AddAddress: openPanesInModal, uniq option to enable/disable all step123 in Modal

This commit is contained in:
2021-09-17 10:50:57 +02:00
parent 782f0bc332
commit 6a60758c0d
10 changed files with 19 additions and 48 deletions

View File

@@ -9,8 +9,8 @@
</button>
<!-- step 1 -->
<teleport to="body" v-if="step1WithModal">
<modal v-if="flag.showPane"
<teleport to="body" v-if="InModal">
modalDialogClass="modal-dialog-scrollable modal-xl"
@close="flag.showPane = false">
@@ -62,7 +62,7 @@
</div>
<!-- step 2 -->
<teleport to="body" v-if="step2WithModal">
<teleport to="body" v-if="InModal">
<modal v-if="flag.editPane"
modalDialogClass="modal-dialog-scrollable modal-xl"
@close="flag.editPane = false">
@@ -147,10 +147,7 @@ export default {
displayText: true
},
title: { create: 'add_an_address_title', edit: 'edit_address' },
bindModal: {
step1: true,
step2: true,
},
openPanesInModal: true,
useDate: {
validFrom: false,
validTo: false
@@ -192,19 +189,9 @@ export default {
}
},
computed: {
step1WithModal() {
return (typeof this.options.bindModal !== 'undefined' && typeof this.options.bindModal.step1 !== 'undefined') ?
this.options.bindModal.step1 : this.default.bindModal.step1;
},
step2WithModal() {
let step2 = (typeof this.options.bindModal !== 'undefined' && typeof this.options.bindModal.step2 !== 'undefined') ?
this.options.bindModal.step2 : this.default.bindModal.step2;
if (step2 === false && this.step1WithModal === true) {
console.log("step2 must open in a Modal");
return true;
}
return step2;
InModal() {
return (typeof this.options.openPanesInModal !== 'undefined') ?
this.options.openPanesInModal : this.default.openPanesInModal;
},
getTextTitle() {
if ( typeof this.options.title !== 'undefined'