mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-09 16:18:00 -05:00
ingredient editor improve merge/delete add edit
This commit is contained in:
@@ -140,7 +140,7 @@ export default {
|
||||
},
|
||||
nothingSelected() {
|
||||
if (this.multiple || !this.initial_single_selection) {
|
||||
return this.selected_objects.length === 0 && this.initial_selection.length === 0
|
||||
return this.selected_objects?.length === 0 && this.initial_selection?.length === 0
|
||||
} else {
|
||||
return !this.selected_objects && !this.initial_single_selection
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
} else {
|
||||
this.genericAPI(this.model, this.Actions.UPDATE, this.form_data)
|
||||
.then((result) => {
|
||||
this.$emit("finish-action")
|
||||
this.$emit("finish-action", { item: result.data })
|
||||
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_UPDATE)
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
target: this.form_data.target.id,
|
||||
})
|
||||
.then((result) => {
|
||||
this.$emit("finish-action", { target: this.form_data.target.id })
|
||||
this.$emit("finish-action", { target: this.form_data.target.id, target_object: this.form_data.target }) //TODO temporary workaround to not change other apis
|
||||
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_MERGE)
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user