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 256c5688a0
commit 0f2cbbe553
4 changed files with 19 additions and 13 deletions

View File

@@ -212,7 +212,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,
@@ -225,12 +225,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();