Skip to content

Commit

Permalink
Merge pull request #496 from saltykheera/alertbox
Browse files Browse the repository at this point in the history
Fixes #494 alert box bug heuristics unsaved changes
  • Loading branch information
jvJUCA authored Jun 11, 2024
2 parents bf36f2b + d1cd2eb commit 56b142d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/organisms/EditHeuristicsTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</v-tabs>

<div>
<Heuristic v-if="index == 0" :heuristics="object.heuristics" />
<Heuristic v-if="index == 0" :heuristics="object.heuristics" @change="change" />
<OptionsTable v-if="index == 1" :options="object.options" />
<WeightTable v-if="index == 2" :options="object.weight" />
<Settings v-if="index == 3" :options="object.settings" />
Expand Down Expand Up @@ -61,6 +61,10 @@ export default {
tabClicked(index) {
this.$emit('tabClicked', index)
},
change(){
this.$emit('change')
}
},
}
</script>
2 changes: 2 additions & 0 deletions src/views/admin/EditTestView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
:object="object"
:index="index"
@tabClicked="setIndex"
@change="change=true"
/>

<!-- Unmoderated User tests -->
Expand Down Expand Up @@ -297,6 +298,7 @@ export default {
},
validateAll() {
this.submit()
this.change=false
},
preventNav(event) {
if (!this.change) return
Expand Down

0 comments on commit 56b142d

Please sign in to comment.