Fix not sending the user to the view they came from when viewing task details
This commit is contained in:
parent
3248aca041
commit
87b7f6de15
1 changed files with 9 additions and 1 deletions
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<h6 class="subtitle" v-if="parent && parent.namespace && parent.list">
|
<h6 class="subtitle" v-if="parent && parent.namespace && parent.list">
|
||||||
{{ parent.namespace.title }} >
|
{{ 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 }}
|
{{ parent.list.title }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</h6>
|
</h6>
|
||||||
|
@ -359,6 +359,7 @@
|
||||||
showDeleteModal: false,
|
showDeleteModal: false,
|
||||||
taskTitle: '',
|
taskTitle: '',
|
||||||
descriptionChanged: false,
|
descriptionChanged: false,
|
||||||
|
listViewName: 'list.list',
|
||||||
|
|
||||||
priorities: priorites,
|
priorities: priorites,
|
||||||
flatPickerConfig: {
|
flatPickerConfig: {
|
||||||
|
@ -392,6 +393,13 @@
|
||||||
this.task = new TaskModel()
|
this.task = new TaskModel()
|
||||||
},
|
},
|
||||||
mounted() {
|
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()
|
this.loadTask()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in a new issue