diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 6d28db7c9..21b79a1c7 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -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; } } },