Show task index instead of id on kanban

This commit is contained in:
kolaente 2020-06-11 23:35:50 +02:00
parent 6a00c31c3d
commit e2fb50c39b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -57,7 +57,12 @@
</span> </span>
<span class="task-id"> <span class="task-id">
<span class="is-done" v-if="task.done">Done</span> <span class="is-done" v-if="task.done">Done</span>
#{{ task.id }} <template v-if="task.identifier === ''">
#{{ task.index }}
</template>
<template v-else>
#{{ task.index }}
</template>
</span> </span>
<span <span
v-if="task.dueDate > 0" v-if="task.dueDate > 0"
@ -363,7 +368,11 @@
const bi = bucketIndex() const bi = bucketIndex()
const task = new TaskModel({title: this.newTaskText, bucketId: this.buckets[bi].id, listId: this.$route.params.listId}) const task = new TaskModel({
title: this.newTaskText,
bucketId: this.buckets[bi].id,
listId: this.$route.params.listId
})
this.taskService.create(task) this.taskService.create(task)
.then(r => { .then(r => {
@ -379,7 +388,10 @@
return return
} }
const newBucket = new BucketModel({title: this.newBucketTitle, listId: parseInt(this.$route.params.listId)}) const newBucket = new BucketModel({
title: this.newBucketTitle,
listId: parseInt(this.$route.params.listId)
})
this.$store.dispatch('kanban/createBucket', newBucket) this.$store.dispatch('kanban/createBucket', newBucket)
.then(() => { .then(() => {