@fleetbase/fleetops-engine 0.1.7 → 0.1.8
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.
|
@@ -182,16 +182,6 @@ export default class OperationsOrdersIndexNewController extends Controller {
|
|
|
182
182
|
return groups;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
@action dropdownAction(actionName, dd, ...params) {
|
|
186
|
-
if (typeof dd?.actions?.close === 'function') {
|
|
187
|
-
dd.actions.close();
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
if (typeof this[actionName] === 'function') {
|
|
191
|
-
this[actionName](...params);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
185
|
@action createOrder() {
|
|
196
186
|
if (!this.isValid) {
|
|
197
187
|
return;
|
|
@@ -499,7 +489,7 @@ export default class OperationsOrdersIndexNewController extends Controller {
|
|
|
499
489
|
}
|
|
500
490
|
|
|
501
491
|
@action scheduleOrder(dateInstance) {
|
|
502
|
-
this.order.scheduled_at = dateInstance
|
|
492
|
+
this.order.scheduled_at = dateInstance;
|
|
503
493
|
}
|
|
504
494
|
|
|
505
495
|
@action setupInterface() {
|
|
@@ -890,6 +880,7 @@ export default class OperationsOrdersIndexNewController extends Controller {
|
|
|
890
880
|
|
|
891
881
|
@action setOrderFacilitator(model) {
|
|
892
882
|
this.order.set('facilitator', model);
|
|
883
|
+
// this.order.set('facilitator_type', `fleet-ops:${model.facilitator_type}`);
|
|
893
884
|
this.order.set('driver', null);
|
|
894
885
|
|
|
895
886
|
this.isUsingIntegratedVendor = model.isIntegratedVendor;
|
|
@@ -908,6 +899,11 @@ export default class OperationsOrdersIndexNewController extends Controller {
|
|
|
908
899
|
}
|
|
909
900
|
}
|
|
910
901
|
|
|
902
|
+
@action setOrderCustomer(model) {
|
|
903
|
+
this.order.set('customer', model);
|
|
904
|
+
// this.order.set('customer_type', `fleet-ops:${model.customer_type}`);
|
|
905
|
+
}
|
|
906
|
+
|
|
911
907
|
@action selectIntegratedServiceType(key) {
|
|
912
908
|
this.integratedVendorServiceType = key;
|
|
913
909
|
|
|
@@ -169,38 +169,36 @@ export default class OperationsOrdersIndexViewController extends Controller {
|
|
|
169
169
|
|
|
170
170
|
@action removeRoutingControlPreview() {
|
|
171
171
|
const { leafletMap, routeControl } = this;
|
|
172
|
-
let removed = false;
|
|
173
172
|
|
|
174
173
|
if (routeControl instanceof RoutingControl) {
|
|
175
174
|
try {
|
|
176
175
|
routeControl.remove();
|
|
177
|
-
removed = true;
|
|
178
176
|
} catch (e) {
|
|
179
177
|
// silent
|
|
180
178
|
}
|
|
179
|
+
}
|
|
181
180
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
181
|
+
if (leafletMap instanceof L.Map) {
|
|
182
|
+
try {
|
|
183
|
+
leafletMap.removeControl(routeControl);
|
|
184
|
+
} catch (e) {
|
|
185
|
+
// silent
|
|
188
186
|
}
|
|
189
187
|
}
|
|
190
188
|
|
|
191
|
-
|
|
192
|
-
this.forceRemoveRoutePreview();
|
|
193
|
-
}
|
|
189
|
+
this.forceRemoveRoutePreview();
|
|
194
190
|
}
|
|
195
191
|
|
|
196
192
|
@action forceRemoveRoutePreview() {
|
|
197
193
|
const { leafletMap } = this;
|
|
198
194
|
|
|
199
|
-
leafletMap.
|
|
200
|
-
|
|
201
|
-
layer.
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
if (leafletMap instanceof L.Map) {
|
|
196
|
+
leafletMap.eachLayer((layer) => {
|
|
197
|
+
if (layer instanceof L.Polyline || layer instanceof L.Marker) {
|
|
198
|
+
layer.remove();
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
204
202
|
}
|
|
205
203
|
|
|
206
204
|
@action setupInterface() {
|
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
<DropdownButton @icon="ellipsis-h" @size="sm" @iconPrefix="fas" @triggerClass="mr-2 hidden md:flex" as |dd|>
|
|
4
4
|
<div class="next-dd-menu mt-1 mx-0" aria-orientation="vertical" aria-labelledby="user-menu">
|
|
5
5
|
<div class="p-1">
|
|
6
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
6
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.newCustomer)}}>
|
|
7
7
|
<div class="w-6">
|
|
8
8
|
<FaIcon @icon="user-plus" />
|
|
9
9
|
</div>
|
|
10
10
|
<span>Create new customer</span>
|
|
11
11
|
</a>
|
|
12
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
12
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.newFacilitator)}}>
|
|
13
13
|
<div class="w-6">
|
|
14
14
|
<FaIcon @icon="truck" />
|
|
15
15
|
</div>
|
|
16
16
|
<span>Create new facilitator</span>
|
|
17
17
|
</a>
|
|
18
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
18
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.newPlace)}}>
|
|
19
19
|
<div class="w-6">
|
|
20
20
|
<FaIcon @icon="map-pin" />
|
|
21
21
|
</div>
|
|
22
22
|
<span>Create new place</span>
|
|
23
23
|
</a>
|
|
24
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
24
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.addEntity)}}>
|
|
25
25
|
<div class="w-6">
|
|
26
26
|
<FaIcon @icon="box" />
|
|
27
27
|
</div>
|
|
28
28
|
<span>Add entity to order</span>
|
|
29
29
|
</a>
|
|
30
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
30
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.editMetaData)}}>
|
|
31
31
|
<div class="w-6">
|
|
32
32
|
<FaIcon @icon="table" />
|
|
33
33
|
</div>
|
|
34
34
|
<span>Edit order metadata</span>
|
|
35
35
|
</a>
|
|
36
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.
|
|
36
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd this.addCustomField)}}>
|
|
37
37
|
<div class="w-6">
|
|
38
38
|
<FaIcon @icon="edit" />
|
|
39
39
|
</div>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</InputGroup>
|
|
63
63
|
|
|
64
64
|
<InputGroup @name="Customer" @helpText="Optionally assign the customer of this order. If it's a new customer, use the 'New Customer' button above.">
|
|
65
|
-
<ModelSelect @modelName="customer" @selectedModel={{this.order.customer}} @placeholder="Select Customer" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @allowClear={{true}} @onChange={{
|
|
65
|
+
<ModelSelect @modelName="customer" @selectedModel={{this.order.customer}} @placeholder="Select Customer" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @allowClear={{true}} @onChange={{this.setOrderCustomer}} as |model|>
|
|
66
66
|
<div class="flex items-center">
|
|
67
67
|
<div class="w-7">
|
|
68
68
|
<FaIcon @icon={{if model.isVendor "warehouse" "user" }} />
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fleetbase/fleetops-engine",
|
|
3
3
|
"extension": "Fleet Ops",
|
|
4
4
|
"icon": "route",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.8",
|
|
6
6
|
"priority": 0,
|
|
7
7
|
"fleetbase": {
|
|
8
8
|
"dashboard": "int/v1/fleet-ops/dashboard"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fleetbase/ember-core": "^0.0.8",
|
|
43
|
-
"@fleetbase/ember-ui": "^0.1.
|
|
44
|
-
"@fleetbase/fleetops-data": "^0.0.
|
|
43
|
+
"@fleetbase/ember-ui": "^0.1.2",
|
|
44
|
+
"@fleetbase/fleetops-data": "^0.0.6",
|
|
45
45
|
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
|
46
46
|
"@fortawesome/ember-fontawesome": "^0.4.1",
|
|
47
47
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|