diff --git a/apps/mobile/src/app/barcode.tsx b/apps/mobile/src/app/barcode.tsx index 4869369..bca0666 100644 --- a/apps/mobile/src/app/barcode.tsx +++ b/apps/mobile/src/app/barcode.tsx @@ -86,6 +86,7 @@ export default function BarcodeScreen() { }, }); await queryClient.invalidateQueries({ queryKey: ["inventory"] }); + await queryClient.invalidateQueries({ queryKey: ["what-to-eat"] }); router.back(); } catch (err) { Alert.alert(t("common.oops"), err instanceof Error ? err.message : t("common.error")); diff --git a/apps/mobile/src/app/kitchen.tsx b/apps/mobile/src/app/kitchen.tsx index d91eaeb..67a37c2 100644 --- a/apps/mobile/src/app/kitchen.tsx +++ b/apps/mobile/src/app/kitchen.tsx @@ -72,6 +72,8 @@ export default function KitchenScreen() { onSettled: () => { void queryClient.invalidateQueries({ queryKey: ["inventory"] }); void queryClient.invalidateQueries({ queryKey: ["inventory-expiring"] }); + // Lagret styr receptförslagen – uppdatera "Vad ska vi äta?" direkt. + void queryClient.invalidateQueries({ queryKey: ["what-to-eat"] }); }, }); diff --git a/apps/mobile/src/app/meal-boxes.tsx b/apps/mobile/src/app/meal-boxes.tsx index f92d4c4..ee087e9 100644 --- a/apps/mobile/src/app/meal-boxes.tsx +++ b/apps/mobile/src/app/meal-boxes.tsx @@ -56,6 +56,7 @@ export default function MealBoxesScreen() { onSuccess: async () => { await queryClient.invalidateQueries({ queryKey: ["meal-boxes"] }); await queryClient.invalidateQueries({ queryKey: ["inventory"] }); + await queryClient.invalidateQueries({ queryKey: ["what-to-eat"] }); await queryClient.invalidateQueries({ queryKey: ["day"] }); Alert.alert(t("common.done"), t("mealbox.undoSuccess")); }, diff --git a/apps/mobile/src/app/shopping.tsx b/apps/mobile/src/app/shopping.tsx index 60c7e34..9601f85 100644 --- a/apps/mobile/src/app/shopping.tsx +++ b/apps/mobile/src/app/shopping.tsx @@ -120,6 +120,7 @@ export default function ShoppingScreen() { onSuccess: async (result) => { const added = (result as { itemsAddedToInventory?: number }).itemsAddedToInventory ?? 0; await queryClient.invalidateQueries({ queryKey: ["inventory"] }); + await queryClient.invalidateQueries({ queryKey: ["what-to-eat"] }); invalidate(); Alert.alert(t("shopping.completedTitle"), t("shopping.completedBody", { count: added })); },