Introduction
Order presentation profiles let your extension give its own order type a custom order form, details view and actions in Fleet-Ops — composed from Fleet-Ops' own sections and yours — while every other order keeps the standard screens.
Order Presentation
Fleet-Ops has one order form and one order details view, designed for deliveries: a driver, a vehicle, a route, dispatch, proof of delivery. Every order type uses them.
Some order types aren't deliveries. A vehicle loan, an equipment rental, a service appointment or a document collection still benefits from being a Fleet-Ops order, with tracking numbers, an activity history, comments, documents, the map and the board. But its form needs different fields, and its details view should lead with different information.
An order presentation profile lets your extension give its order type its own form, details view and actions, without forking Fleet-Ops' screens.
What a Profile Changes
The Order Form
On the left is the form every order type gets. On the right is the same form for an Equipment rental order, with a profile that:
- adds a section from the extension's own engine (Equipment), and leaves out the sections a rental doesn't use;
- adds fields to the details section (Rental reference, Depot);
- hides fields that don't apply (driver, vehicle, dispatch, …);
- renames the route section to "Delivery & collection", and hides multi-drop routing.
The Details View
The profile can lead the details view with its own summary, keep only the native sections that matter, and remove actions such as Assign driver from the "…" menu and the orders table.
What You Can Customize
| What | Page | |
|---|---|---|
| Form sections | Which sections the order form has, and in what order: Fleet-Ops' own and yours | The Order Form |
| Form fields | Extra fields in the details section, hidden fields, the route section's title | Form Fields |
| Details sections | Which sections the details view has, and in what order | The Details View |
| Actions | Which built-in actions the orders table and details menu offer | Actions |
| Drafts | What happens when a user switches a new order to, or away from, your order type | Drafts and Validation |
Only Your Order Type Changes
A profile applies to an order only when the order's order config, its order type, names the profile. Every other order, and every other order type, keeps the standard Fleet-Ops form and details view exactly as before. See How It Works.
Presentation, Not Behaviour
A profile changes what the console shows. It doesn't change what an order does: its statuses, whether it can be dispatched, or which steps it can move to. For that, give the order config a configured lifecycle. Most order types with a profile have one too:
| Order presentation profile | Configured order lifecycle | |
|---|---|---|
| Changes | The form, details view and actions in the console | The order's activities, dispatch, and allowed transitions |
| Defined in | Your extension's extension.js | The order config's meta.lifecycle |
| Enforced by | The console | The API |
Requirements
Order presentation profiles and configured lifecycles need Fleet-Ops 0.6.71 or later.