fix: add kind to mapped related tasks

This commit is contained in:
kolaente 2021-11-02 20:18:09 +01:00
parent 5ae4809a44
commit edc74fd598
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@
</template>
</transition-group>
<div :key="kind" class="related-tasks" v-for="(rts, kind ) in mappedRelatedTasks">
<div :key="rts.kind" class="related-tasks" v-for="rts in mappedRelatedTasks">
<span class="title">{{ rts.title }}</span>
<div class="tasks noborder">
<div :key="t.id" class="task" v-for="t in rts.tasks">
@ -104,7 +104,7 @@
</span>
</router-link>
<a
@click="() => {showDeleteModal = true; relationToDelete = {relationKind: kind, otherTaskId: t.id}}"
@click="() => {showDeleteModal = true; relationToDelete = {relationKind: rts.kind, otherTaskId: t.id}}"
class="remove"
v-if="editEnabled">
<icon icon="trash-alt"/>
@ -204,6 +204,7 @@ export default {
return Object.keys(this.relatedTasks).map(kind => ({
title: this.$tc(`task.relation.kinds.${kind}`, this.relatedTasks[kind].length),
tasks: this.mapRelatedTasks(this.relatedTasks[kind]),
kind,
}))
},
mappedFoundTasks() {