mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
bugfix addPersons
This commit is contained in:
parent
b42ae76bdf
commit
a4457664d4
@ -241,13 +241,14 @@ export default {
|
|||||||
return item.result.type + item.result.id;
|
return item.result.type + item.result.id;
|
||||||
},
|
},
|
||||||
addPriorSuggestion() {
|
addPriorSuggestion() {
|
||||||
//console.log('addPriorSuggestion', this.hasPriorSuggestion);
|
// console.log('prior suggestion', this.priorSuggestion);
|
||||||
if (this.hasPriorSuggestion) {
|
if (this.hasPriorSuggestion) {
|
||||||
console.log('addPriorSuggestion',);
|
// console.log('addPriorSuggestion',);
|
||||||
this.suggested.unshift(this.priorSuggestion);
|
this.suggested.unshift(this.priorSuggestion);
|
||||||
this.selected.unshift(this.priorSuggestion);
|
this.selected.unshift(this.priorSuggestion);
|
||||||
|
|
||||||
console.log('reset priorSuggestion');
|
// console.log('selected', this.selected);
|
||||||
|
// console.log('suggested', this.suggested);
|
||||||
this.newPriorSuggestion(null);
|
this.newPriorSuggestion(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -260,13 +261,14 @@ export default {
|
|||||||
result: entity
|
result: entity
|
||||||
}
|
}
|
||||||
this.search.priorSuggestion = suggestion;
|
this.search.priorSuggestion = suggestion;
|
||||||
console.log('search priorSuggestion', this.search.priorSuggestion);
|
// console.log('search priorSuggestion', this.search.priorSuggestion);
|
||||||
|
this.addPriorSuggestion(suggestion)
|
||||||
} else {
|
} else {
|
||||||
this.search.priorSuggestion = {};
|
this.search.priorSuggestion = {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
saveFormOnTheFly({ type, data }) {
|
saveFormOnTheFly({ type, data }) {
|
||||||
console.log('saveFormOnTheFly from addPersons, type', type, ', data', data);
|
// console.log('saveFormOnTheFly from addPersons, type', type, ', data', data);
|
||||||
if (type === 'person') {
|
if (type === 'person') {
|
||||||
makeFetch('POST', '/api/1.0/person/person.json', data)
|
makeFetch('POST', '/api/1.0/person/person.json', data)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user