form editor goback improvement (#379)

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala 2024-04-17 20:07:13 +05:30 committed by GitHub
parent dbf5fd5bcc
commit 8776414fac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -10,7 +10,7 @@
v-if="backButton"
href="#"
class="ml-2 flex text-blue font-semibold text-sm"
@click.prevent="$router.back()"
@click.prevent="goBack"
>
<svg
class="w-3 h-3 text-blue mt-1 mr-1"
@ -257,6 +257,13 @@ export default {
},
methods: {
goBack() {
if (this.isEdit) {
useRouter().push({ name: 'forms-slug-show-submissions', params: {slug:this.form.slug} })
} else {
useRouter().push({ name: 'home' })
}
},
displayFormModificationAlert(responseData) {
const alert = useAlert()
if (