From 87b7f6de157b00a9bd8da752b59bc7f9a1d7d2aa Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 17 Jun 2020 22:02:10 +0200 Subject: [PATCH] Fix not sending the user to the view they came from when viewing task details --- src/components/tasks/TaskDetailView.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/tasks/TaskDetailView.vue b/src/components/tasks/TaskDetailView.vue index 1c3cf814f..1d8de57b8 100644 --- a/src/components/tasks/TaskDetailView.vue +++ b/src/components/tasks/TaskDetailView.vue @@ -14,7 +14,7 @@
{{ parent.namespace.title }} > - + {{ parent.list.title }}
@@ -359,6 +359,7 @@ showDeleteModal: false, taskTitle: '', descriptionChanged: false, + listViewName: 'list.list', priorities: priorites, flatPickerConfig: { @@ -392,6 +393,13 @@ this.task = new TaskModel() }, mounted() { + + // Build the list path from the task detail name to send the user to the view they came from. + const parts = this.$route.name.split('.') + if (parts.length > 2 && parts[2] === 'detail') { + this.listViewName = `list.${parts[1]}` + } + this.loadTask() }, computed: {