"use client"; /* The manager's ward view: who on their team holds what. * * A list, not a dashboard. The only computed thing on it is each person's set count, and the * footnote exists because the first question a manager asks about "3 of 6 sets" is whether * something has to come back before the next set can. Nothing does — the owner's rule is six held * at any time, reached without handing anything in. */ import { MBody, MRule, MTop } from "@/components/m"; import { INK, N600, N700 } from "@/components/staffui"; import ManagerNav from "./ManagerNav"; import { fmtDate } from "@/lib/compute"; type Row = { id: string; name: string; group: string; held: number; lastIssued: string; capped: boolean; setsLabel: string; isNewStarter: boolean }; export default function WardScreen({ ward, rows, anyCapped }: { ward: string; rows: Row[]; anyCapped: boolean }) { return ( <> {rows.length} staff} /> {rows.length === 0 ? (
Nobody is recorded as reporting to you. The linen room sets who approves each staff member on their record.
) : ( <>
{ward || "Your team"} Items held
{rows.map((r) => (
{r.name}
{[ r.group, r.capped ? r.setsLabel : "", r.isNewStarter && r.lastIssued ? `set issued ${fmtDate(r.lastIssued)}` : "", ].filter(Boolean).join(" · ")}
{r.held}
))} )} {anyCapped && (

The figure against each person is how many sets they hold, out of the most anyone may hold at once. Nothing has to be handed back before the next set is issued.

)}
); }