bugfix of double civility abbreviation after edit

This commit is contained in:
Julie Lenaerts 2022-01-24 14:44:53 +01:00
parent 145c1d59e9
commit 433ccb1fc4
4 changed files with 5 additions and 4 deletions

View File

@ -221,7 +221,7 @@ export default {
data = {
"type": "thirdparty",
"kind": "child",
"name": data.text,
"name": data.name,
"isChild": true,
"parent": {"type": "thirdparty", "id": this.parent.id},
"civility": {"id": data.civility},
@ -240,7 +240,7 @@ export default {
throw 'error with object type';
}
}
// console.log('type', type, 'data', data)
console.log('type', type, 'data', data)
// pass datas to parent
this.$emit('saveFormOnTheFly', { type: type, data: data });
},

View File

@ -451,7 +451,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
}));
}
else if (payload.type === 'thirdparty') {
body.name = payload.data.text;
body.name = payload.data.name;
body.email = payload.data.email;
body.telephone = payload.data.phonenumber;
body.address = { id: payload.data.address.address_id };

View File

@ -84,7 +84,7 @@
</div>
<div class="form-floating mb-3">
<input class="form-control form-control-lg" id="name" v-model="thirdparty.text" v-bind:placeholder="$t('thirdparty.name')" />
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.name')" />
<label for="name">{{ $t('thirdparty.name') }}</label>
</div>

View File

@ -36,6 +36,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
{
return [
'type' => 'thirdparty',
'name' => $thirdParty->getName(),
'text' => $this->thirdPartyRender->renderString($thirdParty, []),
'id' => $thirdParty->getId(),
'kind' => $thirdParty->getKind(),