feat(dashboard): Jalali date pickers + mobile/tablet responsive shell
CI/CD / CI · API (dotnet build + test) (push) Successful in 51s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 38s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m5s
CI/CD / CI · Admin Web (tsc) (push) Successful in 37s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 50s
CI/CD / Deploy · all services (push) Successful in 2m41s

Full Persian calendar:
- New JalaliDateField — Shamsi popover picker (Saturday-first weeks,
  Persian digits, امروز shortcut); wire format stays ISO Gregorian
  YYYY-MM-DD. Falls back to the native input for the en locale.
- Replaces all 5 native type="date" inputs (Gregorian-only pickers):
  reservations, expenses from/to, reports from/to.
- Reservations list date now renders Jalali instead of the raw ISO
  string; branches purge timestamp now formats with fa-IR.

Responsive shell (mobile + tablet):
- New MobileNav: hamburger in the topbar (< md) opening an RTL-aware
  slide-over drawer with all nav destinations, permission-filtered,
  Escape/backdrop close and body scroll lock.
- Desktop sidebar hidden below md; header center cluster (clock/plan)
  hidden below md; language switcher hidden below sm.
- Main content padding scales p-3 → p-4 → p-6.
- Verified at 375px and 768px: no horizontal overflow, drawer and
  Jalali picker fully functional.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-11 23:10:38 +03:30
parent d811b7d6d5
commit 2a4cf1d20b
10 changed files with 439 additions and 53 deletions
@@ -11,6 +11,7 @@ import { isoTodayTehran } from "@/lib/reports/analytics";
import { PageHeader } from "@/components/layout/page-header";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { JalaliDateField } from "@/components/ui/jalali-date-field";
import { LabeledField } from "@/components/ui/labeled-field";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
type Branch = { id: string; name: string };
@@ -172,27 +173,10 @@ export function ExpensesScreen() {
</select>
</LabeledField>
<LabeledField label={t("fromDate")} htmlFor="exp-from">
<Input
id="exp-from"
type="date"
dir="ltr"
className="w-40 text-end"
value={from}
max={to}
onChange={(e) => setFrom(e.target.value)}
/>
<JalaliDateField id="exp-from" className="w-40" value={from} onChange={setFrom} />
</LabeledField>
<LabeledField label={t("toDate")} htmlFor="exp-to">
<Input
id="exp-to"
type="date"
dir="ltr"
className="w-40 text-end"
value={to}
min={from}
max={today}
onChange={(e) => setTo(e.target.value)}
/>
<JalaliDateField id="exp-to" className="w-40" value={to} onChange={setTo} />
</LabeledField>
<div className="ms-auto text-end">
<p className="text-[11px] font-medium uppercase tracking-[0.06em] text-muted-foreground">