mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
otf: comments to remember things to improve
This commit is contained in:
parent
4c9d352c46
commit
4047399b76
@ -68,7 +68,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//context: {},
|
//context: {}, <--
|
||||||
thirdparty: {
|
thirdparty: {
|
||||||
type: 'thirdparty'
|
type: 'thirdparty'
|
||||||
},
|
},
|
||||||
@ -104,7 +104,7 @@ export default {
|
|||||||
context.edit = true;
|
context.edit = true;
|
||||||
}
|
}
|
||||||
console.log('context', context);
|
console.log('context', context);
|
||||||
//this.context = context;
|
//this.context = context; <--
|
||||||
return context;
|
return context;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -114,6 +114,7 @@ export default {
|
|||||||
this.thirdparty = thirdparty;
|
this.thirdparty = thirdparty;
|
||||||
console.log('get thirdparty', thirdparty);
|
console.log('get thirdparty', thirdparty);
|
||||||
if (this.action !== 'show') {
|
if (this.action !== 'show') {
|
||||||
|
// bof! we force getInitialAddress because addressId not available when mounted
|
||||||
this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id);
|
this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id);
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
@ -121,11 +122,11 @@ export default {
|
|||||||
},
|
},
|
||||||
submitAddress(payload) {
|
submitAddress(payload) {
|
||||||
console.log('submitAddress', payload);
|
console.log('submitAddress', payload);
|
||||||
if (typeof payload.addressId !== 'undefined') {
|
if (typeof payload.addressId !== 'undefined') { // <--
|
||||||
this.context.edit = true;
|
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);
|
console.log('switch address to edit mode', this.context);
|
||||||
this.thirdparty.address = payload.address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user