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 6dcca0d8a..28a51c4e6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -233,7 +233,7 @@ export default { // console.log('data original', data); data.parent = {type: "thirdparty", id: this.parent.id}; data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null; - data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null; + data.profession = data.profession !== '' ? data.profession : ''; } else { type = this.$refs.castNew.radioType; data = this.$refs.castNew.castDataByType(); @@ -241,8 +241,8 @@ export default { if (typeof data.civility !== 'undefined' && null !== data.civility) { data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null; } - if (typeof data.profession !== 'undefined' && null !== data.profession) { - data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null; + if (typeof data.profession !== 'undefined' && '' !== data.profession) { + data.profession = data.profession !== '' ? data.profession : ''; } // console.log('onthefly data', data); } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue index 140a0e8b4..287d98b07 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue @@ -178,7 +178,7 @@ export default { body.civility = {type: 'chill_main_civility', id: payload.data.civility.id}; } if (null !== payload.data.profession) { - body.profession = {type: 'third_party_profession', id: payload.data.profession.id}; + body.profession = payload.data.profession; } // console.log('body', body); 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 765d67fe8..0c830d673 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -73,13 +73,13 @@ -
- -
+
+ +
@@ -192,9 +192,8 @@ export default { name: '', telephone: '', civility: null, - profession: null, + profession: '', }, - professions: [], civilities: [], addAddress: { options: { @@ -274,18 +273,6 @@ export default { this.$toast.open({message: error.body}) }) }, - loadProfessions() { - const url = `/api/1.0/thirdparty/professions.json`; - return makeFetch('GET', url) - .then(response => { - this.$data.professions = response.results; - return Promise.resolve(); - }) - .catch((error) => { - console.log(error) - this.$toast.open({message: error.body}) - }) - }, submitAddress(payload) { console.log('submitAddress', payload); if (typeof payload.addressId !== 'undefined') { // <-- @@ -311,7 +298,6 @@ export default { }, mounted() { let dependencies = []; - dependencies.push(this.loadProfessions()); dependencies.push(this.loadCivilities()); if (this.action !== 'create') { if (this.id) {