> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fleet Maintenance

> Manage fleet vehicle maintenance schedules at /fm/fleet/maintenance with overdue detection, trigger-type filters, and work order generation.

This screen lists fleet maintenance schedules and is available at `/fm/fleet/maintenance`.

## Overview

The Fleet Maintenance page uses `useFleetMaintenance` to load maintenance schedules with pagination (page size 20). URL-synced filters include: vehicle, status (active/inactive/all, defaulting to active), trigger type (from `MAINTENANCE_TRIGGERS`), and overdue toggle. An **overdue count** from the query result is displayed in the header subtitle. When `overdueCount > 0` and the overdue filter is not active, a destructive alert banner appears with a "Show Overdue Only" shortcut. The data table shows: Maintenance name with description, Vehicle, Trigger type badge, Next Due Date (warning color if within 7 days, destructive if past), Next Due Odometer, Status badge, and an Actions dropdown (Edit, Generate Work Order, Activate/Deactivate, Delete). Generating a work order requires confirmation and creates a work order from the schedule. Deleting is a soft delete with confirmation.

## Who it's for

Requires permission `fm.dashboard.view`. Write actions require `fm.fleet.edit` or `fm.fleet.admin` — confirm with SME.

## Before you start

* Fleet vehicles must exist before maintenance schedules can be created.

## Steps

<Steps>
  <Step title="Open Fleet Maintenance">Navigate to `/fm/fleet/maintenance` via the Fleet menu.</Step>
  <Step title="Review overdue alert">If the alert banner is visible, click **Show Overdue Only** to filter to overdue items.</Step>
  <Step title="Apply filters">Use the Vehicle, Status, Trigger Type dropdowns and the Overdue toggle to narrow the list.</Step>
  <Step title="Add a schedule">Click **Add Schedule** to open `FleetMaintenanceFormDialog`.</Step>
  <Step title="Generate a work order">From the Actions dropdown on a row, click **Generate Work Order** and confirm to create a work order for that schedule.</Step>
  <Step title="Edit a schedule">Click **Edit Schedule** from the Actions dropdown.</Step>
  <Step title="Deactivate or delete">Use **Deactivate** or **Delete** from the Actions dropdown; deletions require confirmation.</Step>
</Steps>

## Key concepts

* **Trigger type** — values from `MAINTENANCE_TRIGGER_LABELS` (e.g., date-based, mileage-based — confirm with SME).
* **Next due date warning** — yellow warning color within 7 days; red destructive color if past due.
* **Generate Work Order** — creates a new work order and updates the schedule's next due date/mileage automatically.

## Related

<Columns cols={2}>
  <Card title="Facilities & Inventory" icon="warehouse" href="/fm/overview">
    Facilities & Inventory core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fm.tsx
  * src/cores/fm/pages/FleetMaintenancePage.tsx
</Accordion>
