Show done at in task detail view
This commit is contained in:
parent
25bd9d17f9
commit
3f2056bbf9
3 changed files with 13 additions and 0 deletions
|
@ -69,6 +69,7 @@ export default class TaskModel extends AbstractModel {
|
|||
|
||||
this.created = new Date(this.created)
|
||||
this.updated = new Date(this.updated)
|
||||
this.doneAt = this.doneAt ? new Date(this.doneAt) : null
|
||||
}
|
||||
|
||||
defaults() {
|
||||
|
@ -77,6 +78,7 @@ export default class TaskModel extends AbstractModel {
|
|||
title: '',
|
||||
description: '',
|
||||
done: false,
|
||||
doneAt: null,
|
||||
priority: 0,
|
||||
labels: [],
|
||||
assignees: [],
|
||||
|
|
|
@ -39,6 +39,7 @@ export default class TaskService extends AbstractService {
|
|||
model.endDate = !model.endDate ? null : formatISO(new Date(model.endDate))
|
||||
model.created = formatISO(new Date(model.created))
|
||||
model.updated = formatISO(new Date(model.updated))
|
||||
model.doneAt = formatISO(new Date(model.doneAt))
|
||||
|
||||
// remove all nulls, these would create empty reminders
|
||||
for (const index in model.reminderDates) {
|
||||
|
|
|
@ -317,6 +317,10 @@
|
|||
<!-- Computed properties to show the actual date every time it gets updated -->
|
||||
Updated <span v-tooltip="updatedFormatted">{{ updatedSince }}</span>
|
||||
</template>
|
||||
<template v-if="task.done">
|
||||
<br/>
|
||||
Done <span v-tooltip="doneFormatted">{{ doneSince }}</span>
|
||||
</template>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -462,6 +466,12 @@ export default {
|
|||
updatedFormatted() {
|
||||
return this.formatDate(this.task.updated)
|
||||
},
|
||||
doneSince() {
|
||||
return this.formatDateSince(this.task.doneAt)
|
||||
},
|
||||
doneFormatted() {
|
||||
return this.formatDate(this.task.doneAt)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
loadTask() {
|
||||
|
|
Loading…
Reference in a new issue