From 6ab1391bd898b751c8b1bbbbba7a719ae00d701c Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 16 Sep 2021 21:21:40 +0200 Subject: [PATCH] addAddress: allow other rootcomponent to not precise bindmodal options --- .../public/vuejs/Address/components/AddAddress.vue | 10 +++++----- .../Resources/public/vuejs/Address/index.js | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue index 88e4d8be3..17e1a1a27 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -187,14 +187,14 @@ export default { }, computed: { step1WithModal() { - console.log('options displayText', this.options.button.displayText); - console.log('options bindModal.step1', this.options.bindModal.step1); - console.log('options bindModal.step2', this.options.bindModal.step2); - return (this.options.bindModal !== null && typeof this.options.bindModal.step1 !== 'undefined') ? + //console.log('options displayText', this.options.button.displayText); + //console.log('options bindModal.step1', this.options.bindModal.step1); + //console.log('options bindModal.step2', this.options.bindModal.step2); + return (typeof this.options.bindModal !== 'undefined' && typeof this.options.bindModal.step1 !== 'undefined') ? this.options.bindModal.step1 : this.default.bindModal.step1; }, step2WithModal() { - let step2 = (this.options.bindModal !== null && typeof this.options.bindModal.step2 !== 'undefined') ? + 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) { diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js index a4d933cdd..8da0856de 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js @@ -45,7 +45,9 @@ containers.forEach((container) => { bindModal: { step1: container.dataset.bindModalStep1 !== 'false', //boolean, default: true step2: container.dataset.bindModalStep2 !== 'false' //boolean, default: true - } + }, + // Hide ValidFrom Date fields + //hideDateFrom: true } } }