Create 3rd party contact: fix adding civility and profession to payload

This commit is contained in:
nobohan
2022-02-18 14:17:39 +01:00
parent 8c7da5f80c
commit ca6bfea51f
2 changed files with 7 additions and 114 deletions

View File

@@ -232,13 +232,18 @@ export default {
"name": data.text,
"isChild": true,
"parent": {"type": "thirdparty", "id": this.parent.id},
"civility": {"id": data.civility},
"profession": {"id": data.profession},
"comment": data.comment,
"telephone": data.phonenumber,
"email": data.email,
"address": this.parent.address
}
if ("civility" in data) {
Object.assign(data, {"civility": {"id": data.civility}} )
}
if ("profession" in data) {
Object.assign(data, {"profession": {"id": data.profession}} )
}
} else {
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();