CottageCabbage / vu-dooit

Task Manager application for Web, Desktop and Mobile. Still in development
https://CottageCabbage.github.io/vu-dooit
3 stars 1 forks source link

You have to be in a /TodoList/ to open a TodoList #9

Closed CottageCabbage closed 2 years ago

CottageCabbage commented 2 years ago

Title not completely correct. You have to be in a /#/TodoList/ route for the new route's details to load. Coming from /Profile, for example, gives you a blank page, and you have to move to another Project so things work. Then go back to whatever project you wanted to use.

No relevant links, but may be related to these:

methods: {
  getProjectInfo () {
    if (this.$route.params.projectID !== null) {
      this.title = this.$route.params.projectID
    }
    if (this.$route.params.tasks !== null) {
      this.tasks = JSON.parse(this.$route.params.tasks)
    }
  }
},
watch: {
  '$route' (to, from) {
    if (to.name === 'TodoList' && to.params.projectID !== null) {
      return this.getProjectInfo()
    }
  }
}