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