Maintenance & work ordersIncidents
Incidents — create, edit, delete
Fields, validation, and steps for incident dialogs.
Incident dialogs share the same validation style as issues: Zod schema + react-hook-form.
Create Incident
Steps
- Open Incidents — list.
- Select New Incident.
- Complete the form.
- Submit to create.
Fields
| Field | Required | Validation / notes |
|---|---|---|
| Title | Yes | Non-empty string. |
| Vehicle | Yes | UUID string from vehicle select. |
| Category | Yes | UUID string from category select. |
| Priority | Yes | UUID string from priority select. |
| Status | Yes | Object with id, name, value where value is one of: Open, Closed, Pending, Approved, Rejected. Default create flow uses Open. |
| Description | No | Free text. |
| Attachments | No | Same shape as issues: id, name, size ≥ 0, type. |
After save (reviewed build)
The incident is prepended to the table with a generated id and reporter metadata, updating only the local list state.
Edit Incident
Use the row Edit action, adjust fields, and save. Same validation as create.
Delete Incident
Use Delete from the row menu, confirm in the modal, and the row is filtered out of local state.
Troubleshooting
- Mirror Issues — forms for required-field and UUID messages.
- See How to Use Forms for general guidance.