Fix getting back to the kanban board after closing a task popup
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-01-10 22:07:33 +01:00
parent 3e71b76c25
commit d7112c99c7
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 15 additions and 2 deletions

View File

@ -13,16 +13,29 @@
<script>
import TaskDetailView from './TaskDetailView'
import router from '../../router'
export default {
name: 'TaskDetailViewModal',
components: {
TaskDetailView,
},
data() {
return {
lastRoute: null,
}
},
beforeRouteEnter(to, from, next) {
next(vm => {
vm.lastRoute = from
})
},
methods: {
close() {
router.back()
if (this.lastRoute === null) {
this.$router.back()
} else {
this.$router.push(this.lastRoute)
}
},
},
}