diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue index 2ed08ffc0..dbc7b47ac 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue @@ -120,6 +120,8 @@ export default { if (payload.data.birthdate !== null) { body.birthdate = payload.data.birthdate; } body.phonenumber = payload.data.phonenumber; body.mobilenumber = payload.data.mobilenumber; + body.email = payload.data.email; + body.altNames = payload.data.altNames; body.gender = payload.data.gender; makeFetch('PATCH', `/api/1.0/person/person/${payload.data.id}.json`, body) @@ -143,7 +145,7 @@ export default { body.telephone = payload.data.phonenumber; body.address = { id: payload.data.address.address_id }; - makeFetch('PATCH', `/api/1.0/third-party/third-party/${payload.data.id}.json`, body) + makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body) .then(response => { this.$store.dispatch('addThirdparty', { target: payload.target, body: response }) this.canCloseOnTheFlyModal = true; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 8f29f4771..809348d20 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -261,6 +261,8 @@ export default { if (payload.data.birthdate !== null) { body.birthdate = payload.data.birthdate; } body.phonenumber = payload.data.phonenumber; body.mobilenumber = payload.data.mobilenumber; + body.email = payload.data.email; + body.altNames = payload.data.altNames; body.gender = payload.data.gender; makeFetch('PATCH', `/api/1.0/person/person/${payload.data.id}.json`, body) @@ -284,7 +286,7 @@ export default { body.telephone = payload.data.phonenumber; body.address = { id: payload.data.address.address_id }; - makeFetch('PATCH', `/api/1.0/third-party/third-party/${payload.data.id}.json`, body) + makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body) .then(response => { this.$store.dispatch('addThirdparty', { target: payload.target, body: response }) this.canCloseOnTheFlyModal = true; 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 102dcf741..c9b66a8e5 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 @@ -152,6 +152,8 @@ export default { if (payload.data.birthdate !== null) { body.birthdate = payload.data.birthdate; } body.phonenumber = payload.data.phonenumber; body.mobilenumber = payload.data.mobilenumber; + body.email = payload.data.email; + body.altNames = payload.data.altNames; body.gender = payload.data.gender; makeFetch('PATCH', `/api/1.0/person/person/${payload.data.id}.json`, body) @@ -175,7 +177,7 @@ export default { body.telephone = payload.data.phonenumber; body.address = { id: payload.data.address.address_id }; - makeFetch('PATCH', `/api/1.0/third-party/third-party/${payload.data.id}.json`, body) + makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body) .then(response => { this.$store.dispatch('addThirdparty', { target: payload.target, body: response }) this.canCloseOnTheFlyModal = true; diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php index 6288663e2..bfac5f936 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php @@ -91,6 +91,7 @@ class PersonJsonNormalizer implements 'deathdate', 'center', 'altNames', + 'email' ]; $fields = array_filter( @@ -161,6 +162,11 @@ class PersonJsonNormalizer implements } } + break; + + case 'email': + $person->setEmail($data[$item]); + break; } } @@ -189,6 +195,7 @@ class PersonJsonNormalizer implements 'centers' => $this->normalizer->normalize($this->centerResolverManager->resolveCenters($person), $format, $context), 'phonenumber' => $person->getPhonenumber(), 'mobilenumber' => $person->getMobilenumber(), + 'email' => $person->getEmail(), 'altNames' => $this->normalizeAltNames($person->getAltNames()), 'gender' => $person->getGender(), 'current_household_address' => $this->normalizer->normalize($person->getCurrentHouseholdAddress(), $format, $context),