Maintenance & work ordersIssues
Issues — create, edit, delete
Fields, validation, and steps for issue dialogs in the tenant console.
Issue dialogs use react-hook-form with a Zod schema. Required fields must be valid before Create Issue or Save succeeds.
Create Issue
When to use
- You need a new issue row in the Issues list.
Steps
- Open Issues — list.
- Select New Issue.
- Fill the form (see fields below).
- Submit Create Issue.
Fields
| Field | Required | Validation / notes |
|---|---|---|
| Title | Yes | Non-empty string. |
| Vehicle | Yes | Must be a selected vehicle (UUID in schema). Options come from the console’s vehicle pick list for issues. |
| Category | Yes | Must be a selected category (UUID). |
| Priority | Yes | Must be a selected priority (UUID). |
| Status | Yes | Object with id, name, and value. Default create flow sets value Open. Allowed values: Open, Closed, Pending, Approved, Rejected. |
| Description | No | Free text. |
| Attachments | No | Optional list; each attachment has id, name, size (≥ 0), and type. Use the issue/incident uploader component in the dialog. |
After save (reviewed build)
The new issue is inserted at the top of the table with a generated id (pattern like IS-####), reportedBy set to a placeholder current user, and updatedAt formatted for display. This is session-local unless your deployment wires an API.
Edit Issue
Steps
- Open the row actions menu → Edit, or open the detail page and use Manage Issue when available.
- Change fields as needed.
- Save.
Validation matches Create Issue. The save handler replaces the row with the same id in the local list.
Delete Issue
Steps
- Open the row actions menu → Delete.
- Read the confirmation text.
- Confirm to remove the row from the local list.
Troubleshooting (forms)
- “Title is required” — enter a title.
- “Vehicle is required” — pick a vehicle from the select; empty string fails UUID validation.
- “Category is required” / “Priority is required” — choose values from the dropdowns.
- Status errors — ensure status
valueis one of the allowed enum strings above. - Attachments — each file entry must include size as a non-negative number.
For general form behavior, see How to Use Forms.