mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Issue316 addresses search by postal code
This commit is contained in:
@@ -556,8 +556,8 @@ export default {
|
||||
this.entity.selected.address.distribution = this.context.edit ? this.entity.address.distribution: null;
|
||||
this.entity.selected.address.extra = this.context.edit ? this.entity.address.extra: null;
|
||||
|
||||
this.entity.selected.writeNew.address = this.context.edit;
|
||||
this.entity.selected.writeNew.postcode = this.context.edit;
|
||||
this.entity.selected.writeNew.address = this.context.edit && this.entity.address.addressReference === null && this.entity.address.street.length > 0
|
||||
this.entity.selected.writeNew.postcode = false // NB: this used to be this.context.edit, but think it was erroneous;
|
||||
console.log('!! just set writeNew.postcode to', this.entity.selected.writeNew.postcode);
|
||||
},
|
||||
|
||||
@@ -569,7 +569,6 @@ export default {
|
||||
applyChanges()
|
||||
{
|
||||
console.log('apply changes');
|
||||
|
||||
let newAddress = {
|
||||
'isNoAddress': this.entity.selected.isNoAddress,
|
||||
'street': this.entity.selected.isNoAddress ? '' : this.entity.selected.address.street,
|
||||
@@ -633,7 +632,6 @@ export default {
|
||||
if (!this.context.edit) {
|
||||
this.addNewAddress(newAddress)
|
||||
.then(payload => this.addressChangedCallback(payload));
|
||||
|
||||
} else {
|
||||
this.updateAddress({
|
||||
addressId: this.context.addressId,
|
||||
@@ -697,8 +695,7 @@ export default {
|
||||
* Async PATCH transactions,
|
||||
* then update existing address with backend datas when promise is resolved
|
||||
*/
|
||||
updateAddress(payload)
|
||||
{
|
||||
updateAddress(payload) {
|
||||
this.flag.loading = true;
|
||||
|
||||
// TODO change the condition because it writes new postal code in edit mode now: !writeNewPostalCode
|
||||
|
Reference in New Issue
Block a user