Maintenance items
What it is
Section titled “What it is”A maintenance item is a scheduled task tracked against a single asset — an Annual Inspection, an ARC renewal, a 50-Hour check, an oil change. Each item records:
- What the task is (name, description).
- When it is next due (calendar date, or meter value).
- Its current status, calculated from how close to due it is.
- A completion history — who completed it, when, and at what meter value.
Items are either one-off (created by hand for a specific asset) or recurring (created from a maintenance template, with a new instance auto-created on completion).
Who can use it
Section titled “Who can use it”- All members can see maintenance items on assets in their syndicate.
- Admins and owners can create, edit, and log completion. The RLS policy on
maintenance_logs("Admins can log maintenance") restricts the insert to syndicate admins, so a member who carried out a usage-based item themselves still asks an admin to record the completion.
Where to find it
Section titled “Where to find it”- Asset detail → Maintenance tile → Maintenance list.
- Route:
/syndicates/:syndicateId/assets/:assetId/maintenance. - A quick-stats card on the asset detail shows the next-due picture at a glance.
Fields / options
Section titled “Fields / options”| Field | Required | Notes |
|---|---|---|
| Name | Yes | Up to 100 characters. E.g. 100-Hour Check. |
| Description | No | Up to 500 characters. |
| Interval type | Yes | Hours or Days in the create form. Existing items may use Cycles — see Maintenance intervals. |
| Interval value | Yes | Number in the chosen unit (e.g. 50 for hours, 365 for days). |
| Last completed (date) | When calendar-based | Used to compute the next due date. |
| Last completed value | When usage-based | Meter value at last completion. |
| Warning threshold value | Optional | Absolute threshold in the same unit — see rules below. |
Computed read-only fields:
| Field | Meaning |
|---|---|
| Due at (date) | For calendar-based items: last_completed + interval_value days. |
| Due at value | For usage-based items: last_completed_value + interval_value. |
| Status | One of ok, approaching, dueSoon, overdue, completed. See Behaviour rules. |
Behaviour rules
Section titled “Behaviour rules”- Status calculation is automatic. It is derived from how much interval remains, not stored directly.
- Default thresholds (percentage-based):
- More than 20% remaining →
ok - 10–20% remaining →
approaching - 0–10% remaining →
dueSoon - Past due →
overdue
- More than 20% remaining →
- Absolute threshold takes priority. When an item has a warning threshold value set, the status uses absolute remaining instead of percentage:
- Remaining >
warningThresholdValue × 2→ok - Remaining ≤
warningThresholdValue × 2→approaching - Remaining ≤
warningThresholdValue→dueSoon - Remaining ≤ 0 →
overdue
- Remaining >
- Overdue grounds the asset. An overdue maintenance item makes the asset not airworthy and prevents new bookings. See Airworthiness rules.
- Completion creates a next item for recurring templates. One-off items stay as
completedand do not recur. - Completion records include
completedBy(user),completedAt(timestamp),lastCompletedValue(for usage-based) and optional notes. - The pre-booking maintenance check is computed locally. When a member opens the booking dialog, Syndik8 evaluates the asset’s open hours-based and calendar-based items against the synced meter reading and recent usage logs in around 10 ms — entirely on the device, no Edge Function call. The amber/red warning surfaces whether the device is online or offline. Calendar items raise an amber warning when the booking ends within 7 days of due. Hours-based items use a projected-remaining estimate based on the member’s recent usage rate.