Skip to content

Commit dc2aa8b

Browse files
author
Hrvoje Vucic
committed
Display published state in Progress page data table
1 parent d791068 commit dc2aa8b

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

client/components/repository/Workflow/Overview/index.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<template #item.dueDate="{ value }">
2222
<overview-due-date v-if="value" :value="value" />
2323
</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>
2428
</v-data-table>
2529
</template>
2630

@@ -31,6 +35,7 @@ import OverviewDueDate from './DueDate';
3135
import OverviewName from './Name';
3236
import OverviewPriority from './Priority';
3337
import OverviewStatus from './Status';
38+
import PublishingBadge from '@/components/repository/common/Sidebar/Badge';
3439
import selectActivity from '@/components/repository/common/selectActivity';
3540
import { workflow } from '@tailor-cms/config';
3641
@@ -41,7 +46,8 @@ export default {
4146
activities: { type: Array, default: () => [] }
4247
},
4348
computed: {
44-
...mapGetters('repository', ['workflow']),
49+
...mapGetters(['isAdmin']),
50+
...mapGetters('repository', ['isRepositoryAdmin', 'workflow']),
4551
headers() {
4652
return [{
4753
text: 'Name',
@@ -61,13 +67,18 @@ export default {
6167
}, {
6268
text: 'Due date',
6369
value: 'dueDate'
70+
}, {
71+
text: 'Publish state',
72+
value: 'publishedAt'
6473
}];
6574
},
6675
items() {
67-
return this.activities.map(({ id, data, status }) => ({
76+
return this.activities.map(({ id, data, publishedAt, status, type }) => ({
6877
...status,
6978
id,
7079
name: data.name,
80+
publishedAt,
81+
type,
7182
status: this.getStatusById(status.status),
7283
priority: workflow.getPriority(status.priority),
7384
class: this.isActivitySelected(id) && 'selected'
@@ -96,6 +107,7 @@ export default {
96107
}
97108
},
98109
components: {
110+
PublishingBadge,
99111
OverviewAssignee,
100112
OverviewDueDate,
101113
OverviewName,

client/components/repository/Workflow/Sidebar/Header.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</div>
1212
<publishing
1313
v-if="isAdmin || isRepositoryAdmin"
14-
:activity="activityConfig"
14+
:activity="{ publishedAt, type }"
1515
:outline-activities="outlineActivities"
1616
hide-publish />
1717
<div class="mt-8">
@@ -73,11 +73,12 @@ export default {
7373
name: { type: String, required: true },
7474
type: { type: String, required: true },
7575
createdAt: { type: String, required: true },
76-
updatedAt: { type: String, default: null }
76+
updatedAt: { type: String, default: null },
77+
publishedAt: { type: String, default: null }
7778
},
7879
computed: {
7980
...mapGetters(['isAdmin']),
80-
...mapGetters('repository', ['structure', 'isRepositoryAdmin']),
81+
...mapGetters('repository', ['structure', 'outlineActivities', 'isRepositoryAdmin']),
8182
activityConfig: vm => vm.$schemaService.getLevel(vm.type),
8283
isUpdated() {
8384
if (!this.updatedAt) return false;

0 commit comments

Comments
 (0)