mirror of
https://git.meshkee.com/Meshkee/dashboards.git
synced 2026-08-11 22:30:58 +04:30
Add FA/EN locale, home activity charts, and theme-aware polish.
Ship shared LocaleProvider, business/customer i18n, branding defaultLocale, curated home tiles with dual 30-day charts, and chart/page aura tokens; refresh PROJECT_CONTEXT. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
f5b2193ba1
commit
66004a0fba
+39
-2
@@ -3,7 +3,7 @@
|
||||
> **For AI agents:** Read this file at the start of a new chat before making changes.
|
||||
> Update this document when a major feature is completed or architecture changes.
|
||||
|
||||
Last updated: July 26, 2026
|
||||
Last updated: August 1, 2026
|
||||
|
||||
---
|
||||
|
||||
@@ -496,11 +496,48 @@ SSL: Certbot cert `meshkee-dashboards` + cron `ssl-sync.sh` every 2h (option A:
|
||||
|
||||
---
|
||||
|
||||
## Locale (FA / EN)
|
||||
|
||||
Dashboards support **Farsi + English** via shared `LocaleProvider` (`@meshkee/dashboard-ui`) and `LanguageSelect` in headers.
|
||||
|
||||
| Piece | Where |
|
||||
|-------|--------|
|
||||
| Locale state | `packages/dashboard-ui` → `LocaleContext` |
|
||||
| Default language per business | `settings.branding.defaultLocale`: `'fa' \| 'en'` (default **`fa`**) |
|
||||
| Applied on open | Business + customer `TenantBrandingProvider` once from tenant branding |
|
||||
| Super-admin edit | Businesses list **Lang** column + edit modal |
|
||||
| Business UI copy | `apps/business/src/i18n/messages.ts` + `useT()` |
|
||||
| Customer UI copy | `apps/customer/src/i18n/` (parallel pattern) |
|
||||
| Document titles | Locale-aware via `routeTitles` + `useDashboardDocumentTitle` |
|
||||
| Fonts | `--font-ui: var(--font-en), var(--font-fa)` — see `.cursor/rules/ui-farsi-fonts.mdc` |
|
||||
|
||||
RTL: `dir="rtl"` when locale is `fa`.
|
||||
|
||||
---
|
||||
|
||||
## Business home dashboard
|
||||
|
||||
Home is **not** a 1:1 mirror of the sidebar. Tiles are curated (no Settings tile).
|
||||
|
||||
| Feature | Detail |
|
||||
|---------|--------|
|
||||
| Section cards | Count pill + arrow (settings/website have arrow only); hover fills primary |
|
||||
| Counts | Existing list `total` with `pageSize=1` — light, not a new stats join |
|
||||
| Charts (6/12 each) | Orders (+ add-to-basket) and Customers (+ active logins), last 30 days |
|
||||
| Chart API | `GET .../orders/activity?days=30`, `GET .../customers/activity?days=30` |
|
||||
| Chart colors | Primary series = theme primary; accent = purple for red theme, cyan for blue themes (`--chart-accent` from `businessPrimaryColors`) |
|
||||
| Page aura | Slow-moving radial blobs on `body::before` (tokens + business `index.css`) |
|
||||
|
||||
Products overview page uses the same i18n + theme-aware `ProductActivityChart` (added vs updated, 12 months).
|
||||
|
||||
---
|
||||
|
||||
## Suggested next work
|
||||
|
||||
- Point `meshkee.com/invoices/*` at the public invoice viewer (proxy or dedicated host)
|
||||
- Business-dashboard invoice templates + issue flow (`owner_scope=business`)
|
||||
- Migrate business and super-admin to `@meshkee/dashboard-core` / `@meshkee/dashboard-ui`
|
||||
- Migrate business and super-admin fully onto `@meshkee/dashboard-core` / `@meshkee/dashboard-ui` (LocaleProvider already shared)
|
||||
- Finish FA/EN coverage on remaining business form pages (many labels still English)
|
||||
- Connect product comments to backend
|
||||
- Wire order status transitions to store `orderProcessSteps`
|
||||
- Enforce `onlineSellEnabled` on public website checkout
|
||||
|
||||
Reference in New Issue
Block a user