Conversation
… 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Planned release work
Merging this closes #342.
Related
@fleetbase/ember-uistays at^0.4.3here, because 0.4.4 isn't published yet. Without it the dashboardorderis ignored rather than breaking anything. Bump the dependency once ember-ui v0.4.4 is published.🤖 Generated with Claude Code