otf: comments to remember things to improve

This commit is contained in:
Mathieu Jaumotte 2021-09-30 21:22:28 +02:00
parent 4c9d352c46
commit 4047399b76

View File

@ -68,7 +68,7 @@ export default {
},
data() {
return {
//context: {},
//context: {}, <--
thirdparty: {
type: 'thirdparty'
},
@ -104,7 +104,7 @@ export default {
context.edit = true;
}
console.log('context', context);
//this.context = context;
//this.context = context; <--
return context;
},
},
@ -114,6 +114,7 @@ export default {
this.thirdparty = thirdparty;
console.log('get thirdparty', thirdparty);
if (this.action !== 'show') {
// bof! we force getInitialAddress because addressId not available when mounted
this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id);
}
resolve();
@ -121,11 +122,11 @@ export default {
},
submitAddress(payload) {
console.log('submitAddress', payload);
if (typeof payload.addressId !== 'undefined') {
if (typeof payload.addressId !== 'undefined') { // <--
this.context.edit = true;
this.context.addressId = payload.addressId;
this.context.addressId = payload.addressId; // bof! use legacy and not legacy in payload
this.thirdparty.address = payload.address; // <--
console.log('switch address to edit mode', this.context);
this.thirdparty.address = payload.address;
}
}
},