Fix navigating back to list view after deleting a task
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-04-30 12:49:42 +02:00
parent 120d5a8c19
commit b043369245
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
6 changed files with 8 additions and 20 deletions

View File

@ -141,7 +141,7 @@
<div class="more-container" :key="n.id + 'child'">
<ul class="menu-list can-be-hidden" >
<li v-for="l in n.lists" :key="l.id">
<router-link :to="{ name: 'showList', params: { listId: l.id} }">
<router-link :to="{ name: 'list.index', params: { listId: l.id} }">
<span class="name">
<span class="color-bubble" v-if="l.hexColor !== ''" :style="{ backgroundColor: l.hexColor }"></span>
{{l.title}}

View File

@ -70,7 +70,7 @@
.then(response => {
this.$parent.loadNamespaces()
this.success({message: 'The list was successfully created.'}, this)
router.push({name: 'showList', params: {listId: response.id}})
router.push({name: 'list.index', params: {listId: response.id}})
})
.catch(e => {
this.error(e, this)

View File

@ -28,7 +28,7 @@
auth.linkShareAuth(this.$route.params.share)
.then((r) => {
this.loading = false
router.push({name: 'showList', params: {listId: r.listId}})
router.push({name: 'list.index', params: {listId: r.listId}})
})
.catch(e => {
this.error(e, this)

View File

@ -12,7 +12,7 @@
<!-- Commented out because it is a) not working and b) not working -->
<!-- <h6 class="subtitle">-->
<!-- {{ namespace.name }} >-->
<!-- <router-link :to="{ name: 'showList', params: { id: list.id } }">-->
<!-- <router-link :to="{ name: 'list.index', params: { id: list.id } }">-->
<!-- {{ list.title }}-->
<!-- </router-link>-->
<!-- </h6>-->
@ -306,7 +306,6 @@
import TaskService from '../../services/task'
import TaskModel from '../../models/task'
import relationKinds from '../../models/relationKinds'
import ListModel from '../../models/list'
import NamespaceModel from '../../models/namespace'
import priorites from '../../models/priorities'
@ -323,7 +322,7 @@
import Reminders from './reusable/reminders'
import Comments from './reusable/comments'
import router from '../../router'
import ListSearch from "./reusable/listSearch";
import ListSearch from './reusable/listSearch'
export default {
name: 'TaskDetailView',
@ -347,7 +346,6 @@
task: TaskModel,
relationKinds: relationKinds,
list: ListModel,
namespace: NamespaceModel,
showDeleteModal: false,
taskTitle: '',
@ -484,7 +482,7 @@
this.taskService.delete(this.task)
.then(() => {
this.success({message: 'The task been deleted successfully.'}, this)
router.push({name: 'showList', params: {listId: this.list.id}})
router.back()
})
.catch(e => {
this.error(e, this)

View File

@ -5,7 +5,7 @@
<a @click="close()" class="close">
<icon icon="times"/>
</a>
<task-detail-view :parent-list="list" :parent-namespace="namespace"/>
<task-detail-view/>
</div>
</div>
</div>
@ -17,12 +17,6 @@
export default {
name: 'TaskDetailViewModal',
data() {
return {
list: null,
namespace: null,
}
},
components: {
TaskDetailView,
},
@ -33,7 +27,3 @@
},
}
</script>
<style scoped>
</style>

View File

@ -92,7 +92,7 @@ export default new Router({
},
{
path: '/lists/:listId',
name: 'showList',
name: 'list.index',
component: ShowListComponent,
children: [
{