Template:Category/Maintenance record/State
From Miniscope
Annotation emitter + Maintenance status sidebox for Template:Category/Maintenance record.
Called once via #ask|format=template|import-annotation=true
with the latest Maintenance record's date, performer(s), and type.
Mirrors Template:Category/Review record/State structurally — see that template for the rationale on import-annotation, single-line annotation block (whitespace-leak avoidance), and date arithmetic.
Does three jobs in one pass:
- Emits page-level annotations:
Has last maintained= MaintenanceDateHas next maintenance date= MaintenanceDate + the page's
Has maintenance interval (months).
- Renders the "Maintenance status" sidebox top half (status table).
- Renders a collapsible "Maintenance history" block at the bottom of
the sidebox via a nested #ask on all Maintenance record
subobjects, delegating per-row formatting to
Template:Category/Maintenance record/History row.
Parameters (named args from the parent #ask):
MaintenanceDate— ISO date of the latest maintenance eventPerformedBy— page link(s) to the person/people who
performed the latest maintenance event
Type— maintenance type (Calibration / Repair / Routine
Service / Inspection)