From b65dacca726b9c91b36cc66748d2a81c41af17c6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 18 Feb 2022 16:24:07 +0100 Subject: [PATCH] bugfix onthefly thirdparty edit form phonenumber was interchanged with telephone. Editing phonenumber was therefore not possible --- .../vuejs/_components/OnTheFly/ThirdParty.vue | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) 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 02515981b..4b012e3f0 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -21,42 +21,42 @@
-
-
- - -
-
- - -
-
-
-

Contact de :

- -
+
+
+ + +
+
+ + +
+
+
+

Contact de :

+ +
@@ -69,16 +69,16 @@
- +
@@ -92,7 +92,7 @@
@@ -134,27 +134,27 @@ export default { size: 'btn-sm' }, title: { - create: 'add_an_address_title', - edit: 'edit_address' + create: 'add_an_address_title', + edit: 'edit_address' } } } } }, computed: { - kind: { - get() { - // note: there are also default to 'institution' set in the "mounted" method - if (this.$data.thirdparty.kind !== undefined) { - return this.$data.thirdparty.kind; - } else { - return 'company'; - } - }, - set(v) { - this.$data.thirdparty.kind = v; - } - }, + kind: { + get() { + // note: there are also default to 'institution' set in the "mounted" method + if (this.$data.thirdparty.kind !== undefined) { + return this.$data.thirdparty.kind; + } else { + return 'company'; + } + }, + set(v) { + this.$data.thirdparty.kind = v; + } + }, context() { let context = { target: { @@ -165,10 +165,10 @@ export default { addressId: null }; if ( !(this.thirdparty.address === undefined || this.thirdparty.address === null) - && this.thirdparty.address.address_id !== null + && this.thirdparty.address.address_id !== null ) { // to complete - context.addressId = this.thirdparty.address.address_id; - context.edit = true; + context.addressId = this.thirdparty.address.address_id; + context.edit = true; } console.log('context', context); //this.context = context; <-- @@ -182,10 +182,10 @@ export default { this.thirdparty.kind = thirdparty.kind; //console.log('get thirdparty', thirdparty); if (this.action !== 'show') { - if (thirdparty.address !== null) { - // bof! we force getInitialAddress because addressId not available when mounted - this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id); - } + if (thirdparty.address !== null) { + // bof! we force getInitialAddress because addressId not available when mounted + this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id); + } } resolve(); })); @@ -193,11 +193,11 @@ export default { submitAddress(payload) { console.log('submitAddress', payload); if (typeof payload.addressId !== 'undefined') { // <-- - this.context.edit = true; - 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.context.edit = true; + 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); + } }, addQuery(query) { this.thirdparty.text = query; @@ -208,7 +208,7 @@ export default { if (this.action !== 'create') { this.loadData(); } else { - this.thirdparty.kind = 'company'; + this.thirdparty.kind = 'company'; } }, }