mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
bugfix emit saveFormOnTheFly and add newly created contact to suggestion list immediately
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
v-bind:item="item"
|
||||
v-bind:search="search"
|
||||
v-bind:type="checkUniq"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
@updateSelected="updateSelected">
|
||||
</person-suggestion>
|
||||
|
||||
@@ -259,15 +260,15 @@ export default {
|
||||
result: entity
|
||||
}
|
||||
this.search.priorSuggestion = suggestion;
|
||||
console.log('search priorSuggestion', this.search.priorSuggestion);
|
||||
// console.log('search priorSuggestion', this.search.priorSuggestion);
|
||||
} else {
|
||||
this.search.priorSuggestion = {};
|
||||
}
|
||||
},
|
||||
saveFormOnTheFly({ type, data }) {
|
||||
console.log('saveFormOnTheFly from addPersons, type', type, ', data', data);
|
||||
// console.log('saveFormOnTheFly from addPersons, type', type, ', data', data);
|
||||
if (type === 'person') {
|
||||
console.log('type person with', data);
|
||||
// console.log('type person with', data);
|
||||
postPerson(data)
|
||||
.then(person => new Promise((resolve, reject) => {
|
||||
console.log('onthefly create: post person', person);
|
||||
@@ -276,10 +277,10 @@ export default {
|
||||
}));
|
||||
}
|
||||
else if (type === 'thirdparty') {
|
||||
console.log('type thirdparty with', data);
|
||||
// console.log('type thirdparty with', data);
|
||||
postThirdparty(data)
|
||||
.then(thirdparty => new Promise((resolve, reject) => {
|
||||
console.log('onthefly create: post thirdparty', thirdparty);
|
||||
// console.log('onthefly create: post thirdparty', thirdparty);
|
||||
this.newPriorSuggestion(thirdparty);
|
||||
resolve();
|
||||
}));
|
||||
|
Reference in New Issue
Block a user