Add frontend phase 15 updates: complete MVP for admin backoffice and partner-center consoles, including new services and endpoints; document requests for backend enhancements.
This commit is contained in:
@@ -488,3 +488,95 @@ delivers fixes in its own change. **Frontend never edits backend code to "fix" a
|
||||
linked bookings are themselves mock-primary. When they land the swap is a single `USE_TICKETS_MOCK = false` flip
|
||||
(no hook/component change) — `ticketsClientApi` already maps the live routes.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-029 — Config `updatedAt`/`updatedBy` on `PlatformConfigDto` — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the f15 config editor shows each row's last-changed meta ("updated {date} by {actor}"), but the b1
|
||||
`PlatformConfigDto` carries only `{ key, value, dataType, description }`. Proposed: add `updatedAt` (UTC) +
|
||||
`updatedBy` (actor id or display) to the DTO (the audit trail already records the change; this surfaces the
|
||||
latest on the row without opening the drawer). Mock supplies both; the real row degrades gracefully without.
|
||||
- **Why:** finance needs the effective value + who last touched it at a glance. `services/admin` is mock-primary
|
||||
(`USE_ADMIN_MOCK = true`); `adminClientApi.listConfigs` maps the live route 1:1 and leaves these undefined.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-030 — Audit-trail filters: actor / action / date-range — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** `GET audit/get_audit_trail` filters only by `entity_type` + `entity_id`. The f15 audit viewer offers
|
||||
actor, action, and from/to date filters. Proposed: add `actor_id`, `action`, `from`, `to` query params (the mock
|
||||
honours all four). Until then the real client passes only the supported two and the rest degrade.
|
||||
- **Why:** ops audits by actor and by time window, not only by a single entity. Mock-primary.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-031 — RBAC role grant/revoke/list endpoints — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the b15 contract exposes no role-management endpoints. The (optional, **DEFERRED-IF-MISSING**) admin
|
||||
roles console needs: `GET admin_roles/list_roles[?user_id=]` returning `RoleGrant[]` (`{ userId, role, grantedBy,
|
||||
grantedAt, revokedAt }`), `POST admin_roles/grant_role { userId, role }`, `POST admin_roles/revoke_role
|
||||
{ userId, role }`, where `role` is one of `super_admin|admin|support|finance|moderation`. The screen is built
|
||||
against the mock and flagged DEFERRED-IF-MISSING; swap `USE_ADMIN_MOCK=false` once the routes land.
|
||||
- **Why:** to manage which users hold which admin scopes. Not on the testable acceptance path.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-032 — Partner-portal split reads + activate/suspend + IBAN write-then-masked — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the b15 contract has admin partner-center CRUD/verify/sponsor + a single `GET /centers/{id}/dashboard`
|
||||
portal endpoint. The f15 partner portal + admin management need: (1) a **center-scoped "my center"** resolution
|
||||
(`GET centers/me` or `/centers/me/dashboard`) so a center admin never passes a raw id; (2) split portal reads
|
||||
`GET centers/me/nurses`, `GET centers/me/bookings?status=&page=`, `GET centers/me/settlement?page=` (or these as
|
||||
fields on the dashboard); (3) an **activate/suspend** toggle (`POST admin/partner-centers/{id}/set-active
|
||||
{ isActive }`) — verify only activates; (4) confirm the **write-then-masked** IBAN contract (PATCH accepts a
|
||||
full `settlementIban`, GET returns only `settlementIbanMasked` last-4). Also the admin **roster read**
|
||||
(`GET admin/partner-centers/{id}/nurses`). `services/partnerCenter` is mock-primary (`USE_PARTNER_MOCK`).
|
||||
- **Why:** the portal (separate authz scope, own-center tenancy) + the admin management screens render these.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-033 — Partner settlement: per-booking commission invoices + invoice `total` — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the merchant-of-record settlement view lists per-booking **commission invoices** (b11 `Invoice`
|
||||
shape) filtered to the center, but there's no center-scoped invoice-list route (see REQ-032). Also the b11
|
||||
`Invoice` DTO has no `total` — the settlement row shows `platform commission + BNPL commission + VAT = total`;
|
||||
the client currently **sums the served legs** for the total (a display sum, not a load-bearing re-derivation).
|
||||
Proposed: serve `totalIrr` on the invoice (= commission + bnplCommission + vat), plus a center-scoped list.
|
||||
- **Why:** the settlement/invoice view (rendered only when `is_merchant_of_record`) needs a reconciling total.
|
||||
VAT stays on the commission line only; the rate is config-driven (`vat_rate`), never hardcoded.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-034 — Verification admin: nurse-level queue + on-demand document URL + whole-verification approve/reject — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** three gaps in the b6 admin surface for the f15 review queue: (1) `GET admin_verifications` returns
|
||||
**one row per pending step**; the queue UI is **nurse-level** (progress "X of Y", next step, expiring flag) — a
|
||||
nurse-grouped list (or a `group_by=nurse` param) would avoid a lossy client fold. (2) A **per-document on-demand
|
||||
signed-URL** route (`GET admin_verifications/documents/{documentId}/url`) — signed URLs are short-lived and must
|
||||
be fetched on demand / re-requested on expiry, not read from the long-lived case payload. (3) **whole-
|
||||
verification** approve/reject (`POST admin_verifications/{id}/approve` and `/reject`) — today the aggregate flips
|
||||
implicitly when the last step is decided; the UI wants an explicit Approve (enabled only when all steps pass) /
|
||||
Reject action. `services/verification` is mock-primary.
|
||||
- **Why:** the queue + per-nurse case + signed-URL document viewer render these. The client never writes
|
||||
`is_verified` — the server flips it transactionally (§5).
|
||||
- **Status:** open
|
||||
|
||||
## REQ-035 — Refund preview + explicit approve/reject — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** b11 `POST admin_refunds` **creates and executes** in one call, so there is no way to render a
|
||||
**preview** (tiered percentage + fee/payout decomposition + channel + BNPL ETA + will-create-clawback) before
|
||||
initiating. Proposed: `GET admin_refunds/preview?booking_id=&ticket_id=` returning the server-computed
|
||||
decomposition (the client renders it, never recomputes the split/percentage). Also explicit
|
||||
`POST admin_refunds/{id}/approve` and `/reject` for the provider-revert-failure → retry and the decline paths
|
||||
(today the single POST both creates + executes). `services/refunds` admin methods are mock-primary;
|
||||
`initiateRefund` maps the live `POST admin_refunds`.
|
||||
- **Why:** the ticket-linked refund panel shows the preview, then initiate → (retry on provider failure) / reject.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-036 — Payout single preview endpoint + `holidayShifted` flag + record-transfer-reference — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the f15 payout dashboard wants (1) a **single preview** call returning eligible + skipped + the
|
||||
holiday-shifted processing date together (b13 `GET admin_payouts/eligible` is paged and returns only the eligible
|
||||
page — skipped nurses come back on the batch `POST`); a `GET admin_payouts/preview?periodStart=&periodEnd=`
|
||||
returning `{ eligible[], skipped[], processingDate, holidayShifted, totalNet }` would drive the dry-run cleanly.
|
||||
(2) A `holidayShifted` boolean on `PayoutBatchDto` / the preview so the UI can badge a batch whose processing
|
||||
date moved off a bank-closed day (currently not on the DTO). (3) A **record-transfer-reference** route
|
||||
(`POST admin_payouts/{payoutId}/transfer_reference { reference }`) for finance to attach the real bank reference
|
||||
(b13 has `mark_failed` but no reconcile-reference write). `services/payouts` admin methods are mock-primary; the
|
||||
run/retry map the live routes with the `Idempotency-Key` header.
|
||||
- **Why:** preview → run (idempotency-keyed, no double-pay) → detail with per-nurse retry + transfer-ref reconcile.
|
||||
- **Status:** open
|
||||
|
||||
## REQ-037 — Moderation queue `tagCodes` on `ModerationQueueItemDto` — filed by frontend-phase-15-b15 — 2026-07-10
|
||||
- **Need:** the f15 moderation queue renders each review's tag chips, but `ModerationQueueItemDto` (b14) doesn't
|
||||
list `tagCodes` (only the public `ReviewListItemDto` does). Proposed: add `tagCodes: string[]` to the moderation
|
||||
DTO. The client defaults to `[]` meanwhile. `services/reviews` moderation methods are mock-primary; `moderateReview`
|
||||
maps the live `PATCH reviews/{id}/status` and the queue maps `GET admin/reviews/moderation_queue`.
|
||||
- **Why:** moderators see the tags a review carries before publishing/hiding.
|
||||
- **Status:** open
|
||||
|
||||
Reference in New Issue
Block a user