automatically open ingredient editor in new tab

This commit is contained in:
vabene1111 2023-12-02 21:26:54 +01:00
parent 1758aebb73
commit a2aa0dc3b9

View File

@ -186,10 +186,10 @@ export default {
case "ingredient-editor": { case "ingredient-editor": {
let url = resolveDjangoUrl("view_ingredient_editor") let url = resolveDjangoUrl("view_ingredient_editor")
if (this.this_model === this.Models.FOOD) { if (this.this_model === this.Models.FOOD) {
window.location.href = url + '?food_id=' + e.source.id window.open(url + '?food_id=' + e.source.id, "_blank");
} }
if (this.this_model === this.Models.UNIT) { if (this.this_model === this.Models.UNIT) {
window.location.href = url + '?unit_id=' + e.source.id window.open(url + '?unit_id=' + e.source.id, "_blank");
} }
break break
} }