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 ad11fc02f..a37cd4ee3 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -306,7 +306,7 @@ export default { hasSuggestions() { // TODO //return addressSuggestions.length > 0 - return true; + return false; }, displaySuggestions() { return !this.context.edit && this.hasSuggestions; @@ -325,7 +325,7 @@ export default { return !this.context.edit && !this.inModal; }, forceRedirect() { - return this.context.backUrl !== null; + return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined')); } }, mounted() { @@ -339,7 +339,7 @@ export default { console.log('Mounted now !'); if (this.context.edit) { - console.log('getInitialAddress'); + console.log('getInitialAddress', this.context.addressId); this.getInitialAddress(this.context.addressId); } this.openShowPane(); @@ -380,15 +380,8 @@ export default { console.log('displaySuggestions'); this.openSuggestPane(); } else { - if (this.flag.suggestPane === true) { - this.closeSuggestPane(); - } - if (this.flag.showPane === true) { - this.closeShowPane(); - } - console.log('step2: open the Edit panel'); this.initForm(); - this.getCountries(); // will open edit pane when resolve promise + this.getCountries(); // will open editPane when resolve promise } }, closeEditPane() { @@ -463,6 +456,13 @@ export default { fetchCountries().then( countries => new Promise((resolve, reject) => { this.entity.loaded.countries = countries.results; + if (this.flag.suggestPane === true) { + this.closeSuggestPane(); + } + if (this.flag.showPane === true) { + this.closeShowPane(); + } + console.log('step2: open the Edit panel'); this.flag.editPane = true; this.flag.loading = false; resolve() 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 7a270eafa..87cb65549 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/DatePane.vue @@ -1,4 +1,4 @@ -