conditional statements to allow for personne moral creation and edit

This commit is contained in:
2022-03-24 11:40:06 +01:00
parent 688914906d
commit 06cc84a21f
3 changed files with 18 additions and 7 deletions

View File

@@ -229,11 +229,18 @@ export default {
data = this.$refs.castThirdparty.$data.thirdparty;
// console.log('data original', data);
data.parent = {type: "thirdparty", id: this.parent.id};
data.civility = {type: 'chill_main_civility', id: data.civility.id};
data.profession = {type: 'third_party_profession', id: data.profession.id};
} else {
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();
data.civility = {type: 'chill_main_civility', id: data.civility.id};
data.profession = {type: 'third_party_profession', id: data.profession.id};
// console.log('type', type);
if (null !== data.civility) {
data.civility = {type: 'chill_main_civility', id: data.civility.id};
}
if (null !== data.profession) {
data.profession = {type: 'third_party_profession', id: data.profession.id};
}
// console.log('onthefly data', data);
}
} else {