Show created/updated by for tasks

This commit is contained in:
kolaente 2020-10-25 12:25:08 +01:00
parent 471301d1a7
commit d9fe433619
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 22 additions and 2 deletions

View file

@ -185,6 +185,12 @@
justify-content: left; justify-content: left;
} }
} }
.created {
font-size: .75rem;
color: $grey;
text-align: right;
}
} }
.task-view-container { .task-view-container {

View file

@ -343,10 +343,18 @@
<span class="icon is-small"><icon icon="trash-alt"/></span> <span class="icon is-small"><icon icon="trash-alt"/></span>
Delete task Delete task
</a> </a>
<!-- Created / Updated [by] -->
<p class="created">
Created <span v-tooltip="formatDate(task.created)">{{ formatDateSince(task.created) }}</span> by {{ task.createdBy.username }}
<template v-if="+new Date(task.created) !== +new Date(task.updated)">
<br/>
<!-- Computed properties to show the actual date every time it gets updated -->
Updated <span v-tooltip="updatedFormatted">{{ updatedSince }}</span>
</template>
</p>
</div> </div>
</div> </div>
<!-- Created / Updated [by] -->
</div> </div>
<modal <modal
@ -497,6 +505,12 @@ export default {
canWrite() { canWrite() {
return this.task && this.task.maxRight && this.task.maxRight > rights.READ return this.task && this.task.maxRight && this.task.maxRight > rights.READ
}, },
updatedSince() {
return this.formatDateSince(this.task.updated)
},
updatedFormatted() {
return this.formatDate(this.task.updated)
},
}, },
methods: { methods: {
loadTask() { loadTask() {