Maintenance scheduling tool - asset log, overdue-first view, test-piece records, and spare-part minimums on one page; missing data goes to a gray zone
You are a coding agent. Build a single-file HTML "maintenance
scheduler" tool for a central kitchen equipment maintenance
lead: asset register, service due dates, overdue alerts,
metal-detector test-piece records, and spare-part minimums on
one page. Runs locally in the browser - no network, no
installs, no external resources of any kind.
1. Asset register (data block one)
- Fields: asset number / name / location (station) /
service interval (daily/weekly/monthly/quarterly/
semiannual; one asset may hold several) / last service
date / owner / service mode (in-house / vendor name)
- Entry one by one or paste CSV; stored in localStorage
2. Due and overdue (main view)
- Next due = last service date + interval; past today
means overdue
- Main table: asset / next due / days from today, three
colors - overdue (red) / due within [7] days
(yellow) / normal
- Sort is fixed by days overdue, most first, never
alphabetical - the red zone is the lead's morning
work order
- Assets missing either the interval or the last
service date go to a "register incomplete" gray zone
with no due-date math - missing data is never guessed,
but the gray zone stays on the page; every entry fixed
shrinks it
3. Service-item templates
- Each interval holds an editable task list (what is
done, which consumables); completing a service ticks
the items, generates the record, and refreshes the
"last service date"
4. Metal-detector test-piece records (standalone module)
- Form: date / shift / pass position / three-material
detection / reject executed / tester
- On any "not detected" or "reject failed" entry, the
page pops the full containment script (stop and tag,
isolate and re-run since the last pass, troubleshoot
in order) and marks the record red
- The module exports monthly as text - a standing
customer-audit item
5. Spare-part minimums
- Fields: part / on-hand / minimum / supplier / last
replenished; below minimum flags yellow and builds a
copyable "to-order list"
6. Export
- Full JSON export / import
- "This month's overdue and to-order" copies as text in
one click, formatted to paste straight into the
weekly report
UI: desktop first; the lead opens it in the morning and
reads the red zone. Deliver one complete HTML file, all
CSS and JS inline, with a Chinese usage note under two
hundred words.
Why it is written this way
Sorting by days overdue rather than asset name follows from what a default view does to a morning. An alphabetical register is a dictionary - searchable, but it pushes nothing; sorted by overdue it becomes a work order - open it and the first task of the day requires no thought. Maintenance programs are rarely defeated by technology; they are defeated by the "remembered to check" step, and the default view is that step.
The gray zone for incomplete records guards against the maintenance system's darkest pit: an asset with no last-service date is invisible to every reminder - no due date, no appearance in any view - until it breaks mid-shift. Parked permanently in gray, the gaps are visible daily and shrink one entry at a time. Faking a date to pull it into the normal list would do the opposite: hide it.
Hanging the test-piece module inside the maintenance tool rather than a QC system follows the rule that records survive closest to execution: the daily metal-detector check is run by the equipment crew, and routing them to a QC screen to type entries is how the backfilling starts within two weeks. Popping the containment script on a "not detected" entry welds the SOP into the tool - nobody opens a binder during a line-down event, and the paragraph on screen becomes the entire basis of that response. That one feature turns an SOP from wall paper into part of the process.
One-click report copy solves the friction that quietly kills data discipline. The cheaper it is to report upward in the expected format, the longer the data keeps flowing - a tool's value is not feature count but whether people want to open it daily. Full JSON export keeps the data portable, and running fully offline keeps the register (vendor names included) from ever leaving the plant - together, the two conditions under which a tool like this gets allowed on the floor at all.
Variables
| Variable | Description |
|---|---|
| Yellow lead days | Days-before-due that turns yellow; default 7, set by consumable lead times |
| Interval tiers | Whether custom tiers beyond daily/weekly/monthly/quarterly/semiannual are needed, per the plant's equipment mix |