mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Address: remove forceRedirect option: backUrl option not null is considerated as forceRedirect true
This commit is contained in:
@@ -252,7 +252,6 @@ export default {
|
||||
validFrom: false,
|
||||
validTo: false
|
||||
},
|
||||
forceRedirect: false,
|
||||
hideAddress: false
|
||||
},
|
||||
entity: {
|
||||
@@ -324,6 +323,9 @@ export default {
|
||||
bypassFirstStep() {
|
||||
// exception: passing step0 if new address and pane are not in modal
|
||||
return !this.context.edit && !this.inModal;
|
||||
},
|
||||
forceRedirect() {
|
||||
return this.context.backUrl !== null;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -396,7 +398,7 @@ export default {
|
||||
this.openDatePane();
|
||||
} else {
|
||||
this.applyChanges();
|
||||
if (!this.options.forceRedirect) {
|
||||
if (!this.forceRedirect) {
|
||||
this.openShowPane();
|
||||
}
|
||||
}
|
||||
@@ -425,7 +427,7 @@ export default {
|
||||
*/
|
||||
afterLastPaneAction(params) {
|
||||
this.initForm();
|
||||
if (this.options.forceRedirect === true) {
|
||||
if (this.forceRedirect) {
|
||||
console.log("redirect to backUrl");
|
||||
window.location.assign(this.context.backUrl);
|
||||
} else {
|
||||
|
@@ -86,8 +86,7 @@ export default {
|
||||
this.options.hideAddress : this.defaultz.hideAddress;
|
||||
},
|
||||
forceRedirect() {
|
||||
return (typeof this.options.forceRedirect !== 'undefined') ?
|
||||
this.options.forceRedirect : this.defaultz.forceRedirect;
|
||||
return this.context.backUrl !== null;
|
||||
},
|
||||
noAddressWithStickyActions() {
|
||||
return !this.context.edit && !this.address.id && this.options.stickyActions;
|
||||
|
@@ -52,9 +52,6 @@ containers.forEach((container) => {
|
||||
validTo: container.dataset.useValidTo === 'true' //boolean, default: false
|
||||
},
|
||||
|
||||
/// Force redirection after last step (cfr. backUrl)
|
||||
forceRedirect: container.dataset.forceRedirect === 'true', //boolean, default: false
|
||||
|
||||
/// Don't display show renderbox Address: showPane display only a button
|
||||
hideAddress: container.dataset.hideAddress === 'true' //boolean, default: false
|
||||
}
|
||||
|
Reference in New Issue
Block a user