@fleetbase/fleetops-engine 0.6.45 → 0.6.47
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/addon/components/admin/map-settings.hbs +26 -0
- package/addon/components/admin/map-settings.js +46 -0
- package/addon/components/admin/routing-settings.hbs +11 -0
- package/addon/components/cell/order-route-type.hbs +46 -0
- package/addon/components/cell/order-route-type.js +90 -0
- package/addon/components/cell/place-address.hbs +1 -0
- package/addon/components/display-place.hbs +45 -56
- package/addon/components/display-place.js +21 -0
- package/addon/components/layout/fleet-ops-sidebar/driver-listing.js +5 -5
- package/addon/components/layout/fleet-ops-sidebar/fleet-listing.js +5 -5
- package/addon/components/layout/fleet-ops-sidebar.js +8 -0
- package/addon/components/maintenance-schedule/form.js +2 -1
- package/addon/components/map/drawer/driver-listing.js +5 -5
- package/addon/components/map/drawer/place-listing.js +5 -5
- package/addon/components/map/drawer/position-listing.js +102 -21
- package/addon/components/map/drawer/vehicle-listing.js +5 -5
- package/addon/components/map/google-live-map.hbs +9 -0
- package/addon/components/map/google-live-map.js +445 -0
- package/addon/components/map/leaflet-live-map.hbs +186 -142
- package/addon/components/map/leaflet-live-map.js +121 -41
- package/addon/components/map/toolbar/visibility-control-panel.js +2 -2
- package/addon/components/map/toolbar/zones-panel.hbs +9 -9
- package/addon/components/map/toolbar.hbs +3 -3
- package/addon/components/map/toolbar.js +9 -1
- package/addon/components/modals/map-layer-form.hbs +132 -63
- package/addon/components/modals/orchestrator-import.hbs +4 -11
- package/addon/components/modals/orchestrator-import.js +17 -1
- package/addon/components/modals/update-order-activity.hbs +1 -1
- package/addon/components/orchestrator/order-pool.js +3 -2
- package/addon/components/orchestrator-workbench.js +29 -41
- package/addon/components/order/details/detail.js +2 -2
- package/addon/components/order/details/payload.hbs +5 -5
- package/addon/components/order/details/payload.js +18 -1
- package/addon/components/order/details/route.hbs +2 -2
- package/addon/components/order/details/route.js +76 -3
- package/addon/components/order/form/details.hbs +1 -2
- package/addon/components/order/form/details.js +6 -0
- package/addon/components/order/form/payload.hbs +33 -0
- package/addon/components/order/form/payload.js +1 -0
- package/addon/components/order/form/route.hbs +8 -8
- package/addon/components/order/form/route.js +86 -18
- package/addon/components/order/form.js +2 -2
- package/addon/components/order/route-editor.hbs +209 -147
- package/addon/components/order/route-editor.js +143 -102
- package/addon/components/place/address.hbs +1 -0
- package/addon/components/place/address.js +12 -0
- package/addon/components/route-list.hbs +43 -55
- package/addon/components/route-list.js +47 -0
- package/addon/components/route-optimization-wizard-panel.js +3 -4
- package/addon/components/vehicle/card.hbs +4 -4
- package/addon/controllers/maintenance/schedules/index.js +2 -1
- package/addon/controllers/operations/orders/index/details.js +110 -37
- package/addon/controllers/operations/orders/index/new.js +1 -1
- package/addon/controllers/operations/orders/index.js +8 -1
- package/addon/controllers/settings/map.js +97 -0
- package/addon/controllers/settings/payments/index.js +1 -1
- package/addon/controllers/settings/routing.js +47 -12
- package/addon/extension.js +11 -0
- package/addon/helpers/place-address-html.js +6 -0
- package/addon/instance-initializers/register-google-routes.js +17 -0
- package/addon/instance-initializers/register-osrm.js +5 -0
- package/addon/routes/application.js +6 -0
- package/addon/routes/operations/orchestrator.js +13 -0
- package/addon/routes/operations/orders/index/details.js +29 -22
- package/addon/routes/operations/orders/index/new.js +9 -0
- package/addon/routes/operations/orders/index.js +0 -1
- package/addon/routes/settings/map.js +3 -0
- package/addon/routes.js +1 -0
- package/addon/services/entity-actions.js +1 -1
- package/addon/services/geofence-event-bus.js +2 -1
- package/addon/services/geofence.js +204 -168
- package/addon/services/google-routes.js +300 -0
- package/addon/services/leaflet-draw-restriction.js +2 -1
- package/addon/services/leaflet-map-manager.js +17 -0
- package/addon/services/map-adapter/google.js +2205 -0
- package/addon/services/map-adapter/leaflet.js +1042 -0
- package/addon/services/map-adapter-interface.js +551 -0
- package/addon/services/map-manager.js +768 -0
- package/addon/services/map-settings.js +75 -0
- package/addon/services/movement-tracker.js +83 -32
- package/addon/services/order-actions.js +11 -1
- package/addon/services/osrm.js +79 -6
- package/addon/services/position-playback.js +135 -62
- package/addon/services/route-engine.js +83 -0
- package/addon/services/service-areas.js +8 -1
- package/addon/styles/fleetops-engine.css +555 -0
- package/addon/templates/management/vehicles/index.hbs +0 -1
- package/addon/templates/operations/orders/index/details.hbs +0 -1
- package/addon/templates/settings/map.hbs +53 -0
- package/addon/templates/settings/routing.hbs +15 -4
- package/addon/utils/fleet-ops-options.js +1 -0
- package/addon/utils/has-valid-coordinates.js +6 -0
- package/addon/utils/map-provider-options.js +6 -0
- package/addon/utils/order-route-editing.js +86 -0
- package/addon/utils/order-route-summary.js +20 -0
- package/addon/utils/place-address-html.js +41 -0
- package/addon/utils/route-colors.js +43 -12
- package/addon/utils/route-visualization.js +93 -0
- package/addon/utils/vendor-integration.js +2 -1
- package/app/components/admin/map-settings.js +1 -0
- package/app/components/admin/routing-settings.js +1 -0
- package/app/components/cell/order-route-type.js +1 -0
- package/app/components/cell/place-address.js +1 -0
- package/app/components/map/google-live-map.js +1 -0
- package/app/components/place/address.js +1 -0
- package/app/controllers/settings/map.js +1 -0
- package/app/helpers/place-address-html.js +1 -0
- package/app/routes/settings/map.js +1 -0
- package/app/services/map-adapter/google.js +1 -0
- package/app/services/map-adapter/leaflet.js +1 -0
- package/app/services/map-adapter-interface.js +1 -0
- package/app/services/map-manager.js +1 -0
- package/app/services/map-settings.js +1 -0
- package/app/templates/settings/map.js +1 -0
- package/app/utils/has-valid-coordinates.js +1 -0
- package/app/utils/order-route-editing.js +2 -0
- package/app/utils/order-route-summary.js +1 -0
- package/app/utils/place-address-html.js +1 -0
- package/app/utils/route-colors.js +1 -1
- package/app/utils/route-visualization.js +1 -0
- package/assets/images/drawing-controls-spritesheet.svg +156 -0
- package/composer.json +1 -1
- package/extension.json +1 -1
- package/package.json +4 -4
- package/pnpm-workspace.yaml +7 -0
- package/server/src/Auth/Schemas/FleetOps.php +5 -0
- package/server/src/Http/Controllers/Api/v1/OrderController.php +31 -3
- package/server/src/Http/Controllers/Api/v1/PayloadController.php +14 -1
- package/server/src/Http/Controllers/Api/v1/ServiceAreaController.php +2 -0
- package/server/src/Http/Controllers/Api/v1/ServiceQuoteController.php +3 -2
- package/server/src/Http/Controllers/Api/v1/ZoneController.php +2 -0
- package/server/src/Http/Controllers/Internal/v1/LiveController.php +2 -1
- package/server/src/Http/Controllers/Internal/v1/OrchestrationController.php +7 -4
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +90 -34
- package/server/src/Http/Controllers/Internal/v1/ServiceQuoteController.php +3 -2
- package/server/src/Http/Controllers/Internal/v1/SettingController.php +106 -3
- package/server/src/Http/Filter/OrderFilter.php +2 -1
- package/server/src/Http/Resources/v1/Index/Payload.php +9 -7
- package/server/src/Http/Resources/v1/Order.php +20 -1
- package/server/src/Models/Order.php +42 -1
- package/server/src/Models/OrderConfig.php +15 -0
- package/server/src/Models/Payload.php +131 -27
- package/server/src/Models/Place.php +182 -48
- package/server/src/Models/ServiceRate.php +4 -3
- package/server/src/Orchestration/Engines/VroomOrchestrationEngine.php +59 -23
- package/server/src/Support/Utils.php +36 -2
- package/server/src/routes.php +4 -0
- package/translations/en-us.yaml +1937 -1916
|
@@ -1,164 +1,208 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
live-map component
|
|
3
|
+
─────────────────────────────────────────────────────────────────────────
|
|
4
|
+
Supports two map providers:
|
|
5
|
+
• "leaflet" (default) — uses ember-leaflet / Leaflet.js
|
|
6
|
+
• "google" — uses ember-google-maps / Google Maps JS API
|
|
7
|
+
|
|
8
|
+
The active provider is read from `this.mapManager.activeProvider`.
|
|
9
|
+
Set `ENV.mapProvider = 'google'` in environment.js to switch globally,
|
|
10
|
+
or pass `@mapProvider="google"` as a component argument to override.
|
|
11
|
+
|
|
12
|
+
Both branches share the same JS component class and all services route
|
|
13
|
+
through the provider-agnostic MapManagerService.
|
|
14
|
+
}}
|
|
15
|
+
|
|
1
16
|
<div class="live-map-component {{@wrapperClass}}">
|
|
2
|
-
<LeafletMap
|
|
3
|
-
id={{this.id}}
|
|
4
|
-
class="next-leaflet-container-map {{@mapClass}}"
|
|
5
|
-
@lat={{this.latitude}}
|
|
6
|
-
@lng={{this.longitude}}
|
|
7
|
-
@zoom={{this.zoom}}
|
|
8
|
-
@zoomControl={{false}}
|
|
9
|
-
@contextmenu={{true}}
|
|
10
|
-
@contextmenuWidth={{140}}
|
|
11
|
-
@onLoad={{this.didLoad}}
|
|
12
|
-
{{set-container-dimensions}}
|
|
13
|
-
...attributes
|
|
14
|
-
as |layers|
|
|
15
|
-
>
|
|
16
|
-
<layers.tile @url={{this.tileUrl}} />
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@
|
|
22
|
-
@
|
|
23
|
-
@
|
|
24
|
-
@
|
|
25
|
-
@
|
|
26
|
-
@
|
|
27
|
-
@
|
|
18
|
+
{{#if this.shouldUseGoogleMaps}}
|
|
19
|
+
{{! ─── Google Maps branch ──────────────────────────────────────────── }}
|
|
20
|
+
<Map::GoogleLiveMap
|
|
21
|
+
@latitude={{this.latitude}}
|
|
22
|
+
@longitude={{this.longitude}}
|
|
23
|
+
@zoom={{this.zoom}}
|
|
24
|
+
@drivers={{this.drivers}}
|
|
25
|
+
@vehicles={{this.vehicles}}
|
|
26
|
+
@places={{this.places}}
|
|
27
|
+
@serviceAreas={{this.serviceAreaActions.serviceAreas}}
|
|
28
|
+
@ready={{this.load.isIdle}}
|
|
29
|
+
@onLoad={{this.didLoadGoogleMap}}
|
|
30
|
+
@onViewportChanged={{perform this.reloadResourcesInViewport}}
|
|
31
|
+
@onDriverAdded={{fn this.trigger "onDriverAdded"}}
|
|
32
|
+
@onDriverClicked={{fn this.trigger "onDriverClicked"}}
|
|
33
|
+
@onVehicleAdded={{fn this.trigger "onVehicleAdded"}}
|
|
34
|
+
@onVehicleClicked={{fn this.trigger "onVehicleClicked"}}
|
|
35
|
+
@onPlaceAdded={{fn this.trigger "onPlaceAdded"}}
|
|
36
|
+
@onPlaceClicked={{fn this.trigger "onPlaceClicked"}}
|
|
37
|
+
@onServiceAreaLayerAdded={{fn this.trigger "onServiceAreaLayerAdded"}}
|
|
38
|
+
@onZoneLayerAdd={{fn this.trigger "onZoneLayerAdd"}}
|
|
39
|
+
@mapClass={{@mapClass}}
|
|
40
|
+
...attributes
|
|
28
41
|
/>
|
|
42
|
+
{{else}}
|
|
43
|
+
{{! ─── Leaflet branch (default) ────────────────────────────────────── }}
|
|
44
|
+
<LeafletMap
|
|
45
|
+
id={{this.id}}
|
|
46
|
+
class="next-leaflet-container-map {{@mapClass}}"
|
|
47
|
+
@lat={{this.latitude}}
|
|
48
|
+
@lng={{this.longitude}}
|
|
49
|
+
@zoom={{this.zoom}}
|
|
50
|
+
@zoomControl={{false}}
|
|
51
|
+
@contextmenu={{true}}
|
|
52
|
+
@contextmenuWidth={{140}}
|
|
53
|
+
@onLoad={{this.didLoad}}
|
|
54
|
+
{{set-container-dimensions}}
|
|
55
|
+
...attributes
|
|
56
|
+
as |layers|
|
|
57
|
+
>
|
|
58
|
+
<layers.tile @url={{this.tileUrl}} />
|
|
59
|
+
|
|
60
|
+
<layers.draw-control
|
|
61
|
+
@position="topright"
|
|
62
|
+
@draw={{hash marker=false circlemarker=false polyline=false}}
|
|
63
|
+
@onDrawDrawstop={{fn this.trigger "onDrawDrawstop"}}
|
|
64
|
+
@onDrawDeleted={{fn this.trigger "onDrawDeleted"}}
|
|
65
|
+
@onDrawEdited={{fn this.trigger "onDrawEdited"}}
|
|
66
|
+
@onDrawDeletestart={{fn this.trigger "onDrawDeletestart"}}
|
|
67
|
+
@onDrawEditstop={{fn this.trigger "onDrawEditstop"}}
|
|
68
|
+
@onDrawControlCreated={{this.didCreateDrawControl}}
|
|
69
|
+
@onDrawFeatureGroupCreated={{this.didCreateDrawControlFeatureGroup}}
|
|
70
|
+
/>
|
|
29
71
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
72
|
+
{{#if this.load.isIdle}}
|
|
73
|
+
{{#each this.drivers as |driver|}}
|
|
74
|
+
<layers.tracking-marker
|
|
75
|
+
@id={{driver.id}}
|
|
76
|
+
@publicId={{driver.public_id}}
|
|
77
|
+
@location={{point-to-coordinates driver.location}}
|
|
78
|
+
@rotationAngle={{driver.heading}}
|
|
79
|
+
@icon={{icon iconUrl=driver.vehicle_avatar iconSize=(array 24 24)}}
|
|
80
|
+
@onAdd={{fn this.trigger "onDriverAdded" driver}}
|
|
81
|
+
@onClick={{fn this.trigger "onDriverClicked" driver}}
|
|
82
|
+
@draggable={{false}}
|
|
83
|
+
as |marker|
|
|
84
|
+
>
|
|
85
|
+
<marker.popup @maxWidth="500" @minWidth="225">
|
|
86
|
+
<div class="flex flex-row">
|
|
87
|
+
<div class="w-14">
|
|
88
|
+
<img src={{driver.photoUrl}} alt={{driver.name}} class="rounded-md w-12 h-12 shadow-sm" />
|
|
89
|
+
</div>
|
|
90
|
+
<div class="flex-1">
|
|
91
|
+
<div class="text-xs font-semibold">{{driver.name}}</div>
|
|
92
|
+
<div class="text-xs">{{t "common.phone"}}: {{n-a driver.phone}}</div>
|
|
93
|
+
<div class="text-xs">{{t "resource.vehicle"}}: {{n-a driver.vehicle_name}}</div>
|
|
94
|
+
<div class="text-xs">{{t "common.status"}}:
|
|
95
|
+
<span class="{{if driver.online 'text-green-500' 'text-red-400'}}">{{if driver.online "Online" "Offline"}}</span></div>
|
|
96
|
+
<div class="text-xs truncate">{{t "common.pos"}}: {{point-coordinates driver.location}}</div>
|
|
97
|
+
</div>
|
|
47
98
|
</div>
|
|
48
|
-
|
|
99
|
+
</marker.popup>
|
|
100
|
+
<marker.tooltip @permanent={{false}} @sticky={{true}}>
|
|
101
|
+
<div class="flex items-center space-x-1">
|
|
49
102
|
<div class="text-xs font-semibold">{{driver.name}}</div>
|
|
50
|
-
<div
|
|
51
|
-
<div class="text-xs
|
|
52
|
-
<div class="text-xs">{{t "common.status"}}:
|
|
53
|
-
<span class="{{if driver.online 'text-green-500' 'text-red-400'}}">{{if driver.online "Online" "Offline"}}</span></div>
|
|
54
|
-
<div class="text-xs truncate">{{t "common.pos"}}: {{point-coordinates driver.location}}</div>
|
|
103
|
+
<div>•</div>
|
|
104
|
+
<div class="text-xs {{if driver.online 'text-green-500' 'text-red-400'}}">{{if driver.online "Online" "Offline"}}</div>
|
|
55
105
|
</div>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<div class="text-xs font-semibold">{{driver.name}}</div>
|
|
61
|
-
<div>•</div>
|
|
62
|
-
<div class="text-xs {{if driver.online 'text-green-500' 'text-red-400'}}">{{if driver.online "Online" "Offline"}}</div>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="text-xs truncate"><FaIcon @icon="location-dot" @size="xs" class="mr-0.5" />{{point-coordinates driver.location}}</div>
|
|
65
|
-
</marker.tooltip>
|
|
66
|
-
</layers.tracking-marker>
|
|
67
|
-
{{/each}}
|
|
106
|
+
<div class="text-xs truncate"><FaIcon @icon="location-dot" @size="xs" class="mr-0.5" />{{point-coordinates driver.location}}</div>
|
|
107
|
+
</marker.tooltip>
|
|
108
|
+
</layers.tracking-marker>
|
|
109
|
+
{{/each}}
|
|
68
110
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
{{#each this.vehicles as |vehicle|}}
|
|
112
|
+
<layers.tracking-marker
|
|
113
|
+
@id={{vehicle.id}}
|
|
114
|
+
@publicId={{vehicle.public_id}}
|
|
115
|
+
@location={{point-to-coordinates vehicle.location}}
|
|
116
|
+
@rotationAngle={{vehicle.heading}}
|
|
117
|
+
@icon={{icon iconUrl=vehicle.avatar_url iconSize=(array 24 24)}}
|
|
118
|
+
@onAdd={{fn this.trigger "onVehicleAdded" vehicle}}
|
|
119
|
+
@onClick={{fn this.trigger "onVehicleClicked" vehicle}}
|
|
120
|
+
@draggable={{false}}
|
|
121
|
+
as |marker|
|
|
122
|
+
>
|
|
123
|
+
<marker.popup @permanent={{false}} @sticky={{true}}>
|
|
124
|
+
<div class="flex flex-row">
|
|
125
|
+
<div class="w-14 mr-2">
|
|
126
|
+
<img src={{vehicle.photo_url}} alt={{vehicle.display_name}} class="rounded-md w-14 h-12 shadow-sm" />
|
|
127
|
+
</div>
|
|
128
|
+
<div class="flex-1">
|
|
129
|
+
<div class="text-xs font-semibold">{{vehicle.displayName}}</div>
|
|
130
|
+
<div class="text-xs">ID: {{n-a vehicle.public_id}}</div>
|
|
131
|
+
<div class="text-xs">Serial No: {{n-a vehicle.serial_number vehicle.vin vehicle.internal_id vehicle.id}}</div>
|
|
132
|
+
<div class="text-xs">Driver: {{n-a vehicle.driver_name}}</div>
|
|
133
|
+
<div class="text-xs">Status: <span class="{{if vehicle.online 'text-green-500' 'text-red-400'}}">{{if vehicle.online "Online" "Offline"}}</span></div>
|
|
134
|
+
<div class="text-xs truncate">Pos: {{point-coordinates vehicle.location}}</div>
|
|
135
|
+
</div>
|
|
85
136
|
</div>
|
|
86
|
-
|
|
137
|
+
</marker.popup>
|
|
138
|
+
<marker.tooltip @permanent={{false}} @sticky={{true}}>
|
|
139
|
+
<div class="flex items-center space-x-1">
|
|
87
140
|
<div class="text-xs font-semibold">{{vehicle.displayName}}</div>
|
|
88
|
-
<div
|
|
89
|
-
<div class="text-xs
|
|
90
|
-
<div class="text-xs">Driver: {{n-a vehicle.driver_name}}</div>
|
|
91
|
-
<div class="text-xs">Status: <span class="{{if vehicle.online 'text-green-500' 'text-red-400'}}">{{if vehicle.online "Online" "Offline"}}</span></div>
|
|
92
|
-
<div class="text-xs truncate">Pos: {{point-coordinates vehicle.location}}</div>
|
|
141
|
+
<div>•</div>
|
|
142
|
+
<div class="text-xs {{if vehicle.online 'text-green-500' 'text-red-400'}}">{{if vehicle.online "Online" "Offline"}}</div>
|
|
93
143
|
</div>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<div class="text-xs {{if vehicle.online 'text-green-500' 'text-red-400'}}">{{if vehicle.online "Online" "Offline"}}</div>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="text-xs">ID: {{n-a vehicle.public_id}}</div>
|
|
103
|
-
<div class="text-xs">Serial No: {{or vehicle.serial_number vehicle.vin vehicle.internal_id vehicle.id "-"}}</div>
|
|
104
|
-
<div class="text-xs truncate"><FaIcon @icon="location-dot" @size="xs" class="mr-0.5" />{{point-coordinates vehicle.location}}</div>
|
|
105
|
-
</marker.tooltip>
|
|
106
|
-
</layers.tracking-marker>
|
|
107
|
-
{{/each}}
|
|
108
|
-
|
|
109
|
-
{{#each this.places as |place|}}
|
|
110
|
-
<layers.marker
|
|
111
|
-
@id={{place.id}}
|
|
112
|
-
@publicId={{place.public_id}}
|
|
113
|
-
@location={{point-to-coordinates place.location}}
|
|
114
|
-
@icon={{icon iconUrl=(or place.avatar_url "/engines-dist/images/building-marker.png") iconSize=(array 16 16)}}
|
|
115
|
-
@riseOnHover={{true}}
|
|
116
|
-
@title={{place.address}}
|
|
117
|
-
@alt={{place.address}}
|
|
118
|
-
@onAdd={{fn this.trigger "onPlaceAdded" place}}
|
|
119
|
-
@onClick={{fn this.trigger "onPlaceClicked" place}}
|
|
120
|
-
@draggable={{false}}
|
|
121
|
-
as |marker|
|
|
122
|
-
>
|
|
123
|
-
<marker.popup>
|
|
124
|
-
<div>{{place.address}}</div>
|
|
125
|
-
<div>{{format-point place.location}}</div>
|
|
126
|
-
</marker.popup>
|
|
127
|
-
<marker.tooltip @permanent={{false}} @sticky={{true}} @direction="bottom">{{or place.name place.address}}</marker.tooltip>
|
|
128
|
-
</layers.marker>
|
|
129
|
-
{{/each}}
|
|
144
|
+
<div class="text-xs">ID: {{n-a vehicle.public_id}}</div>
|
|
145
|
+
<div class="text-xs">Serial No: {{or vehicle.serial_number vehicle.vin vehicle.internal_id vehicle.id "-"}}</div>
|
|
146
|
+
<div class="text-xs truncate"><FaIcon @icon="location-dot" @size="xs" class="mr-0.5" />{{point-coordinates vehicle.location}}</div>
|
|
147
|
+
</marker.tooltip>
|
|
148
|
+
</layers.tracking-marker>
|
|
149
|
+
{{/each}}
|
|
130
150
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
151
|
+
{{#each this.places as |place|}}
|
|
152
|
+
<layers.marker
|
|
153
|
+
@id={{place.id}}
|
|
154
|
+
@publicId={{place.public_id}}
|
|
155
|
+
@location={{point-to-coordinates place.location}}
|
|
156
|
+
@icon={{icon iconUrl=(or place.avatar_url "/engines-dist/images/building-marker.png") iconSize=(array 16 16)}}
|
|
157
|
+
@riseOnHover={{true}}
|
|
158
|
+
@title={{place.address}}
|
|
159
|
+
@alt={{place.address}}
|
|
160
|
+
@onAdd={{fn this.trigger "onPlaceAdded" place}}
|
|
161
|
+
@onClick={{fn this.trigger "onPlaceClicked" place}}
|
|
162
|
+
@draggable={{false}}
|
|
163
|
+
as |marker|
|
|
164
|
+
>
|
|
165
|
+
<marker.popup>
|
|
166
|
+
<div>{{place.address}}</div>
|
|
167
|
+
<div>{{format-point place.location}}</div>
|
|
168
|
+
</marker.popup>
|
|
169
|
+
<marker.tooltip @permanent={{false}} @sticky={{true}} @direction="bottom">{{or place.name place.address}}</marker.tooltip>
|
|
170
|
+
</layers.marker>
|
|
171
|
+
{{/each}}
|
|
143
172
|
|
|
144
|
-
{{#each
|
|
173
|
+
{{#each this.serviceAreaActions.serviceAreas as |serviceArea|}}
|
|
145
174
|
<layers.polygon
|
|
146
|
-
@id={{
|
|
147
|
-
@record={{
|
|
148
|
-
@locations={{unwrap-coordinates
|
|
149
|
-
@fillColor={{
|
|
150
|
-
@color={{
|
|
151
|
-
@onAdd={{fn this.trigger "
|
|
175
|
+
@id={{serviceArea.id}}
|
|
176
|
+
@record={{serviceArea}}
|
|
177
|
+
@locations={{unwrap-coordinates serviceArea.leafletCoordinates}}
|
|
178
|
+
@fillColor={{serviceArea.color}}
|
|
179
|
+
@color={{serviceArea.stroke_color}}
|
|
180
|
+
@onAdd={{fn this.trigger "onServiceAreaLayerAdded" serviceArea}}
|
|
152
181
|
as |polygon|
|
|
153
182
|
>
|
|
154
|
-
<polygon.tooltip @permanent={{true}} @sticky={{true}}>{{
|
|
183
|
+
<polygon.tooltip @permanent={{true}} @sticky={{true}}>{{serviceArea.name}} {{t "resource.service-area"}}</polygon.tooltip>
|
|
155
184
|
</layers.polygon>
|
|
185
|
+
|
|
186
|
+
{{#each serviceArea.zones as |zone|}}
|
|
187
|
+
<layers.polygon
|
|
188
|
+
@id={{zone.id}}
|
|
189
|
+
@record={{zone}}
|
|
190
|
+
@locations={{unwrap-coordinates zone.leafletCoordinates}}
|
|
191
|
+
@fillColor={{zone.color}}
|
|
192
|
+
@color={{zone.stroke_color}}
|
|
193
|
+
@onAdd={{fn this.trigger "onZoneLayerAdd" zone}}
|
|
194
|
+
as |polygon|
|
|
195
|
+
>
|
|
196
|
+
<polygon.tooltip @permanent={{true}} @sticky={{true}}>{{zone.name}} {{t "resource.zone"}}</polygon.tooltip>
|
|
197
|
+
</layers.polygon>
|
|
198
|
+
{{/each}}
|
|
156
199
|
{{/each}}
|
|
157
|
-
{{/
|
|
158
|
-
|
|
200
|
+
{{/if}}
|
|
201
|
+
|
|
202
|
+
{{yield layers}}
|
|
203
|
+
</LeafletMap>
|
|
204
|
+
{{/if}}
|
|
159
205
|
|
|
160
|
-
{{yield layers}}
|
|
161
|
-
</LeafletMap>
|
|
162
206
|
{{#unless this.ready}}
|
|
163
207
|
<div class="flex w-full h-full items-center justify-center">
|
|
164
208
|
<Spinner />
|