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 963101472..71c33ef84 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -280,7 +280,7 @@ export default { }, valid: { from: new Date(), - to: new Date() + to: null } }, addressMap: { @@ -609,8 +609,10 @@ export default { if (this.context.target.name === 'person') { // !!! maintain here ? postcodeBody = Object.assign(postcodeBody, {'origin': 3}); } + console.log('juste before post new postcode', postcodeBody); return postPostalCode(postcodeBody) .then(postalCode => { + console.log('new postcode created', postalCode.id); payload.postcode = {'id': postalCode.id }; return this.postNewAddress(payload); }); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue index 87cb65549..d86144358 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue @@ -11,27 +11,29 @@ -
-

{{ $t(getValidFromDateText) }}

-
- - +
+
+

{{ $t(getValidFromDateText) }}

+
+ + +
-
-
-

{{ $t(getValidToDateText) }}

-
- - +
+

{{ $t(getValidToDateText) }}

+
+ + +
@@ -88,7 +90,7 @@ export default { this.entity.selected.valid.to = ISOToDate(value); }, get() { - return dateToISO(this.entity.selected.valid.from); + return dateToISO(this.entity.selected.valid.to); } }, getValidFromDateText() { diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig index da2bfe474..5f75a103a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig @@ -30,11 +30,11 @@ {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, stickyActions: true, + useValidFrom: true, useValidTo: true, } %} {# backUrl: path('chill_person_address_list', { 'person_id': person.id }), openPanesInModal: false, - useValidFrom: true, #} {% endblock %}