@fleetbase/fleetops-engine 0.6.65 → 0.6.66
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 +11 -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 +43 -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 +44 -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 +1 -1
- package/docs/AFAQY.md +91 -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/telematics.php +8 -1
- package/server/config/telemetry.php +17 -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/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 +32 -2
- package/server/src/Contracts/TelemetryProviderInterface.php +27 -0
- package/server/src/Events/DeviceTelemetryUpdated.php +37 -0
- package/server/src/Events/VehicleLocationChanged.php +8 -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 +118 -0
- package/server/src/Jobs/ProcessTelematicDelivery.php +122 -0
- package/server/src/Jobs/SyncFuelProviderTransactionsJob.php +21 -4
- 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 +9 -0
- 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 +179 -61
- package/server/src/Support/Telematics/TelematicService.php +37 -6
- package/server/src/Support/Telematics/Telemetry/Configuration.php +30 -0
- package/server/src/Support/Telematics/Telemetry/Inbox.php +61 -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 +792 -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/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/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 +27 -0
- package/server/tests/Support/ExampleTelemetryProvider.php +82 -0
- package/server/tests/Support/TelemetryTestEnvironment.php +53 -0
- package/server/tests/TelematicsHardeningTest.php +17 -17
- package/server/tests/TrailerSupportCoverageTest.php +1 -1
- 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 +8 -0
- package/server/tests/Unit/Support/Telematics/Providers/AfaqyRealtimeContractTest.php +188 -0
- package/server/tests/Unit/Support/Telematics/TelematicServiceTelemetryTest.php +1 -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,47 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Fleetbase\FleetOps\Support\InspectionSubmitter;
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* The public link and `POST /v1/inspections` both hand the submitter what
|
|
7
|
+
* validate() returns, and validate() returns only keys that have a rule: once
|
|
8
|
+
* an array has nested rules, its other keys are dropped. `value` had no rule of
|
|
9
|
+
* its own, so every answer reached the submitter empty and a failed check
|
|
10
|
+
* carrying its photo was refused for having none.
|
|
11
|
+
*
|
|
12
|
+
* The rules are checked here rather than run through a validator, which this
|
|
13
|
+
* package does not install.
|
|
14
|
+
*/
|
|
15
|
+
test('the submitter rules give every key of an answer a rule of its own', function () {
|
|
16
|
+
$rules = InspectionSubmitter::rules();
|
|
17
|
+
|
|
18
|
+
expect($rules)->toHaveKeys([
|
|
19
|
+
// What the API documents.
|
|
20
|
+
'answers',
|
|
21
|
+
'answers.*.field',
|
|
22
|
+
'answers.*.custom_field',
|
|
23
|
+
'answers.*.value',
|
|
24
|
+
'answers.*.value_type',
|
|
25
|
+
// What the first cut shipped, still accepted.
|
|
26
|
+
'custom_field_values',
|
|
27
|
+
'custom_field_values.*.custom_field',
|
|
28
|
+
'custom_field_values.*.custom_field_uuid',
|
|
29
|
+
'custom_field_values.*.value',
|
|
30
|
+
'custom_field_values.*.value_type',
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
// Either spelling satisfies the requirement, and so does a flat body.
|
|
34
|
+
expect($rules['answers'])->toContain('required_without_all:item_results,custom_field_values')
|
|
35
|
+
->and($rules['custom_field_values'])->toContain('required_without_all:item_results,answers')
|
|
36
|
+
->and($rules['item_results'])->toContain('required_without_all:custom_field_values,answers');
|
|
37
|
+
|
|
38
|
+
// An empty answer is still an answer (it clears the field), so the value
|
|
39
|
+
// is allowed to be null rather than required.
|
|
40
|
+
expect($rules['custom_field_values.*.value'])->toBe('nullable')
|
|
41
|
+
->and($rules['custom_field_values.*.custom_field_uuid'])->toContain('nullable');
|
|
42
|
+
|
|
43
|
+
// Every key of a flat item result has a rule too, so none of them is dropped.
|
|
44
|
+
foreach (['item_key', 'label', 'category', 'status', 'severity', 'passed', 'comments', 'photos'] as $key) {
|
|
45
|
+
expect($rules)->toHaveKey('item_results.*.' . $key);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -744,7 +744,7 @@ test('work order observer creates maintenance resets schedule and dispatches com
|
|
|
744
744
|
'maintainable_type' => 'fleet-ops:vehicle',
|
|
745
745
|
'maintainable_uuid' => 'vehicle-uuid',
|
|
746
746
|
'type' => 'scheduled',
|
|
747
|
-
'status' => '
|
|
747
|
+
'status' => 'completed',
|
|
748
748
|
'priority' => 'high',
|
|
749
749
|
'performed_by_type' => 'fleet-ops:contact',
|
|
750
750
|
'performed_by_uuid' => 'assignee-uuid',
|
|
@@ -713,12 +713,11 @@ test('sync fuel provider transactions job passes parsed dates and records failur
|
|
|
713
713
|
->and($connection->updates[0])->toMatchArray([
|
|
714
714
|
'status' => 'error',
|
|
715
715
|
'last_error' => 'provider failed',
|
|
716
|
-
'last_sync_state' => [
|
|
717
|
-
'failed_at' => '2026-05-01T12:00:00+00:00',
|
|
718
|
-
'message' => 'provider failed',
|
|
719
|
-
],
|
|
720
716
|
]);
|
|
721
717
|
|
|
718
|
+
expect($connection->updates[0])->not->toHaveKey('last_sync_state');
|
|
719
|
+
expect($job->middleware()[0])->toBeInstanceOf(Illuminate\Queue\Middleware\WithoutOverlapping::class);
|
|
720
|
+
|
|
722
721
|
Carbon::setTestNow();
|
|
723
722
|
});
|
|
724
723
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
test('radar routes are registered beside the hubs', function () {
|
|
4
|
+
$routes = file_get_contents(dirname(__DIR__) . '/src/routes.php');
|
|
5
|
+
|
|
6
|
+
expect($routes)
|
|
7
|
+
->toContain("['prefix' => 'radar']")
|
|
8
|
+
->toContain("\$router->get('items', 'RadarController@items');")
|
|
9
|
+
->toContain("\$router->get('summary', 'RadarController@summary');")
|
|
10
|
+
->toContain("\$router->get('briefing', 'RadarController@briefing');")
|
|
11
|
+
->toContain("\$router->get('agenda', 'RadarController@agenda');")
|
|
12
|
+
->toContain("\$router->get('handovers/{key}', 'RadarController@handoverSuggest');")
|
|
13
|
+
->toContain("\$router->post('shifts/{id}/extend', 'RadarController@extendShift');")
|
|
14
|
+
->toContain("\$router->post('items/bulk', 'RadarController@bulk');")
|
|
15
|
+
->toContain("\$router->post('items/{key}/acknowledge', 'RadarController@acknowledge');")
|
|
16
|
+
->toContain("\$router->post('items/{key}/snooze', 'RadarController@snooze');")
|
|
17
|
+
->toContain("\$router->post('items/{key}/wake', 'RadarController@wake');")
|
|
18
|
+
->toContain("\$router->post('items/{key}/assign', 'RadarController@assign');")
|
|
19
|
+
->toContain("\$router->post('items/{key}/plan', 'RadarController@plan');")
|
|
20
|
+
->toContain("\$router->post('items/{key}/resolve', 'RadarController@resolve');")
|
|
21
|
+
->toContain("\$router->post('notices', 'RadarController@storeNotice');")
|
|
22
|
+
->toContain("\$router->delete('notices/{id}', 'RadarController@destroyNotice');");
|
|
23
|
+
|
|
24
|
+
// The bulk route is declared before the keyed routes so `items/bulk`
|
|
25
|
+
// is never read as a key called "bulk".
|
|
26
|
+
expect(strpos($routes, 'items/bulk'))->toBeLessThan(strpos($routes, 'items/{key}/acknowledge'));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('radar controller exposes every routed action', function () {
|
|
30
|
+
$controller = new ReflectionClass(Fleetbase\FleetOps\Http\Controllers\Internal\v1\RadarController::class);
|
|
31
|
+
|
|
32
|
+
foreach (['items', 'summary', 'briefing', 'agenda', 'handoverSuggest', 'extendShift', 'bulk', 'acknowledge', 'snooze', 'wake', 'assign', 'plan', 'resolve', 'storeNotice', 'destroyNotice'] as $method) {
|
|
33
|
+
expect($controller->hasMethod($method))->toBeTrue("RadarController@{$method} is routed but missing");
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -219,6 +219,9 @@ test('fleetops report schema registers every table with columns computed columns
|
|
|
219
219
|
'contacts',
|
|
220
220
|
'vendors',
|
|
221
221
|
'fuel_reports',
|
|
222
|
+
'work_orders',
|
|
223
|
+
'maintenances',
|
|
224
|
+
'inspection_submissions',
|
|
222
225
|
]);
|
|
223
226
|
|
|
224
227
|
$orders = $tables['orders'];
|
|
@@ -248,7 +251,18 @@ test('fleetops report schema registers every table with columns computed columns
|
|
|
248
251
|
->and(fleetOpsReportTableMeta($tables['places'], 'category'))->toBe('Geography')
|
|
249
252
|
->and(fleetOpsReportTableMeta($tables['contacts'], 'category'))->toBe('CRM')
|
|
250
253
|
->and(fleetOpsReportTableMeta($tables['vendors'], 'category'))->toBe('CRM')
|
|
251
|
-
->and(fleetOpsReportTableMeta($tables['fuel_reports'], 'category'))->toBe('Operations')
|
|
254
|
+
->and(fleetOpsReportTableMeta($tables['fuel_reports'], 'category'))->toBe('Operations')
|
|
255
|
+
->and(fleetOpsReportTableMeta($tables['work_orders'], 'category'))->toBe('Maintenance')
|
|
256
|
+
->and(fleetOpsReportTableName(fleetOpsReportRelationship($tables['work_orders'], 'vehicle_target')))->toBe('vehicles')
|
|
257
|
+
->and(fleetOpsReportColumnAggregate(fleetOpsReportColumn($tables['work_orders'], 'total_actual_cost')))->toBe('sum')
|
|
258
|
+
->and(fleetOpsReportTableMeta($tables['maintenances'], 'label'))->toBe('Maintenance History')
|
|
259
|
+
->and(fleetOpsReportTableName(fleetOpsReportRelationship($tables['maintenances'], 'work_order')))->toBe('work_orders')
|
|
260
|
+
->and(fleetOpsReportTableMeta($tables['inspection_submissions'], 'label'))->toBe('Inspections')
|
|
261
|
+
->and(fleetOpsReportTableMeta($tables['inspection_submissions'], 'category'))->toBe('Maintenance')
|
|
262
|
+
->and(fleetOpsReportColumnFlag(fleetOpsReportColumn($tables['inspection_submissions'], 'result'), 'aggregatable'))->toBeTrue()
|
|
263
|
+
->and(fleetOpsReportColumnAggregate(fleetOpsReportColumn($tables['inspection_submissions'], 'total_failed_items')))->toBe('sum')
|
|
264
|
+
->and(fleetOpsReportTableName(fleetOpsReportRelationship($tables['inspection_submissions'], 'inspection_form')))->toBe('inspection_forms')
|
|
265
|
+
->and(fleetOpsReportTableName(fleetOpsReportRelationship($tables['inspection_submissions'], 'work_order')))->toBe('work_orders');
|
|
252
266
|
});
|
|
253
267
|
|
|
254
268
|
test('fleetops report schema transformers normalize labels booleans distances and money', function () {
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
3
|
use Illuminate\Support\Facades\Route;
|
|
4
|
+
use Illuminate\Support\Str;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One recorded route, handed back so the route file can chain onto it as it
|
|
8
|
+
* would onto a real one. `middleware()` is recorded against the route; any
|
|
9
|
+
* other chained call (`name()`, `where()`) is accepted and ignored, so a chain
|
|
10
|
+
* the recorder does not model cannot break the whole file.
|
|
11
|
+
*/
|
|
12
|
+
class FleetOpsRecordedRoute
|
|
13
|
+
{
|
|
14
|
+
public function __construct(private FleetOpsRouteRecorder $recorder, private int $index)
|
|
15
|
+
{
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public function middleware(array|string $middleware): self
|
|
19
|
+
{
|
|
20
|
+
$this->recorder->routes[$this->index]['middleware'] = array_merge(
|
|
21
|
+
$this->recorder->routes[$this->index]['middleware'] ?? [],
|
|
22
|
+
(array) $middleware,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return $this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public function __call(string $method, array $arguments): self
|
|
29
|
+
{
|
|
30
|
+
return $this;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
4
33
|
|
|
5
34
|
class FleetOpsRouteRecorder
|
|
6
35
|
{
|
|
@@ -49,47 +78,69 @@ class FleetOpsRouteRecorder
|
|
|
49
78
|
return $this;
|
|
50
79
|
}
|
|
51
80
|
|
|
52
|
-
public function get(string $uri, string|array $action):
|
|
81
|
+
public function get(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
53
82
|
{
|
|
54
|
-
$this->record('GET', $uri, $action);
|
|
83
|
+
return $this->record('GET', $uri, $action);
|
|
55
84
|
}
|
|
56
85
|
|
|
57
|
-
public function post(string $uri, string|array $action):
|
|
86
|
+
public function post(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
58
87
|
{
|
|
59
|
-
$this->record('POST', $uri, $action);
|
|
88
|
+
return $this->record('POST', $uri, $action);
|
|
60
89
|
}
|
|
61
90
|
|
|
62
|
-
public function put(string $uri, string|array $action):
|
|
91
|
+
public function put(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
63
92
|
{
|
|
64
|
-
$this->record('PUT', $uri, $action);
|
|
93
|
+
return $this->record('PUT', $uri, $action);
|
|
65
94
|
}
|
|
66
95
|
|
|
67
|
-
public function patch(string $uri, string|array $action):
|
|
96
|
+
public function patch(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
68
97
|
{
|
|
69
|
-
$this->record('PATCH', $uri, $action);
|
|
98
|
+
return $this->record('PATCH', $uri, $action);
|
|
70
99
|
}
|
|
71
100
|
|
|
72
|
-
public function delete(string $uri, string|array $action):
|
|
101
|
+
public function delete(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
73
102
|
{
|
|
74
|
-
$this->record('DELETE', $uri, $action);
|
|
103
|
+
return $this->record('DELETE', $uri, $action);
|
|
75
104
|
}
|
|
76
105
|
|
|
77
|
-
public function any(string $uri, string|array $action):
|
|
106
|
+
public function any(string $uri, string|array $action): FleetOpsRecordedRoute
|
|
78
107
|
{
|
|
79
|
-
$this->record('ANY', $uri, $action);
|
|
108
|
+
return $this->record('ANY', $uri, $action);
|
|
80
109
|
}
|
|
81
110
|
|
|
82
|
-
public function match(array $methods, string $uri, string|array $action):
|
|
111
|
+
public function match(array $methods, string $uri, string|array $action): FleetOpsRecordedRoute
|
|
83
112
|
{
|
|
84
|
-
$this->record(implode('|', array_map('strtoupper', $methods)), $uri, $action);
|
|
113
|
+
return $this->record(implode('|', array_map('strtoupper', $methods)), $uri, $action);
|
|
85
114
|
}
|
|
86
115
|
|
|
87
|
-
|
|
116
|
+
/**
|
|
117
|
+
* The platform's resource routes, and the extra routes a resource declares
|
|
118
|
+
* in its callback. The callback is run inside a group prefixed with the
|
|
119
|
+
* resource, as the platform's macro does, and handed a `$controller` that
|
|
120
|
+
* names the action the way the macro would, so those routes are recorded
|
|
121
|
+
* rather than silently skipped.
|
|
122
|
+
*/
|
|
123
|
+
public function fleetbaseRoutes(string $resource, ?callable $callback = null): FleetOpsRecordedRoute
|
|
88
124
|
{
|
|
89
|
-
$this->record('FLEETBASE', $resource, 'fleetbaseRoutes');
|
|
125
|
+
$route = $this->record('FLEETBASE', $resource, 'fleetbaseRoutes');
|
|
126
|
+
|
|
127
|
+
if ($callback) {
|
|
128
|
+
$controllerName = Str::studly(Str::singular($resource)) . 'Controller';
|
|
129
|
+
$this->group(['prefix' => $resource], function ($router) use ($callback, $controllerName) {
|
|
130
|
+
$callback($router, fn (string $method) => $controllerName . '@' . $method);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return $route;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Router methods the recorder does not model are accepted and ignored. */
|
|
138
|
+
public function __call(string $method, array $arguments): self
|
|
139
|
+
{
|
|
140
|
+
return $this;
|
|
90
141
|
}
|
|
91
142
|
|
|
92
|
-
private function record(string $method, string $uri, string|array $action):
|
|
143
|
+
private function record(string $method, string $uri, string|array $action): FleetOpsRecordedRoute
|
|
93
144
|
{
|
|
94
145
|
$prefixes = array_values(array_filter(array_map(
|
|
95
146
|
fn (array $group) => $group['prefix'] ?? null,
|
|
@@ -102,6 +153,8 @@ class FleetOpsRouteRecorder
|
|
|
102
153
|
'action' => $action,
|
|
103
154
|
'groups' => $this->stack,
|
|
104
155
|
];
|
|
156
|
+
|
|
157
|
+
return new FleetOpsRecordedRoute($this, array_key_last($this->routes));
|
|
105
158
|
}
|
|
106
159
|
}
|
|
107
160
|
|
|
@@ -139,7 +192,37 @@ test('fleetops route file registers public internal analytics metrics and hub ro
|
|
|
139
192
|
->toContain('v1/fuel-transactions/{id}/match-vehicle')
|
|
140
193
|
->toContain('int/v1/fleet-ops/analytics/operations-pulse')
|
|
141
194
|
->toContain('int/v1/fleet-ops/metrics/{slug}')
|
|
142
|
-
->toContain('int/v1/fleet-ops/hubs/resources')
|
|
195
|
+
->toContain('int/v1/fleet-ops/hubs/resources')
|
|
196
|
+
->toContain('public/inspections/forms/{id}')
|
|
197
|
+
->toContain('public/inspections/forms/{id}/submit')
|
|
198
|
+
->toContain('public/inspections/forms/{id}/files');
|
|
199
|
+
|
|
200
|
+
// A link's PIN can be sent again from the console.
|
|
201
|
+
$sendPin = array_values(array_filter($recorder->routes, fn (array $route) => str_ends_with($route['uri'], 'inspection-forms/{id}/links/{linkId}/send-pin')));
|
|
202
|
+
expect($sendPin)->toHaveCount(1)
|
|
203
|
+
->and($sendPin[0]['method'])->toBe('POST')
|
|
204
|
+
->and($sendPin[0]['action'])->toBe('InspectionFormController@sendPin');
|
|
205
|
+
|
|
206
|
+
// Every inspection route answers in JSON, so a refused request is a 422
|
|
207
|
+
// rather than a redirect: the driver API, the vehicle history and the
|
|
208
|
+
// console's form and submission routes.
|
|
209
|
+
$json = Fleetbase\FleetOps\Http\Middleware\ForceJsonResponse::class;
|
|
210
|
+
$inGroup = fn (array $route) => in_array($json, array_merge(...array_map(fn ($group) => (array) ($group['middleware'] ?? []), $route['groups'])), true)
|
|
211
|
+
|| in_array($json, (array) ($route['middleware'] ?? []), true);
|
|
212
|
+
foreach (['InspectionController@findForm', 'InspectionController@submit', 'InspectionController@forVehicle'] as $action) {
|
|
213
|
+
$route = collect($recorder->routes)->first(fn (array $route) => $route['action'] === $action);
|
|
214
|
+
expect($route)->not->toBeNull()
|
|
215
|
+
->and($inGroup($route))->toBeTrue();
|
|
216
|
+
}
|
|
217
|
+
$console = array_filter($recorder->routes, fn (array $route) => str_contains($route['uri'], 'inspection-forms/{id}/generate-link') || str_contains($route['uri'], 'inspection-submissions/{id}/submit'));
|
|
218
|
+
expect($console)->toHaveCount(2);
|
|
219
|
+
foreach ($console as $route) {
|
|
220
|
+
expect($inGroup($route))->toBeTrue();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Uploads through a link have a tighter limit of their own, on top of the group's.
|
|
224
|
+
$upload = collect($recorder->routes)->firstWhere('uri', 'public/inspections/forms/{id}/files');
|
|
225
|
+
expect($upload['middleware'] ?? [])->toBe(['throttle:20,1,inspection-upload']);
|
|
143
226
|
});
|
|
144
227
|
|
|
145
228
|
test('fleetops route file wires route groups with expected middleware and namespaces', function () {
|
|
@@ -156,6 +239,14 @@ test('fleetops route file wires route groups with expected middleware and namesp
|
|
|
156
239
|
'namespace' => 'Api\v1',
|
|
157
240
|
]);
|
|
158
241
|
|
|
242
|
+
// The public inspection routes answer in JSON whatever the client asks
|
|
243
|
+
// for, and are rate limited per address.
|
|
244
|
+
expect($recorder->groups)->toContainEqual([
|
|
245
|
+
'prefix' => 'public',
|
|
246
|
+
'namespace' => 'Public',
|
|
247
|
+
'middleware' => [Fleetbase\FleetOps\Http\Middleware\ForceJsonResponse::class, 'throttle:60,1,inspection-public'],
|
|
248
|
+
]);
|
|
249
|
+
|
|
159
250
|
expect($recorder->groups)->toContainEqual([
|
|
160
251
|
'prefix' => 'int',
|
|
161
252
|
'namespace' => 'Internal',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
// Package fixtures use authenticated OpenSSL encryption at the Crypt boundary.
|
|
4
|
+
// Production resolves Laravel's encrypter from the host application.
|
|
5
|
+
function afaqyTestCrypto(): object
|
|
6
|
+
{
|
|
7
|
+
return new class {
|
|
8
|
+
public function encryptString(string $value): string
|
|
9
|
+
{
|
|
10
|
+
$iv = random_bytes(12);
|
|
11
|
+
$cipher = openssl_encrypt($value, 'aes-256-gcm', str_repeat('t', 32), OPENSSL_RAW_DATA, $iv, $tag);
|
|
12
|
+
|
|
13
|
+
return base64_encode($iv . $tag . $cipher);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public function decryptString(string $value): string
|
|
17
|
+
{
|
|
18
|
+
$bytes = base64_decode($value, true);
|
|
19
|
+
$plain = openssl_decrypt(substr($bytes, 28), 'aes-256-gcm', str_repeat('t', 32), OPENSSL_RAW_DATA, substr($bytes, 0, 12), substr($bytes, 12, 16));
|
|
20
|
+
if ($plain === false) {
|
|
21
|
+
throw new RuntimeException('Invalid encrypted fixture.');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return $plain;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Fleetbase\FleetOps\Contracts\TelemetryProviderInterface;
|
|
4
|
+
use Fleetbase\FleetOps\Models\Telematic;
|
|
5
|
+
use Fleetbase\FleetOps\Support\Telematics\Providers\AbstractProvider;
|
|
6
|
+
use Fleetbase\FleetOps\Support\Telematics\Telemetry\Sample;
|
|
7
|
+
|
|
8
|
+
/** Deliberately uses a protocol unrelated to any bundled vendor. */
|
|
9
|
+
class ExampleTelemetryProvider extends AbstractProvider implements TelemetryProviderInterface
|
|
10
|
+
{
|
|
11
|
+
public static int $connections = 0;
|
|
12
|
+
public static array $pages = [];
|
|
13
|
+
|
|
14
|
+
protected function prepareAuthentication(): void
|
|
15
|
+
{
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public function connect(Telematic $telematic): void
|
|
19
|
+
{
|
|
20
|
+
self::$connections++;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public function testConnection(array $credentials): array
|
|
24
|
+
{
|
|
25
|
+
return ['success' => true];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public function fetchDevices(array $options = []): array
|
|
29
|
+
{
|
|
30
|
+
return array_shift(self::$pages);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public function fetchDeviceDetails(string $externalId): array
|
|
34
|
+
{
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public function normalizeSensor(array $payload): array
|
|
39
|
+
{
|
|
40
|
+
return $payload;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public function supportsWebhooks(): bool
|
|
44
|
+
{
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public function telemetryOptions(): array
|
|
49
|
+
{
|
|
50
|
+
return ['polling_enabled' => true, 'webhooks_enabled' => true, 'page_size' => 2, 'stale_engine_on_seconds' => 90];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public function telemetryUnits(array $payload): array
|
|
54
|
+
{
|
|
55
|
+
$samples = $payload['signals'] ?? (isset($payload['tracker']) ? [$payload] : $payload);
|
|
56
|
+
foreach ($samples as $sample) {
|
|
57
|
+
if (!is_array($sample) || !isset($sample['tracker'], $sample['measured'], $sample['point'])) {
|
|
58
|
+
throw new InvalidArgumentException('Unsupported signal');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return $samples;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public function normalizeDevice(array $payload): array
|
|
66
|
+
{
|
|
67
|
+
return ['device_id' => $payload['tracker'], 'last_seen_at' => Sample::timestamp($payload['received']), 'meta' => []];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public function normalizeEvent(array $payload): array
|
|
71
|
+
{
|
|
72
|
+
return ['device_id' => $payload['tracker'], 'event_type' => 'telemetry_update',
|
|
73
|
+
'occurred_at' => Sample::timestamp($payload['measured']), 'last_seen_at' => Sample::timestamp($payload['received']),
|
|
74
|
+
'location' => ['lat' => $payload['point'][1], 'lng' => $payload['point'][0]], 'ignition' => true,
|
|
75
|
+
'meta' => ['telemetry' => ['provider_at' => Sample::timestamp($payload['received'])]]];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public function normalizeTelemetrySnapshot(array $payload): array
|
|
79
|
+
{
|
|
80
|
+
return ['device' => $this->normalizeDevice($payload), 'event' => $this->normalizeEvent($payload), 'sensors' => []];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Fleetbase\FleetOps\Jobs {
|
|
4
|
+
// Advance the polling deadline deterministically without sleeping in tests.
|
|
5
|
+
function microtime($asFloat = false)
|
|
6
|
+
{
|
|
7
|
+
if (!empty($GLOBALS['telemetry_test_clock'])) {
|
|
8
|
+
return array_shift($GLOBALS['telemetry_test_clock']);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return \microtime($asFloat);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
namespace Fleetbase\FleetOps\Http\Controllers\Internal\v1 {
|
|
16
|
+
// The package test container does not include Foundation HTTP helpers.
|
|
17
|
+
function abort_unless($condition, $code, $message = '', array $headers = [])
|
|
18
|
+
{
|
|
19
|
+
if (!$condition) {
|
|
20
|
+
throw new \Symfony\Component\HttpKernel\Exception\HttpException($code, $message, null, $headers);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
namespace Fleetbase\Support {
|
|
26
|
+
function app($abstract = null, array $parameters = [])
|
|
27
|
+
{
|
|
28
|
+
if ($abstract !== null) {
|
|
29
|
+
return \app($abstract, $parameters);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return new class() {
|
|
33
|
+
public function environment($environments = null)
|
|
34
|
+
{
|
|
35
|
+
$environment = \config('app.env', 'production');
|
|
36
|
+
|
|
37
|
+
return $environments === null ? $environment : in_array($environment, (array) $environments, true);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public function __call($method, $arguments)
|
|
41
|
+
{
|
|
42
|
+
return \app()->{$method}(...$arguments);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function url($path, $parameters = [], $secure = null)
|
|
48
|
+
{
|
|
49
|
+
$generator = new \Illuminate\Routing\UrlGenerator(new \Illuminate\Routing\RouteCollection(), \Illuminate\Http\Request::create('https://api.example.test'));
|
|
50
|
+
|
|
51
|
+
return $generator->to($path, $parameters, $secure);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -300,7 +300,8 @@ test('telematics service requires provider identity and stores idempotent event
|
|
|
300
300
|
->toContain('$event->createPosition($positionData)')
|
|
301
301
|
->toContain('updateVehicleTelemetry')
|
|
302
302
|
->toContain('$vehicle->odometer = $eventData[\'odometer\'];')
|
|
303
|
-
->toContain('
|
|
303
|
+
->toContain('new VehicleLocationChanged')
|
|
304
|
+
->toContain('broadcastTelemetry')
|
|
304
305
|
->toContain("'heading' => \$eventData['heading'] ?? null")
|
|
305
306
|
->toContain("'bearing' => \$eventData['heading'] ?? null")
|
|
306
307
|
->toContain("'speed' => \$eventData['speed'] ?? null")
|
|
@@ -1412,20 +1413,19 @@ test('afaqy sync stores compact device diagnostics and paginates complete units
|
|
|
1412
1413
|
->toContain("'provider_code'")
|
|
1413
1414
|
->toContain("'provider_message'")
|
|
1414
1415
|
->toContain("'retry_attempted'")
|
|
1415
|
-
->toContain('??
|
|
1416
|
+
->toContain('?? 1000), 1000')
|
|
1416
1417
|
->toContain('if (is_array($filters) && empty($filters))')
|
|
1417
1418
|
->toContain('$filters = new \stdClass();')
|
|
1418
1419
|
->toContain("'limit' => \$limit")
|
|
1419
1420
|
->toContain("'offset' => \$offset")
|
|
1420
1421
|
->not->toContain("\n 'limit' => \$limit,\n 'offset' => \$offset,")
|
|
1421
1422
|
->toContain("\$this->afaqyPost('/units/lists', [")
|
|
1422
|
-
->toContain('
|
|
1423
|
+
->toContain("'simplify' => 0")
|
|
1423
1424
|
->toContain("http_build_query(['token' => \$this->credentials['token']])")
|
|
1424
1425
|
->toContain("\$body = \$tokenInQuery ? \$payload : array_merge(['token' => \$this->credentials['token']], \$payload)")
|
|
1425
1426
|
->toContain('$pageOffset = (int) ($pagination[\'offset\'] ?? $offset);')
|
|
1426
1427
|
->toContain('$pageLimit = (int) ($pagination[\'limit\'] ?? $limit);')
|
|
1427
|
-
->toContain('
|
|
1428
|
-
->toContain('$nextCursor = ($pageOffset + $advanceBy) < $total ? $pageOffset + $advanceBy : null;')
|
|
1428
|
+
->toContain('AFAQY returned inconsistent pagination; sweep incomplete.')
|
|
1429
1429
|
->toContain("'requested_limit'")
|
|
1430
1430
|
->toContain("'provider_limit'")
|
|
1431
1431
|
->toContain("'provider_result_count'")
|
|
@@ -1433,8 +1433,8 @@ test('afaqy sync stores compact device diagnostics and paginates complete units
|
|
|
1433
1433
|
->toContain("'allCount'")
|
|
1434
1434
|
->toContain("'filtersCount'")
|
|
1435
1435
|
->toContain("'resultCount'")
|
|
1436
|
-
->toContain("'online' =>
|
|
1437
|
-
->toContain(
|
|
1436
|
+
->toContain("'online' => null")
|
|
1437
|
+
->toContain('normalizeEvent');
|
|
1438
1438
|
});
|
|
1439
1439
|
|
|
1440
1440
|
test('afaqy sensors normalize stable parent scoped identities and latest values', function () {
|
|
@@ -1471,7 +1471,7 @@ test('afaqy sensors normalize stable parent scoped identities and latest values'
|
|
|
1471
1471
|
'value' => 'Open',
|
|
1472
1472
|
'status' => 'active',
|
|
1473
1473
|
]);
|
|
1474
|
-
expect($open['recorded_at'])->toBe('2026-06-
|
|
1474
|
+
expect($open['recorded_at'])->toBe('2026-06-23T09:00:00.000000Z');
|
|
1475
1475
|
expect(data_get($open, 'meta.provider'))->toBe('afaqy');
|
|
1476
1476
|
expect(data_get($open, 'meta.unit_id'))->toBe('unit-123');
|
|
1477
1477
|
expect($closed['internal_id'])->toBe($open['internal_id']);
|
|
@@ -1494,7 +1494,7 @@ test('afaqy sensors reject event shaped payloads without scalar sensor values',
|
|
|
1494
1494
|
});
|
|
1495
1495
|
|
|
1496
1496
|
test('afaqy provider helpers build authenticated requests and sanitized diagnostics', function () {
|
|
1497
|
-
Carbon::setTestNow(Carbon::parse('2026-06-
|
|
1497
|
+
Carbon::setTestNow(Carbon::parse('2026-06-23T10:00:00.000000Z'));
|
|
1498
1498
|
|
|
1499
1499
|
try {
|
|
1500
1500
|
$provider = new FleetOpsAfaqyProviderProbe();
|
|
@@ -1522,8 +1522,8 @@ test('afaqy provider helpers build authenticated requests and sanitized diagnost
|
|
|
1522
1522
|
->and($provider->providerErrorMessageForTest(['error_description' => 'Description failure']))->toBe('Description failure')
|
|
1523
1523
|
->and($provider->providerErrorMessageForTest(['error' => ['not_scalar' => true]]))->toBeNull()
|
|
1524
1524
|
->and($provider->parseTimestampForTest(null))->toBeNull()
|
|
1525
|
-
->and($provider->parseTimestampForTest(1719136800000))->toBe('2024-06-
|
|
1526
|
-
->and($provider->parseTimestampForTest('2026-06-23T09:00:00Z'))->toBe('2026-06-
|
|
1525
|
+
->and($provider->parseTimestampForTest(1719136800000))->toBe('2024-06-23T10:00:00.000000Z')
|
|
1526
|
+
->and($provider->parseTimestampForTest('2026-06-23T09:00:00Z'))->toBe('2026-06-23T09:00:00.000000Z')
|
|
1527
1527
|
->and($provider->compactLastUpdateForTest([
|
|
1528
1528
|
'dtt' => '2026-06-23T09:00:00Z',
|
|
1529
1529
|
'lat' => 25.2,
|
|
@@ -1533,7 +1533,7 @@ test('afaqy provider helpers build authenticated requests and sanitized diagnost
|
|
|
1533
1533
|
'alt' => 12,
|
|
1534
1534
|
'params' => ['sat' => 8, 'protocol' => 'wialon'],
|
|
1535
1535
|
]))->toMatchArray([
|
|
1536
|
-
'occurred_at' => '2026-06-
|
|
1536
|
+
'occurred_at' => '2026-06-23T09:00:00.000000Z',
|
|
1537
1537
|
'lat' => 25.2,
|
|
1538
1538
|
'lng' => 55.2,
|
|
1539
1539
|
'speed' => 64,
|
|
@@ -1609,8 +1609,8 @@ test('afaqy normalization covers device event and sensor type variants', functio
|
|
|
1609
1609
|
'phone' => 'sim-123',
|
|
1610
1610
|
'vin' => 'vin-123',
|
|
1611
1611
|
'status' => 'active',
|
|
1612
|
-
'online' =>
|
|
1613
|
-
'last_seen_at' => '2026-06-
|
|
1612
|
+
'online' => null,
|
|
1613
|
+
'last_seen_at' => '2026-06-23T09:00:00.000000Z',
|
|
1614
1614
|
'location' => ['lat' => 25.2, 'lng' => 55.2],
|
|
1615
1615
|
])
|
|
1616
1616
|
->and(data_get($device, 'meta.capabilities'))->toBe([
|
|
@@ -1624,8 +1624,8 @@ test('afaqy normalization covers device event and sensor type variants', functio
|
|
|
1624
1624
|
'device_id' => 'unit-123',
|
|
1625
1625
|
'event_type' => 'ignition_on',
|
|
1626
1626
|
'message' => 'Ignition on',
|
|
1627
|
-
'occurred_at' => '2026-06-
|
|
1628
|
-
'online' =>
|
|
1627
|
+
'occurred_at' => '2026-06-23T09:00:00.000000Z',
|
|
1628
|
+
'online' => null,
|
|
1629
1629
|
'location' => ['lat' => 25.2, 'lng' => 55.2],
|
|
1630
1630
|
'speed' => 64,
|
|
1631
1631
|
'heading' => 180,
|
|
@@ -1658,7 +1658,7 @@ test('afaqy normalization covers device event and sensor type variants', functio
|
|
|
1658
1658
|
'name' => 'Temperature 1',
|
|
1659
1659
|
'type' => 'temperature',
|
|
1660
1660
|
'value' => 4.5,
|
|
1661
|
-
'recorded_at' => '2026-06-
|
|
1661
|
+
'recorded_at' => '2026-06-23T09:10:00.000000Z',
|
|
1662
1662
|
]);
|
|
1663
1663
|
});
|
|
1664
1664
|
|
|
@@ -141,7 +141,7 @@ function fleetOpsTrailerSupportDatabase(): SQLiteConnection
|
|
|
141
141
|
});
|
|
142
142
|
$schema->create('custom_fields', function ($table) {
|
|
143
143
|
$table->increments('id');
|
|
144
|
-
foreach (['uuid', 'company_uuid', 'label', 'name', 'type'] as $column) {
|
|
144
|
+
foreach (['uuid', 'public_id', 'company_uuid', 'label', 'name', 'type'] as $column) {
|
|
145
145
|
$table->string($column)->nullable();
|
|
146
146
|
}
|
|
147
147
|
$table->timestamps();
|
|
@@ -64,7 +64,7 @@ class FleetOpsManifestFake extends Manifest
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
test('manifest resource publishes what a driver needs to run a route', function () {
|
|
67
|
-
$request
|
|
67
|
+
$request = Request::create('/v1/manifests/manifest_public', 'GET');
|
|
68
68
|
FleetOpsSupportRequestState::$request = $request;
|
|
69
69
|
|
|
70
70
|
$manifest = new FleetOpsManifestFake();
|
|
@@ -94,7 +94,7 @@ test('manifest resource publishes what a driver needs to run a route', function
|
|
|
94
94
|
test('manifest resource omits stops when they were not loaded, so a list stays a list', function () {
|
|
95
95
|
// A driver's manifest list on a busy fleet must not drag every stop of
|
|
96
96
|
// every route along with it.
|
|
97
|
-
$request
|
|
97
|
+
$request = Request::create('/v1/drivers/driver_public/manifests', 'GET');
|
|
98
98
|
FleetOpsSupportRequestState::$request = $request;
|
|
99
99
|
|
|
100
100
|
$manifest = new FleetOpsManifestFake();
|
|
@@ -106,7 +106,7 @@ test('manifest resource omits stops when they were not loaded, so a list stays a
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
test('manifest stop resource carries the sequence a re-sequence rewrites', function () {
|
|
109
|
-
$request
|
|
109
|
+
$request = Request::create('/v1/manifest-stops/stop_public', 'GET');
|
|
110
110
|
FleetOpsSupportRequestState::$request = $request;
|
|
111
111
|
|
|
112
112
|
$stop = new ManifestStop();
|