Show the list of a related task if it belongs to a different list
This commit is contained in:
parent
2d59b0a1b0
commit
48df1a44e8
3 changed files with 21 additions and 1 deletions
|
@ -48,8 +48,11 @@
|
|||
<span class="title">{{ relationKindTitle(kind, rts.length) }}</span>
|
||||
<div class="tasks noborder">
|
||||
<div class="task" v-for="t in rts" :key="t.id">
|
||||
<router-link :to="{ name: 'task.kanban.detail', params: { id: t.id } }">
|
||||
<router-link :to="{ name: $route.name, params: { id: t.id } }">
|
||||
<span class="tasktext" :class="{ 'done': t.done}">
|
||||
<span v-if="t.listId !== listId" class="different-list" v-tooltip="'This task belongs to a different list.'">
|
||||
{{ $store.getters['namespaces/getListById'](t.listId).title }} >
|
||||
</span>
|
||||
{{t.text}}
|
||||
</span>
|
||||
</router-link>
|
||||
|
|
|
@ -46,6 +46,18 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getListById: state => id => {
|
||||
for (const n in state.namespaces) {
|
||||
for (const l in state.namespaces[n].lists) {
|
||||
if (state.namespaces[n].lists[l].id === id) {
|
||||
return state.namespaces[n].lists[l]
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
loadNamespaces(ctx) {
|
||||
const namespaceService = new NamespaceService()
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
|
||||
.task {
|
||||
padding: .5em;
|
||||
|
||||
.different-list {
|
||||
color: lighten($dark, 50);
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue