@@ -31,13 +31,13 @@
-
{{notification.title}}
-
T{{notification.text}}
+
{{props.item.title}}
+
T{{props.item.text}}
@@ -54,14 +54,14 @@
-
{{notification.title}}
-
{{notification.text}}
+
{{props.item.title}}
+
{{props.item.text}}
-
-
+
+
diff --git a/client/components/open/components/RecordOperations.vue b/client/components/open/components/RecordOperations.vue
index 972bff6..f98cd4e 100644
--- a/client/components/open/components/RecordOperations.vue
+++ b/client/components/open/components/RecordOperations.vue
@@ -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)
})
}
}
diff --git a/client/components/open/forms/OpenCompleteForm.vue b/client/components/open/forms/OpenCompleteForm.vue
index 843dddf..2c1e2a9 100644
--- a/client/components/open/forms/OpenCompleteForm.vue
+++ b/client/components/open/forms/OpenCompleteForm.vue
@@ -129,7 +129,8 @@ export default {
setup(props) {
return {
isIframe: useIsIframe(),
- pendingSubmission: pendingSubmission(props.form)
+ pendingSubmission: pendingSubmission(props.form),
+ confetti: useConfetti()
}
},
@@ -214,12 +215,11 @@ export default {
// If enabled display confetti
if (this.form.confetti_on_submission) {
- this.playConfetti()
+ this.confetti.play()
}
}).catch((error) => {
if (error.response && error.response.data && error.response.data.message) {
- console.error(error)
- // this.alertError(error.response.data.message)
+ useAlert().error(error.response.data.message)
}
this.loading = false
onFailure()
diff --git a/client/components/open/forms/components/CopyContent.vue b/client/components/open/forms/components/CopyContent.vue
index 828c64a..95643b3 100644
--- a/client/components/open/forms/components/CopyContent.vue
+++ b/client/components/open/forms/components/CopyContent.vue
@@ -56,9 +56,9 @@ export default {
document.execCommand('copy')
document.body.removeChild(el)
if(this.isDraft){
- this.alertWarning('Copied! But other people won\'t be able to see the form since it\'s currently in draft mode')
+ useAlert().warning('Copied! But other people won\'t be able to see the form since it\'s currently in draft mode')
} else {
- this.alertSuccess('Copied!')
+ useAlert().success('Copied!')
}
}
diff --git a/client/components/open/forms/components/FormEditor.vue b/client/components/open/forms/components/FormEditor.vue
index 9a1a7e5..f8876b5 100644
--- a/client/components/open/forms/components/FormEditor.vue
+++ b/client/components/open/forms/components/FormEditor.vue
@@ -217,9 +217,9 @@ export default {
methods: {
displayFormModificationAlert (responseData) {
if (responseData.form && responseData.form.cleanings && Object.keys(responseData.form.cleanings).length > 0) {
- // this.alertWarning(responseData.message)
+ useAlert().warning(responseData.message)
} else {
- // this.alertSuccess(responseData.message)
+ useAlert().success(responseData.message)
}
},
openCrisp () {
diff --git a/client/components/open/forms/components/form-components/FormCustomization.vue b/client/components/open/forms/components/form-components/FormCustomization.vue
index cc31c59..0962f66 100644
--- a/client/components/open/forms/components/form-components/FormCustomization.vue
+++ b/client/components/open/forms/components/form-components/FormCustomization.vue
@@ -19,7 +19,7 @@
/>
@@ -80,56 +80,25 @@
-
diff --git a/client/components/open/forms/components/form-logic-components/ColumnCondition.vue b/client/components/open/forms/components/form-logic-components/ColumnCondition.vue
index 443b433..62d6b49 100644
--- a/client/components/open/forms/components/form-logic-components/ColumnCondition.vue
+++ b/client/components/open/forms/components/form-logic-components/ColumnCondition.vue
@@ -6,20 +6,20 @@