frontend phase 11

This commit is contained in:
hamid
2026-07-10 13:55:42 +03:30
parent ccfa27aff6
commit 67c028562e
43 changed files with 3275 additions and 24 deletions
@@ -12,6 +12,32 @@ for awareness.
- **Requests filed:** frontend/requests/for-backend.md (yes/no)
-->
## frontend-phase-11-b12 — BNPL installment checkout (D1D5) — 2026-07-10
- **Shipped:** the **alternate checkout branch** off C6 — a **new `services/bnpl` domain** (types/keys/
constants/invalidations/apis[client+mock]/7 hooks + barrel) and the five wireframe screens under the
customer shell, terracotta-financial: **D1 روش پرداخت** (provider chooser off `useBnplOptions`, full-card
fall-back), **D2 انتخاب طرح** (single-select plan), **D3 اعتبارسنجی** (کد ملی + prefilled موبایل +
consent-gated → approved-with-ceiling / declined+ceiling-exceeded → **card fall-back**), **D4 تایید طرح و
قرارداد** (served repayment table + ownership note + contract-gated final action → provider handoff), and
**D5 پیگیری اقساط** in the **کیف‌پول** tab (provider-reported outstanding balance + due list + early-pay
**provider hand-off**). The handoff (gateway harness → return) settles the down-payment and **routes to the
reused f9 confirmation** (`?method=bnpl`), so the booking confirms exactly as the card path. Two shared
tested composites: `BnplPlanCard`, `InstallmentScheduleRow` (reused D4+D5). C6's «پرداخت اقساطی» is enabled;
the `installments` icon + the `bnpl` i18n namespace (87 keys, both locales in sync) added.
- **Consumes:** dev/contracts/domains/bnpl.md (backend phase b12) — `eligibility`/`initiate`/order-by-id map
1:1; options/schedule/wallet-status/by-request-order/D3-KYC are contract gaps.
- **Mocked client-side:** `services/bnpl` via `bnplMockApi` (`USE_BNPL_MOCK=true`) — the settle bridge reuses
the f9 conversion (a settled BNPL order = a card payment net-of-fee) + seeds a provider-reported Wallet
plan. See mocks-registry. Money = served IRR digit-strings end-to-end (mock computes with BigInt; components
only format). **D5 is provider-reported status, NOT a Balinyaar ledger; early-pay hands off to the provider.**
- **Reviewed:** 6-dimension adversarial multi-agent review + verify pass — 5 confirmed findings, all fixed
(return-page window-expired copy/CTA, real getBnplOrder order-id keying, a needless poll fetch, dead `col_*`
keys + surfacing `ownership_note` at D1, a dark-mode glyph-contrast token).
- **Gate:** npm run check green · npm run test:ci green (223 tests, +9) · npm run build green with
NEXT_PUBLIC_API_URL set.
- **Requests filed:** frontend/requests/for-backend.md — yes (REQ-022 options+schedule, REQ-023 eligibility
KYC inputs, REQ-024 wallet status + customer bookingId + by-request order lookup).
## frontend-phase-10-b11 — Cancellation & refund status (customer) — 2026-07-10
- **Shipped:** the trust-first **exit** — a **new `services/refunds` domain** (types/constants/keys/
invalidations/apis[client+mock]/3 hooks + barrel) and two customer screens: the **cancellation flow**