"use client";
/* This facility's rules, as the counter applies them: the panel at the top of Help. It was the whole
* Help page until the manual arrived (docs/manual); it stays because it is the one place the rules
* are stated with this facility's own figures rather than the defaults.
*
* Every figure is read from this facility's own settings rather than written in, so the page can't
* quote a number the facility has changed. The import rules are the templates' own notes, so they
* can't drift from what the importer accepts. */
import Link from "next/link";
import { useSnap } from "@/lib/client";
import { CSV_TEMPLATES } from "@/lib/csv";
import { FTE_SETS, SLIP_DAYS } from "@/lib/compute";
import { SET_GARMENTS, setsCap, setsOnStart } from "@/lib/sets";
function Section({ title, more, children }: { title: string; more?: string; children: React.ReactNode }) {
return (
- Up to {cap} sets at any time — {cap} tops and {cap} pairs of trousers. The same for every staff group, nursing included.
- It counts everything issued and not handed in or returned, plus anything on order for them, waiting at the counter, or approved and not yet collected. Pre-loved garments count.
- Garments that aren't part of a set — fleeces, jackets, maternity wear — have their own ceiling of {cap}.
- It isn't a yearly allowance and nothing resets in July. At the ceiling, the next garment comes by handing one in first, or on a coordinator's override, which is recorded.
- Change the figure under Settings → Issuing rules, as Most anyone holds.
- Orders → To order lists every size at or below its reorder level, topped up to twice the level and netted off what is already on order, one panel per supplier. Adjust the quantities, add a line, type the supplier order no., then Order and email (Order when the supplier has no order email).
- A person's order from the counter stays its own order — one per supplier per person — so an order placed under their account at the supplier is never merged into the shelf's.
- Sheet prints the supplier's A4 sheet with their product codes. The email goes to the Order email under Settings → Catalogue & suppliers. Enter each size's code once, on the garment's page under Ordering. Invoice and tracking numbers go on the order's own page, opened from On the way.
Each staff group is on one route, chosen under Settings → Issuing rules, on the staff groups board. All three stop at the same {cap} sets.
- FTE table — the hours someone works propose their starting kit: {table.map(([fte, n]) => `${fte} FTE ${n}`).join(", ")} sets; a casual is at the manager's discretion. A manager may sign for more.
- Starting kit — {start} sets on the first day ({start * SET_GARMENTS} garments), then more as needed. Nothing has to be handed back first.
- Manager approval — no starting kit; the manager approves each set that is asked for. The counter checks the ceiling, not whether an approval is on file.
- A group can't be on two routes. Taking a group with staff in it off the list puts them on manager approval, so move them to another group or rename it instead.
“Items (FY)” on Reports → People counts what someone has drawn since 1 July. It feeds the reports and the Exceptions list, and never limits what the counter issues. Groups on the FTE table aren't measured against one.
- Handing a garment in frees room at the counter straight away, whether or not the credit box is ticked.
- The credit tick adds the good garments back to the yearly figure and to the manager's approval. Pre-loved garments earn neither.
- Good garments join the pre-loved pool and are reissued free; rags are counted for disposal.
A garment's type decides how it counts. Tops and trousers are each half a set; every other type counts toward the separate ceiling. A type typed in by hand that isn't on the list counts toward no set, so pick from the list.
Each garment is tagged for the staff groups that wear it, or for all groups. Staff can only request their own groups' garments, and the counter needs a coordinator's override, which is recorded, to issue anyone a garment outside their group.
A garment is also men's, women's or unisex. Somebody is offered the cut set as their Uniform style plus everything unisex; blank means every style until a coordinator sets it, and the counter needs the same override, also recorded, to issue anyone another cut.
- On the person's record, under Details & access → Staff app, generate a code and print the slip. A code works once and expires after {SLIP_DAYS} days.
- Record their manager first, under Manager on the same tab — nobody can raise a request without one.
- A request goes to the person's manager — the same person who signs their paper order form.
- A manager can raise requests for the people who report to them; those go to the manager above. With nobody above, the request waits on Requests under Needs an approver.
- Nobody approves a request they raised for somebody else.
- Anyone can be set as their own manager; what they approve for themselves is marked Self-approved.
A count in progress on Stock → Count is saved in this browser only, under your sign-in. It survives a reload, but not a move to another computer or the phone — finish a count where you started it.
Settings → Data & audit log imports each list from a CSV file. The rules for each:
{Object.entries(CSV_TEMPLATES).map(([k, t]) => - {t.name} — {t.note}
)}
People → Export CSV writes headers the import reads back, so a ward's list can go to its manager, come back with Manager number filled in, and be imported again.
Reports → Spend → Journal: one debit line per cost centre, priced at each garment's cost on the day it was issued. Finance posts the balancing credit.
- You — password resets, and updates you've subscribed to.
- Staff — only about their own requests, once they've set up the staff app.
- Managers — the link to approve or decline a request.
);
}