feat: ( reports ) add fleet passenger overview to passengers landing page

This commit is contained in:
Abubeker Yasin
2026-08-13 16:20:21 +03:00
parent aabf58320a
commit 62b2080aaf
4 changed files with 780 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { Users, Armchair, BarChart3, Train, Download } from "lucide-react";
import { apiClient } from "@/lib/api-client";
import FleetPassengerOverview from "@/components/reports/FleetPassengerOverview";
import { formatDateTime } from "@/lib/utils";
import ActionButton from "@/components/ui/ActionButton";
import Pagination from "@/components/ui/Pagination";
@@ -585,12 +586,9 @@ export default function PassengersReportPage() {
</div>
)}
{!scheduleId && (
<div className="card py-16 text-center text-muted-foreground">
<Armchair className="h-10 w-10 mx-auto mb-3 opacity-30" />
<p>Select a schedule above to load the occupancy report</p>
</div>
)}
{/* Landing state only. Unmounts the moment a schedule is selected, leaving the
per-schedule report above untouched. */}
{!scheduleId && <FleetPassengerOverview onSelectSchedule={setScheduleId} />}
</div>
);
}