diff --git a/refactor-strategy.md b/refactor-strategy.md
index 4210b9e..bc6902d 100644
--- a/refactor-strategy.md
+++ b/refactor-strategy.md
@@ -41,6 +41,7 @@ Outcome: Components get smaller and easier to read; business logic is reusable.
- [x] Add Prettier config and .editorconfig; wire Prettier with ESLint
- [ ] Upgrade ESLint (if/when convenient) and align with Vue 3 rules
- [ ] Ensure Volar is used (dev environment) for Vue 3 type intelligence
+ - Optional next: add lint-staged + husky for `pre-commit` formatting
Outcome: Stable formatting and consistent linting across contributors.
diff --git a/src/components/meals/EditMealPage.vue b/src/components/meals/EditMealPage.vue
index e8fa46c..791f2e5 100644
--- a/src/components/meals/EditMealPage.vue
+++ b/src/components/meals/EditMealPage.vue
@@ -52,16 +52,17 @@
Purchased {{ ago(meal.purchase_date) }}
- diff --git a/src/components/meals/MealPlanPage.vue b/src/components/meals/MealPlanPage.vue index 1a54975..09e0faf 100644 --- a/src/components/meals/MealPlanPage.vue +++ b/src/components/meals/MealPlanPage.vue @@ -78,41 +78,36 @@ ul.actions { - \ No newline at end of file diff --git a/src/composables/useMeals.js b/src/composables/useMeals.js new file mode 100644 index 0000000..398974d --- /dev/null +++ b/src/composables/useMeals.js @@ -0,0 +1,25 @@ +import * as api from '@/api/meals' + +export async function getUpcomingMeals(from, to) { + return api.getUpcomingMeals(from, to) +} + +export async function getMeal(id) { + return api.getMeal(id) +} + +export async function saveMeal(meal) { + return api.saveMeal(meal) +} + +export async function markMealConsumed(mealId) { + return api.markMealConsumed(mealId) +} + +export async function deleteMeal(mealId) { + return api.deleteMeal(mealId) +} + +export function useMeals() { + return { getUpcomingMeals, getMeal, saveMeal, markMealConsumed, deleteMeal } +}