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 71c33ef84..272a17bd9 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -7,6 +7,7 @@ v-bind:defaultz="this.defaultz" v-bind:entity="this.entity" v-bind:flag="this.flag" + v-bind:useDatePane="this.useDatePane" @openEditPane="openEditPane" ref="showAddress"> @@ -334,11 +335,6 @@ export default { }, mounted() { - //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); - //console.log('options useDate.validFrom', this.options.useDate.validFrom); - //console.log('options useDate.validTo', this.options.useDate.validTo); console.log('useDatePane', this.useDatePane); console.log('Mounted now !'); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue index 405ba0cc7..a4e5c571d 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue @@ -21,7 +21,7 @@

- + +
+
+ + {{ $t('validFrom') }}: {{ $d(address.validFrom.date) }} + +
+
+ + {{ $t('validTo') }}: {{ $d(address.validTo.date) }} + +
+
+ @@ -67,6 +80,10 @@ export default { isMultiline: { default: true, type: Boolean + }, + useDatePane: { + default: false, + type: Boolean } }, computed: { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php index 9e3b5c11b..2b39c07c3 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php @@ -13,6 +13,7 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface public function normalize($address, string $format = null, array $context = []) { + /** @var Address $address */ $data['address_id'] = $address->getId(); $data['text'] = $address->isNoAddress() ? '' : $address->getStreetNumber().', '.$address->getStreet(); $data['street'] = $address->getStreet(); @@ -30,6 +31,8 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface $data['buildingName'] = $address->getBuildingName(); $data['distribution'] = $address->getDistribution(); $data['extra'] = $address->getExtra(); + $data['validFrom'] = $address->getValidFrom(); + $data['validTo'] = $address->getValidTo(); return $data; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig index 5f75a103a..c88959340 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig @@ -30,9 +30,10 @@ {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, stickyActions: true, - useValidFrom: true, useValidTo: true, + useValidFrom: true, } %} {# + useValidTo: true, backUrl: path('chill_person_address_list', { 'person_id': person.id }), openPanesInModal: false, #}