Skip to content
Snippets Groups Projects
Commit 8545a3c7 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Go back on success instead of redirect to separate route

parent 32c545c2
No related branches found
No related tags found
1 merge request!1594Resolve "Vue: Rework Person Create / Edit"
Pipeline #196493 canceled
......@@ -11,10 +11,6 @@ export default {
components: { FullscreenDialogPage, CancelButton, ObjectForm, SaveButton },
mixins: [objectFormPropsMixin, loadingMixin],
props: {
successRedirectUrl: {
type: [String, Object],
default: null,
},
fallbackUrl: {
type: [Object, String],
default: null,
......@@ -26,7 +22,7 @@ export default {
},
save() {
this.handleLoading(false);
this.$router.push(this.successRedirectUrl);
this.$backOrElse(this.fallbackUrl);
},
},
data() {
......
......@@ -14,7 +14,6 @@ export default {
componentProps() {
return this.$route.query._ui_action === "create" ? {
fallbackUrl: { name: 'core.persons' },
successRedirectUrl: { name: 'core.persons' },
} : {};
},
}
......
......@@ -14,7 +14,6 @@ export default {
componentProps() {
return this.$route.query._ui_action === "edit" ? {
fallbackUrl: { name: "core.personById", params: { id: this.id } },
successRedirectUrl: { name: "core.personById", params: { id: this.id } },
isCreate: false,
id: this.id,
} : {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment