Skip to content

release: Fleet-Ops v0.6.70 - #343

Open
roncodes wants to merge 7 commits into
mainfrom
release/v0.6.70
Open

roncodes wants to merge 7 commits into
mainfrom
release/v0.6.70

Conversation

@roncodes

Copy link
Copy Markdown
Member

Summary

  • open the Fleet-Ops v0.6.70 release branch
  • synchronize the extension, frontend package, and API package versions
  • prepare release notes for order reporting and the default dashboard

Planned release work

  • Custom field persistence fixes and order reporting schema #342:
    • the order reporting schema: items, tracking, identifiers, summary columns and soft deletes, with 13 dead column references removed;
    • custom field values persisting on fuel reports and service areas;
    • declared default dashboard order and live-map cards in the Live Fleet widget.

Merging this closes #342.

Related

  • Release v1.6.64 core-api#271 (v1.6.64): expression columns, soft deletes and computed group keys used by the order schema. The schema also registers on older core-api.
  • Release v0.4.4 ember-ui#184 (v0.4.4): report builder changes and default dashboard ordering.
  • fleetbase/ledger v0.0.11: ledger's widgets on the default dashboard.

@fleetbase/ember-ui stays at ^0.4.3 here, because 0.4.4 isn't published yet. Without it the dashboard order is ignored rather than breaking anything. Bump the dependency once ember-ui v0.4.4 is published.

🤖 Generated with Claude Code

… values

Ember Data's REST serializer sends a record under a camelCase root
(`fuelReport`, `serviceArea`). The base controller's payload reader
accepts both spellings, so the ordinary attributes saved, but these two
afterSave hooks read `$request->array('fuel_report.custom_field_values')`
and `'service_area.custom_field_values'` from the raw request, which was
always empty. No custom field value was ever persisted for either
resource; single-word resources (driver, vehicle, ...) were unaffected.

Read the values from the payload the base controller already extracted,
which the after hook receives as its third argument, so the root key's
spelling no longer matters.

Found while testing the ember-ui signature pad custom field on a fuel
report: the upload landed, the report saved, and the value vanished.
…refront totals

The Orders report table was missing most of what an order report needs, and
several tables referenced columns that do not exist.

Orders
- Order ID / Internal ID now show (core-api hid every *_id column as a key).
- New columns: customer and facilitator kind, dispatched/started flags, time
  window, ad hoc distance, POD method, route optimized, priority, notes.
- Storefront totals from meta as expression columns: storefront, currency,
  subtotal, delivery fee, tip and total (in the currency's smallest unit).
- Summary columns: total/completed/canceled orders (distinct, so they stay right
  when items are joined), order total/average, delivery fees, tips; the
  transaction sums now read transaction.amount instead of a missing orders.amount.
- New relationships: tracking number (+ latest tracking status), order config,
  customer vendor, created by, purchase rate -> service quote, payload return.
- Payload now has its own columns and exposes its items (payload.entities, one
  row per item) with name, SKU, price, product ID, quantity and line total
  from meta, plus the item destination.
- Distance/duration are labelled in meters/seconds (what is stored); the
  km->miles transformer on a meters column is gone.

Other tables
- Drivers: name/email/phone and current_vehicle_uuid do not exist on drivers;
  use the user and vehicle relationships.
- Vehicles: the driver join used a non-existent current_driver_uuid.
- Fuel reports: cost/odometer_reading/report_date do not exist; use amount,
  odometer, metric unit and created_at.
- Every table and item join leaves soft-deleted rows out.

Requires fleetbase/core-api feature/report-framework-enhancements for expression
columns and soft-delete filtering; on older core-api releases the schema still
registers (the new columns fall back to plain computed columns).
meta has no fixed structure: users, integrations and extensions each put
their own keys there, so a column such as "Order Total" read from
meta.total is empty or wrong for most orders. Remove the columns built on
meta keys (storefront, order currency/subtotal/delivery fee/tip/total, the
order total/average/fee/tip summaries, and item product ID, quantity and
line total). meta stays selectable as raw JSON on orders and items, and a
key is read with a computed column, e.g.
CAST(JSON_UNQUOTE(JSON_EXTRACT(payload.entities.meta, '$.quantity')) AS DECIMAL(15,2)).
A table's own columns no longer repeat the table's name: Orders "Order ID"
and "Order Type" are "ID" and "Type", and every table's public ID is "ID".
Relationship labels are tuned for core-api's whole-name prefixes:
"Tracking Status" (not "Tracking Status Status"), "Service Quote Amount",
"Transaction Gateway ID", "Transaction Item Quantity", "Inspection Form Name",
"Target Vehicle ID".
…Fleet widget

Default dashboard
- Fleet-ops widgets declare an `order` so the shared default dashboard lays
  out cleanly beside other extensions' widgets: the KPI row (Radar, Active
  Orders, Drivers Online, with ledger's Revenue), ledger's KPI row, the Live
  Fleet Map at full width, then Revenue Trend, Top Drivers and Maintenance
  Overview a third of the width each.
- Earnings and Avg Order Value are no longer defaults (still addable).

Live Fleet widget
- Its marker popups and hover tooltips are now the live map's own cards: the
  driver and vehicle cards moved into shared Map::MarkerCard::Driver/Vehicle
  components (the live map rendered each twice, inline), and the widget uses
  them too.
- /fleet-ops/analytics/live-fleet adds each marker's `card`, the same index
  resource the live map's endpoints return (status, driver, trailers,
  devices, order, speed, heading, location labels).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant