@fleetbase/fleetops-engine 0.0.4 → 0.0.5
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/cell/driver-name.js +1 -1
- package/addon/components/custom-field.hbs +1 -1
- package/addon/components/fleet-driver-listing.hbs +1 -1
- package/addon/components/fleet-driver-listing.js +15 -15
- package/addon/components/global-search.hbs +1 -1
- package/addon/components/integrated-order-details.js +1 -1
- package/addon/components/leaflet-draw-control.js +3 -4
- package/addon/components/live-map.js +0 -2
- package/addon/components/modals/contact-form.hbs +5 -5
- package/addon/components/modals/driver-form.hbs +6 -6
- package/addon/components/modals/entity-form.hbs +1 -1
- package/addon/components/modals/group-form.hbs +1 -1
- package/addon/components/modals/order-form.hbs +1 -1
- package/addon/components/modals/order-import.hbs +1 -1
- package/addon/components/modals/policy-form.hbs +2 -2
- package/addon/components/modals/role-form.hbs +1 -1
- package/addon/components/modals/user-form.hbs +3 -3
- package/addon/components/modals/vehicle-form.hbs +34 -34
- package/addon/components/modals/vendor-form.hbs +8 -8
- package/addon/components/modals/zone-form.hbs +1 -1
- package/addon/components/order-config/activity-flow-editor.hbs +1 -1
- package/addon/components/order-config/fields-editor.js +2 -7
- package/addon/components/order-list-overlay/order.hbs +0 -1
- package/addon/components/order-list-overlay.hbs +2 -2
- package/addon/controllers/management/contacts/index.js +4 -4
- package/addon/controllers/management/fleets/index.js +3 -4
- package/addon/controllers/management/fuel-reports/index.js +3 -2
- package/addon/controllers/management/issues/index.js +2 -1
- package/addon/controllers/management/places/index.js +4 -5
- package/addon/controllers/management/vehicles/index.js +2 -2
- package/addon/controllers/management/vendors/index.js +4 -3
- package/addon/controllers/management.js +0 -2
- package/addon/controllers/operations/orders/index/view.js +0 -1
- package/addon/controllers/operations/orders/index.js +1 -0
- package/addon/controllers/operations/service-rates/index.js +2 -2
- package/addon/controllers/operations/zones/index.js +8 -3
- package/addon/helpers/feature-group.js +0 -1
- package/addon/routes/comms/chat.js +1 -1
- package/addon/routes/comms/intercom.js +1 -1
- package/addon/routes/management/contacts/index.js +0 -1
- package/addon/routes/operations/dispatch.js +1 -1
- package/addon/services/service-areas.js +0 -1
- package/addon/templates/management/index.hbs +8 -8
- package/addon/templates/operations/orders/index/new.hbs +4 -4
- package/addon/templates/operations/service-rates/index/new.hbs +1 -1
- package/addon/templates/operations/zones/index.hbs +6 -6
- package/config/environment.js +1 -2
- package/index.js +4 -4
- package/package.json +7 -5
- package/addon/components/event-timeline.hbs +0 -7
- package/addon/components/event-timeline.js +0 -423
- package/app/components/event-timeline.js +0 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<FaIcon @icon="handshake" @size="xl" class="text-blue-500" />
|
|
9
9
|
</div>
|
|
10
10
|
<div>
|
|
11
|
-
<
|
|
11
|
+
<span class="text-gray-900 dark:text-gray-100 text-lg">Choose Integrated Vendor</span>
|
|
12
12
|
</div>
|
|
13
13
|
</button>
|
|
14
14
|
<button type="button" class="outline-none flex-1 rounded-lg bg-white dark:bg-gray-900 border-2 border-transparent px-4 py-2 flex items-center justify-center {{if (eq @options.action "create") 'border-blue-500'}}" {{on "click" (fn (mut @options.action) "create")}}>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<FaIcon @icon="building" @size="xl" class="text-blue-500" />
|
|
17
17
|
</div>
|
|
18
18
|
<div>
|
|
19
|
-
<
|
|
19
|
+
<span class="text-gray-900 dark:text-gray-100 text-lg">Create Custom Vendor</span>
|
|
20
20
|
</div>
|
|
21
21
|
</button>
|
|
22
22
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<img src={{integratedVendor.logo}} alt={{integratedVendor.code}} class="w-20 h-20" width="80" height="80" />
|
|
32
32
|
</div>
|
|
33
33
|
<div>
|
|
34
|
-
<
|
|
34
|
+
<span class="text-sm font-semibold dark:text-white text-lg">{{integratedVendor.name}}</span>
|
|
35
35
|
</div>
|
|
36
36
|
</button>
|
|
37
37
|
{{/each}}
|
|
@@ -91,13 +91,13 @@
|
|
|
91
91
|
<InputGroup @name={{smart-humanize param.key}} @value={{mut (get @options.vendor.credentials param.key)}} @helpText={{concat "Optionally supply your own " (smart-humanize param.key) " to configure this vendor."}} />
|
|
92
92
|
{{/each}}
|
|
93
93
|
<div class="my-4">
|
|
94
|
-
<Button @text="Cancel credentials reset" @type="danger" @size="sm" @icon="times" @onClick={{
|
|
94
|
+
<Button @text="Cancel credentials reset" @type="danger" @size="sm" @icon="times" @onClick={{@options.toggleCredentialsReset}} />
|
|
95
95
|
</div>
|
|
96
96
|
{{else}}
|
|
97
97
|
<div>
|
|
98
98
|
<div class="rounded-md border border-blue-300 dark:border-blue-600 bg-blue-100 dark:bg-blue-500 text-blue-900 dark:text-white text-sm px-4 py-2 mb-4">
|
|
99
99
|
<p class="mb-2">Sensitive credentials can only be reset, to update credentials you must re-enter the credentials.</p>
|
|
100
|
-
<Button @type="default" @size="xs" @icon="repeat" @text="Click here to reset" @onClick={{
|
|
100
|
+
<Button @type="default" @size="xs" @icon="repeat" @text="Click here to reset" @onClick={{@options.toggleCredentialsReset}} />
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
103
|
{{#each @options.vendor.provider_settings.credential_params as |param|}}
|
|
@@ -147,13 +147,13 @@
|
|
|
147
147
|
</label>
|
|
148
148
|
<div class="mb-1.5 flex flex-row">
|
|
149
149
|
{{#if @options.vendor.has_place}}
|
|
150
|
-
<Button @type="default" @size="xs" @icon="edit" @text="Edit" @onClick={{
|
|
150
|
+
<Button @type="default" @size="xs" @icon="edit" @text="Edit" @onClick={{@options.editAddress}} />
|
|
151
151
|
{{/if}}
|
|
152
|
-
<Button @type="default" @size="xs" @icon="plus" @text="New" @onClick={{
|
|
152
|
+
<Button @type="default" @size="xs" @icon="plus" @text="New" @onClick={{@options.newAddress}} />
|
|
153
153
|
</div>
|
|
154
154
|
</div>
|
|
155
155
|
|
|
156
|
-
<ModelSelect @modelName="place" @selectedModel={{@options.vendor.place}} @placeholder="Select Address" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{
|
|
156
|
+
<ModelSelect @modelName="place" @selectedModel={{@options.vendor.place}} @placeholder="Select Address" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{@options.selectAddress}} as |model|>
|
|
157
157
|
{{model.name}} - {{model.street1}}
|
|
158
158
|
</ModelSelect>
|
|
159
159
|
</InputGroup>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="modal-body-container">
|
|
3
3
|
<div class="input-group">
|
|
4
4
|
<InputLabel @labelText="Zone Name" @helpText="Set a display name for the zone." @required={{true}} />
|
|
5
|
-
<Input @value={{@options.zone.name}}
|
|
5
|
+
<Input @value={{@options.zone.name}} @type="text" class="w-full form-input" placeholder="Zone Name" />
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<InputGroup @type="color" @value={{@options.zone.stroke_color}} @name="Zone Border Color" @helpText="Customize the border color for this zone." class="p-0 border-0 m-0 w-8 h-8 bg-transparent rounded-none" />
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
<Select @options={{this.logicOperators}} @value={{get logic 1}} @optionLabel="label" @optionValue="value" @onSelect={{fn this.updateActivityLogic status event conditionIndex 1}} @placeholder="Select operator" />
|
|
83
83
|
<div class="flex items-center col-span-2">
|
|
84
|
-
<Input @type="text" @value={{get logic 2}}
|
|
84
|
+
<Input @type="text" @value={{get logic 2}} {{on "keyup" (fn this.updateActivityLogic status event conditionIndex 2)}} placeholder="Enter value to compare" class="form-input w-full flex-1 mr-3" />
|
|
85
85
|
<Button @size="sm" @icon="trash" @onClick={{fn this.removeLogicCondition event logic}} />
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
@@ -196,27 +196,22 @@ export default class OrderConfigFieldsEditorComponent extends Component {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
/* eslint no-unused-vars: "off" */
|
|
199
200
|
@action sortMetaFieldOptions(metaField, el, target) {
|
|
200
|
-
console.log(`sortMetaFieldOptions`, ...arguments);
|
|
201
|
+
// console.log(`[sortMetaFieldOptions()]`, ...arguments);
|
|
201
202
|
// const { fields } = this;
|
|
202
203
|
// const { index } = el.dataset;
|
|
203
204
|
// const parentEl = el.parentElement();
|
|
204
|
-
|
|
205
205
|
// console.log(parentEl);
|
|
206
206
|
// const { metaGroupKey } = target.dataset;
|
|
207
|
-
|
|
208
207
|
// // get the index of the moved metafield
|
|
209
208
|
// const metaFieldIndex = fields.findIndex((field) => field.key === metaFieldKey);
|
|
210
|
-
|
|
211
209
|
// // get the meta field and update the group
|
|
212
210
|
// const metaField = fields[metaFieldIndex];
|
|
213
|
-
|
|
214
211
|
// if (!metaField) {
|
|
215
212
|
// return;
|
|
216
213
|
// }
|
|
217
|
-
|
|
218
214
|
// metaField.group = metaGroupKey;
|
|
219
|
-
|
|
220
215
|
// if (typeof this.args.onFieldsChanged === 'function') {
|
|
221
216
|
// this.args.onFieldsChanged(fields);
|
|
222
217
|
// }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<div class="{{@wrapperClass}}">
|
|
2
|
-
{{log @order}}
|
|
3
2
|
<a href="javascript:;" class="order-listings-row flex flex-col {{if @isSelected 'selected'}}" {{on "click" (fn @onClick @order)}} {{on "dblclick" (fn @onDoubleClick @order)}} ...attributes>
|
|
4
3
|
<div class="flex flex-row items-center">
|
|
5
4
|
<div class="mr-4 text-gray-600 {{if @isSelected 'text-blue-900'}}">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{{#if this.selectedOrders.length}}
|
|
10
10
|
<BasicDropdown class="mr-2" @renderInPlace={{true}} as |dd|>
|
|
11
11
|
<dd.Trigger>
|
|
12
|
-
<div
|
|
12
|
+
<div class="next-org-button-trigger has-selections {{if dd.isOpen 'is-open'}}">
|
|
13
13
|
<FaIcon @icon="ellipsis-h" @prefix="fas" class="text-gray-800 dark:text-white" />
|
|
14
14
|
</div>
|
|
15
15
|
</dd.Trigger>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{{/if}}
|
|
33
33
|
<BasicDropdown @renderInPlace={{true}} as |dd|>
|
|
34
34
|
<dd.Trigger>
|
|
35
|
-
<div
|
|
35
|
+
<div class="next-org-button-trigger {{if dd.isOpen 'is-open'}}">
|
|
36
36
|
<FaIcon @icon="ellipsis-h" @prefix="fas" class="text-gray-900 dark:text-gray-500" />
|
|
37
37
|
</div>
|
|
38
38
|
</dd.Trigger>
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
5
|
-
import {
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isBlank } from '@ember/utils';
|
|
6
6
|
import { timeout } from 'ember-concurrency';
|
|
7
7
|
import { task } from 'ember-concurrency-decorators';
|
|
8
8
|
|
|
@@ -82,7 +82,7 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
82
82
|
*
|
|
83
83
|
* @var {String}
|
|
84
84
|
*/
|
|
85
|
-
@tracked sort= '-created_at';
|
|
85
|
+
@tracked sort = '-created_at';
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* The filterable param `public_id`
|
|
@@ -429,7 +429,7 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
429
429
|
@action deleteContact(contact, options = {}) {
|
|
430
430
|
this.crud.delete(contact, {
|
|
431
431
|
acceptButtonIcon: 'trash',
|
|
432
|
-
onConfirm: (
|
|
432
|
+
onConfirm: () => {
|
|
433
433
|
this.hostRouter.refresh();
|
|
434
434
|
},
|
|
435
435
|
...options,
|
|
@@ -2,6 +2,7 @@ import Controller, { inject as 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 { isBlank } from '@ember/utils';
|
|
5
6
|
import { timeout } from 'ember-concurrency';
|
|
6
7
|
import { task } from 'ember-concurrency-decorators';
|
|
7
8
|
|
|
@@ -95,7 +96,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
95
96
|
*
|
|
96
97
|
* @var {String}
|
|
97
98
|
*/
|
|
98
|
-
@tracked sort= '-created_at';
|
|
99
|
+
@tracked sort = '-created_at';
|
|
99
100
|
|
|
100
101
|
/**
|
|
101
102
|
* The filterable param `public_id`
|
|
@@ -438,8 +439,6 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
438
439
|
* @void
|
|
439
440
|
*/
|
|
440
441
|
@action editFleet(fleet, options = {}) {
|
|
441
|
-
const isNew = fleet.get('isNew');
|
|
442
|
-
|
|
443
442
|
this.modalsManager.show('modals/fleet-form', {
|
|
444
443
|
title: 'Edit Fleet',
|
|
445
444
|
acceptButtonText: 'Save Changes',
|
|
@@ -448,7 +447,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
448
447
|
declineButtonIconPrefix: 'fas',
|
|
449
448
|
statusOptions: this.statusOptions,
|
|
450
449
|
fleet,
|
|
451
|
-
confirm: (modal
|
|
450
|
+
confirm: (modal) => {
|
|
452
451
|
modal.startLoading();
|
|
453
452
|
|
|
454
453
|
return fleet
|
|
@@ -2,6 +2,7 @@ import Controller, { inject as 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 { isBlank } from '@ember/utils';
|
|
5
6
|
import { timeout } from 'ember-concurrency';
|
|
6
7
|
import { task } from 'ember-concurrency-decorators';
|
|
7
8
|
|
|
@@ -95,7 +96,7 @@ export default class ManagementFuelReportsIndexController extends Controller {
|
|
|
95
96
|
*
|
|
96
97
|
* @var {String}
|
|
97
98
|
*/
|
|
98
|
-
@tracked sort= '-created_at';
|
|
99
|
+
@tracked sort = '-created_at';
|
|
99
100
|
|
|
100
101
|
/**
|
|
101
102
|
* The filterable param `public_id`
|
|
@@ -419,7 +420,7 @@ export default class ManagementFuelReportsIndexController extends Controller {
|
|
|
419
420
|
*/
|
|
420
421
|
@action deleteFuelReport(fuelReport, options = {}) {
|
|
421
422
|
this.crud.delete(fuelReport, {
|
|
422
|
-
onConfirm: (
|
|
423
|
+
onConfirm: () => {
|
|
423
424
|
this.hostRouter.refresh();
|
|
424
425
|
},
|
|
425
426
|
...options,
|
|
@@ -1,7 +1,8 @@
|
|
|
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
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isBlank } from '@ember/object';
|
|
5
6
|
import { timeout } from 'ember-concurrency';
|
|
6
7
|
import { task } from 'ember-concurrency-decorators';
|
|
7
8
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import Controller, { inject as controller } from '@ember/controller';
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import { action
|
|
5
|
-
import {
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isBlank } from '@ember/utils';
|
|
6
6
|
import { task, timeout } from 'ember-concurrency';
|
|
7
|
-
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
8
7
|
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
|
|
9
8
|
|
|
10
9
|
export default class ManagementPlacesIndexController extends Controller {
|
|
@@ -209,7 +208,7 @@ export default class ManagementPlacesIndexController extends Controller {
|
|
|
209
208
|
sortable: true,
|
|
210
209
|
filterable: true,
|
|
211
210
|
filterComponent: 'filter/country',
|
|
212
|
-
filterParam: 'country'
|
|
211
|
+
filterParam: 'country',
|
|
213
212
|
},
|
|
214
213
|
{
|
|
215
214
|
label: 'Created At',
|
|
@@ -483,7 +482,7 @@ export default class ManagementPlacesIndexController extends Controller {
|
|
|
483
482
|
*/
|
|
484
483
|
@action deletePlace(place, options = {}) {
|
|
485
484
|
this.crud.delete(place, {
|
|
486
|
-
onConfirm: (
|
|
485
|
+
onConfirm: () => {
|
|
487
486
|
return this.hostRouter.refresh();
|
|
488
487
|
},
|
|
489
488
|
...options,
|
|
@@ -99,7 +99,7 @@ export default class ManagementVehiclesIndexController extends ManagementControl
|
|
|
99
99
|
*
|
|
100
100
|
* @var {String}
|
|
101
101
|
*/
|
|
102
|
-
@tracked sort= '-created_at';
|
|
102
|
+
@tracked sort = '-created_at';
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* The filterable param `public_id`.
|
|
@@ -612,5 +612,5 @@ export default class ManagementVehiclesIndexController extends ManagementControl
|
|
|
612
612
|
* @todo implement
|
|
613
613
|
* @void
|
|
614
614
|
*/
|
|
615
|
-
@action assignDriver(
|
|
615
|
+
@action assignDriver() {}
|
|
616
616
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Controller, { inject as controller } from '@ember/controller';
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import { action
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
5
|
import { isBlank } from '@ember/utils';
|
|
6
6
|
import { isArray } from '@ember/array';
|
|
7
7
|
import { capitalize } from '@ember/string';
|
|
8
|
+
import { timeout } from 'ember-concurrency';
|
|
8
9
|
import { task } from 'ember-concurrency-decorators';
|
|
9
10
|
import apiUrl from '@fleetbase/ember-core/utils/api-url';
|
|
10
11
|
|
|
@@ -434,7 +435,7 @@ export default class ManagementVendorsIndexController extends Controller {
|
|
|
434
435
|
credentials: {},
|
|
435
436
|
options: {},
|
|
436
437
|
credential_params,
|
|
437
|
-
option_params
|
|
438
|
+
option_params,
|
|
438
439
|
});
|
|
439
440
|
|
|
440
441
|
this.modalsManager.setOption('integratedVendor', vendor);
|
|
@@ -509,7 +510,7 @@ export default class ManagementVendorsIndexController extends Controller {
|
|
|
509
510
|
},
|
|
510
511
|
});
|
|
511
512
|
},
|
|
512
|
-
confirm: (modal
|
|
513
|
+
confirm: (modal) => {
|
|
513
514
|
modal.startLoading();
|
|
514
515
|
|
|
515
516
|
const isAddingIntegratedVendor = modal.getOption('action') !== undefined && modal.getOption('integratedVendor')?.isNew;
|
|
@@ -10,7 +10,6 @@ import groupBy from '@fleetbase/ember-core/utils/macros/group-by';
|
|
|
10
10
|
import findClosestWaypoint from '@fleetbase/ember-core/utils/find-closest-waypoint';
|
|
11
11
|
import getRoutingHost from '@fleetbase/ember-core/utils/get-routing-host';
|
|
12
12
|
import extractCoordinates from '@fleetbase/ember-core/utils/extract-coordinates';
|
|
13
|
-
import getModelName from '@fleetbase/ember-core/utils/get-model-name';
|
|
14
13
|
|
|
15
14
|
export default class OperationsOrdersIndexViewController extends Controller {
|
|
16
15
|
/**
|
|
@@ -4,6 +4,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { equal } from '@ember/object/computed';
|
|
6
6
|
import { isArray } from '@ember/array';
|
|
7
|
+
import { isBlank } from '@ember/utils';
|
|
7
8
|
import { timeout } from 'ember-concurrency';
|
|
8
9
|
import { task } from 'ember-concurrency-decorators';
|
|
9
10
|
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
5
|
import { isBlank } from '@ember/utils';
|
|
6
6
|
import { timeout } from 'ember-concurrency';
|
|
7
7
|
import { task } from 'ember-concurrency-decorators';
|
|
@@ -250,7 +250,7 @@ export default class OperationsServiceRatesIndexController extends Controller {
|
|
|
250
250
|
*/
|
|
251
251
|
@action deleteServiceRate(serviceRate, options = {}) {
|
|
252
252
|
this.crud.delete(serviceRate, {
|
|
253
|
-
onSuccess: (
|
|
253
|
+
onSuccess: () => {
|
|
254
254
|
return this.hostRouter.refresh();
|
|
255
255
|
},
|
|
256
256
|
...options,
|
|
@@ -2,6 +2,7 @@ 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 { later } from '@ember/runloop';
|
|
5
6
|
import GeoJson from '@fleetbase/fleetops-data/utils/geojson/geo-json';
|
|
6
7
|
import FeatureCollection from '@fleetbase/fleetops-data/utils/geojson/feature-collection';
|
|
7
8
|
import last from '@fleetbase/ember-core/utils/last';
|
|
@@ -120,9 +121,13 @@ export default class OperationsZonesIndexController extends Controller {
|
|
|
120
121
|
this.leafletMap = event.target;
|
|
121
122
|
|
|
122
123
|
// handle resize event now
|
|
123
|
-
|
|
124
|
-
this
|
|
125
|
-
|
|
124
|
+
later(
|
|
125
|
+
this,
|
|
126
|
+
() => {
|
|
127
|
+
this.leafletMap.invalidateSize();
|
|
128
|
+
},
|
|
129
|
+
100
|
|
130
|
+
);
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
/**
|
|
@@ -5,7 +5,6 @@ import { action } from '@ember/object';
|
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import { dasherize } from '@ember/string';
|
|
7
7
|
import { later } from '@ember/runloop';
|
|
8
|
-
import first from '@fleetbase/ember-core/utils/first';
|
|
9
8
|
import GeoJson from '@fleetbase/fleetops-data/utils/geojson/geo-json';
|
|
10
9
|
import MultiPolygon from '@fleetbase/fleetops-data/utils/geojson/multi-polygon';
|
|
11
10
|
import Polygon from '@fleetbase/fleetops-data/utils/geojson/polygon';
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
<div class="content">
|
|
2
2
|
<div class="row">
|
|
3
3
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
4
|
-
<LinkTo @route="dashboard.fleet-ops.management.vendors"
|
|
4
|
+
<LinkTo @route="dashboard.fleet-ops.management.vendors" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
5
5
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Vendors</p>
|
|
6
6
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
7
7
|
</LinkTo>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
10
|
-
<LinkTo @route="dashboard.fleet-ops.management.fleets"
|
|
10
|
+
<LinkTo @route="dashboard.fleet-ops.management.fleets" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
11
11
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Fleets</p>
|
|
12
12
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
13
13
|
</LinkTo>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
16
|
-
<LinkTo @route="dashboard.fleet-ops.management.drivers"
|
|
16
|
+
<LinkTo @route="dashboard.fleet-ops.management.drivers" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
17
17
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Drivers</p>
|
|
18
18
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
19
19
|
</LinkTo>
|
|
20
20
|
</div>
|
|
21
21
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
22
|
-
<LinkTo @route="dashboard.fleet-ops.management.vehicles"
|
|
22
|
+
<LinkTo @route="dashboard.fleet-ops.management.vehicles" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
23
23
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Vehicles</p>
|
|
24
24
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
25
25
|
</LinkTo>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
28
|
-
<LinkTo @route="dashboard.fleet-ops.management.places"
|
|
28
|
+
<LinkTo @route="dashboard.fleet-ops.management.places" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
29
29
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Places</p>
|
|
30
30
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
31
31
|
</LinkTo>
|
|
32
32
|
</div>
|
|
33
33
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
34
|
-
<LinkTo @route="dashboard.fleet-ops.management.contacts"
|
|
34
|
+
<LinkTo @route="dashboard.fleet-ops.management.contacts" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
35
35
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Contacts</p>
|
|
36
36
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
37
37
|
</LinkTo>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
40
|
-
<LinkTo @route="dashboard.fleet-ops.management.issues"
|
|
40
|
+
<LinkTo @route="dashboard.fleet-ops.management.issues" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
41
41
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Issues</p>
|
|
42
42
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
43
43
|
</LinkTo>
|
|
44
44
|
</div>
|
|
45
45
|
<div class="col-12 col-lg-3 col-xl-3">
|
|
46
|
-
<LinkTo @route="dashboard.fleet-ops.management.fuel-reports"
|
|
46
|
+
<LinkTo @route="dashboard.fleet-ops.management.fuel-reports" class="group hover:bg-flb-blue p-4 cursor-pointer bg-white rounded max-w-xs w-full shadow-lg select-none overflow-hidden mx-auto mb-6">
|
|
47
47
|
<p class="font-semibold text-lg mb-1 text-black group-hover:text-white">Fuel Reports</p>
|
|
48
48
|
<p class="text-grey-darker group-hover:text-white mb-2">Manage your vendors</p>
|
|
49
49
|
</LinkTo>
|
|
@@ -365,10 +365,10 @@
|
|
|
365
365
|
</div>
|
|
366
366
|
<div class="space-y-2">
|
|
367
367
|
<div>
|
|
368
|
-
<Input @value={{entity.name}}
|
|
368
|
+
<Input @value={{entity.name}} @type="text" class="w-full form-input form-input-sm" placeholder="Name" />
|
|
369
369
|
</div>
|
|
370
370
|
<div>
|
|
371
|
-
<Input @value={{entity.sku}}
|
|
371
|
+
<Input @value={{entity.sku}} @type="text" class="w-full form-input form-input-sm" placeholder="SKU" />
|
|
372
372
|
</div>
|
|
373
373
|
<Button @icon="pencil" @text="Edit Item" @size="sm" @onClick={{fn this.editEntity entity}} />
|
|
374
374
|
</div>
|
|
@@ -392,10 +392,10 @@
|
|
|
392
392
|
</div>
|
|
393
393
|
<div class="space-y-2">
|
|
394
394
|
<div>
|
|
395
|
-
<Input @value={{entity.name}}
|
|
395
|
+
<Input @value={{entity.name}} @type="text" class="w-full form-input form-input-sm" placeholder="Name" />
|
|
396
396
|
</div>
|
|
397
397
|
<div>
|
|
398
|
-
<Input @value={{entity.sku}}
|
|
398
|
+
<Input @value={{entity.sku}} @type="text" class="w-full form-input form-input-sm" placeholder="SKU" />
|
|
399
399
|
</div>
|
|
400
400
|
{{#if this.waypoints.length}}
|
|
401
401
|
<select class="form-select w-full form-input-sm" {{on "change" (fn
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
<ContentPanel @title="Restrict Service" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
295
295
|
<div class="input-group">
|
|
296
296
|
<InputLabel @labelText="Service Area" @helpText="Restrict this service to order request originating from a service area." />
|
|
297
|
-
<Select class="w-full" @options={{this.serviceAreas}} @optionLabel="name" @optionValue="id" @value={{this.serviceRate.service_area_uuid}} @onSelect={{
|
|
297
|
+
<Select class="w-full" @options={{this.serviceAreas}} @optionLabel="name" @optionValue="id" @value={{this.serviceRate.service_area_uuid}} @onSelect={{this.selectServiceArea}} @placeholder="Restrict to service area" @disabled={{not this.serviceAreas.length}} />
|
|
298
298
|
</div>
|
|
299
299
|
|
|
300
300
|
{{#if this.serviceRate.service_area_uuid}}
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="content-panel-body no-padding sidebar-panels not-service-nav w-full">
|
|
35
|
-
<ContentPanel @title={{
|
|
35
|
+
<ContentPanel @title={{this.activeServiceArea.name}} @open={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
36
36
|
<div class="px-2 mb-2">
|
|
37
37
|
<div class="flex items-center justify-end">
|
|
38
|
-
<Button class="mr-2" @icon="eye" @type="magic" @text="Focus" @onClick={{fn this.startZoneEditing
|
|
39
|
-
<DropdownButton @icon="cog" @
|
|
38
|
+
<Button class="mr-2" @icon="eye" @type="magic" @text="Focus" @onClick={{fn this.startZoneEditing this.activeServiceArea}} @helpText="Moves map focus to {{this.activeServiceArea.name}}. Once focused you will then be able to edit, delete, and define zone bounds for the service area." />
|
|
39
|
+
<DropdownButton @icon="cog" @contentClass="dropdown-menu" @size="xs" @horizontalPosition="right" @helpText="Service Area options.">
|
|
40
40
|
<div class="dropdown-menu-content context-menu">
|
|
41
|
-
<a href="javascript:;" class="dropdown-menu-item" {{on "click" (fn this.renameServiceArea
|
|
42
|
-
<a href="javascript:;" class="dropdown-menu-item" {{on "click" (fn this.deleteServiceArea
|
|
41
|
+
<a href="javascript:;" class="dropdown-menu-item" {{on "click" (fn this.renameServiceArea this.activeServiceArea)}}>Rename Service Area</a>
|
|
42
|
+
<a href="javascript:;" class="dropdown-menu-item" {{on "click" (fn this.deleteServiceArea this.activeServiceArea)}}>Delete Service Area</a>
|
|
43
43
|
</div>
|
|
44
44
|
</DropdownButton>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="px-0 py-1">
|
|
48
|
-
{{#each
|
|
48
|
+
{{#each this.activeServiceArea.zones as |zone|}}
|
|
49
49
|
<div class="flex items-center justify-between border-t w-full border-gray-900 py-3 px-5 dark:text-gray-100">
|
|
50
50
|
<div>
|
|
51
51
|
<div class="font-semibold mb-1">
|
package/config/environment.js
CHANGED
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ module.exports = buildEngine({
|
|
|
12
12
|
enabled: true,
|
|
13
13
|
},
|
|
14
14
|
|
|
15
|
-
included: function (
|
|
15
|
+
included: function () {
|
|
16
16
|
this._super.included.apply(this, arguments);
|
|
17
17
|
|
|
18
18
|
const importJs = (module, file, options) => {
|
|
@@ -36,13 +36,13 @@ module.exports = buildEngine({
|
|
|
36
36
|
const leafletPath = path.dirname(require.resolve('leaflet'));
|
|
37
37
|
const leafletImagesPath = path.join(leafletPath, 'images');
|
|
38
38
|
const addonTree = [
|
|
39
|
-
new Funnel(`node_modules/${name}/assets`, {
|
|
40
|
-
destDir: '/',
|
|
41
|
-
}),
|
|
42
39
|
new Funnel(leafletImagesPath, {
|
|
43
40
|
srcDir: '/',
|
|
44
41
|
destDir: '/leaflet-images',
|
|
45
42
|
}),
|
|
43
|
+
new Funnel(path.join(__dirname, 'assets'), {
|
|
44
|
+
destDir: '/',
|
|
45
|
+
}),
|
|
46
46
|
];
|
|
47
47
|
|
|
48
48
|
// Merge the addon tree with the existing tree
|