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
@@ -25,6 +25,7 @@ import {
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";
import { cn } from "@/lib/utils";
@@ -222,30 +223,19 @@ export function ReportsScreen() {
</div>
<LabeledField label={t("fromDate")} htmlFor="report-from">
<Input
<JalaliDateField
id="report-from"
type="date"
dir="ltr"
className="w-40 text-end"
className="w-40"
value={range.from}
max={range.to}
onChange={(e) =>
setRange((r) => ({ ...r, from: e.target.value, preset: "custom" }))
}
onChange={(iso) => setRange((r) => ({ ...r, from: iso, preset: "custom" }))}
/>
</LabeledField>
<LabeledField label={t("toDate")} htmlFor="report-to">
<Input
<JalaliDateField
id="report-to"
type="date"
dir="ltr"
className="w-40 text-end"
className="w-40"
value={range.to}
min={range.from}
max={isoTodayTehran()}
onChange={(e) =>
setRange((r) => ({ ...r, to: e.target.value, preset: "custom" }))
}
onChange={(iso) => setRange((r) => ({ ...r, to: iso, preset: "custom" }))}
/>
</LabeledField>