mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
further attempts to do POST of thirdparty contact, passing parent id causes problems + civility and profession fk's are not saved on POST
This commit is contained in:
@@ -154,8 +154,7 @@ export default {
|
||||
return {
|
||||
//context: {}, <--
|
||||
thirdparty: {
|
||||
type: 'thirdparty',
|
||||
parent: this.parent.id
|
||||
type: 'thirdparty'
|
||||
},
|
||||
professions: [],
|
||||
civilities: [],
|
||||
@@ -213,7 +212,7 @@ export default {
|
||||
getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {
|
||||
this.thirdparty = thirdparty;
|
||||
this.thirdparty.kind = thirdparty.kind;
|
||||
//console.log('get thirdparty', thirdparty);
|
||||
console.log('get thirdparty', thirdparty);
|
||||
if (this.action !== 'show') {
|
||||
if (thirdparty.address !== null) {
|
||||
// bof! we force getInitialAddress because addressId not available when mounted
|
||||
@@ -262,6 +261,9 @@ export default {
|
||||
this.loadData();
|
||||
}
|
||||
if (this.action === 'addContact') {
|
||||
this.$data.thirdparty.kind = 'child'
|
||||
// this.$data.thirdparty.parent = this.parent.id
|
||||
this.$data.thirdparty.address = null
|
||||
this.loadProfessions();
|
||||
this.loadCivilities();
|
||||
}
|
||||
|
Reference in New Issue
Block a user