@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
|
@@ -2,6 +2,8 @@ import Controller from '@ember/controller';
|
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
+
import { buildIdentityStub } from '../../../utils/identity-cell-resource';
|
|
6
|
+
import relationValue from '../../../utils/relation-value';
|
|
5
7
|
import fleetOpsOptions from '../../../utils/fleet-ops-options';
|
|
6
8
|
|
|
7
9
|
export default class ManagementVendorsIndexController extends Controller {
|
|
@@ -118,7 +120,7 @@ export default class ManagementVendorsIndexController extends Controller {
|
|
|
118
120
|
sticky: true,
|
|
119
121
|
label: this.intl.t('column.name'),
|
|
120
122
|
valuePath: 'name',
|
|
121
|
-
cellComponent: '
|
|
123
|
+
cellComponent: 'cell/vendor-identity',
|
|
122
124
|
mediaPath: 'logo_url',
|
|
123
125
|
action: this.vendorActions.transition.view,
|
|
124
126
|
permission: 'fleet-ops view vendor',
|
|
@@ -178,8 +180,9 @@ export default class ManagementVendorsIndexController extends Controller {
|
|
|
178
180
|
{
|
|
179
181
|
label: this.intl.t('column.address'),
|
|
180
182
|
valuePath: 'address',
|
|
181
|
-
cellComponent: '
|
|
182
|
-
|
|
183
|
+
cellComponent: 'cell/place-identity',
|
|
184
|
+
permission: 'fleet-ops view place',
|
|
185
|
+
resourcePath: (vendor) => relationValue(vendor, 'place') ?? buildIdentityStub(vendor, { type: 'place', nameKey: 'address', load: () => vendor.get('place') }),
|
|
183
186
|
resizable: true,
|
|
184
187
|
sortable: true,
|
|
185
188
|
filterable: true,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import Controller from '@ember/controller';
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import { action } from '@ember/object';
|
|
4
|
+
import { action, get } from '@ember/object';
|
|
5
|
+
import { buildIdentityStub } from '../../../utils/identity-cell-resource';
|
|
6
|
+
import relationValue from '../../../utils/relation-value';
|
|
5
7
|
|
|
6
8
|
export default class OperationsOrdersIndexController extends Controller {
|
|
7
9
|
@service orderActions;
|
|
10
|
+
@service driverActions;
|
|
11
|
+
@service vehicleActions;
|
|
12
|
+
@service store;
|
|
8
13
|
@service orderSocketEvents;
|
|
9
14
|
@service leafletMapManager;
|
|
10
15
|
@service mapDrawer;
|
|
@@ -164,7 +169,8 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
164
169
|
{
|
|
165
170
|
label: this.intl.t('column.payload'),
|
|
166
171
|
valuePath: 'payload.public_id',
|
|
167
|
-
cellComponent: '
|
|
172
|
+
cellComponent: 'cell/payload-identity',
|
|
173
|
+
resourcePath: (order) => relationValue(order, 'payload'),
|
|
168
174
|
resizable: true,
|
|
169
175
|
hidden: true,
|
|
170
176
|
filterable: true,
|
|
@@ -174,9 +180,13 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
174
180
|
},
|
|
175
181
|
{
|
|
176
182
|
label: this.intl.t('column.driver-assigned'),
|
|
177
|
-
cellComponent: 'cell/driver-
|
|
183
|
+
cellComponent: 'cell/driver-identity',
|
|
178
184
|
valuePath: 'driver_assigned',
|
|
179
|
-
|
|
185
|
+
permission: 'fleet-ops view driver',
|
|
186
|
+
action: this.driverActions.panel.view,
|
|
187
|
+
resourcePath: (order) =>
|
|
188
|
+
relationValue(order, 'driver_assigned') ??
|
|
189
|
+
buildIdentityStub(order, { type: 'driver', load: () => (order.driver_assigned_uuid ? this.store.findRecord('driver', order.driver_assigned_uuid) : null) }),
|
|
180
190
|
resizable: true,
|
|
181
191
|
sortable: true,
|
|
182
192
|
filterable: true,
|
|
@@ -188,7 +198,9 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
188
198
|
{
|
|
189
199
|
label: this.intl.t('column.pickup'),
|
|
190
200
|
valuePath: 'pickupName',
|
|
191
|
-
cellComponent: '
|
|
201
|
+
cellComponent: 'cell/place-identity',
|
|
202
|
+
permission: 'fleet-ops view place',
|
|
203
|
+
resourcePath: (order) => relationValue(relationValue(order, 'payload'), 'pickup') ?? buildIdentityStub(order, { type: 'place', nameKey: 'pickupName' }),
|
|
192
204
|
resizable: true,
|
|
193
205
|
sortable: true,
|
|
194
206
|
filterable: true,
|
|
@@ -202,7 +214,9 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
202
214
|
{
|
|
203
215
|
label: this.intl.t('column.dropoff'),
|
|
204
216
|
valuePath: 'dropoffName',
|
|
205
|
-
cellComponent: '
|
|
217
|
+
cellComponent: 'cell/place-identity',
|
|
218
|
+
permission: 'fleet-ops view place',
|
|
219
|
+
resourcePath: (order) => relationValue(relationValue(order, 'payload'), 'dropoff') ?? buildIdentityStub(order, { type: 'place', nameKey: 'dropoffName' }),
|
|
206
220
|
resizable: true,
|
|
207
221
|
sortable: true,
|
|
208
222
|
filterable: true,
|
|
@@ -215,7 +229,8 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
215
229
|
{
|
|
216
230
|
label: this.intl.t('column.customer'),
|
|
217
231
|
valuePath: 'customer.name',
|
|
218
|
-
cellComponent: '
|
|
232
|
+
cellComponent: 'cell/customer-identity',
|
|
233
|
+
resourcePath: (order) => relationValue(order, 'customer') ?? buildIdentityStub(order, { type: order.customer_type ?? 'customer', nameKey: 'customer_name' }),
|
|
219
234
|
resizable: true,
|
|
220
235
|
sortable: true,
|
|
221
236
|
hidden: false,
|
|
@@ -227,10 +242,17 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
227
242
|
},
|
|
228
243
|
{
|
|
229
244
|
label: this.intl.t('column.vehicle-assigned'),
|
|
230
|
-
cellComponent: 'cell/vehicle-
|
|
245
|
+
cellComponent: 'cell/vehicle-identity',
|
|
231
246
|
valuePath: 'vehicle_assigned.display_name',
|
|
232
|
-
|
|
233
|
-
|
|
247
|
+
permission: 'fleet-ops view vehicle',
|
|
248
|
+
action: this.vehicleActions.panel.view,
|
|
249
|
+
resourcePath: (order) =>
|
|
250
|
+
relationValue(order, 'vehicle_assigned') ??
|
|
251
|
+
buildIdentityStub(order, {
|
|
252
|
+
type: 'vehicle',
|
|
253
|
+
name: get(order, 'vehicle_assigned.display_name'),
|
|
254
|
+
load: () => (order.vehicle_assigned_uuid ? this.store.findRecord('vehicle', order.vehicle_assigned_uuid) : null),
|
|
255
|
+
}),
|
|
234
256
|
hidden: true,
|
|
235
257
|
resizable: true,
|
|
236
258
|
sortable: true,
|
|
@@ -244,7 +266,8 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
244
266
|
{
|
|
245
267
|
label: this.intl.t('column.facilitator'),
|
|
246
268
|
valuePath: 'facilitator.name',
|
|
247
|
-
cellComponent: '
|
|
269
|
+
cellComponent: 'cell/facilitator-identity',
|
|
270
|
+
resourcePath: (order) => relationValue(order, 'facilitator') ?? buildIdentityStub(order, { type: order.facilitator_type ?? 'facilitator', nameKey: 'facilitator_name' }),
|
|
248
271
|
resizable: true,
|
|
249
272
|
hidden: true,
|
|
250
273
|
sortable: true,
|
|
@@ -333,6 +356,8 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
333
356
|
{
|
|
334
357
|
label: this.intl.t('column.created-by'),
|
|
335
358
|
valuePath: 'created_by_name',
|
|
359
|
+
cellComponent: 'table/cell/user-identity',
|
|
360
|
+
resourcePath: (order) => buildIdentityStub(order, { type: 'user', nameKey: 'created_by_name' }),
|
|
336
361
|
resizable: true,
|
|
337
362
|
hidden: true,
|
|
338
363
|
filterable: true,
|
|
@@ -344,6 +369,8 @@ export default class OperationsOrdersIndexController extends Controller {
|
|
|
344
369
|
{
|
|
345
370
|
label: this.intl.t('column.updated-by'),
|
|
346
371
|
valuePath: 'updated_by_name',
|
|
372
|
+
cellComponent: 'table/cell/user-identity',
|
|
373
|
+
resourcePath: (order) => buildIdentityStub(order, { type: 'user', nameKey: 'updated_by_name' }),
|
|
347
374
|
resizable: true,
|
|
348
375
|
hidden: true,
|
|
349
376
|
filterable: true,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import Controller from '@ember/controller';
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
|
+
import { get } from '@ember/object';
|
|
4
|
+
import { buildIdentityStub } from '../../../utils/identity-cell-resource';
|
|
5
|
+
import relationValue from '../../../utils/relation-value';
|
|
3
6
|
import { tracked } from '@glimmer/tracking';
|
|
4
7
|
|
|
5
8
|
export default class OperationsServiceRatesIndexController extends Controller {
|
|
@@ -74,7 +77,10 @@ export default class OperationsServiceRatesIndexController extends Controller {
|
|
|
74
77
|
{
|
|
75
78
|
label: this.intl.t('column.service-area'),
|
|
76
79
|
valuePath: 'service_area.name',
|
|
77
|
-
cellComponent: '
|
|
80
|
+
cellComponent: 'cell/service-area-identity',
|
|
81
|
+
resourcePath: (rate) =>
|
|
82
|
+
relationValue(rate, 'service_area') ??
|
|
83
|
+
buildIdentityStub(rate, { type: 'service-area', name: rate.service_area_name ?? get(rate, 'service_area.name'), load: () => rate.get('service_area') }),
|
|
78
84
|
resizable: true,
|
|
79
85
|
sortable: true,
|
|
80
86
|
filterable: true,
|
|
@@ -86,7 +92,9 @@ export default class OperationsServiceRatesIndexController extends Controller {
|
|
|
86
92
|
{
|
|
87
93
|
label: this.intl.t('column.zone'),
|
|
88
94
|
valuePath: 'zone.name',
|
|
89
|
-
cellComponent: '
|
|
95
|
+
cellComponent: 'cell/zone-identity',
|
|
96
|
+
resourcePath: (rate) =>
|
|
97
|
+
relationValue(rate, 'zone') ?? buildIdentityStub(rate, { type: 'zone', name: rate.zone_name ?? get(rate, 'zone.name'), load: () => rate.get('zone') }),
|
|
90
98
|
resizable: true,
|
|
91
99
|
sortable: true,
|
|
92
100
|
filterable: true,
|
|
@@ -5,8 +5,11 @@ import { isEmpty } from '@ember/utils';
|
|
|
5
5
|
import { task } from 'ember-concurrency';
|
|
6
6
|
import config from 'ember-get-config';
|
|
7
7
|
import { action } from '@ember/object';
|
|
8
|
+
import { buildIdentityStub } from '../../../utils/identity-cell-resource';
|
|
9
|
+
import relationValue from '../../../utils/relation-value';
|
|
8
10
|
|
|
9
11
|
export default class SettingsPaymentsIndexController extends Controller {
|
|
12
|
+
@service store;
|
|
10
13
|
@service fetch;
|
|
11
14
|
@tracked hasStripeConnectAccount = true;
|
|
12
15
|
@tracked table;
|
|
@@ -24,16 +27,22 @@ export default class SettingsPaymentsIndexController extends Controller {
|
|
|
24
27
|
{
|
|
25
28
|
label: 'Service Quote',
|
|
26
29
|
valuePath: 'service_quote_id',
|
|
27
|
-
cellComponent: '
|
|
30
|
+
cellComponent: 'cell/service-quote-identity',
|
|
31
|
+
resourcePath: (payment) => relationValue(payment, 'service_quote') ?? buildIdentityStub(payment, { type: 'service-quote', nameKey: 'service_quote_id' }),
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
label: 'Order',
|
|
31
35
|
valuePath: 'order_id',
|
|
32
|
-
cellComponent: '
|
|
36
|
+
cellComponent: 'cell/order-identity',
|
|
37
|
+
resourcePath: (payment) =>
|
|
38
|
+
relationValue(payment, 'order') ??
|
|
39
|
+
buildIdentityStub(payment, { type: 'order', nameKey: 'order_id', load: () => (payment.order_uuid ? this.store.findRecord('order', payment.order_uuid) : null) }),
|
|
33
40
|
},
|
|
34
41
|
{
|
|
35
42
|
label: 'Customer',
|
|
36
43
|
valuePath: 'customer.name',
|
|
44
|
+
cellComponent: 'cell/customer-identity',
|
|
45
|
+
resourcePath: (payment) => relationValue(payment, 'customer') ?? buildIdentityStub(payment, { type: payment.customer_type ?? 'customer', nameKey: 'customer_name' }),
|
|
37
46
|
},
|
|
38
47
|
{
|
|
39
48
|
label: 'Amount',
|
package/addon/extension.js
CHANGED
|
@@ -13,6 +13,12 @@ export default {
|
|
|
13
13
|
priority: 0,
|
|
14
14
|
description: 'Dispatch, fleet management, driver tracking, and logistics operations.',
|
|
15
15
|
shortcuts: [
|
|
16
|
+
{
|
|
17
|
+
title: 'Radar',
|
|
18
|
+
description: 'Everything across resources, maintenance and staffing that needs a decision today.',
|
|
19
|
+
icon: 'satellite-dish',
|
|
20
|
+
route: 'console.fleet-ops.management.index',
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
title: 'Orders',
|
|
18
24
|
description: 'Create, dispatch, and track delivery orders in real time.',
|
|
@@ -118,6 +124,21 @@ export default {
|
|
|
118
124
|
})
|
|
119
125
|
);
|
|
120
126
|
|
|
127
|
+
menuService.registerMenuItem(
|
|
128
|
+
'auth:login',
|
|
129
|
+
new MenuItem({
|
|
130
|
+
title: 'Inspection',
|
|
131
|
+
route: 'virtual',
|
|
132
|
+
slug: 'inspection',
|
|
133
|
+
type: 'link',
|
|
134
|
+
wrapperClass: 'hidden',
|
|
135
|
+
component: new ExtensionComponent('@fleetbase/fleetops-engine', 'public-inspection'),
|
|
136
|
+
onClick: (menuItem) => {
|
|
137
|
+
universe.transitionMenuItem('virtual', menuItem);
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
);
|
|
141
|
+
|
|
121
142
|
// Register widgets
|
|
122
143
|
this.registerWidgets(widgetService);
|
|
123
144
|
|
|
@@ -205,6 +226,16 @@ export default {
|
|
|
205
226
|
category: 'KPI Tiles',
|
|
206
227
|
default: true,
|
|
207
228
|
}),
|
|
229
|
+
new Widget({
|
|
230
|
+
id: 'fleet-ops-radar-widget',
|
|
231
|
+
name: 'Radar',
|
|
232
|
+
description: 'What needs a decision across the fleet right now: open, overdue and snoozed items, linking to Radar.',
|
|
233
|
+
icon: 'satellite-dish',
|
|
234
|
+
component: new ExtensionComponent('@fleetbase/fleetops-engine', 'widget/radar'),
|
|
235
|
+
grid_options: { w: 3, h: 4, minW: 3, minH: 4 },
|
|
236
|
+
category: 'KPI Tiles',
|
|
237
|
+
default: true,
|
|
238
|
+
}),
|
|
208
239
|
new Widget({
|
|
209
240
|
id: 'fleet-ops-kpi-open-issues-widget',
|
|
210
241
|
name: 'Open Issues',
|
|
@@ -394,6 +425,11 @@ export default {
|
|
|
394
425
|
'fleet-ops:component:maintenance:form',
|
|
395
426
|
'fleet-ops:component:maintenance:form:details',
|
|
396
427
|
'fleet-ops:component:maintenance:details',
|
|
428
|
+
'fleet-ops:component:inspection-form:form',
|
|
429
|
+
'fleet-ops:component:inspection-form:details',
|
|
430
|
+
'fleet-ops:component:inspection-submission:form',
|
|
431
|
+
'fleet-ops:component:inspection-submission:details',
|
|
432
|
+
'fleet-ops:component:public-inspection',
|
|
397
433
|
'fleet-ops:component:work-order:form',
|
|
398
434
|
'fleet-ops:component:work-order:form:details',
|
|
399
435
|
'fleet-ops:component:work-order:details',
|
|
@@ -5,9 +5,14 @@ import { inject as service } from '@ember/service';
|
|
|
5
5
|
* Resolves the Leaflet tile URL from Fleet-Ops map settings.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* <layers.tile @url={{leaflet-tile-url}} />
|
|
8
|
+
* <layers.tile @url={{(leaflet-tile-url)}} />
|
|
9
9
|
* <layers.tile @url={{leaflet-tile-url theme="dark"}} />
|
|
10
10
|
*
|
|
11
|
+
* With no arguments it must be invoked in parentheses. A bare
|
|
12
|
+
* `@url={{leaflet-tile-url}}` passes the helper by name, which Glimmer refuses
|
|
13
|
+
* with "A resolved helper cannot be passed as a named argument" and the whole
|
|
14
|
+
* template fails to render.
|
|
15
|
+
*
|
|
11
16
|
* Recomputes automatically when map settings load or change.
|
|
12
17
|
*/
|
|
13
18
|
export default class LeafletTileUrlHelper extends Helper {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { buildFleetOpsResourceDescriptors } from '../utils/resource-descriptors';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registers every FleetOps resource descriptor with the resource registry
|
|
5
|
+
* ember-ui provides. Runs with the engine instance, so the descriptors'
|
|
6
|
+
* open actions reach the engine's action services and router. A host whose
|
|
7
|
+
* ember-ui predates the registry has no `resource-registry` service, and
|
|
8
|
+
* the identity components simply fall back to text.
|
|
9
|
+
*/
|
|
10
|
+
export function initialize(engineInstance) {
|
|
11
|
+
let registry;
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
registry = engineInstance.lookup('service:resource-registry');
|
|
15
|
+
} catch {
|
|
16
|
+
registry = null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (!registry || typeof registry.registerDescriptors !== 'function') {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
registry.registerDescriptors(buildFleetOpsResourceDescriptors(engineInstance));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'register-fleetops-resource-descriptors',
|
|
28
|
+
initialize,
|
|
29
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { modifier } from 'ember-modifier';
|
|
2
|
+
|
|
3
|
+
/** Room left between the flyout and its field, and between it and the sheet's edge. */
|
|
4
|
+
const GAP = 8;
|
|
5
|
+
const EDGE = 8;
|
|
6
|
+
|
|
7
|
+
/** The nearest ancestor that actually scrolls, or null for the window. */
|
|
8
|
+
function scrollParentOf(element) {
|
|
9
|
+
let node = element?.parentElement;
|
|
10
|
+
|
|
11
|
+
while (node && node !== document.body) {
|
|
12
|
+
const { overflowY } = getComputedStyle(node);
|
|
13
|
+
|
|
14
|
+
if (/(auto|scroll|overlay)/.test(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
15
|
+
return node;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
node = node.parentElement;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Place a floating flyout against its field.
|
|
26
|
+
*
|
|
27
|
+
* Both live inside the same sheet, so they scroll together and nothing has to
|
|
28
|
+
* follow the scroll. The flyout goes below the field unless only the visible
|
|
29
|
+
* space above it can hold it, is kept inside the sheet horizontally, and
|
|
30
|
+
* points its caret at the field's Fail button.
|
|
31
|
+
*/
|
|
32
|
+
export function placeFlyout(element, anchor, container) {
|
|
33
|
+
const containerRect = container.getBoundingClientRect();
|
|
34
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
35
|
+
const width = element.offsetWidth;
|
|
36
|
+
const height = element.offsetHeight;
|
|
37
|
+
|
|
38
|
+
const scroller = scrollParentOf(anchor);
|
|
39
|
+
const viewTop = scroller ? scroller.getBoundingClientRect().top : 0;
|
|
40
|
+
const viewBottom = scroller ? scroller.getBoundingClientRect().bottom : window.innerHeight;
|
|
41
|
+
|
|
42
|
+
const fitsBelow = viewBottom - anchorRect.bottom >= height + GAP;
|
|
43
|
+
const fitsAbove = anchorRect.top - viewTop >= height + GAP;
|
|
44
|
+
|
|
45
|
+
// Below, unless only the space above can hold it. Whatever hangs below a
|
|
46
|
+
// field can always be scrolled to — an absolutely placed panel extends
|
|
47
|
+
// the scroll area — but a panel pushed above the start of the sheet
|
|
48
|
+
// cannot be reached at all, so "more room above" is not reason enough.
|
|
49
|
+
const below = fitsBelow || !fitsAbove;
|
|
50
|
+
|
|
51
|
+
const top = below ? anchorRect.bottom - containerRect.top + GAP : anchorRect.top - containerRect.top - height - GAP;
|
|
52
|
+
|
|
53
|
+
const maxLeft = Math.max(EDGE, container.clientWidth - width - EDGE);
|
|
54
|
+
const left = Math.max(EDGE, Math.min(anchorRect.left - containerRect.left, maxLeft));
|
|
55
|
+
|
|
56
|
+
element.style.top = `${Math.round(top)}px`;
|
|
57
|
+
element.style.left = `${Math.round(left)}px`;
|
|
58
|
+
element.dataset.placement = below ? 'bottom' : 'top';
|
|
59
|
+
|
|
60
|
+
const pointAt = anchor.querySelector('[data-answer="fail"]') ?? anchor;
|
|
61
|
+
const pointRect = pointAt.getBoundingClientRect();
|
|
62
|
+
const caret = pointRect.left + pointRect.width / 2 - containerRect.left - left;
|
|
63
|
+
|
|
64
|
+
element.style.setProperty('--flyout-caret-x', `${Math.round(Math.max(16, Math.min(caret, width - 16)))}px`);
|
|
65
|
+
|
|
66
|
+
// Where it now sits, worked out from layout rather than read off its
|
|
67
|
+
// rendered box: the open animation is still translating it, and a reveal
|
|
68
|
+
// measured from the moving box stops exactly that many pixels short.
|
|
69
|
+
const flyoutTop = containerRect.top + top;
|
|
70
|
+
|
|
71
|
+
return { placement: below ? 'bottom' : 'top', flyoutTop, flyoutBottom: flyoutTop + height, viewTop, viewBottom, scroller };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Scroll just enough to bring a newly opened flyout fully into view, keeping
|
|
76
|
+
* a small margin from the edge. If it is taller than the view, its top — the
|
|
77
|
+
* title, and the first thing to answer — is what stays in view. Returns how
|
|
78
|
+
* far it scrolled.
|
|
79
|
+
*/
|
|
80
|
+
export function revealFlyout({ flyoutTop, flyoutBottom, viewTop, viewBottom, scroller }) {
|
|
81
|
+
let delta = 0;
|
|
82
|
+
|
|
83
|
+
if (flyoutBottom + EDGE > viewBottom) {
|
|
84
|
+
delta = flyoutBottom + EDGE - viewBottom;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (flyoutTop - delta - EDGE < viewTop) {
|
|
88
|
+
delta = flyoutTop - EDGE - viewTop;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (Math.abs(delta) < 1) {
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const reduce = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
96
|
+
(scroller ?? window).scrollBy({ top: delta, behavior: reduce ? 'auto' : 'smooth' });
|
|
97
|
+
|
|
98
|
+
return delta;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Run something once the flyout's opening animation has finished.
|
|
103
|
+
*
|
|
104
|
+
* The animation translates the panel, and a translated box changes the
|
|
105
|
+
* scrollable area: a reveal worked out mid-animation is clamped against a
|
|
106
|
+
* scroll area that is briefly too short, and lands short by exactly the
|
|
107
|
+
* animated offset. Without an animation — reduced motion — it runs at once.
|
|
108
|
+
* Returns a timer to clear on teardown.
|
|
109
|
+
*/
|
|
110
|
+
function afterOpening(element, callback) {
|
|
111
|
+
const style = getComputedStyle(element);
|
|
112
|
+
const seconds = parseFloat(style.animationDuration) || 0;
|
|
113
|
+
|
|
114
|
+
if (style.animationName === 'none' || seconds === 0) {
|
|
115
|
+
callback();
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
let done = false;
|
|
120
|
+
const finish = () => {
|
|
121
|
+
if (done) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
done = true;
|
|
126
|
+
element.removeEventListener('animationend', finish);
|
|
127
|
+
callback();
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
element.addEventListener('animationend', finish);
|
|
131
|
+
|
|
132
|
+
// In case the event never comes: a hidden tab, an interrupted animation.
|
|
133
|
+
return setTimeout(finish, seconds * 1000 + 50);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Keep a defect flyout attached to its field, and close it the natural way.
|
|
138
|
+
*
|
|
139
|
+
* <div {{inspection-flyout this.anchor presentation="floating" onDismiss=this.dismiss}}>
|
|
140
|
+
*
|
|
141
|
+
* It closes on a press outside itself and outside its own field, and on
|
|
142
|
+
* Escape. It deliberately does not close on blur or on scroll: focus leaves
|
|
143
|
+
* the page for the native photo picker, and scrolling moves the flyout with
|
|
144
|
+
* its field anyway. Nothing is lost by closing, because every answer is saved
|
|
145
|
+
* as it is typed.
|
|
146
|
+
*
|
|
147
|
+
* A bottom sheet is placed by its stylesheet, so it only takes the
|
|
148
|
+
* dismissal half of this.
|
|
149
|
+
*/
|
|
150
|
+
export default modifier(function inspectionFlyout(element, [anchor], { presentation = 'floating', onDismiss, focus } = {}) {
|
|
151
|
+
if (!(anchor instanceof Element)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const container = anchor.closest('.inspection-sheet') ?? document.body;
|
|
156
|
+
const floating = presentation === 'floating';
|
|
157
|
+
let frame = null;
|
|
158
|
+
let revealed = false;
|
|
159
|
+
let revealTimer = null;
|
|
160
|
+
|
|
161
|
+
const place = () => {
|
|
162
|
+
if (!floating || !element.isConnected || !anchor.isConnected) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
cancelAnimationFrame(frame);
|
|
167
|
+
frame = requestAnimationFrame(() => {
|
|
168
|
+
placeFlyout(element, anchor, container);
|
|
169
|
+
|
|
170
|
+
// A panel that opens half off the page is not natural. Bring it
|
|
171
|
+
// into view once, by the least scroll that will do it, as soon as
|
|
172
|
+
// it has finished opening; after that the inspector is in charge
|
|
173
|
+
// of the scrolling.
|
|
174
|
+
if (!revealed) {
|
|
175
|
+
revealed = true;
|
|
176
|
+
revealTimer = afterOpening(element, () => {
|
|
177
|
+
if (element.isConnected && anchor.isConnected) {
|
|
178
|
+
revealFlyout(placeFlyout(element, anchor, container));
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const dismiss = (reason) => {
|
|
186
|
+
if (typeof onDismiss === 'function') {
|
|
187
|
+
onDismiss(reason);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// A press anywhere but the flyout or its own field closes it. Pointerdown,
|
|
192
|
+
// not click, so pressing another field's Fail closes this one first.
|
|
193
|
+
const onPointerDown = (event) => {
|
|
194
|
+
const target = event.target;
|
|
195
|
+
|
|
196
|
+
if (element.contains(target) || anchor.contains(target)) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
dismiss('outside');
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const onKeyDown = (event) => {
|
|
204
|
+
if (event.key === 'Escape') {
|
|
205
|
+
event.stopPropagation();
|
|
206
|
+
dismiss('escape');
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
document.addEventListener('pointerdown', onPointerDown, true);
|
|
211
|
+
document.addEventListener('keydown', onKeyDown, true);
|
|
212
|
+
window.addEventListener('resize', place);
|
|
213
|
+
|
|
214
|
+
// Re-place when anything around it changes height: a field above it
|
|
215
|
+
// gaining a line, or the flyout itself growing as a photo is added.
|
|
216
|
+
const observer = typeof ResizeObserver === 'function' ? new ResizeObserver(place) : null;
|
|
217
|
+
observer?.observe(container);
|
|
218
|
+
observer?.observe(element);
|
|
219
|
+
|
|
220
|
+
place();
|
|
221
|
+
|
|
222
|
+
if (focus) {
|
|
223
|
+
requestAnimationFrame(() => {
|
|
224
|
+
const target = focus === true ? element : element.querySelector(focus);
|
|
225
|
+
target?.focus({ preventScroll: true });
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return () => {
|
|
230
|
+
cancelAnimationFrame(frame);
|
|
231
|
+
clearTimeout(revealTimer);
|
|
232
|
+
document.removeEventListener('pointerdown', onPointerDown, true);
|
|
233
|
+
document.removeEventListener('keydown', onKeyDown, true);
|
|
234
|
+
window.removeEventListener('resize', place);
|
|
235
|
+
observer?.disconnect();
|
|
236
|
+
};
|
|
237
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { modifier } from 'ember-modifier';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Radar keyboard layer: j/k move, x selects, e acknowledges, s snoozes,
|
|
5
|
+
* a assigns, Enter opens the record, Escape closes what is open.
|
|
6
|
+
*
|
|
7
|
+
* Keys are ignored while the user is typing in a field or a modal or
|
|
8
|
+
* overlay is open, so the list never steals a keystroke from a form.
|
|
9
|
+
* `handlers` is a hash of key => function; a missing key is ignored.
|
|
10
|
+
*/
|
|
11
|
+
const KEYS = {
|
|
12
|
+
j: 'next',
|
|
13
|
+
k: 'previous',
|
|
14
|
+
ArrowDown: 'next',
|
|
15
|
+
ArrowUp: 'previous',
|
|
16
|
+
x: 'select',
|
|
17
|
+
e: 'acknowledge',
|
|
18
|
+
s: 'snooze',
|
|
19
|
+
a: 'assign',
|
|
20
|
+
Enter: 'open',
|
|
21
|
+
Escape: 'close',
|
|
22
|
+
'/': 'search',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function isTypingTarget(target) {
|
|
26
|
+
if (!target || typeof target.closest !== 'function') {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (target.isContentEditable) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const tag = (target.tagName || '').toLowerCase();
|
|
35
|
+
if (['input', 'textarea', 'select'].includes(tag)) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return Boolean(target.closest('.ember-basic-dropdown-content, .modal, .next-content-overlay-panel, [role="dialog"], .ember-power-select-dropdown'));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default modifier(function radarKeyboard(element, [handlers = {}], { enabled = true } = {}) {
|
|
43
|
+
const onKeydown = (event) => {
|
|
44
|
+
if (!enabled || event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// A letter arrives as typed; the map is lowercase.
|
|
49
|
+
const key = typeof event.key === 'string' && event.key.length === 1 ? event.key.toLowerCase() : event.key;
|
|
50
|
+
const name = KEYS[key];
|
|
51
|
+
if (!name) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// "/" focuses the search even from a field; every other key only
|
|
56
|
+
// fires when the user is not typing.
|
|
57
|
+
if (name !== 'search' && isTypingTarget(event.target)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (name === 'search' && isTypingTarget(event.target)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const handler = handlers[name];
|
|
65
|
+
if (typeof handler !== 'function') {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
handler(event);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
document.addEventListener('keydown', onKeydown);
|
|
74
|
+
|
|
75
|
+
return () => {
|
|
76
|
+
document.removeEventListener('keydown', onKeydown);
|
|
77
|
+
};
|
|
78
|
+
});
|