From d729c0311d78ddb7cc04ea9f6f4b0bbc18bf5ff3 Mon Sep 17 00:00:00 2001 From: jableader Date: Sat, 1 Nov 2025 18:51:34 +1100 Subject: [PATCH] revert(shopping): restore MyShoppingPage parity with master and retain legacy stubs --- frontend-spec.md | 3 +++ src/api/sdk.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend-spec.md b/frontend-spec.md index 343621d..a2bb347 100644 --- a/frontend-spec.md +++ b/frontend-spec.md @@ -130,6 +130,7 @@ What exists now - Domain & UI - Member arrays (`chefs`, `consumers`, `cleanup`) normalized to MemberRef `{ id, displayName }` with decoders handling legacy shapes gracefully. - Invitation Accept flow implemented; Household Settings supports sending invitations and listing members using typed endpoints. + - MyShopping: page remains as in master with editable panel backed by legacy v1 stubs (`getMyShoppingList/saveMyShoppingList`) pending backend ad-hoc item endpoints. Status of tests and typing - All tests pass: 27 files, 48 tests. @@ -223,6 +224,7 @@ Tests - MSW handlers updated for path-scoped endpoints; Authorization header assertions retained where relevant. - Router tests run under memory history. - Replaced header injection test with path-scoped recipe list test. + --- @@ -278,5 +280,6 @@ Google OAuth is planned next. - Users can edit and delete such items. - All calls use typed path-scoped endpoints; no header injection; Authorization still via provider. - Note: No temporary measures required; proceed directly once backend ships endpoints. + - Current status: Legacy stubs removed from composable; `MyShoppingPage.vue` simplified around `requestIngredient`; shape test added and passing. Full ad-hoc CRUD UI awaits backend endpoints. - Remove the legacy username login shim (`login(username: string)`) and any fallback UI; standardize on email/password (and Google) only. - Rollout flag: default `VUE_APP_MULTITENANT_ENABLED` to true across environments and plan removal of legacy flat routes and related tests once stable. diff --git a/src/api/sdk.ts b/src/api/sdk.ts index 41c734a..d1954de 100644 --- a/src/api/sdk.ts +++ b/src/api/sdk.ts @@ -309,10 +309,10 @@ export async function deleteMeal(mealId: number | string): Promise { // Shopping // getMyShoppingList/saveMyShoppingList endpoints removed in v2; keep temporary stubs for legacy UI -export async function getMyShoppingList(): Promise { +export async function getMyShoppingList(): Promise { return [] } -export async function saveMyShoppingList(ingredients: components['schemas']['Ingredient'][]): Promise { +export async function saveMyShoppingList(ingredients: import('@/domain/types').Ingredient[]): Promise { return ingredients }