Open popup detail view when opening from task overview

This commit is contained in:
kolaente 2020-05-09 19:21:17 +02:00
parent e74c72f486
commit a822a07c89
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 6 additions and 2 deletions

View file

@ -58,7 +58,7 @@
<div class="column">
<div class="tasks" v-if="tasks && tasks.length > 0" :class="{'short': isTaskEdit}">
<div class="task" v-for="t in tasks" :key="t.id">
<single-task-in-list :the-task="t" @taskUpdated="updateTasks"/>
<single-task-in-list :the-task="t" @taskUpdated="updateTasks" task-detail-route="task.detail"/>
<div @click="editTask(t.id)" class="icon settings" v-if="!list.isArchived">
<icon icon="pencil-alt"/>
</div>

View file

@ -1,7 +1,7 @@
<template>
<span>
<fancycheckbox v-model="task.done" @change="markAsDone" :disabled="isArchived"/>
<router-link :to="{ name: 'task.detail', params: { id: task.id } }" class="tasktext" :class="{ 'done': task.done}">
<router-link :to="{ name: taskDetailRoute, params: { id: task.id } }" class="tasktext" :class="{ 'done': task.done}">
<!-- Show any parent tasks to make it clear this task is a sub task of something -->
<span class="parent-tasks" v-if="typeof task.relatedTasks.parenttask !== 'undefined'">
<template v-for="(pt, i) in task.relatedTasks.parenttask">
@ -58,6 +58,10 @@
type: Boolean,
default: false,
},
taskDetailRoute: {
type: String,
default: 'task.list.detail'
}
},
watch: {
theTask(newVal) {