From b29962bf9c41d5cd8eb726d877cb02f0e19f62aa Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Thu, 10 Sep 2026 16:47:59 -0400 Subject: [PATCH] feat: finish multi-pin pickup end-to-end; fix checkout-datetime followups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Multi-pin pickup selection (study §3.4) — previously a standalone unused endpoint + TODO comments: - app/services/pickup-locations.server.ts: pure filterPickupLocationIds + I/O resolvePickupLocations (active + has a PICKUP slot template + ProductRule allowedLocationIds + inventory exclusion). - resolveAvailabilityRequest returns pickupLocations[] on method=PICKUP and defaults the active location to the first eligible pickup point. - apps.scheduling.locations.tsx refactored onto the shared resolver (was a second copy of the logic). - Storefront widget: pickup-location chooser (name + address, optional multi-pin Google map) when >1 eligible point and none block-configured; picking one re-requests availability for that location. New styles + widget.choose_pickup_location locale (en + fr). - Checkout extension Checkout.jsx: same chooser before the date list. - tests/unit/pickup-locations.test.ts (5 cases); suite 161 green. checkout-datetime follow-up fixes from the 808a3b7 review: - typescript devDep ^7.0.2 -> ^5.6.3 (there is no typescript@7 on npm). - Deleted dead shopify.d.ts (Preact-global shim, unused after the React rewrite) and dropped it from tsconfig include. Also stages the CLI-written `uid` lines in the checkout-datetime and payment-customization extension tomls. Co-Authored-By: Claude Sonnet 5 --- HANDOVER_STATUS_SUMMARY.md | 49 ++++--- app/routes/apps.scheduling.locations.tsx | 65 ++++------ app/services/availability-request.server.ts | 29 ++++- app/services/pickup-locations.server.ts | 92 +++++++++++++ .../checkout-datetime/locales/en.default.json | 1 + extensions/checkout-datetime/package.json | 2 +- extensions/checkout-datetime/shopify.d.ts | 19 --- .../checkout-datetime/shopify.extension.toml | 2 + extensions/checkout-datetime/src/Checkout.jsx | 38 +++++- extensions/checkout-datetime/tsconfig.json | 2 +- .../assets/datetime-widget.css | 34 +++++ .../datetime-widget/assets/datetime-widget.js | 2 +- .../datetime-widget/blocks/app-embed.liquid | 1 + .../blocks/datetime-picker.liquid | 1 + .../datetime-widget/locales/en.default.json | 3 +- extensions/datetime-widget/locales/fr.json | 3 +- .../shopify.extension.toml | 2 + tests/unit/pickup-locations.test.ts | 52 ++++++++ widget-src/datetime-widget/datetime-widget.ts | 122 ++++++++++++++++-- 19 files changed, 416 insertions(+), 103 deletions(-) create mode 100644 app/services/pickup-locations.server.ts delete mode 100644 extensions/checkout-datetime/shopify.d.ts create mode 100644 tests/unit/pickup-locations.test.ts diff --git a/HANDOVER_STATUS_SUMMARY.md b/HANDOVER_STATUS_SUMMARY.md index 08061c1..9caae5d 100644 --- a/HANDOVER_STATUS_SUMMARY.md +++ b/HANDOVER_STATUS_SUMMARY.md @@ -1,20 +1,28 @@ # Handover Status Summary -Based on the original `HANDOVER.md` and the recent UI workstreams implemented, here is the current status of the project's action items. +Based on the original `HANDOVER.md` and the recent workstreams, here is the current status of the project's action items. ## ✅ Completed Items ### Known Bugs / Open Issues -- **B3 | Polaris uncontrolled inputs:** - - **Status**: **Completed**. Audited all Polaris forms (`Select`, `TextField`, `Checkbox`, `ChoiceList`) across the admin app. Confirmed that all components are fully controlled using `value` and `onChange`/`checked`. -- **B4 | `checkout-datetime` `checkJs` & Type Errors:** - - **Status**: **Completed**. Reconciled the extension with the latest Shopify UI Extension APIs. Updated `tsconfig.json` to enable `checkJs: true`, `skipLibCheck: true`, and `moduleResolution: "bundler"`. Installed typescript and resolved all rendering and prop type errors (`npm run typecheck` passes). +- **B3 | Polaris uncontrolled inputs:** + - **Status**: **Completed** (`f8dd5b2`). Weekday/method/location/zone `