@fleetbase/fleetops-engine 0.6.65 → 0.6.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE.md +18 -6
- package/addon/components/ai/create-order-preview.hbs +10 -5
- package/addon/components/asset/pill.hbs +24 -0
- package/addon/components/asset/summary.hbs +1 -0
- package/addon/components/asset-connection/pill.hbs +24 -0
- package/addon/components/asset-connection/summary.hbs +1 -0
- package/addon/components/attachable/pill.hbs +24 -0
- package/addon/components/attachable/summary.hbs +1 -0
- package/addon/components/cell/asset-connection-identity.hbs +1 -0
- package/addon/components/cell/asset-identity.hbs +1 -0
- package/addon/components/cell/attachable-identity.hbs +1 -0
- package/addon/components/cell/contact-identity.hbs +1 -0
- package/addon/components/cell/customer-identity.hbs +1 -0
- package/addon/components/cell/device-event-identity.hbs +1 -0
- package/addon/components/cell/device-identity.hbs +1 -24
- package/addon/components/cell/driver-identity.hbs +1 -33
- package/addon/components/cell/entity-identity.hbs +1 -0
- package/addon/components/cell/equipment-identity.hbs +1 -5
- package/addon/components/cell/facilitator-identity.hbs +1 -0
- package/addon/components/cell/fleet-driver-identity.hbs +1 -0
- package/addon/components/cell/fleet-identity.hbs +1 -0
- package/addon/components/cell/fuel-provider-connection-identity.hbs +1 -0
- package/addon/components/cell/fuel-provider-transaction-identity.hbs +1 -0
- package/addon/components/cell/fuel-report-identity.hbs +1 -0
- package/addon/components/cell/inspection-form-identity.hbs +1 -0
- package/addon/components/cell/inspection-item-result-identity.hbs +1 -0
- package/addon/components/cell/inspection-submission-identity.hbs +1 -0
- package/addon/components/cell/integrated-vendor-identity.hbs +1 -0
- package/addon/components/cell/issue-identity.hbs +1 -0
- package/addon/components/cell/maintenance-identity.hbs +1 -0
- package/addon/components/cell/maintenance-schedule-identity.hbs +1 -0
- package/addon/components/cell/maintenance-subject-identity.hbs +1 -0
- package/addon/components/cell/manifest-identity.hbs +1 -0
- package/addon/components/cell/manifest-stop-identity.hbs +1 -0
- package/addon/components/cell/order-config-identity.hbs +1 -0
- package/addon/components/cell/order-identity.hbs +1 -0
- package/addon/components/cell/part-identity.hbs +1 -5
- package/addon/components/cell/payload-identity.hbs +1 -0
- package/addon/components/cell/place-identity.hbs +1 -0
- package/addon/components/cell/position-identity.hbs +1 -0
- package/addon/components/cell/purchase-rate-identity.hbs +1 -0
- package/addon/components/cell/recurring-order-schedule-identity.hbs +1 -0
- package/addon/components/cell/resource-list.hbs +10 -0
- package/addon/components/cell/resource-list.js +28 -0
- package/addon/components/cell/route-identity.hbs +1 -0
- package/addon/components/cell/sensor-identity.hbs +1 -0
- package/addon/components/cell/service-area-identity.hbs +1 -0
- package/addon/components/cell/service-quote-identity.hbs +1 -0
- package/addon/components/cell/service-quote-item-identity.hbs +1 -0
- package/addon/components/cell/service-rate-fee-identity.hbs +1 -0
- package/addon/components/cell/service-rate-identity.hbs +1 -0
- package/addon/components/cell/service-rate-parcel-fee-identity.hbs +1 -0
- package/addon/components/cell/telematic-identity.hbs +1 -0
- package/addon/components/cell/tracking-number-identity.hbs +1 -0
- package/addon/components/cell/tracking-status-identity.hbs +1 -0
- package/addon/components/cell/trailer-identity.hbs +1 -0
- package/addon/components/cell/vehicle-device-identity.hbs +1 -0
- package/addon/components/cell/vehicle-identity.hbs +1 -33
- package/addon/components/cell/vendor-identity.hbs +1 -0
- package/addon/components/cell/warranty-identity.hbs +1 -0
- package/addon/components/cell/waypoint-identity.hbs +1 -0
- package/addon/components/cell/work-order-identity.hbs +1 -0
- package/addon/components/cell/zone-identity.hbs +1 -0
- package/addon/components/contact/form.hbs +2 -4
- package/addon/components/contact/pill.hbs +24 -0
- package/addon/components/contact/summary.hbs +1 -0
- package/addon/components/customer/create-order-form.hbs +8 -4
- package/addon/components/customer/form.hbs +2 -4
- package/addon/components/customer/order-form.hbs +10 -8
- package/addon/components/customer/pill.hbs +24 -0
- package/addon/components/customer/summary.hbs +1 -0
- package/addon/components/device/details.hbs +3 -1
- package/addon/components/device/form.hbs +4 -13
- package/addon/components/device/panel-header.hbs +3 -2
- package/addon/components/device/panel-header.js +1 -5
- package/addon/components/device/panel-tabs/vehicle.hbs +2 -2
- package/addon/components/device/pill.hbs +24 -16
- package/addon/components/device/summary.hbs +1 -0
- package/addon/components/device/telemetry.hbs +17 -0
- package/addon/components/device/telemetry.js +117 -0
- package/addon/components/device-event/details.hbs +6 -24
- package/addon/components/device-event/pill.hbs +24 -0
- package/addon/components/device-event/summary.hbs +1 -0
- package/addon/components/driver/details.hbs +9 -1
- package/addon/components/driver/form.hbs +6 -18
- package/addon/components/driver/panel-header.hbs +3 -4
- package/addon/components/driver/panel-header.js +8 -1
- package/addon/components/driver/pill.hbs +16 -8
- package/addon/components/driver/summary.hbs +1 -0
- package/addon/components/entity/pill.hbs +24 -0
- package/addon/components/entity/summary.hbs +1 -0
- package/addon/components/equipment/details.hbs +6 -2
- package/addon/components/equipment/form.hbs +10 -4
- package/addon/components/equipment/pill.hbs +24 -20
- package/addon/components/equipment/summary.hbs +1 -0
- package/addon/components/facilitator/pill.hbs +24 -0
- package/addon/components/facilitator/summary.hbs +1 -0
- package/addon/components/fleet/details.hbs +6 -2
- package/addon/components/fleet/driver-listing.hbs +3 -12
- package/addon/components/fleet/form.hbs +8 -4
- package/addon/components/fleet/pill.hbs +24 -0
- package/addon/components/fleet/summary.hbs +1 -0
- package/addon/components/fleet/vehicle-listing.hbs +3 -12
- package/addon/components/fleet-driver/pill.hbs +24 -0
- package/addon/components/fleet-driver/summary.hbs +1 -0
- package/addon/components/fleet-driver-listing.hbs +2 -1
- package/addon/components/fleet-panel/details.hbs +6 -2
- package/addon/components/fleet-panel/driver-listing.hbs +2 -1
- package/addon/components/fleet-panel/vehicle-listing.hbs +2 -1
- package/addon/components/fleet-vehicle-listing.hbs +2 -1
- package/addon/components/fuel-integration/form.hbs +125 -25
- package/addon/components/fuel-integration/form.js +74 -19
- package/addon/components/fuel-integration/hub.hbs +68 -65
- package/addon/components/fuel-integration/hub.js +15 -19
- package/addon/components/fuel-provider-connection/pill.hbs +24 -0
- package/addon/components/fuel-provider-connection/summary.hbs +1 -0
- package/addon/components/fuel-provider-transaction/pill.hbs +24 -0
- package/addon/components/fuel-provider-transaction/summary.hbs +1 -0
- package/addon/components/fuel-report/details.hbs +9 -3
- package/addon/components/fuel-report/form.hbs +6 -3
- package/addon/components/fuel-report/pill.hbs +24 -0
- package/addon/components/fuel-report/summary.hbs +1 -0
- package/addon/components/fuel-transaction-status.hbs +1 -0
- package/addon/components/fuel-transaction-status.js +8 -0
- package/addon/components/geofence-map.hbs +19 -0
- package/addon/components/geofence-map.js +83 -0
- package/addon/components/inspection-field/form.hbs +103 -0
- package/addon/components/inspection-field/form.js +211 -0
- package/addon/components/inspection-field/input.hbs +270 -0
- package/addon/components/inspection-field/input.js +472 -0
- package/addon/components/inspection-field/value.hbs +90 -0
- package/addon/components/inspection-field/value.js +158 -0
- package/addon/components/inspection-flyout.hbs +34 -0
- package/addon/components/inspection-flyout.js +66 -0
- package/addon/components/inspection-form/builder.hbs +88 -0
- package/addon/components/inspection-form/builder.js +211 -0
- package/addon/components/inspection-form/details/submissions.hbs +48 -0
- package/addon/components/inspection-form/details/submissions.js +42 -0
- package/addon/components/inspection-form/details.hbs +97 -0
- package/addon/components/inspection-form/details.js +57 -0
- package/addon/components/inspection-form/form.hbs +93 -0
- package/addon/components/inspection-form/form.js +79 -0
- package/addon/components/inspection-form/pill.hbs +24 -0
- package/addon/components/inspection-form/summary.hbs +1 -0
- package/addon/components/inspection-item-result/pill.hbs +24 -0
- package/addon/components/inspection-item-result/summary.hbs +1 -0
- package/addon/components/inspection-link/list.hbs +94 -0
- package/addon/components/inspection-link/list.js +129 -0
- package/addon/components/inspection-sheet/group.hbs +45 -0
- package/addon/components/inspection-sheet/group.js +75 -0
- package/addon/components/inspection-sheet.hbs +77 -0
- package/addon/components/inspection-sheet.js +152 -0
- package/addon/components/inspection-submission/details.hbs +149 -0
- package/addon/components/inspection-submission/details.js +130 -0
- package/addon/components/inspection-submission/form.hbs +114 -0
- package/addon/components/inspection-submission/form.js +129 -0
- package/addon/components/inspection-submission/photos.hbs +20 -0
- package/addon/components/inspection-submission/photos.js +57 -0
- package/addon/components/inspection-submission/pill.hbs +24 -0
- package/addon/components/inspection-submission/summary.hbs +1 -0
- package/addon/components/integrated-vendor/pill.hbs +24 -0
- package/addon/components/integrated-vendor/summary.hbs +1 -0
- package/addon/components/issue/details.hbs +12 -0
- package/addon/components/issue/details.js +36 -0
- package/addon/components/issue/form.hbs +10 -5
- package/addon/components/issue/pill.hbs +24 -0
- package/addon/components/issue/summary.hbs +1 -0
- package/addon/components/layout/fleet-ops-sidebar.js +14 -3
- package/addon/components/maintenance/details.hbs +9 -3
- package/addon/components/maintenance/form.hbs +22 -3
- package/addon/components/maintenance/form.js +4 -4
- package/addon/components/maintenance/panel-header.hbs +14 -12
- package/addon/components/maintenance/pill.hbs +24 -0
- package/addon/components/maintenance/summary.hbs +1 -0
- package/addon/components/maintenance-schedule/details.hbs +7 -3
- package/addon/components/maintenance-schedule/form.hbs +20 -2
- package/addon/components/maintenance-schedule/form.js +6 -6
- package/addon/components/maintenance-schedule/pill.hbs +24 -0
- package/addon/components/maintenance-schedule/summary.hbs +1 -0
- package/addon/components/maintenance-schedule/work-orders.hbs +39 -0
- package/addon/components/maintenance-schedule/work-orders.js +37 -0
- package/addon/components/maintenance-subject/pill.hbs +24 -0
- package/addon/components/maintenance-subject/summary.hbs +1 -0
- package/addon/components/manifest/pill.hbs +24 -0
- package/addon/components/manifest/summary.hbs +1 -0
- package/addon/components/manifest-stop/pill.hbs +24 -0
- package/addon/components/manifest-stop/summary.hbs +1 -0
- package/addon/components/map/drawer/device-event-listing.hbs +4 -14
- package/addon/components/map/drawer/device-event-listing.js +3 -1
- package/addon/components/map/drawer/driver-listing.js +6 -2
- package/addon/components/map/drawer/position-listing.hbs +2 -16
- package/addon/components/map/drawer/vehicle-listing.js +1 -2
- package/addon/components/modals/add-driver-shift.hbs +2 -1
- package/addon/components/modals/assign-driver.hbs +2 -16
- package/addon/components/modals/attach-device.hbs +2 -1
- package/addon/components/modals/attach-equipment.hbs +2 -4
- package/addon/components/modals/attach-telematic-device.hbs +8 -1
- package/addon/components/modals/attach-trailer.hbs +2 -1
- package/addon/components/modals/bulk-assign-driver.hbs +2 -9
- package/addon/components/modals/bulk-assign-orders.hbs +2 -9
- package/addon/components/modals/driver-assign-order.hbs +2 -6
- package/addon/components/modals/driver-assign-vehicle.hbs +4 -12
- package/addon/components/modals/driver-assign-vehicle.js +30 -0
- package/addon/components/modals/driver-assign-vendor.hbs +2 -1
- package/addon/components/modals/driver-form.hbs +4 -2
- package/addon/components/modals/fleet-assign-driver.hbs +2 -1
- package/addon/components/modals/fleet-assign-vehicle.hbs +2 -1
- package/addon/components/modals/fleet-form.hbs +4 -2
- package/addon/components/modals/fuel-connection-diagnostics.hbs +35 -0
- package/addon/components/modals/fuel-connection-diagnostics.js +87 -0
- package/addon/components/modals/fuel-report-form.hbs +4 -2
- package/addon/components/modals/fuel-transaction-action.hbs +48 -0
- package/addon/components/modals/fuel-transaction-action.js +98 -0
- package/addon/components/modals/group-form.hbs +2 -1
- package/addon/components/modals/inspection-follow-up.hbs +31 -0
- package/addon/components/modals/inspection-follow-up.js +39 -0
- package/addon/components/modals/inspection-link.hbs +100 -0
- package/addon/components/modals/inspection-link.js +83 -0
- package/addon/components/modals/issue-assign.hbs +2 -1
- package/addon/components/modals/issue-from.hbs +8 -4
- package/addon/components/modals/map-layer-form.hbs +2 -1
- package/addon/components/modals/order-assign-driver.hbs +2 -16
- package/addon/components/modals/order-form.hbs +8 -46
- package/addon/components/modals/order-route-form.hbs +8 -4
- package/addon/components/modals/place-assign-vendor.hbs +3 -2
- package/addon/components/modals/place-details.hbs +1 -1
- package/addon/components/modals/point-map.hbs +1 -1
- package/addon/components/modals/radar-notice.hbs +24 -0
- package/addon/components/modals/radar-notice.js +8 -0
- package/addon/components/modals/radar-save-view.hbs +7 -0
- package/addon/components/modals/radar-select-resource.hbs +35 -0
- package/addon/components/modals/radar-send-pin.hbs +20 -0
- package/addon/components/modals/radar-send-pin.js +8 -0
- package/addon/components/modals/select-trailer.hbs +2 -4
- package/addon/components/modals/vehicle-form.hbs +2 -1
- package/addon/components/modals/vendor-form.hbs +2 -3
- package/addon/components/order/details/activity.js +9 -0
- package/addon/components/order/details/detail.hbs +2 -32
- package/addon/components/order/form/details.hbs +10 -48
- package/addon/components/order/form/route.hbs +10 -12
- package/addon/components/order/form/service-rate.hbs +2 -3
- package/addon/components/order/pill.hbs +24 -34
- package/addon/components/order/route-editor.hbs +8 -4
- package/addon/components/order/schedule-card.hbs +2 -1
- package/addon/components/order/summary.hbs +1 -0
- package/addon/components/order-config/pill.hbs +24 -0
- package/addon/components/order-config/summary.hbs +1 -0
- package/addon/components/part/details.hbs +15 -3
- package/addon/components/part/details.js +37 -1
- package/addon/components/part/form.hbs +12 -5
- package/addon/components/part/pill.hbs +24 -0
- package/addon/components/part/summary.hbs +1 -0
- package/addon/components/payload/pill.hbs +24 -0
- package/addon/components/payload/summary.hbs +1 -0
- package/addon/components/place/details.hbs +1 -1
- package/addon/components/place/pill.hbs +24 -0
- package/addon/components/place/summary.hbs +1 -0
- package/addon/components/position/pill.hbs +24 -0
- package/addon/components/position/summary.hbs +1 -0
- package/addon/components/positions-replay.hbs +2 -4
- package/addon/components/public-inspection.hbs +174 -0
- package/addon/components/public-inspection.js +279 -0
- package/addon/components/purchase-rate/pill.hbs +24 -0
- package/addon/components/purchase-rate/summary.hbs +1 -0
- package/addon/components/radar/agenda/entry.hbs +17 -0
- package/addon/components/radar/agenda/entry.js +26 -0
- package/addon/components/radar/agenda/lane.hbs +33 -0
- package/addon/components/radar/agenda/lane.js +80 -0
- package/addon/components/radar/agenda.hbs +69 -0
- package/addon/components/radar/agenda.js +29 -0
- package/addon/components/radar/briefing.hbs +108 -0
- package/addon/components/radar/briefing.js +43 -0
- package/addon/components/radar/bulk-bar.hbs +41 -0
- package/addon/components/radar/bulk-bar.js +32 -0
- package/addon/components/radar/decision-card.hbs +28 -0
- package/addon/components/radar/decision-card.js +7 -0
- package/addon/components/radar/empty-state.hbs +30 -0
- package/addon/components/radar/empty-state.js +27 -0
- package/addon/components/radar/filter-pills.hbs +22 -0
- package/addon/components/radar/filter-pills.js +3 -0
- package/addon/components/radar/handover-card.hbs +62 -0
- package/addon/components/radar/handover-card.js +14 -0
- package/addon/components/radar/header.hbs +28 -0
- package/addon/components/radar/header.js +12 -0
- package/addon/components/radar/item-drawer.hbs +92 -0
- package/addon/components/radar/item-drawer.js +37 -0
- package/addon/components/radar/item-list.hbs +20 -0
- package/addon/components/radar/item-list.js +3 -0
- package/addon/components/radar/item-row.hbs +90 -0
- package/addon/components/radar/item-row.js +43 -0
- package/addon/components/radar/keyboard-hints.hbs +8 -0
- package/addon/components/radar/keyboard-hints.js +3 -0
- package/addon/components/radar/subject.hbs +14 -0
- package/addon/components/radar/subject.js +26 -0
- package/addon/components/radar/view-bar.hbs +27 -0
- package/addon/components/radar/view-bar.js +16 -0
- package/addon/components/recurring-order-schedule/pill.hbs +24 -0
- package/addon/components/recurring-order-schedule/summary.hbs +1 -0
- package/addon/components/resource-activity.hbs +1 -0
- package/addon/components/resource-activity.js +4 -0
- package/addon/components/route/pill.hbs +24 -0
- package/addon/components/route/summary.hbs +1 -0
- package/addon/components/select-option/asset-connection.hbs +12 -0
- package/addon/components/select-option/asset.hbs +12 -0
- package/addon/components/select-option/attachable.hbs +12 -0
- package/addon/components/select-option/contact.hbs +12 -0
- package/addon/components/select-option/customer.hbs +12 -0
- package/addon/components/select-option/device-event.hbs +12 -0
- package/addon/components/select-option/device.hbs +12 -0
- package/addon/components/select-option/driver.hbs +12 -0
- package/addon/components/select-option/entity.hbs +12 -0
- package/addon/components/select-option/equipment.hbs +12 -0
- package/addon/components/select-option/facilitator.hbs +12 -0
- package/addon/components/select-option/fleet-driver.hbs +12 -0
- package/addon/components/select-option/fleet.hbs +12 -0
- package/addon/components/select-option/fuel-provider-connection.hbs +12 -0
- package/addon/components/select-option/fuel-provider-transaction.hbs +12 -0
- package/addon/components/select-option/fuel-report.hbs +12 -0
- package/addon/components/select-option/inspection-form.hbs +12 -0
- package/addon/components/select-option/inspection-item-result.hbs +12 -0
- package/addon/components/select-option/inspection-submission.hbs +12 -0
- package/addon/components/select-option/integrated-vendor.hbs +12 -0
- package/addon/components/select-option/issue.hbs +12 -0
- package/addon/components/select-option/maintenance-schedule.hbs +12 -0
- package/addon/components/select-option/maintenance-subject.hbs +12 -0
- package/addon/components/select-option/maintenance.hbs +12 -0
- package/addon/components/select-option/manifest-stop.hbs +12 -0
- package/addon/components/select-option/manifest.hbs +12 -0
- package/addon/components/select-option/order-config.hbs +12 -0
- package/addon/components/select-option/order.hbs +12 -0
- package/addon/components/select-option/part.hbs +12 -0
- package/addon/components/select-option/payload.hbs +12 -0
- package/addon/components/select-option/place.hbs +12 -0
- package/addon/components/select-option/position.hbs +12 -0
- package/addon/components/select-option/purchase-rate.hbs +12 -0
- package/addon/components/select-option/recurring-order-schedule.hbs +12 -0
- package/addon/components/select-option/route.hbs +12 -0
- package/addon/components/select-option/sensor.hbs +12 -0
- package/addon/components/select-option/service-area.hbs +12 -0
- package/addon/components/select-option/service-quote-item.hbs +12 -0
- package/addon/components/select-option/service-quote.hbs +12 -0
- package/addon/components/select-option/service-rate-fee.hbs +12 -0
- package/addon/components/select-option/service-rate-parcel-fee.hbs +12 -0
- package/addon/components/select-option/service-rate.hbs +12 -0
- package/addon/components/select-option/telematic.hbs +12 -0
- package/addon/components/select-option/trackable.hbs +8 -0
- package/addon/components/select-option/tracking-number.hbs +12 -0
- package/addon/components/select-option/tracking-status.hbs +12 -0
- package/addon/components/select-option/trailer.hbs +12 -0
- package/addon/components/select-option/vehicle-device.hbs +12 -0
- package/addon/components/select-option/vehicle.hbs +12 -0
- package/addon/components/select-option/vendor.hbs +12 -0
- package/addon/components/select-option/warranty.hbs +12 -0
- package/addon/components/select-option/waypoint.hbs +12 -0
- package/addon/components/select-option/work-order.hbs +12 -0
- package/addon/components/select-option/zone.hbs +12 -0
- package/addon/components/sensor/details.hbs +6 -2
- package/addon/components/sensor/form.hbs +6 -17
- package/addon/components/sensor/panel-header.hbs +1 -1
- package/addon/components/sensor/pill.hbs +24 -0
- package/addon/components/sensor/summary.hbs +1 -0
- package/addon/components/service-area/details.hbs +1 -20
- package/addon/components/service-area/pill.hbs +24 -0
- package/addon/components/service-area/summary.hbs +1 -0
- package/addon/components/service-quote/pill.hbs +24 -0
- package/addon/components/service-quote/summary.hbs +1 -0
- package/addon/components/service-quote-item/pill.hbs +24 -0
- package/addon/components/service-quote-item/summary.hbs +1 -0
- package/addon/components/service-rate/details.hbs +12 -6
- package/addon/components/service-rate/form.hbs +10 -8
- package/addon/components/service-rate/pill.hbs +24 -0
- package/addon/components/service-rate/summary.hbs +1 -0
- package/addon/components/service-rate-fee/pill.hbs +24 -0
- package/addon/components/service-rate-fee/summary.hbs +1 -0
- package/addon/components/service-rate-parcel-fee/pill.hbs +24 -0
- package/addon/components/service-rate-parcel-fee/summary.hbs +1 -0
- package/addon/components/table/cell/fleet-ops-option.hbs +20 -0
- package/addon/components/telematic/details.hbs +4 -1
- package/addon/components/telematic/details.js +1 -0
- package/addon/components/telematic/form.hbs +6 -1
- package/addon/components/telematic/form.js +1 -0
- package/addon/components/telematic/pill.hbs +24 -0
- package/addon/components/telematic/settings.hbs +6 -1
- package/addon/components/telematic/settings.js +1 -0
- package/addon/components/telematic/summary.hbs +1 -0
- package/addon/components/telematic/telemetry-status.hbs +102 -0
- package/addon/components/telematic/telemetry-status.js +95 -0
- package/addon/components/tracking-number/pill.hbs +24 -0
- package/addon/components/tracking-number/summary.hbs +1 -0
- package/addon/components/tracking-status/pill.hbs +24 -0
- package/addon/components/tracking-status/summary.hbs +1 -0
- package/addon/components/trailer/card.hbs +2 -5
- package/addon/components/trailer/details.hbs +11 -5
- package/addon/components/trailer/details.js +4 -0
- package/addon/components/trailer/form.hbs +6 -3
- package/addon/components/trailer/pill.hbs +24 -21
- package/addon/components/trailer/summary.hbs +1 -0
- package/addon/components/vehicle/card.hbs +4 -8
- package/addon/components/vehicle/details/inspections.hbs +49 -0
- package/addon/components/vehicle/details/inspections.js +44 -0
- package/addon/components/vehicle/details/maintenance-history.hbs +1 -1
- package/addon/components/vehicle/details/schedules.hbs +2 -2
- package/addon/components/vehicle/details/work-orders.hbs +1 -1
- package/addon/components/vehicle/details.hbs +18 -1
- package/addon/components/vehicle/form.hbs +2 -1
- package/addon/components/vehicle/panel-header.hbs +3 -4
- package/addon/components/vehicle/panel-header.js +8 -1
- package/addon/components/vehicle/pill.hbs +15 -24
- package/addon/components/vehicle/summary.hbs +1 -0
- package/addon/components/vehicle-device/pill.hbs +24 -0
- package/addon/components/vehicle-device/summary.hbs +1 -0
- package/addon/components/vendor/form.hbs +2 -4
- package/addon/components/vendor/personnel-manager.hbs +2 -9
- package/addon/components/vendor/personnel-tab.hbs +1 -0
- package/addon/components/vendor/personnel-tab.js +4 -0
- package/addon/components/vendor/pill.hbs +24 -0
- package/addon/components/vendor/summary.hbs +1 -0
- package/addon/components/warranty/details.hbs +3 -1
- package/addon/components/warranty/form.hbs +2 -1
- package/addon/components/warranty/pill.hbs +24 -0
- package/addon/components/warranty/summary.hbs +1 -0
- package/addon/components/waypoint/pill.hbs +24 -0
- package/addon/components/waypoint/summary.hbs +1 -0
- package/addon/components/widget/radar.hbs +28 -0
- package/addon/components/widget/radar.js +51 -0
- package/addon/components/work-order/details.hbs +20 -4
- package/addon/components/work-order/details.js +64 -1
- package/addon/components/work-order/form.hbs +20 -2
- package/addon/components/work-order/form.js +10 -10
- package/addon/components/work-order/panel-header.hbs +15 -13
- package/addon/components/work-order/pill.hbs +24 -0
- package/addon/components/work-order/summary.hbs +1 -0
- package/addon/components/zone/details.hbs +2 -21
- package/addon/components/zone/pill.hbs +24 -0
- package/addon/components/zone/summary.hbs +1 -0
- package/addon/controllers/connectivity/devices/index/details/sensors.js +4 -0
- package/addon/controllers/connectivity/devices/index/details.js +1 -18
- package/addon/controllers/connectivity/events/index.js +1 -4
- package/addon/controllers/connectivity/fuel-providers/details/index.js +6 -0
- package/addon/controllers/connectivity/fuel-providers/details/matching.js +13 -0
- package/addon/controllers/connectivity/fuel-providers/details/sync.js +21 -10
- package/addon/controllers/connectivity/fuel-providers/details/transactions.js +5 -16
- package/addon/controllers/connectivity/fuel-providers/details.js +76 -13
- package/addon/controllers/connectivity/fuel-providers/index.js +22 -17
- package/addon/controllers/connectivity/sensors/index.js +1 -3
- package/addon/controllers/connectivity/telematics/details/events.js +8 -0
- package/addon/controllers/connectivity/telematics/details/sensors.js +3 -2
- package/addon/controllers/connectivity/telematics/index.js +3 -1
- package/addon/controllers/maintenance/inspection-forms/index/details.js +29 -0
- package/addon/controllers/maintenance/inspection-forms/index/edit.js +39 -0
- package/addon/controllers/maintenance/inspection-forms/index/new.js +48 -0
- package/addon/controllers/maintenance/inspection-forms/index.js +90 -0
- package/addon/controllers/maintenance/inspection-submissions/index/details.js +53 -0
- package/addon/controllers/maintenance/inspection-submissions/index/edit.js +39 -0
- package/addon/controllers/maintenance/inspection-submissions/index/new.js +48 -0
- package/addon/controllers/maintenance/inspection-submissions/index.js +142 -0
- package/addon/controllers/maintenance/maintenances/index.js +6 -2
- package/addon/controllers/maintenance/schedules/index/details.js +4 -86
- package/addon/controllers/maintenance/schedules/index.js +15 -0
- package/addon/controllers/maintenance/work-orders/index.js +19 -1
- package/addon/controllers/management/contacts/customers.js +6 -4
- package/addon/controllers/management/contacts/index.js +6 -3
- package/addon/controllers/management/drivers/index/details.js +1 -66
- package/addon/controllers/management/drivers/index.js +9 -34
- package/addon/controllers/management/fleets/index/details.js +2 -15
- package/addon/controllers/management/fleets/index.js +12 -20
- package/addon/controllers/management/fuel-reports/index.js +9 -59
- package/addon/controllers/management/fuel-transactions/index/details.js +51 -48
- package/addon/controllers/management/fuel-transactions/index.js +32 -32
- package/addon/controllers/management/index.js +1367 -49
- package/addon/controllers/management/issues/index/details.js +1 -33
- package/addon/controllers/management/issues/index.js +10 -59
- package/addon/controllers/management/trailers/index/details.js +4 -78
- package/addon/controllers/management/trailers/index.js +20 -22
- package/addon/controllers/management/vehicles/index/details.js +9 -77
- package/addon/controllers/management/vehicles/index.js +50 -72
- package/addon/controllers/management/vendors/index.js +6 -3
- package/addon/controllers/operations/orders/index.js +38 -11
- package/addon/controllers/operations/service-rates/index.js +10 -2
- package/addon/controllers/settings/payments/index.js +11 -2
- package/addon/extension.js +36 -0
- package/addon/helpers/initials.js +6 -0
- package/addon/helpers/leaflet-tile-url.js +6 -1
- package/addon/instance-initializers/register-fleetops-resource-descriptors.js +29 -0
- package/addon/modifiers/inspection-flyout.js +237 -0
- package/addon/modifiers/radar-keyboard.js +78 -0
- package/addon/modifiers/sync-value.js +26 -0
- package/addon/modifiers/when-changed.js +25 -0
- package/addon/routes/connectivity/fuel-providers/details/settings.js +5 -2
- package/addon/routes/connectivity/fuel-providers/details/sync.js +6 -13
- package/addon/routes/connectivity/fuel-providers/details/transactions.js +8 -7
- package/addon/routes/connectivity/fuel-providers/details.js +15 -2
- package/addon/routes/connectivity/fuel-providers/edit.js +2 -1
- package/addon/routes/connectivity/fuel-providers/index.js +5 -0
- package/addon/routes/maintenance/inspection-forms/index/details/index.js +3 -0
- package/addon/routes/maintenance/inspection-forms/index/details/submissions.js +3 -0
- package/addon/routes/maintenance/inspection-forms/index/details.js +18 -0
- package/addon/routes/maintenance/inspection-forms/index/edit.js +18 -0
- package/addon/routes/maintenance/inspection-forms/index/new.js +3 -0
- package/addon/routes/maintenance/inspection-forms/index.js +22 -0
- package/addon/routes/maintenance/inspection-forms.js +3 -0
- package/addon/routes/maintenance/inspection-submissions/index/details/audit.js +8 -0
- package/addon/routes/maintenance/inspection-submissions/index/details/index.js +3 -0
- package/addon/routes/maintenance/inspection-submissions/index/details/photos.js +8 -0
- package/addon/routes/maintenance/inspection-submissions/index/details.js +18 -0
- package/addon/routes/maintenance/inspection-submissions/index/edit.js +18 -0
- package/addon/routes/maintenance/inspection-submissions/index/new.js +3 -0
- package/addon/routes/maintenance/inspection-submissions/index.js +25 -0
- package/addon/routes/maintenance/inspection-submissions.js +3 -0
- package/addon/routes/management/fuel-transactions/index/details.js +12 -2
- package/addon/routes/management/fuel-transactions/index.js +6 -0
- package/addon/routes/management/index.js +17 -1
- package/addon/routes/management/vehicles/index/details/inspections.js +3 -0
- package/addon/routes/management/vehicles/index.js +2 -2
- package/addon/routes.js +24 -0
- package/addon/services/contact-actions.js +22 -4
- package/addon/services/customer-actions.js +7 -4
- package/addon/services/device-actions.js +28 -0
- package/addon/services/driver-actions.js +79 -16
- package/addon/services/equipment-actions.js +15 -6
- package/addon/services/fleet-actions.js +20 -4
- package/addon/services/fuel-report-actions.js +7 -7
- package/addon/services/inspection-form-actions.js +236 -0
- package/addon/services/inspection-submission-actions.js +273 -0
- package/addon/services/issue-actions.js +58 -7
- package/addon/services/maintenance-actions.js +22 -3
- package/addon/services/maintenance-schedule-actions.js +70 -5
- package/addon/services/movement-tracker.js +52 -1
- package/addon/services/part-actions.js +13 -7
- package/addon/services/place-actions.js +8 -7
- package/addon/services/service-area-actions.js +27 -4
- package/addon/services/trailer-actions.js +60 -7
- package/addon/services/vehicle-actions.js +58 -3
- package/addon/services/vendor-actions.js +8 -7
- package/addon/services/work-order-actions.js +14 -5
- package/addon/services/zone-actions.js +27 -4
- package/addon/styles/fleetops-engine.css +3621 -75
- package/addon/templates/connectivity/devices/index/details/vehicle.hbs +2 -2
- package/addon/templates/connectivity/events/details.hbs +2 -2
- package/addon/templates/connectivity/fuel-providers/details/index.hbs +65 -35
- package/addon/templates/connectivity/fuel-providers/details/matching.hbs +2 -2
- package/addon/templates/connectivity/fuel-providers/details/sync.hbs +54 -43
- package/addon/templates/connectivity/fuel-providers/details/transactions.hbs +10 -5
- package/addon/templates/connectivity/fuel-providers/details.hbs +38 -13
- package/addon/templates/connectivity/fuel-providers/edit.hbs +1 -0
- package/addon/templates/connectivity/fuel-providers/index.hbs +2 -1
- package/addon/templates/connectivity/fuel-providers/new.hbs +1 -1
- package/addon/templates/connectivity/telematics/details/attachments.hbs +2 -1
- package/addon/templates/maintenance/inspection-forms/index/details/index.hbs +1 -0
- package/addon/templates/maintenance/inspection-forms/index/details/submissions.hbs +2 -0
- package/addon/templates/maintenance/inspection-forms/index/details.hbs +14 -0
- package/addon/templates/maintenance/inspection-forms/index/edit.hbs +11 -0
- package/addon/templates/maintenance/inspection-forms/index/new.hbs +11 -0
- package/addon/templates/maintenance/inspection-forms/index.hbs +28 -0
- package/addon/templates/maintenance/inspection-forms.hbs +1 -0
- package/addon/templates/maintenance/inspection-submissions/index/details/audit.hbs +1 -0
- package/addon/templates/maintenance/inspection-submissions/index/details/index.hbs +1 -0
- package/addon/templates/maintenance/inspection-submissions/index/details/photos.hbs +1 -0
- package/addon/templates/maintenance/inspection-submissions/index/details.hbs +14 -0
- package/addon/templates/maintenance/inspection-submissions/index/edit.hbs +11 -0
- package/addon/templates/maintenance/inspection-submissions/index/new.hbs +11 -0
- package/addon/templates/maintenance/inspection-submissions/index.hbs +28 -0
- package/addon/templates/maintenance/inspection-submissions.hbs +1 -0
- package/addon/templates/management/fuel-transactions/index/details.hbs +64 -62
- package/addon/templates/management/fuel-transactions/index.hbs +9 -31
- package/addon/templates/management/index.hbs +110 -102
- package/addon/templates/management/vehicles/index/details/inspections.hbs +2 -0
- package/addon/templates/operations/orders/index.hbs +2 -4
- package/addon/utils/context-panel.js +34 -0
- package/addon/utils/device-table-columns.js +18 -27
- package/addon/utils/fleet-ops-options.js +40 -0
- package/addon/utils/fuel-integration-format.js +43 -0
- package/addon/utils/fuel-transaction.js +115 -0
- package/addon/utils/identity-cell-resource.js +56 -0
- package/addon/utils/inspection-answers.js +283 -0
- package/addon/utils/inspection-field-types.js +74 -0
- package/addon/utils/inspection-form-structure.js +161 -0
- package/addon/utils/radar.js +212 -0
- package/addon/utils/relation-value.js +37 -0
- package/addon/utils/resource-descriptors/assets.js +246 -0
- package/addon/utils/resource-descriptors/connectivity.js +146 -0
- package/addon/utils/resource-descriptors/fuel.js +75 -0
- package/addon/utils/resource-descriptors/helpers.js +191 -0
- package/addon/utils/resource-descriptors/index.js +35 -0
- package/addon/utils/resource-descriptors/maintenance.js +175 -0
- package/addon/utils/resource-descriptors/operations.js +215 -0
- package/addon/utils/resource-descriptors/people.js +173 -0
- package/addon/utils/resource-descriptors/polymorphic.js +123 -0
- package/addon/utils/resource-descriptors/sub-records.js +297 -0
- package/addon/utils/telemetry-timestamp.js +6 -0
- package/app/components/asset/pill.js +1 -0
- package/app/components/asset/summary.js +1 -0
- package/app/components/asset-connection/pill.js +1 -0
- package/app/components/asset-connection/summary.js +1 -0
- package/app/components/attachable/pill.js +1 -0
- package/app/components/attachable/summary.js +1 -0
- package/app/components/cell/asset-connection-identity.js +1 -0
- package/app/components/cell/{attached-vehicle.js → asset-identity.js} +1 -1
- package/app/components/cell/attachable-identity.js +1 -0
- package/app/components/cell/{telematic-device.js → contact-identity.js} +1 -1
- package/app/components/cell/customer-identity.js +1 -0
- package/app/components/cell/device-event-identity.js +1 -0
- package/app/components/cell/entity-identity.js +1 -0
- package/app/components/cell/facilitator-identity.js +1 -0
- package/app/components/cell/fleet-driver-identity.js +1 -0
- package/app/components/cell/fleet-identity.js +1 -0
- package/app/components/cell/fuel-provider-connection-identity.js +1 -0
- package/app/components/cell/fuel-provider-transaction-identity.js +1 -0
- package/app/components/cell/fuel-report-identity.js +1 -0
- package/app/components/cell/inspection-form-identity.js +1 -0
- package/app/components/cell/inspection-item-result-identity.js +1 -0
- package/app/components/cell/inspection-submission-identity.js +1 -0
- package/app/components/cell/integrated-vendor-identity.js +1 -0
- package/app/components/cell/issue-identity.js +1 -0
- package/app/components/cell/maintenance-identity.js +1 -0
- package/app/components/cell/maintenance-schedule-identity.js +1 -0
- package/app/components/cell/maintenance-subject-identity.js +1 -0
- package/app/components/cell/manifest-identity.js +1 -0
- package/app/components/cell/manifest-stop-identity.js +1 -0
- package/app/components/cell/order-config-identity.js +1 -0
- package/app/components/cell/order-identity.js +1 -0
- package/app/components/cell/payload-identity.js +1 -0
- package/app/components/cell/place-identity.js +1 -0
- package/app/components/cell/position-identity.js +1 -0
- package/app/components/cell/purchase-rate-identity.js +1 -0
- package/app/components/cell/recurring-order-schedule-identity.js +1 -0
- package/app/components/cell/resource-list.js +1 -0
- package/app/components/cell/route-identity.js +1 -0
- package/app/components/cell/sensor-identity.js +1 -0
- package/app/components/cell/service-area-identity.js +1 -0
- package/app/components/cell/service-quote-identity.js +1 -0
- package/app/components/cell/service-quote-item-identity.js +1 -0
- package/app/components/cell/service-rate-fee-identity.js +1 -0
- package/app/components/cell/service-rate-identity.js +1 -0
- package/app/components/cell/service-rate-parcel-fee-identity.js +1 -0
- package/app/components/cell/{telematic-provider.js → telematic-identity.js} +1 -1
- package/app/components/cell/tracking-number-identity.js +1 -0
- package/app/components/cell/tracking-status-identity.js +1 -0
- package/app/components/cell/trailer-identity.js +1 -0
- package/app/components/cell/vehicle-device-identity.js +1 -0
- package/app/components/cell/vendor-identity.js +1 -0
- package/app/components/cell/warranty-identity.js +1 -0
- package/app/components/cell/waypoint-identity.js +1 -0
- package/app/components/cell/work-order-identity.js +1 -0
- package/app/components/cell/zone-identity.js +1 -0
- package/app/components/{cell/driver-name.js → contact/pill.js} +1 -1
- package/app/components/{cell/vehicle-name.js → contact/summary.js} +1 -1
- package/app/components/customer/pill.js +1 -0
- package/app/components/customer/summary.js +1 -0
- package/app/components/device/summary.js +1 -0
- package/app/components/device/telemetry.js +1 -0
- package/app/components/device-event/pill.js +1 -0
- package/app/components/device-event/summary.js +1 -0
- package/app/components/driver/summary.js +1 -0
- package/app/components/entity/pill.js +1 -0
- package/app/components/entity/summary.js +1 -0
- package/app/components/equipment/card.js +1 -0
- package/app/components/equipment/panel-header.js +1 -0
- package/app/components/equipment/summary.js +1 -0
- package/app/components/{filter/multi-model.js → facilitator/pill.js} +1 -1
- package/app/components/facilitator/summary.js +1 -0
- package/app/components/fleet/pill.js +1 -0
- package/app/components/fleet/summary.js +1 -0
- package/app/components/fleet-driver/pill.js +1 -0
- package/app/components/fleet-driver/summary.js +1 -0
- package/app/components/fuel-provider-connection/pill.js +1 -0
- package/app/components/fuel-provider-connection/summary.js +1 -0
- package/app/components/fuel-provider-transaction/pill.js +1 -0
- package/app/components/fuel-provider-transaction/summary.js +1 -0
- package/app/components/fuel-report/pill.js +1 -0
- package/app/components/fuel-report/summary.js +1 -0
- package/app/components/fuel-transaction-status.js +1 -0
- package/app/components/geofence-map.js +1 -0
- package/app/components/inspection-field/form.js +1 -0
- package/app/components/inspection-field/input.js +1 -0
- package/app/components/inspection-field/value.js +1 -0
- package/app/components/inspection-flyout.js +1 -0
- package/app/components/inspection-form/builder.js +1 -0
- package/app/components/inspection-form/details/submissions.js +1 -0
- package/app/components/inspection-form/details.js +1 -0
- package/app/components/inspection-form/form.js +1 -0
- package/app/components/inspection-form/pill.js +1 -0
- package/app/components/inspection-form/summary.js +1 -0
- package/app/components/inspection-item-result/pill.js +1 -0
- package/app/components/inspection-item-result/summary.js +1 -0
- package/app/components/inspection-link/list.js +1 -0
- package/app/components/inspection-sheet/group.js +1 -0
- package/app/components/inspection-sheet.js +1 -0
- package/app/components/inspection-submission/details.js +1 -0
- package/app/components/inspection-submission/form.js +1 -0
- package/app/components/inspection-submission/photos.js +1 -0
- package/app/components/inspection-submission/pill.js +1 -0
- package/app/components/inspection-submission/summary.js +1 -0
- package/app/components/integrated-vendor/pill.js +1 -0
- package/app/components/integrated-vendor/summary.js +1 -0
- package/app/components/issue/pill.js +1 -0
- package/app/components/issue/summary.js +1 -0
- package/app/components/issue/timeline.js +1 -0
- package/app/components/layout/fleet-ops-sidebar/operations-monitor.js +1 -0
- package/app/components/maintenance/pill.js +1 -0
- package/app/components/maintenance/summary.js +1 -0
- package/app/components/maintenance-schedule/pill.js +1 -0
- package/app/components/maintenance-schedule/summary.js +1 -0
- package/app/components/maintenance-schedule/work-orders.js +1 -0
- package/app/components/maintenance-subject/pill.js +1 -0
- package/app/components/maintenance-subject/summary.js +1 -0
- package/app/components/manifest/pill.js +1 -0
- package/app/components/manifest/summary.js +1 -0
- package/app/components/manifest-stop/pill.js +1 -0
- package/app/components/manifest-stop/summary.js +1 -0
- package/app/components/modals/fuel-connection-diagnostics.js +1 -0
- package/app/components/modals/fuel-transaction-action.js +1 -0
- package/app/components/modals/inspection-follow-up.js +1 -0
- package/app/components/modals/inspection-link.js +1 -0
- package/app/components/modals/radar-notice.js +1 -0
- package/app/components/modals/radar-save-view.js +1 -0
- package/app/components/modals/radar-select-resource.js +1 -0
- package/app/components/modals/radar-send-pin.js +1 -0
- package/app/components/order/summary.js +1 -0
- package/app/components/order-config/pill.js +1 -0
- package/app/components/order-config/summary.js +1 -0
- package/app/components/part/card.js +1 -0
- package/app/components/part/panel-header.js +1 -0
- package/app/components/part/pill.js +1 -0
- package/app/components/part/summary.js +1 -0
- package/app/components/payload/pill.js +1 -0
- package/app/components/payload/summary.js +1 -0
- package/app/components/place/pill.js +1 -0
- package/app/components/place/summary.js +1 -0
- package/app/components/position/pill.js +1 -0
- package/app/components/position/summary.js +1 -0
- package/app/components/public-inspection.js +1 -0
- package/app/components/purchase-rate/pill.js +1 -0
- package/app/components/purchase-rate/summary.js +1 -0
- package/app/components/radar/agenda/entry.js +1 -0
- package/app/components/radar/agenda/lane.js +1 -0
- package/app/components/radar/agenda.js +1 -0
- package/app/components/radar/briefing.js +1 -0
- package/app/components/radar/bulk-bar.js +1 -0
- package/app/components/radar/decision-card.js +1 -0
- package/app/components/radar/empty-state.js +1 -0
- package/app/components/radar/filter-pills.js +1 -0
- package/app/components/radar/handover-card.js +1 -0
- package/app/components/radar/header.js +1 -0
- package/app/components/radar/item-drawer.js +1 -0
- package/app/components/radar/item-list.js +1 -0
- package/app/components/radar/item-row.js +1 -0
- package/app/components/radar/keyboard-hints.js +1 -0
- package/app/components/radar/subject.js +1 -0
- package/app/components/radar/view-bar.js +1 -0
- package/app/components/recurring-order-schedule/pill.js +1 -0
- package/app/components/recurring-order-schedule/summary.js +1 -0
- package/app/components/resource-activity.js +1 -0
- package/app/components/route/pill.js +1 -0
- package/app/components/route/summary.js +1 -0
- package/app/components/select-option/asset-connection.js +1 -0
- package/app/components/select-option/asset.js +1 -0
- package/app/components/select-option/attachable.js +1 -0
- package/app/components/select-option/contact.js +1 -0
- package/app/components/select-option/customer.js +1 -0
- package/app/components/select-option/device-event.js +1 -0
- package/app/components/select-option/device.js +1 -0
- package/app/components/select-option/driver.js +1 -0
- package/app/components/select-option/entity.js +1 -0
- package/app/components/select-option/equipment.js +1 -0
- package/app/components/select-option/facilitator.js +1 -0
- package/app/components/select-option/fleet-driver.js +1 -0
- package/app/components/select-option/fleet.js +1 -0
- package/app/components/select-option/fuel-provider-connection.js +1 -0
- package/app/components/select-option/fuel-provider-transaction.js +1 -0
- package/app/components/select-option/fuel-report.js +1 -0
- package/app/components/select-option/inspection-form.js +1 -0
- package/app/components/select-option/inspection-item-result.js +1 -0
- package/app/components/select-option/inspection-submission.js +1 -0
- package/app/components/select-option/integrated-vendor.js +1 -0
- package/app/components/select-option/issue.js +1 -0
- package/app/components/select-option/maintenance-schedule.js +1 -0
- package/app/components/select-option/maintenance-subject.js +1 -0
- package/app/components/select-option/maintenance.js +1 -0
- package/app/components/select-option/manifest-stop.js +1 -0
- package/app/components/select-option/manifest.js +1 -0
- package/app/components/select-option/order-config.js +1 -0
- package/app/components/select-option/order.js +1 -0
- package/app/components/select-option/part.js +1 -0
- package/app/components/select-option/payload.js +1 -0
- package/app/components/select-option/place.js +1 -0
- package/app/components/select-option/position.js +1 -0
- package/app/components/select-option/purchase-rate.js +1 -0
- package/app/components/select-option/recurring-order-schedule.js +1 -0
- package/app/components/select-option/route.js +1 -0
- package/app/components/select-option/sensor.js +1 -0
- package/app/components/select-option/service-area.js +1 -0
- package/app/components/select-option/service-quote-item.js +1 -0
- package/app/components/select-option/service-quote.js +1 -0
- package/app/components/select-option/service-rate-fee.js +1 -0
- package/app/components/select-option/service-rate-parcel-fee.js +1 -0
- package/app/components/select-option/service-rate.js +1 -0
- package/app/components/select-option/telematic.js +1 -0
- package/app/components/select-option/trackable.js +1 -0
- package/app/components/select-option/tracking-number.js +1 -0
- package/app/components/select-option/tracking-status.js +1 -0
- package/app/components/select-option/trailer.js +1 -0
- package/app/components/select-option/vehicle-device.js +1 -0
- package/app/components/select-option/vehicle.js +1 -0
- package/app/components/select-option/vendor.js +1 -0
- package/app/components/select-option/warranty.js +1 -0
- package/app/components/select-option/waypoint.js +1 -0
- package/app/components/select-option/work-order.js +1 -0
- package/app/components/select-option/zone.js +1 -0
- package/app/components/sensor/pill.js +1 -0
- package/app/components/sensor/summary.js +1 -0
- package/app/components/service-area/pill.js +1 -0
- package/app/components/service-area/summary.js +1 -0
- package/app/components/service-quote/pill.js +1 -0
- package/app/components/service-quote/summary.js +1 -0
- package/app/components/service-quote-item/pill.js +1 -0
- package/app/components/service-quote-item/summary.js +1 -0
- package/app/components/service-rate/pill.js +1 -0
- package/app/components/service-rate/summary.js +1 -0
- package/app/components/service-rate-fee/pill.js +1 -0
- package/app/components/service-rate-fee/summary.js +1 -0
- package/app/components/service-rate-parcel-fee/pill.js +1 -0
- package/app/components/service-rate-parcel-fee/summary.js +1 -0
- package/app/components/table/cell/fleet-ops-option.js +1 -0
- package/app/components/telematic/pill.js +1 -0
- package/app/components/telematic/summary.js +1 -0
- package/app/components/telematic/telemetry-status.js +1 -0
- package/app/components/tracking-number/pill.js +1 -0
- package/app/components/tracking-number/summary.js +1 -0
- package/app/components/tracking-status/pill.js +1 -0
- package/app/components/tracking-status/summary.js +1 -0
- package/app/components/trailer/summary.js +1 -0
- package/app/components/vehicle/details/inspections.js +1 -0
- package/app/components/vehicle/summary.js +1 -0
- package/app/components/vehicle-device/pill.js +1 -0
- package/app/components/vehicle-device/summary.js +1 -0
- package/app/components/vendor/personnel-tab.js +1 -0
- package/app/components/vendor/pill.js +1 -0
- package/app/components/vendor/summary.js +1 -0
- package/app/components/warranty/pill.js +1 -0
- package/app/components/warranty/summary.js +1 -0
- package/app/components/waypoint/pill.js +1 -0
- package/app/components/waypoint/summary.js +1 -0
- package/app/components/widget/radar.js +1 -0
- package/app/components/work-order/panel-header.js +1 -0
- package/app/components/work-order/pill.js +1 -0
- package/app/components/work-order/summary.js +1 -0
- package/app/components/zone/pill.js +1 -0
- package/app/components/zone/summary.js +1 -0
- package/app/controllers/maintenance/inspection-forms/index/details.js +1 -0
- package/app/controllers/maintenance/inspection-forms/index/edit.js +1 -0
- package/app/controllers/maintenance/inspection-forms/index/new.js +1 -0
- package/app/controllers/maintenance/inspection-forms/index.js +1 -0
- package/app/controllers/maintenance/inspection-submissions/index/details.js +1 -0
- package/app/controllers/maintenance/inspection-submissions/index/edit.js +1 -0
- package/app/controllers/maintenance/inspection-submissions/index/new.js +1 -0
- package/app/controllers/maintenance/inspection-submissions/index.js +1 -0
- package/app/helpers/initials.js +1 -0
- package/app/modifiers/inspection-flyout.js +1 -0
- package/app/modifiers/radar-keyboard.js +1 -0
- package/app/modifiers/sync-value.js +1 -0
- package/app/modifiers/when-changed.js +1 -0
- package/app/routes/maintenance/inspection-forms/index/details/index.js +1 -0
- package/app/routes/maintenance/inspection-forms/index/details/submissions.js +1 -0
- package/app/routes/maintenance/inspection-forms/index/details.js +1 -0
- package/app/routes/maintenance/inspection-forms/index/edit.js +1 -0
- package/app/routes/maintenance/inspection-forms/index/new.js +1 -0
- package/app/routes/maintenance/inspection-forms/index.js +1 -0
- package/app/routes/maintenance/inspection-forms.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/details/audit.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/details/index.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/details/photos.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/details.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/edit.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index/new.js +1 -0
- package/app/routes/maintenance/inspection-submissions/index.js +1 -0
- package/app/routes/maintenance/inspection-submissions.js +1 -0
- package/app/routes/management/vehicles/index/details/inspections.js +1 -0
- package/app/services/inspection-form-actions.js +1 -0
- package/app/services/inspection-submission-actions.js +1 -0
- package/app/templates/maintenance/inspection-forms/index/details/index.js +1 -0
- package/app/templates/maintenance/inspection-forms/index/details/submissions.js +1 -0
- package/app/templates/maintenance/inspection-forms/index/details.js +1 -0
- package/app/templates/maintenance/inspection-forms/index/edit.js +1 -0
- package/app/templates/maintenance/inspection-forms/index/new.js +1 -0
- package/app/templates/maintenance/inspection-forms/index.js +1 -0
- package/app/templates/maintenance/inspection-forms.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/details/audit.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/details/index.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/details/photos.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/details.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/edit.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index/new.js +1 -0
- package/app/templates/maintenance/inspection-submissions/index.js +1 -0
- package/app/templates/maintenance/inspection-submissions.js +1 -0
- package/app/templates/management/vehicles/index/details/inspections.js +1 -0
- package/app/utils/inspection-field-types.js +2 -0
- package/app/utils/inspection-form-structure.js +1 -0
- package/app/utils/radar.js +1 -0
- package/composer.json +2 -1
- package/docs/AFAQY.md +145 -0
- package/docs/SAFEE.md +125 -0
- package/docs/TELEMATICS_QUEUES.md +179 -0
- package/docs/TELEMETRY_ARCHITECTURE.md +115 -0
- package/extension.json +1 -1
- package/package.json +3 -3
- package/scripts/coverage-summary.php +11 -0
- package/scripts/pest-bootstrap.php +1 -1
- package/server/config/afaqy.php +8 -0
- package/server/config/fuel-providers.php +28 -7
- package/server/config/safee.php +10 -0
- package/server/config/telematics.php +16 -2
- package/server/config/telemetry.php +20 -0
- package/server/migrations/2026_09_09_000001_create_inspection_tables.php +152 -0
- package/server/migrations/2026_09_10_000001_convert_inspection_form_items_to_field_groups.php +44 -0
- package/server/migrations/2026_09_10_000002_add_token_to_inspection_links.php +39 -0
- package/server/migrations/2026_09_11_000001_add_assignee_and_pin_to_inspection_links.php +39 -0
- package/server/migrations/2026_09_15_000001_create_telematic_telemetry_tables.php +62 -0
- package/server/migrations/2026_09_15_000002_scope_fuel_transactions_to_connection.php +25 -0
- package/server/migrations/2026_09_16_000001_add_public_id_to_alerts_table.php +45 -0
- package/server/migrations/2026_09_17_000001_add_device_event_uuid_lookup_index.php +90 -0
- package/server/resources/views/mail/inspection-link-pin.blade.php +34 -0
- package/server/src/Auth/Schemas/FleetOps.php +12 -0
- package/server/src/Console/Commands/DrainTelematicInbox.php +82 -0
- package/server/src/Console/Commands/ProcessMaintenanceTriggers.php +4 -1
- package/server/src/Console/Commands/SyncTelematics.php +40 -4
- package/server/src/Contracts/TelemetryProviderInterface.php +27 -0
- package/server/src/Events/DeviceTelemetryUpdated.php +38 -0
- package/server/src/Events/TrailerLocationChanged.php +2 -0
- package/server/src/Events/VehicleLocationChanged.php +13 -4
- package/server/src/Exports/InspectionExport.php +125 -0
- package/server/src/Http/Controllers/Api/v1/GeofenceController.php +1 -1
- package/server/src/Http/Controllers/Api/v1/InspectionController.php +300 -0
- package/server/src/Http/Controllers/Internal/v1/FuelProviderConnectionController.php +40 -8
- package/server/src/Http/Controllers/Internal/v1/HubController.php +36 -11
- package/server/src/Http/Controllers/Internal/v1/InspectionFormController.php +326 -0
- package/server/src/Http/Controllers/Internal/v1/InspectionSubmissionController.php +229 -0
- package/server/src/Http/Controllers/Internal/v1/RadarController.php +1117 -0
- package/server/src/Http/Controllers/Internal/v1/TelematicController.php +67 -0
- package/server/src/Http/Controllers/Public/PublicInspectionController.php +243 -0
- package/server/src/Http/Controllers/TelematicPositionWebhookController.php +60 -0
- package/server/src/Http/Controllers/TelematicWebhookController.php +3 -0
- package/server/src/Http/Filter/FuelProviderConnectionFilter.php +1 -1
- package/server/src/Http/Middleware/ForceJsonResponse.php +25 -0
- package/server/src/Http/Resources/v1/InspectionForm.php +153 -0
- package/server/src/Http/Resources/v1/InspectionItemResult.php +77 -0
- package/server/src/Http/Resources/v1/InspectionLink.php +84 -0
- package/server/src/Http/Resources/v1/InspectionSubmission.php +173 -0
- package/server/src/Jobs/PollTelematicTelemetry.php +233 -0
- package/server/src/Jobs/ProcessTelematicDelivery.php +176 -0
- package/server/src/Jobs/SyncFuelProviderTransactionsJob.php +21 -4
- package/server/src/Jobs/SyncTelematicDevicesJob.php +77 -1
- package/server/src/Jobs/TestTelematicConnectionJob.php +1 -0
- package/server/src/Mail/InspectionLinkPinMail.php +57 -0
- package/server/src/Models/Driver.php +8 -2
- package/server/src/Models/FuelProviderTransaction.php +1 -0
- package/server/src/Models/InspectionForm.php +240 -0
- package/server/src/Models/InspectionItemResult.php +90 -0
- package/server/src/Models/InspectionLink.php +284 -0
- package/server/src/Models/InspectionSubmission.php +440 -0
- package/server/src/Models/Part.php +9 -2
- package/server/src/Models/WorkOrder.php +3 -0
- package/server/src/Observers/WorkOrderObserver.php +1 -1
- package/server/src/Providers/FleetOpsServiceProvider.php +13 -1
- package/server/src/Rules/Base64OrUrl.php +54 -0
- package/server/src/Support/FuelProviders/FuelProviderService.php +64 -27
- package/server/src/Support/FuelProviders/Providers/PetroAppFuelProvider.php +81 -15
- package/server/src/Support/InspectionFileStore.php +268 -0
- package/server/src/Support/InspectionFormSync.php +231 -0
- package/server/src/Support/InspectionLinkPin.php +150 -0
- package/server/src/Support/InspectionSubmitter.php +297 -0
- package/server/src/Support/Radar/RadarAgenda.php +375 -0
- package/server/src/Support/Radar/RadarBriefing.php +504 -0
- package/server/src/Support/Radar/RadarItemState.php +435 -0
- package/server/src/Support/Radar/RadarRules.php +1424 -0
- package/server/src/Support/Reporting/FleetOpsReportSchema.php +178 -0
- package/server/src/Support/Telematics/Afaqy/Payload.php +49 -0
- package/server/src/Support/Telematics/Providers/AfaqyProvider.php +241 -68
- package/server/src/Support/Telematics/Providers/SafeeProvider.php +213 -139
- package/server/src/Support/Telematics/Safee/Transport.php +210 -0
- package/server/src/Support/Telematics/TelematicService.php +80 -7
- package/server/src/Support/Telematics/Telemetry/Configuration.php +46 -0
- package/server/src/Support/Telematics/Telemetry/Inbox.php +89 -0
- package/server/src/Support/Telematics/Telemetry/Ingestor.php +112 -0
- package/server/src/Support/Telematics/Telemetry/Queue.php +28 -0
- package/server/src/Support/Telematics/Telemetry/Sample.php +54 -0
- package/server/src/routes.php +76 -0
- package/server/tests/ApiManifestControllerContractsTest.php +9 -9
- package/server/tests/ControllerFilterContractsTest.php +1 -1
- package/server/tests/EventContractsTest.php +2 -1
- package/server/tests/Feature/Http/AfaqyRealtimeIngestionTest.php +881 -0
- package/server/tests/Feature/Http/Api/DeviceEventUuidIndexMigrationTest.php +106 -0
- package/server/tests/Feature/Http/Api/GeofenceControllerContractsTest.php +4 -4
- package/server/tests/Feature/Http/Api/TrailerControllerLifecycleTest.php +1 -1
- package/server/tests/Feature/Http/Internal/DriverControllerCreateRecordTest.php +1 -1
- package/server/tests/Feature/Http/Internal/DriverControllerExistingUserAdoptionTest.php +1 -1
- package/server/tests/Feature/Http/Internal/HubControllerTest.php +28 -2
- package/server/tests/Feature/Http/Internal/OrderControllerCreateRecordTest.php +1 -1
- package/server/tests/Feature/Http/Internal/RadarControllerDatabaseTest.php +415 -0
- package/server/tests/Feature/Http/Internal/RadarControllerTest.php +594 -0
- package/server/tests/Feature/Http/ManualTelemetryPollingTest.php +461 -0
- package/server/tests/Feature/Http/SafeeRealtimeIngestionTest.php +208 -0
- package/server/tests/Feature/Http/TelematicDeliveryCheckpointTest.php +198 -0
- package/server/tests/Feature/Http/TelematicMixedFleetDeliveryTest.php +166 -0
- package/server/tests/FuelProviderConnectionControllerContractsTest.php +83 -3
- package/server/tests/FuelProviderImplementationTest.php +10 -2
- package/server/tests/HubAndGettingStartedContractsTest.php +26 -3
- package/server/tests/InspectionControllerContractsTest.php +1329 -0
- package/server/tests/InspectionFieldContractsTest.php +1019 -0
- package/server/tests/InspectionModelContractsTest.php +728 -0
- package/server/tests/InspectionSubmitterRulesTest.php +47 -0
- package/server/tests/ObserverContractsTest.php +1 -1
- package/server/tests/ProviderContractsTest.php +50 -1
- package/server/tests/QueueJobContractsTest.php +3 -4
- package/server/tests/RadarRoutesTest.php +35 -0
- package/server/tests/ReportSchemaContractsTest.php +15 -1
- package/server/tests/RouteRegistrationExecutionTest.php +109 -18
- package/server/tests/Support/AfaqyTestCrypto.php +10 -0
- package/server/tests/Support/ExampleTelemetryProvider.php +82 -0
- package/server/tests/Support/TelemetryTestEnvironment.php +53 -0
- package/server/tests/SupportJobAndAiCoverageTest.php +102 -5
- package/server/tests/TelematicsHardeningTest.php +35 -30
- package/server/tests/TrailerSupportCoverageTest.php +1 -1
- package/server/tests/Unit/Console/SyncTelematicsCommandTest.php +140 -0
- package/server/tests/Unit/Http/Resources/ManifestResourceTest.php +3 -3
- package/server/tests/Unit/Support/FuelProviderServiceMatchingTest.php +127 -0
- package/server/tests/Unit/Support/PetroAppFuelProviderTest.php +126 -1
- package/server/tests/Unit/Support/RadarAgendaTest.php +200 -0
- package/server/tests/Unit/Support/RadarBriefingTest.php +214 -0
- package/server/tests/Unit/Support/RadarItemStateTest.php +260 -0
- package/server/tests/Unit/Support/RadarRulesTest.php +523 -0
- package/server/tests/Unit/Support/Telematics/Providers/AfaqyProviderTest.php +9 -1
- package/server/tests/Unit/Support/Telematics/Providers/AfaqyProviderTransportTest.php +140 -0
- package/server/tests/Unit/Support/Telematics/Providers/AfaqyRealtimeContractTest.php +188 -0
- package/server/tests/Unit/Support/Telematics/Providers/ProviderTransportSeamsTest.php +1 -1
- package/server/tests/Unit/Support/Telematics/Providers/SafeeLiveContractTest.php +335 -0
- package/server/tests/Unit/Support/Telematics/Providers/SafeeProviderTest.php +17 -27
- package/server/tests/Unit/Support/Telematics/TelematicServiceTelemetryTest.php +1 -0
- package/server/tests/Unit/Support/Telematics/TelematicsQueueRoutingTest.php +36 -0
- package/translations/ar-ae.yml +3 -1
- package/translations/bg-bg.yaml +3 -1
- package/translations/en-us.yaml +738 -15
- package/translations/es-pa.yaml +3 -1
- package/translations/fr-fr.yaml +3 -1
- package/translations/mn-mn.yaml +3 -1
- package/translations/pt-br.yaml +3 -1
- package/translations/ru-ru.yaml +3 -1
- package/translations/vi-vn.yaml +3 -1
- package/addon/components/cell/attached-vehicle.hbs +0 -10
- package/addon/components/cell/attached-vehicle.js +0 -58
- package/addon/components/cell/device-identity.js +0 -129
- package/addon/components/cell/driver-identity.js +0 -143
- package/addon/components/cell/driver-name.hbs +0 -26
- package/addon/components/cell/driver-name.js +0 -30
- package/addon/components/cell/equipment-identity.js +0 -48
- package/addon/components/cell/part-identity.js +0 -63
- package/addon/components/cell/telematic-device.hbs +0 -38
- package/addon/components/cell/telematic-device.js +0 -44
- package/addon/components/cell/telematic-provider.hbs +0 -33
- package/addon/components/cell/telematic-provider.js +0 -78
- package/addon/components/cell/vehicle-identity.js +0 -138
- package/addon/components/cell/vehicle-name.hbs +0 -23
- package/addon/components/cell/vehicle-name.js +0 -3
- package/addon/components/device/pill.js +0 -3
- package/addon/components/driver/pill.js +0 -7
- package/addon/components/equipment/pill.js +0 -3
- package/addon/components/filter/multi-model.hbs +0 -19
- package/addon/components/filter/multi-model.js +0 -90
- package/addon/components/order/pill.js +0 -3
- package/addon/components/trailer/pill.js +0 -3
- package/addon/components/vehicle/pill.js +0 -7
- package/addon/templates/connectivity/fuel-providers/details/settings.hbs +0 -11
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Fleetbase\FleetOps\Exceptions\TelematicProviderException;
|
|
4
|
+
use Fleetbase\FleetOps\Exceptions\TelematicRateLimitExceededException;
|
|
5
|
+
use Fleetbase\FleetOps\Support\Telematics\Providers\SafeeProvider;
|
|
6
|
+
use Fleetbase\FleetOps\Support\Telematics\Safee\Transport;
|
|
7
|
+
use Fleetbase\FleetOps\Support\Telematics\Telemetry\Sample;
|
|
8
|
+
use Illuminate\Encryption\Encrypter;
|
|
9
|
+
use Illuminate\Support\Carbon;
|
|
10
|
+
use Illuminate\Support\Facades\Cache;
|
|
11
|
+
use Illuminate\Support\Facades\Crypt;
|
|
12
|
+
use Illuminate\Support\Facades\Http;
|
|
13
|
+
|
|
14
|
+
class SafeeContractTransport extends Transport
|
|
15
|
+
{
|
|
16
|
+
public static float $clock = 1000;
|
|
17
|
+
|
|
18
|
+
public function reserve(): void
|
|
19
|
+
{
|
|
20
|
+
$this->reserveRequest(self::$clock + 5);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
protected function time(): float
|
|
24
|
+
{
|
|
25
|
+
return self::$clock;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
protected function wallTime(): float
|
|
29
|
+
{
|
|
30
|
+
return self::$clock;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class SafeeLiveContractProvider extends SafeeProvider
|
|
35
|
+
{
|
|
36
|
+
public function credentials(array $credentials): void
|
|
37
|
+
{
|
|
38
|
+
$this->credentials = $credentials;
|
|
39
|
+
$this->prepareAuthentication();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public function tokenCacheKey(): string
|
|
43
|
+
{
|
|
44
|
+
return 'safee:token:' . $this->transport()->fingerprint();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
protected function transport(): Transport
|
|
48
|
+
{
|
|
49
|
+
return $this->transport ??= new SafeeContractTransport($this->baseUrl, $this->credentials);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
protected function requestTime(): float
|
|
53
|
+
{
|
|
54
|
+
return SafeeContractTransport::$clock;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function safeeLiveProvider(array $credentials = []): SafeeLiveContractProvider
|
|
59
|
+
{
|
|
60
|
+
$provider = new SafeeLiveContractProvider();
|
|
61
|
+
$provider->credentials(array_replace(['server_uri' => 'https://safee.contract.test', 'access_token' => 'fixture-token'], $credentials));
|
|
62
|
+
|
|
63
|
+
return $provider;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function safeeLiveCredentials(): array
|
|
67
|
+
{
|
|
68
|
+
return ['access_token' => null, 'realm_id' => 'fixture', 'client_id' => 'fixture-client', 'client_secret' => 'fixture-secret', 'username' => 'fixture-user', 'password' => 'fixture-password'];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function safeeLiveState(int $id, array $overrides = []): array
|
|
72
|
+
{
|
|
73
|
+
return array_replace(['id' => 90000 + $id, 'vehicle' => ['id' => $id], 'date' => '2026-09-17T10:00:00Z', 'position' => ['lat' => 24, 'lon' => 46, 'alt' => 615], 'speed' => 12, 'heading' => 90, 'odometer' => '1234.5'], $overrides);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
beforeEach(function () {
|
|
77
|
+
app()->instance('encrypter', new Encrypter(str_repeat('s', 32), 'aes-256-cbc'));
|
|
78
|
+
Crypt::clearResolvedInstance('encrypter');
|
|
79
|
+
Cache::flush();
|
|
80
|
+
Http::swap(new Illuminate\Http\Client\Factory());
|
|
81
|
+
SafeeContractTransport::$clock = 1000;
|
|
82
|
+
Carbon::setTestNow('2026-09-17 10:01:00 UTC');
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
afterEach(fn () => Carbon::setTestNow());
|
|
86
|
+
|
|
87
|
+
test('safee live polling uses documented inventory and batches all vehicle ids without history requests', function () {
|
|
88
|
+
$requests = [];
|
|
89
|
+
Http::fake(function ($request) use (&$requests) {
|
|
90
|
+
$requests[] = $request;
|
|
91
|
+
if (str_ends_with($request->url(), '/list-info')) {
|
|
92
|
+
expect($request->body())->toBe('{}');
|
|
93
|
+
|
|
94
|
+
return Http::response(['code' => 0, 'result' => array_map(fn ($id) => ['id' => $id, 'plateNo' => 'Truck ' . $id], range(1, 2001))]);
|
|
95
|
+
}
|
|
96
|
+
expect($request->url())->toEndWith('/last-state');
|
|
97
|
+
expect(array_keys($request->data()))->toBe(['live', 'endDate', 'vehicles']);
|
|
98
|
+
expect($request['live'])->toBeTrue()->and($request['endDate'])->toBeNull();
|
|
99
|
+
expect(count($request['vehicles']))->toBeLessThanOrEqual(1000);
|
|
100
|
+
|
|
101
|
+
return Http::response(['code' => 0, 'time' => 9999999999, 'result' => array_map('safeeLiveState', $request['vehicles'])]);
|
|
102
|
+
});
|
|
103
|
+
$provider = safeeLiveProvider();
|
|
104
|
+
$cursor = null;
|
|
105
|
+
$ids = [];
|
|
106
|
+
do {
|
|
107
|
+
$page = $provider->fetchDevices(['cursor' => $cursor, 'limit' => 5000]);
|
|
108
|
+
$ids = array_merge($ids, array_map(fn ($unit) => $provider->normalizeTelemetrySnapshot($unit)['device']['device_id'], $page['devices']));
|
|
109
|
+
$cursor = $page['next_cursor'];
|
|
110
|
+
} while ($page['has_more']);
|
|
111
|
+
expect($ids)->toBe(range(1, 2001))->and($page['pagination']['allCount'])->toBe(2001);
|
|
112
|
+
Http::assertSentCount(4);
|
|
113
|
+
expect($provider->telemetryOptions())->toMatchArray(['polling_enabled' => true, 'manual_batch_sync' => true, 'webhooks_enabled' => false]);
|
|
114
|
+
expect($provider->supportsWebhooks())->toBeFalse();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test('safee caches inventory per credentials and manual refresh replaces it', function () {
|
|
118
|
+
$inventoryCalls = 0;
|
|
119
|
+
Http::fake(function ($request) use (&$inventoryCalls) {
|
|
120
|
+
if (str_ends_with($request->url(), '/list-info')) {
|
|
121
|
+
$inventoryCalls++;
|
|
122
|
+
|
|
123
|
+
return Http::response(['code' => 0, 'result' => [['id' => 1, 'plateNo' => 'revision-' . $inventoryCalls]]]);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return Http::response(['code' => 0, 'result' => [safeeLiveState(1)]]);
|
|
127
|
+
});
|
|
128
|
+
expect(safeeLiveProvider()->fetchDevices()['devices'][0]['plateNo'])->toBe('revision-1');
|
|
129
|
+
expect(safeeLiveProvider()->fetchDevices()['devices'][0]['plateNo'])->toBe('revision-1');
|
|
130
|
+
expect(safeeLiveProvider()->fetchDevices(['refresh_inventory' => true])['devices'][0]['plateNo'])->toBe('revision-2');
|
|
131
|
+
expect(safeeLiveProvider(['access_token' => 'changed'])->fetchDevices()['devices'][0]['plateNo'])->toBe('revision-3');
|
|
132
|
+
expect($inventoryCalls)->toBe(3);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test('safee rejects malformed or unsuccessful fleet responses instead of returning an empty success', function ($response) {
|
|
136
|
+
Http::fakeSequence()->push($response);
|
|
137
|
+
expect(fn () => safeeLiveProvider()->fetchDevices())->toThrow(TelematicProviderException::class);
|
|
138
|
+
})->with([
|
|
139
|
+
'non-json' => ['not json'],
|
|
140
|
+
'error envelope' => [['code' => 4, 'result' => []]],
|
|
141
|
+
'missing code' => [['result' => []]],
|
|
142
|
+
'missing result' => [['code' => 0]],
|
|
143
|
+
'object result' => [['code' => 0, 'result' => ['id' => 1]]],
|
|
144
|
+
'scalar record' => [['code' => 0, 'result' => [false]]],
|
|
145
|
+
'missing identity' => [['code' => 0, 'result' => [['plateNo' => 'unknown']]]],
|
|
146
|
+
'duplicate identity' => [['code' => 0, 'result' => [['id' => 1], ['id' => 1]]]],
|
|
147
|
+
]);
|
|
148
|
+
|
|
149
|
+
test('safee accepts an explicitly empty fleet and does not request states', function () {
|
|
150
|
+
Http::fakeSequence()->push(['code' => 0, 'result' => []]);
|
|
151
|
+
expect(safeeLiveProvider()->fetchDevices())->toMatchArray(['devices' => [], 'next_cursor' => null, 'has_more' => false]);
|
|
152
|
+
Http::assertSentCount(1);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test('safee isolates missing states while retaining both valid neighbors and canonical inventory identity', function () {
|
|
156
|
+
Http::fakeSequence()->push(['code' => 0, 'result' => [['id' => 1], ['id' => 2], ['id' => 3]]])
|
|
157
|
+
->push(['code' => 0, 'result' => [safeeLiveState(1), safeeLiveState(3)]]);
|
|
158
|
+
$provider = safeeLiveProvider();
|
|
159
|
+
$page = $provider->fetchDevices();
|
|
160
|
+
$samples = array_map([$provider, 'normalizeTelemetrySnapshot'], $page['devices']);
|
|
161
|
+
expect(array_column(array_column($samples, 'device'), 'device_id'))->toBe([1, 2, 3]);
|
|
162
|
+
expect(array_map(fn ($sample) => Sample::validPosition($sample['event']), $samples))->toBe([true, false, true]);
|
|
163
|
+
expect($page['sync_meta']['safee_last_endpoint_counts']['missing_states'])->toBe(1);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test('safee refuses state responses that cannot be safely matched to the requested inventory', function ($states) {
|
|
167
|
+
Http::fakeSequence()->push(['code' => 0, 'result' => [['id' => 1]]])->push(['code' => 0, 'result' => $states]);
|
|
168
|
+
expect(fn () => safeeLiveProvider()->fetchDevices())->toThrow(TelematicProviderException::class);
|
|
169
|
+
})->with([
|
|
170
|
+
'wrong vehicle' => [[['vehicleId' => 2]]],
|
|
171
|
+
'duplicate vehicle' => [[['vehicleId' => 1], ['vehicleId' => 1]]],
|
|
172
|
+
'missing identity' => [[['date' => 1]]],
|
|
173
|
+
'scalar state' => [[42]],
|
|
174
|
+
]);
|
|
175
|
+
|
|
176
|
+
test('safee normalizes UTC source time altitude and counters without inventing provider time or missing metadata', function () {
|
|
177
|
+
$provider = safeeLiveProvider();
|
|
178
|
+
$payload = ['_safee' => ['vehicle_id' => 1, 'identity' => ['id' => 1], 'current_state' => safeeLiveState(1, ['date' => '2026-09-17T13:00:00.125+03:00', 'speed' => 0, 'temperature' => ['Cargo' => 0]])]];
|
|
179
|
+
$sample = $provider->normalizeTelemetrySnapshot($payload);
|
|
180
|
+
expect($sample['event'])->toMatchArray(['device_id' => 1, 'occurred_at' => '2026-09-17T10:00:00.125000Z', 'last_seen_at' => '2026-09-17T10:00:00.125000Z', 'altitude' => 615, 'odometer' => '1234.5', 'speed' => 0]);
|
|
181
|
+
expect($sample['device'])->not->toHaveKeys(['name', 'imei', 'status', 'online']);
|
|
182
|
+
expect(data_get($sample, 'event.meta.telemetry.provider_at'))->toBeNull();
|
|
183
|
+
expect($sample['sensors'][0])->toMatchArray(['internal_id' => 'safee:1:temperature:Cargo', 'value' => 0, 'recorded_at' => '2026-09-17T10:00:00.125000Z']);
|
|
184
|
+
$payload['_safee']['current_info'] = safeeLiveState(1, ['date' => '2026-09-16T10:00:00Z', 'position' => ['lat' => 1, 'lon' => 2], 'speed' => 80]);
|
|
185
|
+
$latest = $provider->normalizeTelemetrySnapshot($payload);
|
|
186
|
+
expect($latest['event']['location'])->toBe(['lat' => 24, 'lng' => 46])->and($latest['event']['speed'])->toBe(0);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
test('safee does not invent timestamps or overwrite omitted counters in a partial snapshot', function () {
|
|
190
|
+
$provider = safeeLiveProvider();
|
|
191
|
+
$sample = $provider->normalizeTelemetrySnapshot(['vehicleId' => 1, 'position' => ['lat' => 24, 'lon' => 46], 'date' => 'invalid']);
|
|
192
|
+
expect(Sample::validPosition($sample['event']))->toBeFalse();
|
|
193
|
+
expect($sample['event']['occurred_at'])->toBeNull();
|
|
194
|
+
expect($sample['device']['meta'])->not->toHaveKeys(['driver', 'plate_number']);
|
|
195
|
+
expect($sample['sensors'])->toBe([]);
|
|
196
|
+
expect($provider->normalizeTelemetrySnapshot(['id' => 1, 'date' => 0, 'position' => ['lat' => 0, 'lon' => 0]])['event']['occurred_at'])->toBeNull();
|
|
197
|
+
expect(fn () => $provider->telemetryUnits([safeeLiveState(1)]))->toThrow(InvalidArgumentException::class);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test('safee token cache is encrypted reusable credential scoped and recovers from foreign encryption', function () {
|
|
201
|
+
$authCalls = 0;
|
|
202
|
+
Http::fake(function ($request) use (&$authCalls) {
|
|
203
|
+
if (str_contains($request->url(), '/openid-connect/token')) {
|
|
204
|
+
$authCalls++;
|
|
205
|
+
expect($request['grant_type'])->toBe('password');
|
|
206
|
+
|
|
207
|
+
return Http::response(['access_token' => 'secret-token-' . $authCalls, 'expires_in' => 300]);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return Http::response(['code' => 0, 'result' => []]);
|
|
211
|
+
});
|
|
212
|
+
$a = safeeLiveProvider(safeeLiveCredentials());
|
|
213
|
+
Http::assertNothingSent();
|
|
214
|
+
$a->fetchDevices();
|
|
215
|
+
$stored = Cache::get($a->tokenCacheKey());
|
|
216
|
+
expect($stored)->not->toContain('secret-token');
|
|
217
|
+
expect(json_decode(Crypt::decryptString($stored), true)['access_token'])->toBe('secret-token-1');
|
|
218
|
+
safeeLiveProvider(safeeLiveCredentials())->fetchDevices(['refresh_inventory' => true]);
|
|
219
|
+
expect($authCalls)->toBe(1);
|
|
220
|
+
Cache::put($a->tokenCacheKey(), (new Encrypter(str_repeat('x', 32), 'aes-256-cbc'))->encryptString('foreign'), 60);
|
|
221
|
+
safeeLiveProvider(safeeLiveCredentials())->fetchDevices(['refresh_inventory' => true]);
|
|
222
|
+
safeeLiveProvider(array_replace(safeeLiveCredentials(), ['password' => 'changed']))->fetchDevices();
|
|
223
|
+
expect($authCalls)->toBe(3);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
test('safee refreshes a rejected token once using the documented refresh grant', function () {
|
|
227
|
+
Http::fakeSequence()->push(['access_token' => 'old', 'refresh_token' => 'refresh-value', 'expires_in' => 300])
|
|
228
|
+
->push([], 401)->push(['access_token' => 'new', 'expires_in' => 300])
|
|
229
|
+
->push(['code' => 0, 'result' => []]);
|
|
230
|
+
safeeLiveProvider(safeeLiveCredentials())->fetchDevices();
|
|
231
|
+
Http::assertSentCount(4);
|
|
232
|
+
Http::assertSent(fn ($request) => ($request->data()['grant_type'] ?? null) === 'refresh_token' && ($request->data()['refresh_token'] ?? null) === 'refresh-value');
|
|
233
|
+
Http::assertSent(fn ($request) => str_ends_with($request->url(), '/list-info') && $request->hasHeader('Authorization', 'Bearer new'));
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test('safee stops after a second token rejection', function () {
|
|
237
|
+
Http::fakeSequence()->push(['access_token' => 'old', 'expires_in' => 300])->push([], 401)
|
|
238
|
+
->push(['access_token' => 'new', 'expires_in' => 300])->push([], 401);
|
|
239
|
+
expect(fn () => safeeLiveProvider(safeeLiveCredentials())->fetchDevices())->toThrow(TelematicProviderException::class, '401');
|
|
240
|
+
Http::assertSentCount(4);
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
test('safee refreshes tokens before their documented expiry and falls back once for revoked refresh tokens', function () {
|
|
244
|
+
Http::fakeSequence()->push(['access_token' => 'old', 'refresh_token' => 'revoked-refresh', 'expires_in' => 300, 'refresh_expires_in' => 600])
|
|
245
|
+
->push(['code' => 0, 'result' => []])->push([], 400)
|
|
246
|
+
->push(['access_token' => 'new', 'expires_in' => 300])->push(['code' => 0, 'result' => []]);
|
|
247
|
+
$provider = safeeLiveProvider(safeeLiveCredentials());
|
|
248
|
+
$provider->fetchDevices();
|
|
249
|
+
SafeeContractTransport::$clock += 296;
|
|
250
|
+
$provider->fetchDevices(['refresh_inventory' => true]);
|
|
251
|
+
$grants = collect(Http::recorded())->map(fn ($pair) => $pair[0]->data()['grant_type'] ?? null)->filter()->values()->all();
|
|
252
|
+
expect($grants)->toBe(['password', 'refresh_token', 'password']);
|
|
253
|
+
Http::assertSentCount(5);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
test('safee enforces a shared atomic fifty per second account budget including credential variants', function () {
|
|
257
|
+
$a = new SafeeContractTransport('https://safee.contract.test', safeeLiveCredentials());
|
|
258
|
+
$b = new SafeeContractTransport('https://safee.contract.test', array_replace(safeeLiveCredentials(), ['password' => 'changed']));
|
|
259
|
+
for ($i = 0; $i < 50; $i++) {
|
|
260
|
+
($i % 2 ? $a : $b)->reserve();
|
|
261
|
+
}
|
|
262
|
+
expect(fn () => $a->reserve())->toThrow(TelematicRateLimitExceededException::class);
|
|
263
|
+
SafeeContractTransport::$clock += 1.01;
|
|
264
|
+
$b->reserve();
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
test('safee respects Retry-After across instances without issuing more requests', function () {
|
|
268
|
+
Http::fakeSequence()->push([], 429, ['Retry-After' => '12']);
|
|
269
|
+
foreach (range(1, 2) as $attempt) {
|
|
270
|
+
try {
|
|
271
|
+
safeeLiveProvider()->fetchDevices();
|
|
272
|
+
test()->fail('Expected rate limiting.');
|
|
273
|
+
} catch (TelematicRateLimitExceededException $e) {
|
|
274
|
+
expect($e->context()['retry_after'])->toBe(12);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
Http::assertSentCount(1);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
test('safee page deadline includes authentication inventory and state retrieval', function () {
|
|
281
|
+
$timeouts = [];
|
|
282
|
+
Http::fake(function ($request, $options) use (&$timeouts) {
|
|
283
|
+
$timeouts[] = $options['timeout'];
|
|
284
|
+
expect($options['connect_timeout'])->toBeLessThanOrEqual(3);
|
|
285
|
+
SafeeContractTransport::$clock += 6;
|
|
286
|
+
if (str_contains($request->url(), '/openid-connect/token')) {
|
|
287
|
+
return Http::response(['access_token' => 'token', 'expires_in' => 300]);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return Http::response(['code' => 0, 'result' => [['id' => 1]]]);
|
|
291
|
+
});
|
|
292
|
+
expect(fn () => safeeLiveProvider(safeeLiveCredentials())->fetchDevices(['timeout' => 10, 'connect_timeout' => 3]))->toThrow(TelematicProviderException::class, 'time budget');
|
|
293
|
+
expect($timeouts)->toBe([10, 4]);
|
|
294
|
+
Http::assertSentCount(2);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
test('safee historical failures do not advance the global history checkpoint', function () {
|
|
298
|
+
Http::fakeSequence()->push(['code' => 0, 'result' => ['vehicleId' => 1]])->push([], 503)->push(['code' => 0, 'result' => []]);
|
|
299
|
+
$result = safeeLiveProvider()->fetchDeviceTelemetrySnapshots([['id' => 1]], ['start_date' => 100, 'end_date' => 200]);
|
|
300
|
+
expect($result['sync_meta'])->not->toHaveKey('safee_last_telemetry_synced_at');
|
|
301
|
+
expect($result['sync_meta']['safee_last_enrichment_failures'])->toHaveCount(1);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
test('safee rejects invalid inventory cursors and unsupported list filters before paging', function () {
|
|
305
|
+
Http::fake([
|
|
306
|
+
'*/list-info' => Http::response(['code' => 0, 'result' => [['id' => 1], ['id' => 2]]]),
|
|
307
|
+
'*/last-state' => Http::response(['code' => 0, 'result' => []]),
|
|
308
|
+
]);
|
|
309
|
+
$provider = safeeLiveProvider();
|
|
310
|
+
expect(fn () => $provider->fetchDevices(['cursor' => 'next']))->toThrow(TelematicProviderException::class, 'cursor is invalid')
|
|
311
|
+
->and(fn () => $provider->fetchDevices(['cursor' => -1]))->toThrow(TelematicProviderException::class, 'cursor is invalid')
|
|
312
|
+
->and(fn () => $provider->fetchDevices(['filters' => ['status' => 'ACTIVE']]))->toThrow(TelematicProviderException::class, 'does not support filters')
|
|
313
|
+
->and(fn () => $provider->fetchDevices(['cursor' => 3]))->toThrow(TelematicProviderException::class, 'exceeds the inventory size');
|
|
314
|
+
// Only the out-of-range cursor needed the inventory; invalid input fails before any request.
|
|
315
|
+
Http::assertSentCount(1);
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
test('safee reports data and authentication connection failures without leaking transport details', function (bool $authenticate) {
|
|
319
|
+
Http::fake(fn ($request) => throw new GuzzleHttp\Exception\ConnectException('SSL connection timeout', new GuzzleHttp\Psr7\Request('POST', (string) $request->url())));
|
|
320
|
+
$provider = safeeLiveProvider($authenticate ? safeeLiveCredentials() : []);
|
|
321
|
+
$message = $authenticate ? 'Safee authentication timed out or could not connect.' : 'Safee request timed out or could not connect.';
|
|
322
|
+
expect(fn () => $provider->fetchDevices())->toThrow(TelematicProviderException::class, $message);
|
|
323
|
+
})->with(['data request' => [false], 'token request' => [true]]);
|
|
324
|
+
|
|
325
|
+
test('safee does not refresh a rejected static token without password grant credentials', function () {
|
|
326
|
+
Http::fake(['*' => Http::response([], 401)]);
|
|
327
|
+
expect(fn () => safeeLiveProvider()->fetchDevices())->toThrow(TelematicProviderException::class, '401');
|
|
328
|
+
Http::assertSentCount(1);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
test('safee requires realm client and user credentials when no access token is available', function () {
|
|
332
|
+
Http::fake();
|
|
333
|
+
expect(fn () => safeeLiveProvider(['access_token' => null])->fetchDevices())->toThrow(InvalidArgumentException::class, 'credentials are required');
|
|
334
|
+
Http::assertNothingSent();
|
|
335
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
3
|
use Fleetbase\FleetOps\Models\Telematic;
|
|
4
|
+
use Fleetbase\FleetOps\Exceptions\TelematicProviderException;
|
|
4
5
|
use Fleetbase\FleetOps\Support\Telematics\Providers\SafeeProvider;
|
|
5
6
|
use Illuminate\Http\Client\Factory as HttpFactory;
|
|
6
7
|
use Illuminate\Support\Carbon;
|
|
@@ -43,7 +44,7 @@ class FleetOpsSafeeProviderUnitProbe extends SafeeProvider
|
|
|
43
44
|
|
|
44
45
|
public function queuePostResponse(array|Throwable $response): void
|
|
45
46
|
{
|
|
46
|
-
$this->responses[] = $response;
|
|
47
|
+
$this->responses[] = is_array($response) ? array_replace(['code' => 0], $response) : $response;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
protected function safeePost(string $endpoint, array|stdClass $payload = [], bool $dataEndpoint = false): array
|
|
@@ -136,10 +137,8 @@ test('safee provider authenticates through oidc and masks connection failures',
|
|
|
136
137
|
'password' => 'secret',
|
|
137
138
|
]))->toBe([
|
|
138
139
|
'success' => false,
|
|
139
|
-
'message' => '
|
|
140
|
+
'message' => 'Safee returned an invalid or unsuccessful response.',
|
|
140
141
|
'metadata' => [
|
|
141
|
-
'status' => null,
|
|
142
|
-
'time' => null,
|
|
143
142
|
'auth_host' => 'https://safee.example.test',
|
|
144
143
|
'auth_path' => '/auth/realms/fleetbase/protocol/openid-connect/token',
|
|
145
144
|
'realm_id' => 'fleetbase',
|
|
@@ -178,13 +177,11 @@ test('safee provider authenticates through oidc and masks connection failures',
|
|
|
178
177
|
]);
|
|
179
178
|
});
|
|
180
179
|
|
|
181
|
-
test('safee provider fetches
|
|
180
|
+
test('safee provider fetches bounded live state batches with identity diagnostics', function () {
|
|
182
181
|
$provider = fleetopsSafeeProvider();
|
|
183
182
|
$provider->queuePostResponse([
|
|
184
183
|
'result' => [
|
|
185
184
|
['id' => 101, 'plateNo' => 'TRK-101'],
|
|
186
|
-
['id' => 101, 'plateNo' => 'TRK-101-DUP'],
|
|
187
|
-
['uuid' => 'missing-id'],
|
|
188
185
|
['_safee' => ['vehicle_id' => 202], 'plateNo' => 'TRK-202'],
|
|
189
186
|
],
|
|
190
187
|
]);
|
|
@@ -192,41 +189,34 @@ test('safee provider fetches devices with identity diagnostics and last state fa
|
|
|
192
189
|
'result' => [
|
|
193
190
|
['vehicleId' => 101, 'status' => 'active', 'speed' => 44],
|
|
194
191
|
['vehicle' => ['id' => 202], 'status' => 'offline'],
|
|
195
|
-
'ignored-state',
|
|
196
192
|
],
|
|
197
193
|
]);
|
|
198
194
|
|
|
199
195
|
$result = $provider->fetchDevices([
|
|
200
|
-
'
|
|
201
|
-
'
|
|
202
|
-
'page_index' => 2,
|
|
196
|
+
'limit' => 50,
|
|
197
|
+
'refresh_inventory' => true,
|
|
203
198
|
]);
|
|
204
199
|
|
|
205
|
-
expect($provider->postCalls[0])->toBe(
|
|
206
|
-
|
|
207
|
-
['plateNo' => 'TRK', 'pageSize' => 50, 'pageIndex' => 2],
|
|
208
|
-
true,
|
|
209
|
-
])
|
|
200
|
+
expect($provider->postCalls[0][0])->toBe('/api/v2/vehicle/list-info')
|
|
201
|
+
->and($provider->postCalls[0][1])->toBeInstanceOf(stdClass::class)
|
|
210
202
|
->and($provider->postCalls[1])->toBe([
|
|
211
203
|
'/api/v2/vehicle/last-state',
|
|
212
204
|
[
|
|
213
205
|
'live' => true,
|
|
214
|
-
'startDate' => null,
|
|
215
206
|
'endDate' => null,
|
|
216
207
|
'vehicles' => [101, 202],
|
|
217
208
|
],
|
|
218
209
|
true,
|
|
219
210
|
])
|
|
220
|
-
->and($result['devices'])->toHaveCount(
|
|
211
|
+
->and($result['devices'])->toHaveCount(2)
|
|
221
212
|
->and($result['devices'][0]['_safee']['current_state']['speed'])->toBe(44)
|
|
222
|
-
->and($result['devices'][
|
|
213
|
+
->and($result['devices'][1]['_safee']['current_state']['status'])->toBe('offline')
|
|
223
214
|
->and($result['sync_meta']['safee_last_endpoint_counts'])->toMatchArray([
|
|
224
|
-
'vehicles_listed' =>
|
|
215
|
+
'vehicles_listed' => 2,
|
|
225
216
|
'unique_vehicle_ids' => 2,
|
|
226
|
-
'missing_vehicle_ids' =>
|
|
227
|
-
'duplicate_vehicle_ids' => [
|
|
228
|
-
'
|
|
229
|
-
'list_info_requested_unpaginated' => false,
|
|
217
|
+
'missing_vehicle_ids' => 0,
|
|
218
|
+
'duplicate_vehicle_ids' => [],
|
|
219
|
+
'list_info_requested_unpaginated' => true,
|
|
230
220
|
'last_state_fetched' => 2,
|
|
231
221
|
]);
|
|
232
222
|
});
|
|
@@ -475,13 +465,13 @@ test('safee transport helpers fetch details guard credentials and surface failur
|
|
|
475
465
|
};
|
|
476
466
|
Http::clearResolvedInstances();
|
|
477
467
|
app()->forgetInstance(HttpFactory::class);
|
|
478
|
-
Http::fake(['*' => Http::response(['result' => ['id' => 42, 'name' => 'Vehicle 42']], 200)]);
|
|
468
|
+
Http::fake(['*' => Http::response(['code' => 0, 'result' => ['id' => 42, 'name' => 'Vehicle 42']], 200)]);
|
|
479
469
|
expect($raw->fetchDeviceDetails('42'))->toBe(['id' => 42, 'name' => 'Vehicle 42']);
|
|
480
470
|
|
|
481
471
|
// Failed responses surface as runtime exceptions from both verbs
|
|
482
472
|
Http::clearResolvedInstances();
|
|
483
473
|
app()->forgetInstance(HttpFactory::class);
|
|
484
474
|
Http::fake(['*' => Http::response(['error' => 'nope'], 500)]);
|
|
485
|
-
expect(fn () => $rawInvoke('safeeGet', '/api/v2/broken'))->toThrow(
|
|
486
|
-
->and(fn () => $rawInvoke('safeePost', '/api/v2/broken', ['x' => 1]))->toThrow(
|
|
475
|
+
expect(fn () => $rawInvoke('safeeGet', '/api/v2/broken'))->toThrow(TelematicProviderException::class)
|
|
476
|
+
->and(fn () => $rawInvoke('safeePost', '/api/v2/broken', ['x' => 1]))->toThrow(TelematicProviderException::class);
|
|
487
477
|
});
|
|
@@ -324,6 +324,7 @@ test('telematic service updates attached vehicle telemetry from device events',
|
|
|
324
324
|
'source' => 'telematics',
|
|
325
325
|
'device_event_uuid' => 'event-uuid',
|
|
326
326
|
'provider' => 'flespi',
|
|
327
|
+
'position_at' => '2026-07-23T11:59:00.000000Z',
|
|
327
328
|
]);
|
|
328
329
|
|
|
329
330
|
Carbon::setTestNow();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Fleetbase\FleetOps\Events\TrailerLocationChanged;
|
|
4
|
+
use Fleetbase\FleetOps\Jobs\SyncTelematicDevicesJob;
|
|
5
|
+
use Fleetbase\FleetOps\Jobs\TestTelematicConnectionJob;
|
|
6
|
+
use Fleetbase\FleetOps\Models\Telematic;
|
|
7
|
+
use Fleetbase\FleetOps\Support\Telematics\Telemetry\Configuration;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Covers per-instance queue routing for connection-level telematics jobs and
|
|
11
|
+
* telematics-originated broadcasts. Unset configuration must keep the defaults.
|
|
12
|
+
*/
|
|
13
|
+
afterEach(fn () => config(['telematics.telemetry.poll_queue' => 'default', 'telematics.telemetry.broadcast_queue' => null]));
|
|
14
|
+
|
|
15
|
+
test('legacy discovery and connection test jobs follow the configured poll queue', function (?string $configured, string $expected) {
|
|
16
|
+
config(['telematics.telemetry.poll_queue' => $configured]);
|
|
17
|
+
$telematic = new Telematic();
|
|
18
|
+
|
|
19
|
+
expect((new SyncTelematicDevicesJob($telematic))->queue)->toBe($expected)
|
|
20
|
+
->and((new TestTelematicConnectionJob($telematic))->queue)->toBe($expected)
|
|
21
|
+
->and(Configuration::pollQueue())->toBe($expected);
|
|
22
|
+
})->with([
|
|
23
|
+
'unset' => [null, 'default'],
|
|
24
|
+
'default' => ['default', 'default'],
|
|
25
|
+
'dedicated' => ['telematics', 'telematics'],
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
test('broadcast queue is applied only when configured', function () {
|
|
29
|
+
$event = (new ReflectionClass(TrailerLocationChanged::class))->newInstanceWithoutConstructor();
|
|
30
|
+
|
|
31
|
+
expect(Configuration::withBroadcastQueue($event)->broadcastQueue)->toBeNull();
|
|
32
|
+
|
|
33
|
+
config(['telematics.telemetry.broadcast_queue' => 'telematics-broadcasts']);
|
|
34
|
+
expect(Configuration::withBroadcastQueue($event))->toBe($event)
|
|
35
|
+
->and($event->broadcastQueue)->toBe('telematics-broadcasts');
|
|
36
|
+
});
|
package/translations/ar-ae.yml
CHANGED
|
@@ -2,6 +2,8 @@ menu:
|
|
|
2
2
|
fuel-providers: تكاملات الوقود
|
|
3
3
|
fuel-transactions: معاملات الوقود
|
|
4
4
|
trailers: المقطورات
|
|
5
|
+
inspection-forms: 'نماذج الفحص'
|
|
6
|
+
inspections: 'الفحوصات'
|
|
5
7
|
|
|
6
8
|
trailer:
|
|
7
9
|
navigation-description: إدارة الأصول المقطورة ووصلات القطر والمعدات والتتبع عن بُعد.
|
|
@@ -1995,7 +1997,7 @@ vehicle:
|
|
|
1995
1997
|
filter-internal-id: اكتب أو امسح المعرفات الداخلية
|
|
1996
1998
|
filters:
|
|
1997
1999
|
has-trailer: مقطورة متصلة
|
|
1998
|
-
has-driver: سائق معيّن
|
|
2000
|
+
has-driver: لديه سائق معيّن
|
|
1999
2001
|
has-device: جهاز متصل
|
|
2000
2002
|
any: الكل
|
|
2001
2003
|
attached: متصل
|
package/translations/bg-bg.yaml
CHANGED
|
@@ -73,6 +73,8 @@ menu:
|
|
|
73
73
|
issues: Проблеми
|
|
74
74
|
maintenance: Поддръжка
|
|
75
75
|
work-orders: Работни поръчки
|
|
76
|
+
inspection-forms: 'Формуляри за инспекция'
|
|
77
|
+
inspections: 'Инспекции'
|
|
76
78
|
equipment: Оборудване
|
|
77
79
|
parts: Части
|
|
78
80
|
connectivity: Свързаност
|
|
@@ -1052,7 +1054,7 @@ vehicle:
|
|
|
1052
1054
|
filter-internal-id: Въведете или сканирайте вътрешни ID
|
|
1053
1055
|
filters:
|
|
1054
1056
|
has-trailer: Прикачено ремарке
|
|
1055
|
-
has-driver:
|
|
1057
|
+
has-driver: Има назначен шофьор
|
|
1056
1058
|
has-device: Прикачено устройство
|
|
1057
1059
|
any: Всички
|
|
1058
1060
|
attached: Прикачено
|