Nuxt Migration notifications (#265)

* Nuxt Migration notifications

* @input to @update:model-value

* change field type fixes

* @update:model-value

* Enable form-block-logic-editor

* vue-confetti migration

* PR request changes

* useAlert in setup
This commit is contained in:
formsdev
2023-12-31 17:09:01 +05:30
committed by GitHub
parent b4365b5e30
commit 6fd2985ff5
38 changed files with 586 additions and 1390 deletions

View File

@@ -34,6 +34,11 @@ export default {
default: () => {}
}
},
setup () {
return {
useAlert: useAlert()
}
},
data () {
return {
}
@@ -44,18 +49,18 @@ export default {
},
methods: {
onDeleteClick () {
this.alertConfirm('Do you really want to delete this record?', this.deleteRecord)
this.useAlert.confirm('Do you really want to delete this record?', this.deleteRecord)
},
async deleteRecord () {
axios.delete('/api/open/forms/' + this.form.id + '/records/' + this.rowid + '/delete').then(async (response) => {
if (response.data.type === 'success') {
this.$emit('deleted')
this.alertSuccess(response.data.message)
this.useAlert.success(response.data.message)
} else {
this.alertError('Something went wrong!')
this.useAlert.error('Something went wrong!')
}
}).catch((error) => {
this.alertError(error.response.data.message)
this.useAlert.error(error.response.data.message)
})
}
}