improvement: rtl direction, solar calendar and persian formatting added for persian users.
This commit is contained in:
@@ -24,6 +24,8 @@ Monorepo: `backend/` (NestJS + Prisma), `frontend/` (Next.js + next-intl), `infr
|
||||
|
||||
All user-visible strings: `frontend/messages/en.json`, `fa.json`, `nl.json` — add keys to **all three**.
|
||||
|
||||
Dates/times/numbers: `frontend/src/lib/i18n/format.ts` + `useLocale()`. **Form date fields:** `AppDateInput` only (no native `<input type="date">`); wire format `YYYY-MM-DD`. **Filter selects:** `FORM_SELECT_CLASS` from `components/shared/formSelectStyles.ts` (chevron via `globals.css`). **Tables:** `components/ui/shared/Table.tsx` — use `text-start`/`text-end`/`text-center`, never physical `text-left`/`text-right`. Appointments: `ScheduleDayPicker`. Skill: `.cursor/skills/i18n-formatting/SKILL.md`.
|
||||
|
||||
## Treatment / appointment colors
|
||||
|
||||
Treatment-type colors and labels: `components/shared/treatmentTypeDisplay.ts` + `catalog-type-colors.ts`. UI badges: `components/ui/treatment/TreatmentTypeBadge.tsx`.
|
||||
|
||||
@@ -51,3 +51,14 @@ Reference: `app/.../treatment/page.tsx` + `components/ui/treatment/TreatmentWork
|
||||
1. Check `components/ui/shared/` for an existing primitive.
|
||||
2. Check the feature's `ui/{feature}/` folder for an existing pattern.
|
||||
3. Add i18n keys to en, fa, and nl.
|
||||
|
||||
## Shared form & table primitives
|
||||
|
||||
| Need | Use |
|
||||
|------|-----|
|
||||
| Date filter / due date field | `AppDateInput` (`ui/shared/`) — not `<input type="date">` |
|
||||
| Filter or inline `<select>` | `FORM_SELECT_CLASS` from `components/shared/formSelectStyles.ts` |
|
||||
| Tiny select (sort dir, etc.) | `FORM_SELECT_COMPACT_CLASS` |
|
||||
| Desktop data table | `Table` (`ui/shared/Table.tsx`) — logical alignment only |
|
||||
|
||||
Styles for `.form-select` chevrons live in `styles/globals.css`. Do not duplicate chevron icons on raw selects.
|
||||
|
||||
Reference in New Issue
Block a user