21
21
<template #item .dueDate =" { value } " >
22
22
<overview-due-date v-if =" value" :value =" value" />
23
23
</template >
24
+ <template v-if =" isAdmin || isRepositoryAdmin " #item .publishedAt =" { item } " >
25
+ <publishing-badge :activity =" item" />
26
+ <span >{{ item.publishedAt ? 'Published' : 'Not published' }}</span >
27
+ </template >
24
28
</v-data-table >
25
29
</template >
26
30
@@ -31,6 +35,7 @@ import OverviewDueDate from './DueDate';
31
35
import OverviewName from ' ./Name' ;
32
36
import OverviewPriority from ' ./Priority' ;
33
37
import OverviewStatus from ' ./Status' ;
38
+ import PublishingBadge from ' @/components/repository/common/Sidebar/Badge' ;
34
39
import selectActivity from ' @/components/repository/common/selectActivity' ;
35
40
import { workflow } from ' @tailor-cms/config' ;
36
41
@@ -41,7 +46,8 @@ export default {
41
46
activities: { type: Array , default : () => [] }
42
47
},
43
48
computed: {
44
- ... mapGetters (' repository' , [' workflow' ]),
49
+ ... mapGetters ([' isAdmin' ]),
50
+ ... mapGetters (' repository' , [' isRepositoryAdmin' , ' workflow' ]),
45
51
headers () {
46
52
return [{
47
53
text: ' Name' ,
@@ -61,13 +67,18 @@ export default {
61
67
}, {
62
68
text: ' Due date' ,
63
69
value: ' dueDate'
70
+ }, {
71
+ text: ' Publish state' ,
72
+ value: ' publishedAt'
64
73
}];
65
74
},
66
75
items () {
67
- return this .activities .map (({ id, data, status }) => ({
76
+ return this .activities .map (({ id, data, publishedAt, status, type }) => ({
68
77
... status,
69
78
id,
70
79
name: data .name ,
80
+ publishedAt,
81
+ type,
71
82
status: this .getStatusById (status .status ),
72
83
priority: workflow .getPriority (status .priority ),
73
84
class: this .isActivitySelected (id) && ' selected'
@@ -96,6 +107,7 @@ export default {
96
107
}
97
108
},
98
109
components: {
110
+ PublishingBadge,
99
111
OverviewAssignee,
100
112
OverviewDueDate,
101
113
OverviewName,
0 commit comments