Fix not sending the user to the view they came from when viewing task details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-06-17 22:02:10 +02:00
parent 3248aca041
commit 87b7f6de15
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 1 deletions

View File

@ -14,7 +14,7 @@
</div>
<h6 class="subtitle" v-if="parent && parent.namespace && parent.list">
{{ parent.namespace.title }} >
<router-link :to="{ name: 'list.list', params: { listId: parent.list.id } }">
<router-link :to="{ name: listViewName, params: { listId: parent.list.id } }">
{{ parent.list.title }}
</router-link>
</h6>
@ -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: {