From d1824affff05d4a64c2623c26f7a64bfbdcc3ec4 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:19:37 -0500 Subject: [PATCH] fix: Default to "0" qty when creating ingredients everywhere (#6285) --- .../RecipePageParts/RecipePageIngredientEditor.vue | 6 +++--- .../RecipePage/RecipePageParts/RecipePageParseDialog.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientEditor.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientEditor.vue index 5d78d29b9..198d59ffd 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientEditor.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientEditor.vue @@ -127,7 +127,7 @@ function addIngredient(ingredients: Array | null = null) { note: x, unit: undefined, food: undefined, - quantity: 1, + quantity: 0, }; }); @@ -145,7 +145,7 @@ function addIngredient(ingredients: Array | null = null) { unit: undefined, // @ts-expect-error - prop can be null-type by NoUndefinedField type forces it to be set food: undefined, - quantity: 1, + quantity: 0, }); } } @@ -159,7 +159,7 @@ function insertNewIngredient(dest: number) { unit: undefined, // @ts-expect-error - prop can be null-type by NoUndefinedField type forces it to be set food: undefined, - quantity: 1, + quantity: 0, }); } diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue index 45e157e93..19b0c11a0 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue @@ -523,7 +523,7 @@ function insertNewIngredient(index: number) { input: "", confidence: {}, ingredient: { - quantity: 1.0, + quantity: 0, referenceId: uuid4(), }, } as ParsedIngredient;