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:
@@ -12,6 +12,44 @@ for awareness.
|
||||
- **Requests filed:** frontend/requests/for-backend.md (yes/no)
|
||||
-->
|
||||
|
||||
## frontend-phase-15-b15 — Admin backoffice & partner-center consoles — 2026-07-10 — **MVP COMPLETE**
|
||||
- **Shipped:** the internal **operational cockpit** — the role-gated admin backoffice (desktop sidebar shell) +
|
||||
the separately-scoped **partner-center portal**. Two new domains: **`services/admin`** (config / holidays /
|
||||
audit / support-alerts / RBAC — `usePlatformConfigs`/`useUpdatePlatformConfig`/`useConfigChangeHistory`/
|
||||
`useHolidays`/`useUpsertHoliday`/`useAuditLogs`/`useSupportAlerts`/`useAssignSupportAlert`/
|
||||
`useResolveSupportAlert`/`useAdminRoles`/`useGrantRole`/`useRevokeRole`) and **`services/partnerCenter`** (admin
|
||||
management + `useMyPartnerCenter`/`useMySponsoredNurses`/`useMySponsoredBookings`/`useMySettlement` portal reads).
|
||||
**Admin-endpoint additions to 5 existing domains** (the staff lens, not new domains): verification
|
||||
(`useVerificationQueue`/`useVerificationCase`/`useVerificationDocumentUrl`/`useDecideStep`/`useApproveVerification`/
|
||||
`useRejectVerification`), refunds (`useRefundPreview`/`useInitiateRefund`/`useApproveRefund`/`useRejectRefund`),
|
||||
payouts (`usePayoutBatches`/`usePayoutBatchDetail`/`usePreviewPayoutBatch`/`useRunPayoutBatch`/`useRetryPayout`/
|
||||
`useRecordTransferReference`), reviews (`useModerationQueue`/`useModerateReview`), tickets (`useAdminTickets`/
|
||||
`useAdminTicket`/`useAdminTicketThread`/`usePostAdminMessage` — the admin types carry `isInternal`, the user types
|
||||
never do). **Screens:** `/admin` overview + verification (queue + `[nurseId]` case w/ signed-URL `DocumentViewer`,
|
||||
structured credential entry, Approve-only-when-all-passed), tickets (queue + `[id]` thread w/ internal-note
|
||||
composer + ticket-linked **RefundPanel**), payouts (dashboard + preview → **idempotency-keyed run** + `[batchId]`
|
||||
detail w/ retry + transfer-ref reconcile), reviews (moderation publish/hide/reject), config (typed inputs + 0–1
|
||||
validation + audited-save + history drawer), holidays (`is_bank_closed`), alerts (internal triage assign/resolve),
|
||||
audit (read-only filtered diff), partners (list/create + `[id]` verify/activate/edit + roster/assign, IBAN
|
||||
write-then-masked), roles (**DEFERRED-IF-MISSING**, mock-backed). **Partner portal** (`/partner` scope): home
|
||||
(onboarding state + license + MoR), nurses, bookings, and settlement (**MoR-gated** commission/VAT invoices via
|
||||
`PartnerSettlementRow` + signed-URL PDF; non-MoR → "via Balinyaar" state). New shared/tested `@/components/admin`:
|
||||
`AdminPageHeader`/`AdminEmptyState`/`AdminErrorState`/`AdminPager`/`ConfirmDialog`/`AdminDataTable`/`ConfigRow`/
|
||||
`AuditLogRow`/`SupportAlertCard`/`PartnerSettlementRow`/`DocumentViewer`/`RefundPanel`/`AdminMessageBubble` (13,
|
||||
36 tests). Role-gating via **`useAdminCapabilities()`** (fine-grained `roleCodes` off `AuthContext`); `admin` +
|
||||
`partner` i18n namespaces (both locales, incl. پروانه تأسیس / مسئول فنی / نماد اعتماد الکترونیکی / سامانه مودیان).
|
||||
- **Consumes:** dev/contracts/domains/messaging-notifications-admin.md (b15) + verification.md (b6) + refunds-invoices.md
|
||||
(b11) + payouts.md (b13) + reviews-records.md (b14) + config-reference.md (b1).
|
||||
- **Mocked client-side:** `services/admin` (`USE_ADMIN_MOCK`), `services/partnerCenter` (`USE_PARTNER_MOCK`), and the
|
||||
admin methods of verification/refunds/payouts/reviews/tickets — all mock-primary (their real `clientApi` maps the
|
||||
live routes and targets proposed slugs for the gaps). See mocks-registry.
|
||||
- **Gate:** npm run check green (0/0) · npm run test:ci green (325 tests, +36) · npm run build green with
|
||||
NEXT_PUBLIC_API_URL set · i18n admin+partner in sync.
|
||||
- **Requests filed:** frontend/requests/for-backend.md — yes (REQ-029…037: config audit columns, rich audit
|
||||
filters, RBAC endpoints, partner portal split reads + activate/suspend, invoice total, verification nurse-queue
|
||||
+ on-demand doc URL + whole-verification approve/reject, refund preview + approve/reject, payout single-preview +
|
||||
holidayShifted + record-transfer-reference, moderation `tagCodes`).
|
||||
|
||||
## frontend-phase-14-b15 — Messaging (tickets) & notifications — 2026-07-10
|
||||
- **Shipped:** the social/communication layer for the customer **and** nurse apps (role decides chrome, not
|
||||
the components; admin lens DEFERRED to f15). Two new domains — **`services/tickets`** (`useMyTickets` /
|
||||
|
||||
Reference in New Issue
Block a user