File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 2020 >
2121 {{ item.name }}
2222 </td >
23+ <td
24+ class =" text-center"
25+ data-test =" tag-created-at"
26+ >
27+ {{ formatShortDateTime(item.created_at) }}
28+ </td >
2329 <td class =" text-center" >
2430 <v-menu
2531 location =" bottom"
@@ -92,12 +98,17 @@ import TagEdit from "./TagEdit.vue";
9298import handleError from " @/utils/handleError" ;
9399import useTagsStore from " @/store/modules/tags" ;
94100import useSnackbar from " @/helpers/snackbar" ;
101+ import { formatShortDateTime } from " @/utils/date" ;
95102
96103const headers = ref ([
97104 {
98105 text: " Name" ,
99106 value: " name" ,
100107 },
108+ {
109+ text: " Created At" ,
110+ value: " created_at" ,
111+ },
101112 {
102113 text: " Actions" ,
103114 value: " actions" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,20 @@ import { router } from "@/router";
88import { tagsApi } from "@/api/http" ;
99import { SnackbarPlugin } from "@/plugins/snackbar" ;
1010
11- const tags = [ { name : "123x" } , { name : "newtag" } ] ;
11+ const tags = [
12+ {
13+ tenant_id : "fake-tenant-data" ,
14+ name : "123x" ,
15+ created_at : "2025-01-01T10:00:00Z" ,
16+ updated_at : "2025-01-01T10:00:00Z" ,
17+ } ,
18+ {
19+ tenant_id : "fake-tenant-data" ,
20+ name : "newtag" ,
21+ created_at : "2025-01-02T12:00:00Z" ,
22+ updated_at : "2025-01-02T12:00:00Z" ,
23+ } ,
24+ ] ;
1225
1326describe ( "Tag List" , ( ) => {
1427 const vuetify = createVuetify ( ) ;
Original file line number Diff line number Diff line change @@ -9,12 +9,14 @@ exports[`Tag List > Renders the component 1`] = `
99 <thead class = " bg-v-theme-background" >
1010 <tr >
1111 <th class = " text-center" data-test = " th-name" ><span data-test = " th-label" >Name</span ></th >
12+ <th class = " text-center" data-test = " th-created_at" ><span data-test = " th-label" >Created At</span ></th >
1213 <th class = " text-center" data-test = " th-actions" ><span data-test = " th-label" >Actions</span ></th >
1314 </tr >
1415 </thead >
1516 <tbody data-test = " tbody-has-items" >
1617 <tr >
1718 <td class = " text-center" data-test = " tag-name" >123x</td >
19+ <td class = " text-center" data-test = " tag-created-at" >January 1, 2025 10:00 AM</td >
1820 <td class = " text-center" ><button type = " button" class = " v-btn v-btn--icon v-theme--light v-btn--density-comfortable v-btn--size-default v-btn--variant-plain border rounded bg-v-theme-background" aria-haspopup = " menu" aria-expanded = " false" aria-controls = " v-menu-v-7" aria-owns = " v-menu-v-7" data-test = " tag-list-actions" ><span class = " v-btn__overlay" ></span ><span class = " v-btn__underlay" ></span >
1921 <!----><span class = " v-btn__content" data-no-activator = " " ><i class = " mdi-format-list-bulleted mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden = " true" ></i ></span >
2022 <!---->
@@ -26,6 +28,7 @@ exports[`Tag List > Renders the component 1`] = `
2628 </tr >
2729 <tr >
2830 <td class = " text-center" data-test = " tag-name" >newtag</td >
31+ <td class = " text-center" data-test = " tag-created-at" >January 2, 2025 12:00 PM</td >
2932 <td class = " text-center" ><button type = " button" class = " v-btn v-btn--icon v-theme--light v-btn--density-comfortable v-btn--size-default v-btn--variant-plain border rounded bg-v-theme-background" aria-haspopup = " menu" aria-expanded = " false" aria-controls = " v-menu-v-11" aria-owns = " v-menu-v-11" data-test = " tag-list-actions" ><span class = " v-btn__overlay" ></span ><span class = " v-btn__underlay" ></span >
3033 <!----><span class = " v-btn__content" data-no-activator = " " ><i class = " mdi-format-list-bulleted mdi v-icon notranslate v-theme--light v-icon--size-default" aria-hidden = " true" ></i ></span >
3134 <!---->
You can’t perform that action at this time.
0 commit comments