Skip to content

Commit

Permalink
Merge pull request #519 from saltykheera/suiiar
Browse files Browse the repository at this point in the history
Fixes [🐞 BUG]: Issues in creating Template #518 template form validation
  • Loading branch information
jvJUCA authored Jun 26, 2024
2 parents 16adb91 + 98a80ee commit a2d71e7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/views/admin/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
>
<v-icon left>
mdi-trash-can-outline
</v-icon> {{ $t('pages.settings.deleteTest') }}
</v-icon>
{{ $t('pages.settings.deleteTest') }}
</v-btn>
</v-row>
</v-card>
Expand Down Expand Up @@ -237,7 +238,7 @@ export default {
if (this.test)
return `Are you sure you want to delete your test "${this.test.testTitle}"? This action can't be undone.`
return 'Are you sure you want to delete this test? This action can\'t be undone' //in case object isnt loaded
return "Are you sure you want to delete this test? This action can't be undone" //in case object isnt loaded
},
hasTemplate() {
if (this.object)
Expand Down Expand Up @@ -430,15 +431,18 @@ export default {
header: tempHeader,
body: tempBody,
})
await this.$store.dispatch('createTemplate', template)
this.closeDialog()
if (this.template.templateTitle.trim() !== '') {
await this.$store.dispatch('createTemplate', template)
this.closeDialog()
}else{
this.$refs.tempform.validate()
}
},
closeDialog() {
this.tempDialog = false
this.$refs.tempform.resetValidation()
this.templateTitle = ''
this.templateDescription = ''
this.template.templateTitle = ''
this.template.templateDescription = ''
},
setLeavingAlert() {
this.$store.commit('SET_DIALOG_LEAVE', true)
Expand Down

0 comments on commit a2d71e7

Please sign in to comment.