@fleetbase/fleetops-engine 0.0.3 → 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 -3
- 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
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { action, get, computed } from '@ember/object';
|
|
3
3
|
|
|
4
4
|
export default class CellDriverNameComponent extends Component {
|
|
5
|
-
@computed('args.column.modelPath
|
|
5
|
+
@computed('args.{column.modelPath,args.row}') get driver() {
|
|
6
6
|
const { column, row } = this.args;
|
|
7
7
|
|
|
8
8
|
if (typeof column?.modelPath === 'string') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="custom-meta-field" ...attributes>
|
|
2
2
|
{{#if this.isTextInput}}
|
|
3
|
-
<Input type="text" class="form-input w-full {{@inputClass}}" @value={{@value}} placeholder={{@placeholder}} />
|
|
3
|
+
<Input @type="text" class="form-input w-full {{@inputClass}}" @value={{@value}} placeholder={{@placeholder}} />
|
|
4
4
|
{{/if}}
|
|
5
5
|
|
|
6
6
|
{{#if this.isSelectInput}}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="mb-2 flex items-center justify-between">
|
|
3
3
|
<div class="flex items-center">
|
|
4
4
|
<div class="fleet-driver-listing-search">
|
|
5
|
-
<Input @type="text" {{on "keyup" this.search}} placeholder="Search drivers in fleet" class="w-64 form-input form-input-sm" />
|
|
5
|
+
<Input @type="text" {{on "keyup" (perform this.search)}} placeholder="Search drivers in fleet" class="w-64 form-input form-input-sm" />
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
{{#if this.isLoading}}
|
|
@@ -3,26 +3,27 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action, computed } from '@ember/object';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
|
-
import {
|
|
6
|
+
import { isBlank } from '@ember/utils';
|
|
7
|
+
import { timeout } from 'ember-concurrency';
|
|
8
|
+
import { task } from 'ember-concurrency-decorators';
|
|
7
9
|
|
|
8
10
|
export default class FleetDriverListingComponent extends Component {
|
|
9
11
|
@service store;
|
|
10
12
|
@service appCache;
|
|
11
|
-
|
|
12
13
|
@tracked drivers = [];
|
|
13
14
|
@tracked selected = [];
|
|
14
15
|
@tracked query;
|
|
15
16
|
@tracked isLoading = false;
|
|
16
17
|
@tracked isLoaded = false;
|
|
17
18
|
|
|
18
|
-
@computed
|
|
19
|
-
return this.selected.map(selection => selection.id);
|
|
19
|
+
@computed('selected.[]') get ids() {
|
|
20
|
+
return this.selected.map((selection) => selection.id);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
@action async setupComponent() {
|
|
23
24
|
const { selected, fleet } = this.args;
|
|
24
25
|
|
|
25
|
-
this.selected =
|
|
26
|
+
this.selected = isArray(selected) && selected.length ? selected : [];
|
|
26
27
|
this.drivers = await this.queryFleetDrivers(fleet);
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -95,23 +96,22 @@ export default class FleetDriverListingComponent extends Component {
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
@action toggleSelected(options = []) {
|
|
98
|
-
return options.map(option => {
|
|
99
|
+
return options.map((option) => {
|
|
99
100
|
option.set('selected', this.ids.includes(option.id));
|
|
100
101
|
|
|
101
102
|
return option;
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
const { value } = target;
|
|
106
|
+
@task({ restartable: true }) *search({ target: { value } }) {
|
|
107
107
|
const { fleet } = this.args;
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
if (isBlank(value)) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
113
|
yield timeout(300);
|
|
114
|
-
|
|
115
|
-
this.drivers = yield this.queryFleetDrivers(fleet,
|
|
116
|
-
|
|
114
|
+
|
|
115
|
+
this.drivers = yield this.queryFleetDrivers(fleet, value);
|
|
116
|
+
}
|
|
117
117
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { action
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
4
|
import { equal } from '@ember/object/computed';
|
|
5
5
|
|
|
6
6
|
export default class IntegratedOrderDetailsComponent extends Component {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import BaseLayer from 'ember-leaflet/components/base-layer';
|
|
2
|
-
import {
|
|
3
|
-
import { run } from '@ember/runloop';
|
|
2
|
+
import { computed } from '@ember/object';
|
|
4
3
|
import { assign } from '@ember/polyfills';
|
|
5
4
|
import { scheduleOnce } from '@ember/runloop';
|
|
6
5
|
import { classify, camelize } from '@ember/string';
|
|
@@ -25,7 +24,7 @@ export default class LeafletDrawControl extends BaseLayer {
|
|
|
25
24
|
|
|
26
25
|
leafletOptions = ['draw', 'edit', 'remove', 'poly', 'position'];
|
|
27
26
|
|
|
28
|
-
@computed('
|
|
27
|
+
@computed('leafletEvents.[]', 'args') get usedLeafletEvents() {
|
|
29
28
|
return this.leafletEvents.filter((eventName) => {
|
|
30
29
|
eventName = camelize(eventName.replace(':', ' '));
|
|
31
30
|
let methodName = `_${eventName}`;
|
|
@@ -35,7 +34,7 @@ export default class LeafletDrawControl extends BaseLayer {
|
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
@computed('args.draw
|
|
37
|
+
@computed('args.{draw,edit,remove,poly,position}') get options() {
|
|
39
38
|
return {
|
|
40
39
|
position: getWithDefault(this.args, 'position', 'topright'),
|
|
41
40
|
draw: getWithDefault(this.args, 'draw', { marker: false, circlemarker: false, circle: false, polyline: false }),
|
|
@@ -9,10 +9,8 @@ import { alias } from '@ember/object/computed';
|
|
|
9
9
|
import { guidFor } from '@ember/object/internals';
|
|
10
10
|
import { later } from '@ember/runloop';
|
|
11
11
|
import { allSettled } from 'rsvp';
|
|
12
|
-
import extractCoordinates from '@fleetbase/ember-core/utils/extract-coordinates';
|
|
13
12
|
import config from 'ember-get-config';
|
|
14
13
|
|
|
15
|
-
const L = window.L;
|
|
16
14
|
const DEFAULT_LATITUDE = 1.369;
|
|
17
15
|
const DEFAULT_LONGITUDE = 103.8864;
|
|
18
16
|
|
|
@@ -131,7 +129,6 @@ export default class LiveMapComponent extends Component {
|
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
const { contextmenu } = map;
|
|
134
|
-
console.log('map.contextmenu', contextmenu);
|
|
135
132
|
const contextMenuItems = this.buildContextMenuItems();
|
|
136
133
|
|
|
137
134
|
contextMenuItems.forEach((options) => contextmenu.addItem(options));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex">
|
|
4
4
|
<div class="w-32 mb-6 mr-6">
|
|
5
5
|
<Image src={{@options.contact.photo_url}} @fallbackSrc={{config "defaultValues.contactImage"}} alt={{@options.contact.name}} height="128" width="128" class="h-32 w-32 rounded-md" />
|
|
6
|
-
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{
|
|
6
|
+
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} class="w-32" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="flex-1">
|
|
9
9
|
<div class="grid grid-cols-2 gap-2 text-xs dark:text-gray-100">
|
|
@@ -11,28 +11,28 @@
|
|
|
11
11
|
<label>
|
|
12
12
|
Name
|
|
13
13
|
</label>
|
|
14
|
-
<Input @value={{@options.contact.name}}
|
|
14
|
+
<Input @value={{@options.contact.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
17
|
<div class="input-group">
|
|
18
18
|
<label>
|
|
19
19
|
Title
|
|
20
20
|
</label>
|
|
21
|
-
<Input @value={{@options.contact.title}}
|
|
21
|
+
<Input @value={{@options.contact.title}} @type="text" class="w-full form-input" placeholder="Title" />
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div class="input-group">
|
|
25
25
|
<label>
|
|
26
26
|
Internal ID
|
|
27
27
|
</label>
|
|
28
|
-
<Input @value={{@options.contact.internal_id}}
|
|
28
|
+
<Input @value={{@options.contact.internal_id}} @type="text" class="w-full form-input" placeholder="Internal ID" />
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
<div class="input-group">
|
|
32
32
|
<label>
|
|
33
33
|
Email
|
|
34
34
|
</label>
|
|
35
|
-
<Input @value={{@options.contact.email}}
|
|
35
|
+
<Input @value={{@options.contact.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<div class="input-group">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex">
|
|
4
4
|
<div class="w-32 mb-6 mr-6">
|
|
5
5
|
<Image src={{@options.driver.photo_url}} @fallbackSrc={{config "defaultValues.driverImage"}} alt={{@options.driver.name}} height="128" width="128" class="h-32 w-32 rounded-md" />
|
|
6
|
-
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{
|
|
6
|
+
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} class="w-32" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="flex-1">
|
|
9
9
|
<div class="grid grid-cols-1 gap-2 text-xs dark:text-gray-100">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<label>
|
|
12
12
|
Name
|
|
13
13
|
</label>
|
|
14
|
-
<Input @value={{@options.driver.name}}
|
|
14
|
+
<Input @value={{@options.driver.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
<label>
|
|
21
21
|
Internal ID
|
|
22
22
|
</label>
|
|
23
|
-
<Input @value={{@options.driver.internal_id}}
|
|
23
|
+
<Input @value={{@options.driver.internal_id}} @type="text" class="w-full form-input" placeholder="Internal ID" />
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="input-group">
|
|
27
27
|
<label>
|
|
28
28
|
Drivers License
|
|
29
29
|
</label>
|
|
30
|
-
<Input @value={{@options.driver.drivers_license_number}}
|
|
30
|
+
<Input @value={{@options.driver.drivers_license_number}} @type="text" class="w-full form-input" placeholder="Drivers License" />
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div class="input-group">
|
|
34
34
|
<label>
|
|
35
35
|
Email
|
|
36
36
|
</label>
|
|
37
|
-
<Input @value={{@options.driver.email}}
|
|
37
|
+
<Input @value={{@options.driver.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
40
|
<div class="input-group">
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<label>
|
|
67
67
|
City
|
|
68
68
|
</label>
|
|
69
|
-
<Input @value={{@options.driver.city}}
|
|
69
|
+
<Input @value={{@options.driver.city}} @type="text" class="w-full form-input" placeholder="City" />
|
|
70
70
|
</div>
|
|
71
71
|
|
|
72
72
|
<div class="input-group">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex">
|
|
4
4
|
<div class="w-32 mb-6 mr-6 flex flex-col items-center">
|
|
5
5
|
<Image src={{@options.entity.photo_url}} alt={{@options.entity.name}} height="128" width="128" class="h-32 w-32 rounded-md" />
|
|
6
|
-
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{
|
|
6
|
+
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} class="w-32" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="flex-1 space-y-4">
|
|
9
9
|
<ContentPanel @title="Details" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<label>
|
|
6
6
|
Group Name
|
|
7
7
|
</label>
|
|
8
|
-
<Input @value={{@options.group.name}}
|
|
8
|
+
<Input @value={{@options.group.name}} @type="text" class="w-full form-input" placeholder=" Group Name" />
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<div class="input-group">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<InputGroup @name="Customer" @helpText="Optionally assign the customer of this order. If it's a new customer, use the 'New Customer' button above.">
|
|
12
|
-
<ModelSelect @modelName="customer" @selectedModel={{@options.order.customer}} @placeholder="Select Customer" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @allowClear={{true}} @onChange={{
|
|
12
|
+
<ModelSelect @modelName="customer" @selectedModel={{@options.order.customer}} @placeholder="Select Customer" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @allowClear={{true}} @onChange={{@options.setOrderCustomer}} as |model|>
|
|
13
13
|
<div class="flex items-center">
|
|
14
14
|
<div class="w-7">
|
|
15
15
|
<FaIcon @icon={{if model.isVendor "warehouse" "user" }} />
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<p class="text-base font-semibold my-5">Drag and drop spreadsheet files onto this dropzone</p>
|
|
31
31
|
{{/if}}
|
|
32
32
|
|
|
33
|
-
<UploadButton @buttonText="or select spreadsheets to upload" @type="magic" @name="spreadsheets" @for="spreadsheets" @accept={{join "," @options.acceptedFileTypes}} @multiple={{true}} @onFileAdded={{
|
|
33
|
+
<UploadButton @buttonText="or select spreadsheets to upload" @type="magic" @name="spreadsheets" @for="spreadsheets" @accept={{join "," @options.acceptedFileTypes}} @multiple={{true}} @onFileAdded={{@options.queueFile}} class="w-72" />
|
|
34
34
|
</div>
|
|
35
35
|
{{/if}}
|
|
36
36
|
</FileDropzone>
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
<label>
|
|
5
5
|
Policy Name
|
|
6
6
|
</label>
|
|
7
|
-
<Input @value={{@options.policy.name}}
|
|
7
|
+
<Input @value={{@options.policy.name}} @type="text" class="w-full form-input" placeholder="Enter a name for your policy" />
|
|
8
8
|
</div>
|
|
9
9
|
<div class="input-group">
|
|
10
10
|
<label>
|
|
11
11
|
Policy Description
|
|
12
12
|
</label>
|
|
13
|
-
<Input @value={{@options.policy.description}}
|
|
13
|
+
<Input @value={{@options.policy.description}} @type="text" class="w-full form-input" placeholder="Enter a description for your policy" />
|
|
14
14
|
</div>
|
|
15
15
|
<div class="input-group">
|
|
16
16
|
<label>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<label>
|
|
5
5
|
Role Name
|
|
6
6
|
</label>
|
|
7
|
-
<Input @value={{@options.role.name}}
|
|
7
|
+
<Input @value={{@options.role.name}} @type="text" class="w-full form-input" placeholder="Enter a name for this role" />
|
|
8
8
|
</div>
|
|
9
9
|
<div class="input-group">
|
|
10
10
|
<label>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex">
|
|
4
4
|
<div class="w-32 mb-6 mr-6">
|
|
5
5
|
<img src={{@options.user.avatar_url}} alt={{@options.user.name}} class="w-32 h-32 rounded-md" />
|
|
6
|
-
<FileUpload @name="photos" @accept="image/*" @onFileAdded={{
|
|
6
|
+
<FileUpload @name="photos" @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} as |queue|>
|
|
7
7
|
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
8
8
|
{{#if queue.files.length}}
|
|
9
9
|
<Spinner class="mr-1" />
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<label>
|
|
26
26
|
Name
|
|
27
27
|
</label>
|
|
28
|
-
<Input @value={{@options.user.name}}
|
|
28
|
+
<Input @value={{@options.user.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
<div class="input-group">
|
|
32
32
|
<label>
|
|
33
33
|
Email
|
|
34
34
|
</label>
|
|
35
|
-
<Input @value={{@options.user.email}}
|
|
35
|
+
<Input @value={{@options.user.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<div class="input-group">
|