Create thirdparty on the fly with institution / contact

This commit is contained in:
2021-10-11 14:03:46 +02:00
parent 08764aa0b4
commit d7ae279101
3 changed files with 54 additions and 7 deletions

View File

@@ -74,7 +74,12 @@ export default {
case 'thirdparty':
let data = this.$refs.castThirdparty.$data.thirdparty;
data.name = data.text;
data.address = { id: data.address.address_id }
if (data.address !== undefined) {
data.address = { id: data.address.address_id }
} else {
data.address = null;
}
return data;
default:
throw Error('Invalid type of entity')