Private dev sandbox — Allied Laundry NZ
Staff assigned here are excluded from the normal Processing rotation only during the role's time window (Theatre and Packing are all-day; Sorting AM/PM are half-day). One person can hold only one role at a time. Changing a role does not retroactively touch an already-generated week — re-run Generate weekly rotation on the Dashboard if you want a regenerated week to reflect it.
Skeleton phase live. Each phase unlocks its tab as we build.
Populate appDataV4/staff. Mock generator makes
synthetic staff for algorithm testing; V2.5 import is a fallback
before the Allied API is wired up.
Pulls today's rostered staff from Allied
(employeesWithHours). Matches by full name.
Add / remove only — never edits an existing person.
New people are added with Needs setup flagged (you fill in
dept + certs); people missing from today's roster are marked
inactive, not deleted, and reactivated automatically if
they reappear. Everything else you've set — name spelling, hours,
dept, certs, workDays, notes — is left exactly as you left it.
Pre-algorithm testing tool. Fills a day respecting dept, certs,
mode counts, and fill priority — but with no fairness or HP-cap logic
(that's Phase 2). Proves Day storage + Activity rollup work correctly
before the real algorithm is built on top of them. Simulated days are
tagged source: simulated so they're never confused with
real rotations.
After simulating some days, open any staff \u2192 History tab to see their per-slot assignments and rolling 30-day summary.
The algorithm spreads heavy work fairly by remembering who\u2019s done what. This is that memory, made visible \u2014 it\u2019s rebuilt from the actual daily records (your manual changes included), so it always reflects how the plant really ran, not a separate tally that can drift.
Fairness-aware, HP-capped, catcher-mutex, same-day no-repeat.
Uses each staff member's rolling 30-day activity plus this
week's accumulated history to decide who gets what \u2014 the
real thing, not the naive test filler above. Tagged
source: algorithm in Day storage.
Flags (under-filled roles, HP-cap overshoots) log to the F12
console with a [v4-algo] prefix and summarise in the
status line above. Generate locks per week (see Dashboard) and
auto-pushes the previous week to Allied on first press.
Fires automatically the first time Generate is pressed for a new week (sends the week before it). Use this to test packaging, or to manually retry a week that failed to send.
Changes the TV display's look \u2014 applies live to the floor screen and the embedded preview in the Kiosk tab, no reload needed. Purely decorative (background, particle effect, accent colour); task colour-coding stays the same in every theme.
V4 has its own admin list, separate from V2.5. The owner
(—) always has access.
A user must already exist in Firebase Authentication before being added here.
Supervisors sign in and see Dashboard + Leave only. They can view rotations, switch days/slots, mark or unmark absences, and use the Leave calendar — but cannot generate rotations, move staff, toggle Catcher, or call in casuals. A user must already exist in Firebase Authentication before being added here.
Task definitions, roles, HP, mode counts, shifts, rotation times. Roles are new in V4 — each task has one or more roles (e.g. Ironer 1 has "main" + "catcher"). Save re-applies the config immediately.
Wipes the current config and re-seeds with the V4 default task list (10 Processing tasks + 4 Washroom tasks, roles included). Staff, admins, and any day data are untouched.