Merge branch 'optimize_address' into 'master'

Address: Optimize address

See merge request Chill-Projet/chill-bundles!170
This commit is contained in:
2021-10-18 09:17:05 +00:00
3 changed files with 7 additions and 6 deletions

View File

@@ -617,7 +617,7 @@ export default {
let newPostcode = this.entity.selected.postcode;
newPostcode = Object.assign(newPostcode, {
'country': {'id': this.entity.selected.country.id },
});
});//TODO why not assign postcodeBody here = Object.assign(postcodeBody, {'origin': 3}); ?
console.log('writeNew postcode is true! newPostcode: ', newPostcode);
newAddress = Object.assign(newAddress, {
'newPostcode': newPostcode
@@ -649,9 +649,7 @@ export default {
if ('newPostcode' in payload) {
let postcodeBody = payload.newPostcode;
if (this.context.target.name === 'person') { // !!! maintain here ?
postcodeBody = Object.assign(postcodeBody, {'origin': 3});
}
postcodeBody = Object.assign(postcodeBody, {'origin': 3});
console.log('juste before post new postcode', postcodeBody);
return postPostalCode(postcodeBody)
.then(postalCode => {