Update dirty forms editor (#119)

This commit is contained in:
Chirag Chhatrala
2023-05-21 23:04:47 +05:30
committed by GitHub
parent d2f4c1f358
commit 5087724847
4 changed files with 76 additions and 3 deletions

View File

@@ -98,7 +98,7 @@
<p class="text-gray-600 text-sm">{{notification.text}}</p>
<div class="w-full flex gap-2 mt-1">
<v-button color="blue" size="small" @click.prevent="notification.success();close(notification.id)">Yes</v-button>
<v-button color="transparent" size="small" @click.prevent="notification.failure();close(notification.id)">No</v-button>
<v-button color="gray" shade="light" size="small" @click.prevent="notification.failure();close(notification.id)">No</v-button>
</div>
</div>
</div>

View File

@@ -189,6 +189,7 @@ export default {
this.form.put('/api/open/forms/{id}/'.replace('{id}', this.form.id)).then((response) => {
const data = response.data
this.$store.commit('open/forms/addOrUpdate', data.form)
this.$emit('on-save')
this.$router.push({name: 'forms.show', params: {slug: this.form.slug}})
this.$logEvent('form_saved', {form_id: this.form.id, form_slug: this.form.slug})
this.displayFormModificationAlert(data)
@@ -209,6 +210,7 @@ export default {
this.updateFormLoading = true
this.form.post('/api/open/forms').then((response) => {
this.$store.commit('open/forms/addOrUpdate', response.data.form)
this.$emit('on-save')
this.createdFormId = response.data.form.id
this.$logEvent('form_created', {form_id: response.data.form.id, form_slug: response.data.form.slug})