1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00

feat: add the selected recipe servings and yields in the content of the recipe post action (#5340)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Felix Schneider 2025-06-18 21:57:51 +02:00 committed by GitHub
parent ac984a2d04
commit 78b55c0b98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import { useUserApi } from "~/composables/api";
import { GroupRecipeActionOut, GroupRecipeActionType } from "~/lib/api/types/household";
import { RequestResponse } from "~/lib/api/types/non-generated";
import { Recipe } from "~/lib/api/types/recipe";
import { useScaledAmount } from "~/composables/recipes/use-scaled-amount";
const groupRecipeActions = ref<GroupRecipeActionOut[] | null>(null);
const loading = ref(false);
@ -69,7 +70,7 @@ export const useGroupRecipeActions = function (
window.open(url, "_blank")?.focus();
return;
case "post":
return await api.groupRecipeActions.triggerAction(action.id, recipe.slug || "");
return await api.groupRecipeActions.triggerAction(action.id, recipe.slug || "", useScaledAmount(recipe.recipeServings || 1, recipeScale).scaledAmount);
default:
break;
}