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"
@ -255,12 +260,12 @@
loadBuckets() { loadBuckets() {
// Prevent trying to load buckets if the task popup view is active // Prevent trying to load buckets if the task popup view is active
if(this.$route.name !== 'list.kanban') { if (this.$route.name !== 'list.kanban') {
return return
} }
// Only load buckets if we don't already loaded them // Only load buckets if we don't already loaded them
if(this.loadedListId === this.$route.params.listId) { if (this.loadedListId === this.$route.params.listId) {
return return
} }
@ -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(() => {