@fleetbase/fleetops-engine 0.2.8 → 0.2.9
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/context-panel.hbs +5 -0
- package/addon/components/context-panel.js +6 -0
- package/addon/components/driver-form-panel.hbs +22 -22
- package/addon/components/driver-form-panel.js +28 -3
- package/addon/components/driver-panel.hbs +8 -8
- package/addon/components/driver-panel.js +23 -6
- package/addon/components/fleet-vehicle-listing.hbs +1 -1
- package/addon/components/live-map.hbs +20 -9
- package/addon/components/live-map.js +1045 -354
- package/addon/components/settings-window.hbs +1 -1
- package/addon/components/vehicle-form-panel.hbs +24 -24
- package/addon/components/vehicle-form-panel.js +26 -3
- package/addon/components/vehicle-panel.hbs +8 -9
- package/addon/components/vehicle-panel.js +21 -4
- package/addon/controllers/operations/orders/index/new.js +3 -5
- package/addon/controllers/operations/orders/index/view.js +5 -7
- package/addon/controllers/operations/orders/index.js +15 -2
- package/addon/engine.js +6 -0
- package/addon/routes/operations/orders/index/view.js +4 -2
- package/addon/routes/operations/orders/index.js +5 -1
- package/addon/services/context-panel.js +106 -0
- package/addon/services/leaflet-contextmenu-manager.js +311 -0
- package/addon/services/leaflet-map-manager.js +61 -0
- package/addon/services/service-areas.js +242 -32
- package/addon/templates/application.hbs +2 -1
- package/addon/utils/find-leaflet-layer.js +13 -0
- package/addon/utils/fly-to-leaflet-layer.js +25 -0
- package/addon/utils/get-leaflet-layer-by-id.js +12 -0
- package/addon/utils/layer-can-bind-contextmenu.js +3 -0
- package/app/components/context-panel.js +1 -0
- package/app/services/context-panel.js +1 -0
- package/app/services/leaflet-contextmenu-manager.js +1 -0
- package/app/services/leaflet-map-manager.js +1 -0
- package/app/utils/find-leaflet-layer.js +1 -0
- package/app/utils/fly-to-leaflet-layer.js +1 -0
- package/app/utils/get-leaflet-layer-by-id.js +1 -0
- package/app/utils/layer-can-bind-contextmenu.js +1 -0
- package/composer.json +11 -1
- package/extension.json +1 -1
- package/package.json +2 -2
- package/server/src/Http/Controllers/Internal/v1/LiveController.php +7 -4
- package/server/src/Http/Filter/VehicleFilter.php +7 -0
- package/server/src/Http/Resources/v1/Vehicle.php +51 -39
- package/addon/services/map-manager.js +0 -3
- package/app/services/map-manager.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{{#if this.contextPanel.currentContextRegistry}}
|
|
2
|
+
{{#let this.contextPanel.currentContext this.contextPanel.currentContextRegistry this.contextPanel.currentContextComponentArguments as |model registry dynamicArgs|}}
|
|
3
|
+
{{component registry.component context=model dynamicArgs=dynamicArgs onPressCancel=this.contextPanel.clear}}
|
|
4
|
+
{{/let}}
|
|
5
|
+
{{/if}}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<Overlay @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width="
|
|
1
|
+
<Overlay @position="right" @noBackdrop={{true}} @fullHeight={{true}} @isResizeble={{or this.isResizable @isResizable}} @width={{or this.width @width "600px"}}>
|
|
2
2
|
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i min-h-[127px]">
|
|
3
3
|
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
4
4
|
<div class="flex flex-1 space-x-2">
|
|
5
|
-
{{#if
|
|
5
|
+
{{#if this.driver.id}}
|
|
6
6
|
<Button @type="default" @icon="id-card" @helpText="View driver details" @onClick={{this.viewDetails}} />
|
|
7
7
|
{{/if}}
|
|
8
8
|
</div>
|
|
9
9
|
<div class="flex flex-1 justify-end">
|
|
10
10
|
<div class="mr-2">
|
|
11
|
-
<Button @icon={{if
|
|
11
|
+
<Button @icon={{if this.driver.id "save" "check"}} @type="primary" @text={{if this.driver.id "Save Driver" "Create Driver"}} @onClick={{this.save}} />
|
|
12
12
|
</div>
|
|
13
|
-
<Button @type="default" @icon="times" @helpText={{if
|
|
13
|
+
<Button @type="default" @icon="times" @helpText={{if this.driver.id "Cancel edit driver" "Cancel new driver"}} @onClick={{@onPressCancel}} />
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="flex flex-row justify-between w-full">
|
|
17
17
|
<div class="flex flex-col flex-1 w-3/4">
|
|
18
18
|
<div class="flex flex-row">
|
|
19
19
|
<div class="w-14 flex items-center justify-start">
|
|
20
|
-
<Image src={{
|
|
20
|
+
<Image src={{this.driver.photo_url}} @fallbackSrc={{config "defaultValues.driverImage"}} alt={{this.driver.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
21
21
|
<Attach::Tooltip @class="clean" @animation="scale" @placement={{"top"}}>
|
|
22
|
-
<InputInfo @text={{
|
|
22
|
+
<InputInfo @text={{this.driver.public_id}} />
|
|
23
23
|
</Attach::Tooltip>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="flex flex-col pt-2">
|
|
26
26
|
<h1 class="text-gray-900 dark:text-white text-2xl">
|
|
27
|
-
{{#if
|
|
28
|
-
{{
|
|
27
|
+
{{#if this.driver.id}}
|
|
28
|
+
{{this.driver.name}}
|
|
29
29
|
{{else}}
|
|
30
|
-
{{#if
|
|
31
|
-
{{
|
|
30
|
+
{{#if this.driver.name}}
|
|
31
|
+
{{this.driver.name}}
|
|
32
32
|
{{else}}
|
|
33
33
|
<span>New Driver</span>
|
|
34
34
|
{{/if}}
|
|
35
35
|
{{/if}}
|
|
36
36
|
</h1>
|
|
37
37
|
<div class="-mt-1">
|
|
38
|
-
{{#if
|
|
38
|
+
{{#if this.driver.vehicle}}
|
|
39
39
|
<div class="flex flex-row items-center">
|
|
40
|
-
<span class="text-sm dark:text-gray-500 text-gray-700 mr-3">{{
|
|
40
|
+
<span class="text-sm dark:text-gray-500 text-gray-700 mr-3">{{this.driver.vehicle.displayName}}</span>
|
|
41
41
|
</div>
|
|
42
42
|
{{else}}
|
|
43
43
|
<div class="flex flex-row items-center">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
<div class="flex justify-end w-1/4">
|
|
52
|
-
<Badge @status={{
|
|
52
|
+
<Badge @status={{this.driver.status}} />
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
</Overlay::Header>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<label>
|
|
62
62
|
Name
|
|
63
63
|
</label>
|
|
64
|
-
<Input @value={{
|
|
64
|
+
<Input @value={{this.driver.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
67
|
|
|
@@ -70,35 +70,35 @@
|
|
|
70
70
|
<label>
|
|
71
71
|
Internal ID
|
|
72
72
|
</label>
|
|
73
|
-
<Input @value={{
|
|
73
|
+
<Input @value={{this.driver.internal_id}} @type="text" class="w-full form-input" placeholder="Internal ID" />
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
76
|
<div class="input-group">
|
|
77
77
|
<label>
|
|
78
78
|
Drivers License
|
|
79
79
|
</label>
|
|
80
|
-
<Input @value={{
|
|
80
|
+
<Input @value={{this.driver.drivers_license_number}} @type="text" class="w-full form-input" placeholder="Drivers License" />
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
83
|
<div class="input-group">
|
|
84
84
|
<label>
|
|
85
85
|
Email
|
|
86
86
|
</label>
|
|
87
|
-
<Input @value={{
|
|
87
|
+
<Input @value={{this.driver.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
88
88
|
</div>
|
|
89
89
|
|
|
90
90
|
<div class="input-group">
|
|
91
91
|
<label>
|
|
92
92
|
Phone
|
|
93
93
|
</label>
|
|
94
|
-
<PhoneInput @value={{
|
|
94
|
+
<PhoneInput @value={{this.driver.phone}} @onInput={{fn (mut this.driver.phone)}} class="form-input w-full" />
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
<div class="input-group">
|
|
98
98
|
<label>
|
|
99
99
|
Vendor
|
|
100
100
|
</label>
|
|
101
|
-
<ModelSelect @modelName="vendor" @selectedModel={{
|
|
101
|
+
<ModelSelect @modelName="vendor" @selectedModel={{this.driver.vendor}} @placeholder="Select Vendor" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut this.driver.vendor)}} as |model|>
|
|
102
102
|
{{model.name}}
|
|
103
103
|
</ModelSelect>
|
|
104
104
|
</div>
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<label>
|
|
108
108
|
Vehicle
|
|
109
109
|
</label>
|
|
110
|
-
<ModelSelect @modelName="vehicle" @selectedModel={{
|
|
110
|
+
<ModelSelect @modelName="vehicle" @selectedModel={{this.driver.vehicle}} @placeholder="Select Vehicle" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut this.driver.vehicle)}} as |model|>
|
|
111
111
|
{{model.display_name}}
|
|
112
112
|
</ModelSelect>
|
|
113
113
|
</div>
|
|
@@ -116,14 +116,14 @@
|
|
|
116
116
|
<label>
|
|
117
117
|
City
|
|
118
118
|
</label>
|
|
119
|
-
<Input @value={{
|
|
119
|
+
<Input @value={{this.driver.city}} @type="text" class="w-full form-input" placeholder="City" />
|
|
120
120
|
</div>
|
|
121
121
|
|
|
122
122
|
<div class="input-group">
|
|
123
123
|
<label>
|
|
124
124
|
Country
|
|
125
125
|
</label>
|
|
126
|
-
<CountrySelect class="w-full form-input form-select form-datalist" @value={{
|
|
126
|
+
<CountrySelect class="w-full form-input form-select form-datalist" @value={{this.driver.country}} @onChange={{fn (mut this.driver.country)}} placeholder="Country" />
|
|
127
127
|
</div>
|
|
128
128
|
</div>
|
|
129
129
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
2
3
|
import { inject as service } from '@ember/service';
|
|
3
4
|
import { action } from '@ember/object';
|
|
4
5
|
|
|
@@ -6,10 +7,35 @@ export default class DriverFormPanelComponent extends Component {
|
|
|
6
7
|
@service store;
|
|
7
8
|
@service notifications;
|
|
8
9
|
@service hostRouter;
|
|
10
|
+
@service contextPanel;
|
|
9
11
|
@service loader;
|
|
12
|
+
@tracked driver;
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.driver = this.args.driver;
|
|
17
|
+
this.applyDynamicArguments();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
applyDynamicArguments() {
|
|
21
|
+
// Apply context if available
|
|
22
|
+
if (this.args.context) {
|
|
23
|
+
this.driver = this.args.context;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Apply dynamic arguments if available
|
|
27
|
+
if (this.args.dynamicArgs) {
|
|
28
|
+
const keys = Object.keys(this.args.dynamicArgs);
|
|
29
|
+
|
|
30
|
+
keys.forEach((key) => {
|
|
31
|
+
this[key] = this.args.dynamicArgs[key];
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
10
35
|
|
|
11
36
|
@action save() {
|
|
12
|
-
const { driver
|
|
37
|
+
const { driver } = this;
|
|
38
|
+
const { onAfterSave } = this.args;
|
|
13
39
|
|
|
14
40
|
this.loader.showLoader('.overlay-inner-content', 'Saving driver...');
|
|
15
41
|
|
|
@@ -33,7 +59,6 @@ export default class DriverFormPanelComponent extends Component {
|
|
|
33
59
|
}
|
|
34
60
|
|
|
35
61
|
@action viewDetails() {
|
|
36
|
-
|
|
37
|
-
return this.hostRouter.transitionTo('console.fleet-ops.management.drivers.index.details', driver.public_id);
|
|
62
|
+
this.contextPanel.focus(this.driver, 'viewing');
|
|
38
63
|
}
|
|
39
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<Overlay @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width="
|
|
1
|
+
<Overlay @position="right" @noBackdrop={{true}} @fullHeight={{true}} @isResizeble={{or this.isResizable @isResizable}} @width={{or this.width @width "600px"}}>
|
|
2
2
|
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i min-h-[127px]">
|
|
3
3
|
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
4
4
|
<div class="flex flex-1 space-x-2">
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
<div class="flex flex-col flex-1 w-3/4">
|
|
14
14
|
<div class="flex flex-row">
|
|
15
15
|
<div class="w-14 flex items-center justify-start">
|
|
16
|
-
<Image src={{
|
|
16
|
+
<Image src={{this.driver.photo_url}} @fallbackSrc={{config "defaultValues.driverImage"}} alt={{this.driver.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
17
17
|
<Attach::Tooltip @class="clean" @animation="scale" @placement={{"top"}}>
|
|
18
|
-
<InputInfo @text={{
|
|
18
|
+
<InputInfo @text={{this.driver.public_id}} />
|
|
19
19
|
</Attach::Tooltip>
|
|
20
20
|
</div>
|
|
21
21
|
<div class="flex flex-col">
|
|
22
|
-
<h1 class="text-gray-900 dark:text-white text-2xl">{{
|
|
22
|
+
<h1 class="text-gray-900 dark:text-white text-2xl">{{this.driver.name}}</h1>
|
|
23
23
|
<div class="-mt-1">
|
|
24
|
-
{{#if
|
|
24
|
+
{{#if this.driver.vehicle}}
|
|
25
25
|
<div class="flex flex-row items-center">
|
|
26
|
-
<span class="text-sm dark:text-gray-500 text-gray-700 mr-3">{{
|
|
26
|
+
<span class="text-sm dark:text-gray-500 text-gray-700 mr-3">{{this.driver.vehicle.displayName}}</span>
|
|
27
27
|
</div>
|
|
28
28
|
{{else}}
|
|
29
29
|
<div class="flex flex-row items-center">
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
<div class="flex justify-end w-1/4">
|
|
39
|
-
<Badge @status={{
|
|
39
|
+
<Badge @status={{this.driver.status}} />
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
</Overlay::Header>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
<div class="tab-content tab-{{this.currentTab}}">
|
|
57
|
-
{{component this.tab.component driver
|
|
57
|
+
{{component this.tab.component driver=this.driver tabOptions=this.tab params=this.tab.componentParams}}
|
|
58
58
|
</div>
|
|
59
59
|
</Overlay::Body>
|
|
60
60
|
</Overlay>
|
|
@@ -11,10 +11,11 @@ export default class DriverPanelComponent extends Component {
|
|
|
11
11
|
@service universe;
|
|
12
12
|
@service store;
|
|
13
13
|
@service hostRouter;
|
|
14
|
+
@service contextPanel;
|
|
14
15
|
@tracked currentTab;
|
|
15
16
|
@tracked devices = [];
|
|
16
17
|
@tracked deviceApi = {};
|
|
17
|
-
@tracked
|
|
18
|
+
@tracked driver;
|
|
18
19
|
|
|
19
20
|
get tabs() {
|
|
20
21
|
const registeredTabs = this.universe.getMenuItemsFromRegistry('component:driver-panel');
|
|
@@ -38,11 +39,28 @@ export default class DriverPanelComponent extends Component {
|
|
|
38
39
|
|
|
39
40
|
constructor() {
|
|
40
41
|
super(...arguments);
|
|
41
|
-
this.
|
|
42
|
-
this.changeTab(this.args.tab
|
|
42
|
+
this.driver = this.args.driver;
|
|
43
|
+
this.changeTab(this.args.tab);
|
|
44
|
+
this.applyDynamicArguments();
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
applyDynamicArguments() {
|
|
48
|
+
// Apply context if available
|
|
49
|
+
if (this.args.context) {
|
|
50
|
+
this.driver = this.args.context;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Apply dynamic arguments if available
|
|
54
|
+
if (this.args.dynamicArgs) {
|
|
55
|
+
const keys = Object.keys(this.args.dynamicArgs);
|
|
56
|
+
|
|
57
|
+
keys.forEach((key) => {
|
|
58
|
+
this[key] = this.args.dynamicArgs[key];
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@action async changeTab(tab = 'details') {
|
|
46
64
|
this.currentTab = tab;
|
|
47
65
|
|
|
48
66
|
if (typeof this.args.onTabChanged === 'function') {
|
|
@@ -51,7 +69,6 @@ export default class DriverPanelComponent extends Component {
|
|
|
51
69
|
}
|
|
52
70
|
|
|
53
71
|
@action editDriver() {
|
|
54
|
-
|
|
55
|
-
return this.hostRouter.transitionTo('console.fleet-ops.management.drivers.index.edit', driver.public_id);
|
|
72
|
+
this.contextPanel.focus(this.driver, 'editing');
|
|
56
73
|
}
|
|
57
74
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
<div class="w-56">
|
|
15
15
|
{{#if @onAddVehicle}}
|
|
16
|
-
<ModelSelect @modelName="vehicle" @selectedModel={{@options.selectedVehicle}} @placeholder="Add vehicle to fleet" @triggerClass="form-select form-input form-select-sm form-input-sm" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{this.onAdd}} as |model|>
|
|
16
|
+
<ModelSelect @modelName="vehicle" @query={{hash assignedFleet=false}} @selectedModel={{@options.selectedVehicle}} @placeholder="Add vehicle to fleet" @triggerClass="form-select form-input form-select-sm form-input-sm" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{this.onAdd}} as |model|>
|
|
17
17
|
{{model.display_name}}
|
|
18
18
|
</ModelSelect>
|
|
19
19
|
{{/if}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<div class="live-map-component {{@wrapperClass}}" {{did-insert this.
|
|
2
|
-
<LeafletMap id={{this.mapId}} class={{@mapClass}} @lat={{this.latitude}} @lng={{this.longitude}} @zoom={{this.zoom}} @zoomControl={{@zoomControl}} @contextmenu={{true}} @contextmenuWidth={{140}} @contextmenuItems={{this.contextMenuItems}} @onLoad={{this.
|
|
1
|
+
<div class="live-map-component {{@wrapperClass}}" {{did-insert this.setupComponent}}>
|
|
2
|
+
<LeafletMap id={{this.mapId}} class={{@mapClass}} @lat={{this.latitude}} @lng={{this.longitude}} @zoom={{this.zoom}} @zoomControl={{@zoomControl}} @contextmenu={{true}} @contextmenuWidth={{140}} @contextmenuItems={{this.contextMenuItems}} @onLoad={{this.setupMap}} {{will-destroy this.closeChannels}} ...attributes as |layers|>
|
|
3
3
|
<layers.tile @url={{this.tileSourceUrl}} />
|
|
4
4
|
|
|
5
|
-
{{#if this.
|
|
5
|
+
{{#if this.visibilityControls.drivers}}
|
|
6
6
|
{{#each this.drivers as |driver|}}
|
|
7
|
-
<layers.drift-marker @rotationAngle={{driver.heading}} @duration={{300}} @icon={{icon iconUrl=driver.vehicle_avatar iconSize=(array 24 24)}} @location={{point-to-coordinates driver.location}} @publicId={{driver.public_id}} @onAdd={{fn this.
|
|
7
|
+
<layers.drift-marker @id={{driver.id}} @rotationAngle={{driver.heading}} @duration={{300}} @icon={{icon iconUrl=driver.vehicle_avatar iconSize=(array 24 24)}} @location={{point-to-coordinates driver.location}} @publicId={{driver.public_id}} @onAdd={{fn this.triggerAction "onDriverAdded" driver}} @onClick={{fn this.triggerAction "onDriverClicked" driver}} as |marker|>
|
|
8
8
|
<marker.popup @maxWidth="500" @minWidth="225">
|
|
9
9
|
<DriverCard @driver={{driver}} @showCoordinates={{true}} @textClass="text-gray-900 dark:text-gray-100" />
|
|
10
10
|
</marker.popup>
|
|
@@ -13,9 +13,20 @@
|
|
|
13
13
|
{{/each}}
|
|
14
14
|
{{/if}}
|
|
15
15
|
|
|
16
|
-
{{#if this.
|
|
16
|
+
{{#if this.visibilityControls.vehicles}}
|
|
17
|
+
{{#each this.vehicles as |vehicle|}}
|
|
18
|
+
<layers.drift-marker @id={{vehicle.id}} @rotationAngle={{vehicle.heading}} @duration={{300}} @icon={{icon iconUrl=vehicle.avatar_url iconSize=(array 24 24)}} @location={{point-to-coordinates vehicle.location}} @publicId={{vehicle.public_id}} @onAdd={{fn this.triggerAction "onVehicleAdded" vehicle}} @onClick={{fn this.triggerAction "onVehicleClicked" vehicle}} as |marker|>
|
|
19
|
+
<marker.tooltip @permanent={{false}} @sticky={{true}}>
|
|
20
|
+
<div>{{vehicle.displayName}}</div>
|
|
21
|
+
<div>{{if vehicle.online "Online" "Offline"}}</div>
|
|
22
|
+
</marker.tooltip>
|
|
23
|
+
</layers.drift-marker>
|
|
24
|
+
{{/each}}
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
{{#if this.visibilityControls.places}}
|
|
17
28
|
{{#each this.places as |place|}}
|
|
18
|
-
<layers.marker @icon={{icon iconUrl="/engines-dist/images/building-marker.png" iconSize=(array 16 16)}} @location={{point-to-coordinates place.location}} @riseOnHover={{true}} @title={{place.address}} @alt={{place.address}} as |marker|>
|
|
29
|
+
<layers.marker @id={{place.id}} @icon={{icon iconUrl="/engines-dist/images/building-marker.png" iconSize=(array 16 16)}} @location={{point-to-coordinates place.location}} @riseOnHover={{true}} @title={{place.address}} @alt={{place.address}} @onAdd={{fn this.triggerAction "onPlaceAdded" place}} @onClick={{fn this.triggerAction "onPlaceClicked" place}} as |marker|>
|
|
19
30
|
<marker.popup>
|
|
20
31
|
<div>{{place.address}}</div>
|
|
21
32
|
<div>{{format-point place.location}}</div>
|
|
@@ -57,15 +68,15 @@
|
|
|
57
68
|
{{/each}}
|
|
58
69
|
{{/if}} --}}
|
|
59
70
|
|
|
60
|
-
<layers.draw-control @position="topright" @draw={{hash marker=false circlemarker=false circle=false polyline=false}} @onDrawDrawstop={{fn this.
|
|
71
|
+
<layers.draw-control @position="topright" @draw={{hash marker=false circlemarker=false circle=false polyline=false}} @onDrawDrawstop={{fn this.triggerAction "onDrawDrawstop"}} @onDrawDeleted={{fn this.triggerAction "onDrawDeleted"}} @onDrawEdited={{fn this.triggerAction "onDrawEdited"}} @onDrawDeletestart={{fn this.triggerAction "onDrawDeletestart"}} @onDrawEditstop={{fn this.triggerAction "onDrawEditstop"}} @onDrawControlCreated={{fn this.triggerAction "onDrawControlCreated"}} @onDrawFeatureGroupCreated={{fn this.triggerAction "onDrawFeatureGroupCreated"}} />
|
|
61
72
|
|
|
62
73
|
{{#each this.activeServiceAreas as |serviceArea|}}
|
|
63
|
-
<layers.polygon @id={{serviceArea.id}} @record={{serviceArea}} @locations={{serviceArea.bounds}} @fillColor={{serviceArea.color}} @color={{serviceArea.stroke_color}} @onAdd={{fn this.
|
|
74
|
+
<layers.polygon @id={{serviceArea.id}} @record={{serviceArea}} @locations={{serviceArea.bounds}} @fillColor={{serviceArea.color}} @color={{serviceArea.stroke_color}} @onAdd={{fn this.triggerAction "onServiceAreaLayerAdded" serviceArea}} as |polygon|>
|
|
64
75
|
<polygon.tooltip @permanent={{true}} @sticky={{true}}>{{serviceArea.name}} Service Area</polygon.tooltip>
|
|
65
76
|
</layers.polygon>
|
|
66
77
|
|
|
67
78
|
{{#each serviceArea.zones as |zone|}}
|
|
68
|
-
<layers.polygon @id={{zone.id}} @record={{zone}} @locations={{zone.locations}} @fillColor={{zone.color}} @color={{zone.stroke_color}} @onAdd={{fn this.
|
|
79
|
+
<layers.polygon @id={{zone.id}} @record={{zone}} @locations={{zone.locations}} @fillColor={{zone.color}} @color={{zone.stroke_color}} @onAdd={{fn this.triggerAction "onZoneLayerAdd" zone}} as |polygon|>
|
|
69
80
|
<polygon.tooltip @permanent={{true}} @sticky={{true}}>{{zone.name}} Zone</polygon.tooltip>
|
|
70
81
|
</layers.polygon>
|
|
71
82
|
{{/each}}
|