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

View File

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