wealth/docs/decisions/0034-creator-dashboard-rout...

24 lines
1.7 KiB
Markdown

# 0034 The creator's داشبورد is two tab routes, C7 a pushed page
Status: Proposed · Area: architecture · Date: 2026-10-08 · Decided by: agent
## Context
Board 04 gives the creator two dashboard tabs, «طرح‌های اشتراک» (pricing card and مشترکان) and «مالی» (C19 + C20), and opens C7 as a full page behind «ویرایش قیمت‌ها» with no tab row and no bottom nav. The repo had placeholder routes `/dashboard/pricing` (under `(main)`), `/dashboard/finance/ledger` and `/dashboard/finance/sheba`.
## Decision
- The creator's tabs live in `dashboard/(creator)`, mirroring 0025: `/dashboard/plans` (the default; the nav's داشبورد links here) and `/dashboard/finance`, each with its own `loading.tsx`, under a layout with the bar or heading, `DashboardTabs role="creator"` and `OnboardingGuard`.
- C7 is `/dashboard/pricing` in `(flow)`: back · title · support on mobile, the header with back beside the title on desktop.
- The شبا form expands in place inside مالی and the ledger's details open in a bottom sheet (mobile) or side panel (desktop); `ledger` and `sheba` sub-routes are removed. Only the ledger tab is in the URL (`?ledger=payouts`).
- Each card (pricing, مشترکان, balance, شبا, ledger) is its own browser part with a same-size skeleton and `PartBoundary`; the payout-day notice is server-rendered, the same for every creator.
## Alternatives
- One `/dashboard` page with in-page tabs: one boundary for both tabs, and the URL couldn't open مالی (the SMS links to `/dashboard/finance`).
- Keep C7 under `(main)`: the bottom nav would show on a task page (R8).
## Consequences
The new_subscriber notice now links to `/dashboard/plans` (API). `ROUTES.dashboard.ledger` and `.sheba` are gone.