Reroute if no voting data and users uses native go back
This commit is contained in:
parent
df91ece612
commit
b924c832d0
|
@ -66,6 +66,12 @@
|
|||
: '/theses/results'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (!sessionStorage.getItem('euromat-answers')) {
|
||||
this.$router.push({ path: this.isGermanLocale ? '/thesen' : '/theses' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -136,8 +136,12 @@
|
|||
const emphasized = JSON.parse(sessionStorage.getItem('euromat-emphasized'))
|
||||
const answers = JSON.parse(sessionStorage.getItem('euromat-answers'))
|
||||
|
||||
if (emphasized) this.emphasized = emphasized
|
||||
if (answers) this.answers = answers
|
||||
if (!emphasized) {
|
||||
this.$router.push({ path: this.isGermanLocale ? '/thesen' : '/theses' })
|
||||
}
|
||||
|
||||
this.emphasized = emphasized
|
||||
this.answers = answers
|
||||
|
||||
this.scoringGrid = getScoringGrid(this.answers, this.emphasized)
|
||||
this.scores = this.getScorePoints(this.scoringGrid)
|
||||
|
|
Loading…
Reference in a new issue