Skip to content

Commit

Permalink
fix: just confirm dialog if test started
Browse files Browse the repository at this point in the history
  • Loading branch information
jvJUCA committed May 7, 2024
1 parent 4afca12 commit e0db885
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/views/public/ModeratedTestView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,14 @@ export default {
taskIndex() {
this.$refs.rightView.scrollTop = 0
},
start() {
if (this.start) {
window.onbeforeunload = function() {
return 'handle your events or msgs here'
}
}
// save first to exit
},
async user() {
if (this.user) {
this.noExistUser = false
Expand Down Expand Up @@ -990,10 +998,6 @@ export default {
this.$toast.info('Use a session your session link to the test')
this.$router.push('/managerview/' + this.test.id)
}
// save first to exit
window.onbeforeunload = function() {
return 'handle your events or msgs here'
}
await this.mappingSteps()
this.consentCompleted = this.currentUserTestAnswer.consentCompleted
const ref = doc(db, 'tests/', this.roomTestId)
Expand Down Expand Up @@ -1027,6 +1031,7 @@ export default {
async beforeDestroy() {
if (this.isAdmin) {
this.disconnect()
window.onbeforeunload = null
await this.$store.dispatch('hangUp', this.roomTestId)
}
},
Expand Down

0 comments on commit e0db885

Please sign in to comment.