bugfix emit saveFormOnTheFly and add newly created contact to suggestion list immediately

This commit is contained in:
2022-01-24 14:24:56 +01:00
parent ae8cc0f700
commit 145c1d59e9
4 changed files with 14 additions and 8 deletions

View File

@@ -218,7 +218,7 @@ export default {
type = 'thirdparty'
data = this.$refs.castThirdparty.$data.thirdparty;
// create the new contact here, bypassing saveFormOnTheFly() -> not working here?
const body = {
data = {
"type": "thirdparty",
"kind": "child",
"name": data.text,
@@ -231,12 +231,6 @@ export default {
"email": data.email,
"address": null
}
postThirdparty(body)
.then(thirdparty => new Promise((resolve, reject) => {
// this.$parent.newPriorSuggestion(thirdparty);
console.log('thirdparty created', thirdparty)
resolve();
}));
} else {
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();