From 506118b3f14bb70275ae8a99cc0157b360e25f1d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Mar 2022 16:10:02 +0100 Subject: [PATCH] edit and create of thirdparty pers physique is possible, but current civility and profession don't display yet in edit form --- .../public/vuejs/OnTheFly/components/OnTheFly.vue | 6 ++---- .../public/vuejs/_components/OnTheFly/ThirdParty.vue | 12 ++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index a04c68eaf..437b8be99 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -223,13 +223,11 @@ export default { default: if (typeof this.type === 'undefined') { // action=create or addContact - console.log('will rewrite data'); + // console.log('will rewrite data'); if (this.action === 'addContact') { type = 'thirdparty' data = this.$refs.castThirdparty.$data.thirdparty; - console.log('data original', data); - data.civility = data.civility ? {type: 'chill_main_civility', id: data.civility.id} : null; - data.profession = data.profession ? {type: 'third_party_profession', id: data.profession.id} : null; + // console.log('data original', data); data.parent = {type: "thirdparty", id: this.parent.id}; } else { type = this.$refs.castNew.radioType; 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 6086d75c3..c5e2ef378 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -70,14 +70,14 @@
@@ -264,10 +264,10 @@ export default { this.thirdparty.name = query; }, }, - mounted() { - let dependencies = []; - dependencies.push(this.loadProfessions()); - dependencies.push(this.loadCivilities()); + mounted() { + let dependencies = []; + dependencies.push(this.loadProfessions()); + dependencies.push(this.loadCivilities()); if (this.action !== 'create') { if (this.id) { dependencies.push(this.loadData());