@fleetbase/fleetops-engine 0.4.19 → 0.4.21
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/activity-event-selector.js +1 -1
- package/addon/components/activity-form-panel.js +2 -2
- package/addon/components/activity-logic-builder.js +1 -1
- package/addon/components/admin/navigator-app.hbs +77 -1
- package/addon/components/admin/navigator-app.js +65 -12
- package/addon/components/contact-form-panel.js +2 -2
- package/addon/components/contact-panel.js +2 -2
- package/addon/components/custom-field-form-panel.js +2 -2
- package/addon/components/driver-form-panel.js +2 -2
- package/addon/components/driver-panel.js +2 -2
- package/addon/components/edit-order-route-panel.js +2 -2
- package/addon/components/fleet-form-panel.js +2 -2
- package/addon/components/fleet-panel/driver-listing.js +1 -1
- package/addon/components/fleet-panel/vehicle-listing.js +1 -1
- package/addon/components/fleet-panel.js +2 -2
- package/addon/components/fuel-report-form-panel.js +2 -2
- package/addon/components/fuel-report-panel.js +2 -2
- package/addon/components/issue-form-panel.js +2 -2
- package/addon/components/issue-panel.js +2 -2
- package/addon/components/live-map-drawer.js +2 -2
- package/addon/components/order-config-manager/activity-flow.js +1 -1
- package/addon/components/order-config-manager/custom-fields.js +1 -1
- package/addon/components/order-config-manager/entities.js +1 -1
- package/addon/components/order-config-manager-overlay.js +1 -1
- package/addon/components/order-config-manager.js +2 -2
- package/addon/components/place-form-panel.js +2 -2
- package/addon/components/place-panel.js +2 -2
- package/addon/components/vehicle-form-panel.js +2 -2
- package/addon/components/vehicle-panel.js +2 -2
- package/addon/components/vendor-form-panel/create-form.js +1 -1
- package/addon/components/vendor-form-panel.js +2 -2
- package/addon/components/vendor-panel.js +2 -2
- package/composer.json +2 -2
- package/extension.json +1 -1
- package/package.json +2 -2
- package/server/config/fleetops.php +19 -0
- package/server/src/Console/Commands/DispatchAdhocOrders.php +44 -30
- package/server/src/Console/Commands/DispatchOrders.php +27 -21
- package/server/src/Console/Commands/FixInvalidPolymorphicRelationTypeNamespaces.php +96 -0
- package/server/src/Console/Commands/TrackOrderDistanceAndTime.php +30 -15
- package/server/src/Http/Controllers/Api/v1/DriverController.php +0 -1
- package/server/src/Http/Controllers/Api/v1/OrderController.php +49 -2
- package/server/src/Http/Controllers/Internal/v1/SettingController.php +20 -0
- package/server/src/Http/Filter/ContactFilter.php +5 -0
- package/server/src/Http/Filter/DriverFilter.php +5 -0
- package/server/src/Http/Filter/EntityFilter.php +18 -0
- package/server/src/Http/Filter/FleetFilter.php +5 -0
- package/server/src/Http/Filter/FuelReportFilter.php +5 -0
- package/server/src/Http/Filter/IssueFilter.php +5 -0
- package/server/src/Http/Filter/OrderConfigFilter.php +5 -0
- package/server/src/Http/Filter/OrderFilter.php +5 -0
- package/server/src/Http/Filter/PayloadFilter.php +18 -0
- package/server/src/Http/Filter/PlaceFilter.php +5 -0
- package/server/src/Http/Filter/PurchaseRateFilter.php +18 -0
- package/server/src/Http/Filter/ServiceAreaFilter.php +5 -0
- package/server/src/Http/Filter/ServiceQuoteFilter.php +5 -0
- package/server/src/Http/Filter/ServiceRateFilter.php +5 -0
- package/server/src/Http/Filter/TrackingNumberFilter.php +18 -0
- package/server/src/Http/Filter/TrackingStatusFilter.php +5 -0
- package/server/src/Http/Filter/VehicleFilter.php +5 -0
- package/server/src/Http/Filter/VendorFilter.php +5 -0
- package/server/src/Http/Filter/ZoneFilter.php +5 -0
- package/server/src/Http/Resources/v1/Order.php +1 -0
- package/server/src/Models/Driver.php +1 -1
- package/server/src/Models/Order.php +2 -4
- package/server/src/Providers/FleetOpsServiceProvider.php +4 -3
- package/server/src/Support/Algo.php +0 -24
- package/server/src/Support/DistanceMatrix.php +9 -1
- package/server/src/Support/OSRM.php +7 -0
- package/server/src/Support/Utils.php +216 -169
- package/server/src/routes.php +3 -3
- package/translations/en-us.yaml +3 -0
- package/addon/utils/apply-context-component-arguments.js +0 -33
- package/addon/utils/context-component-callback.js +0 -16
- package/app/utils/apply-context-component-arguments.js +0 -1
- package/app/utils/context-component-callback.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
|
-
import contextComponentCallback from '
|
|
4
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
5
5
|
import getWithDefault from '@fleetbase/ember-core/utils/get-with-default';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -2,8 +2,8 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { underscore, capitalize, w } from '@ember/string';
|
|
5
|
-
import contextComponentCallback from '
|
|
6
|
-
import applyContextComponentArguments from '
|
|
5
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Component class for managing activity forms.
|
|
@@ -3,7 +3,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { isArray } from '@ember/array';
|
|
5
5
|
import { isNone } from '@ember/utils';
|
|
6
|
-
import contextComponentCallback from '
|
|
6
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
7
7
|
import getWithDefault from '@fleetbase/ember-core/utils/get-with-default';
|
|
8
8
|
|
|
9
9
|
export default class ActivityLogicBuilderComponent extends Component {
|
|
@@ -1,8 +1,84 @@
|
|
|
1
|
-
<ContentPanel @title={{t "fleet-ops.component.admin.navigator-app.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
1
|
+
<ContentPanel @title={{t "fleet-ops.component.admin.navigator-app.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800 mb-4">
|
|
2
2
|
<InputGroup @name={{t "fleet-ops.component.admin.navigator-app.name"}}>
|
|
3
3
|
<ClickToCopy class="px-4 py-2 border rounded-md bg-gray-100 shadow-sm dark:bg-gray-700 border-gray-200 dark:border-gray-800" @value={{this.url}}>{{this.url}}</ClickToCopy>
|
|
4
4
|
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
5
5
|
<InputInfo>{{t "fleet-ops.component.admin.navigator-app.message" htmlSafe=true companyName=@app.name}}</InputInfo>
|
|
6
6
|
</Attach::Tooltip>
|
|
7
7
|
</InputGroup>
|
|
8
|
+
</ContentPanel>
|
|
9
|
+
|
|
10
|
+
<ContentPanel @title={{t "fleet-ops.component.admin.navigator-app.settings"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
11
|
+
<InputGroup>
|
|
12
|
+
<div class="flex items-center">
|
|
13
|
+
<Toggle @isToggled={{this.isEntityFieldsEditable}} @onToggle={{this.enableEditableEntityFields}} />
|
|
14
|
+
<div class="ml-2">{{t "fleet-ops.component.admin.navigator-app.select-input"}}</div>
|
|
15
|
+
</div>
|
|
16
|
+
</InputGroup>
|
|
17
|
+
{{#if this.isEntityFieldsEditable}}
|
|
18
|
+
<OrderConfigManager @onConfigChanged={{this.onConfigChanged}} as |Action Context|>
|
|
19
|
+
<div class="mt-2">
|
|
20
|
+
<InputGroup @name="Select order config" @helpText="Apply entity editing settings for an order config.">
|
|
21
|
+
<DropdownButton
|
|
22
|
+
class="order-config-select-button mr-2"
|
|
23
|
+
@disabled={{not Context.configs}}
|
|
24
|
+
@text={{if Context.currentConfig.name Context.currentConfig.name (t "fleet-ops.component.order-config-manager.select-order-config")}}
|
|
25
|
+
@textClass="text-sm mr-2"
|
|
26
|
+
@buttonClass="flex-row-reverse w-44 justify-between"
|
|
27
|
+
@icon="caret-down"
|
|
28
|
+
@iconClass="mr-0i"
|
|
29
|
+
@size="sm"
|
|
30
|
+
@iconPrefix="fas"
|
|
31
|
+
@triggerClass="hidden md:flex"
|
|
32
|
+
as |dd|
|
|
33
|
+
>
|
|
34
|
+
<div class="next-dd-menu mt-1 mx-0" aria-labelledby="user-menu">
|
|
35
|
+
<div class="p-1">
|
|
36
|
+
{{#each Context.configs as |orderConfig|}}
|
|
37
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (dropdown-fn dd Context.selectConfig orderConfig)}}>
|
|
38
|
+
<div class="flex-1 flex flex-row items-center">
|
|
39
|
+
<div class="w-6">
|
|
40
|
+
<FaIcon @icon="cogs" />
|
|
41
|
+
</div>
|
|
42
|
+
<span>{{orderConfig.name}}</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
{{#if (eq Context.currentConfig.id orderConfig.id)}}
|
|
46
|
+
<FaIcon @icon="check" class="text-green-500" />
|
|
47
|
+
{{/if}}
|
|
48
|
+
</div>
|
|
49
|
+
</a>
|
|
50
|
+
{{/each}}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</DropdownButton>
|
|
54
|
+
</InputGroup>
|
|
55
|
+
</div>
|
|
56
|
+
</OrderConfigManager>
|
|
57
|
+
{{#if this.selectedOrderConfig}}
|
|
58
|
+
<div class="bg-gray-400 border-gray-600 rounded-lg px-4 py-2 dark:bg-gray-700 dark:border-gray-800">
|
|
59
|
+
{{#let (get (get this.entityEditingSettings this.selectedOrderConfig.id) "editable_entity_fields") as |editableEntityFields|}}
|
|
60
|
+
{{#each this.entityFields as |entityField|}}
|
|
61
|
+
<div class="mt-1">
|
|
62
|
+
<Checkbox
|
|
63
|
+
@value={{includes entityField editableEntityFields}}
|
|
64
|
+
@label={{smart-humanize entityField}}
|
|
65
|
+
@onToggle={{fn this.toggleFieldEditable entityField}}
|
|
66
|
+
@helpText={{t "fleet-ops.component.admin.visibility-controls.checkbox-text"}}
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
{{/each}}
|
|
70
|
+
{{/let}}
|
|
71
|
+
</div>
|
|
72
|
+
<div class="mt-3 flex items-center">
|
|
73
|
+
<Button
|
|
74
|
+
@type="primary"
|
|
75
|
+
@size="lg"
|
|
76
|
+
@icon="save"
|
|
77
|
+
@text={{t "fleet-ops.common.save-changes"}}
|
|
78
|
+
@onClick={{perform this.saveEntityEditingSettings}}
|
|
79
|
+
@isLoading={{not this.saveEntityEditingSettings.isIdle}}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
{{/if}}
|
|
83
|
+
{{/if}}
|
|
8
84
|
</ContentPanel>
|
|
@@ -1,27 +1,80 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { inject as service } from '@ember/service';
|
|
3
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { inject as service } from '@ember/service';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isArray } from '@ember/array';
|
|
6
|
+
import { task } from 'ember-concurrency-decorators';
|
|
4
7
|
|
|
5
8
|
export default class NavigatorAppControlsComponent extends Component {
|
|
6
9
|
@service fetch;
|
|
7
10
|
@tracked isLoading = false;
|
|
8
11
|
@tracked url;
|
|
12
|
+
@tracked selectedOrderConfig;
|
|
13
|
+
@tracked entityFields = ['name', 'description', 'sku', 'height', 'width', 'length', 'weight', 'declared_value', 'sale_price'];
|
|
14
|
+
@tracked entityEditingSettings = {};
|
|
15
|
+
@tracked isEntityFieldsEditable = false;
|
|
9
16
|
|
|
10
17
|
constructor() {
|
|
11
18
|
super(...arguments);
|
|
12
|
-
this.getAppLinkUrl();
|
|
19
|
+
this.getAppLinkUrl.perform();
|
|
20
|
+
this.getEntityEditableSettings.perform();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@action enableEditableEntityFields(isEntityFieldsEditable) {
|
|
24
|
+
this.isEntityFieldsEditable = isEntityFieldsEditable;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@action onConfigChanged(orderConfig) {
|
|
28
|
+
this.selectedOrderConfig = orderConfig;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@action toggleFieldEditable(fieldName, isEditable) {
|
|
32
|
+
const editableFields = this.entityEditingSettings[this.selectedOrderConfig.id]?.editable_entity_fields;
|
|
33
|
+
if (isArray(editableFields)) {
|
|
34
|
+
if (isEditable) {
|
|
35
|
+
editableFields.pushObject(fieldName);
|
|
36
|
+
} else {
|
|
37
|
+
editableFields.removeObject(fieldName);
|
|
38
|
+
}
|
|
39
|
+
} else {
|
|
40
|
+
this.entityEditingSettings = {
|
|
41
|
+
...this.entityEditingSettings,
|
|
42
|
+
[this.selectedOrderConfig.id]: {
|
|
43
|
+
editable_entity_fields: [],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
return this.toggleFieldEditable(...arguments);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
this.updateEditableEntityFieldsForOrderConfig(editableFields);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
updateEditableEntityFieldsForOrderConfig(editableFields = [], orderConfig = null) {
|
|
53
|
+
orderConfig = orderConfig === null ? this.selectedOrderConfig : orderConfig;
|
|
54
|
+
this.entityEditingSettings = {
|
|
55
|
+
...this.entityEditingSettings,
|
|
56
|
+
[orderConfig.id]: {
|
|
57
|
+
editable_entity_fields: editableFields,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
13
60
|
}
|
|
14
61
|
|
|
15
|
-
getAppLinkUrl() {
|
|
16
|
-
|
|
62
|
+
@task *getAppLinkUrl() {
|
|
63
|
+
const response = yield this.fetch.get('fleet-ops/navigator/get-link-app');
|
|
64
|
+
const { linkUrl } = response;
|
|
65
|
+
if (linkUrl) {
|
|
66
|
+
this.url = linkUrl;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@task *getEntityEditableSettings() {
|
|
71
|
+
const { entityEditingSettings, isEntityFieldsEditable } = yield this.fetch.get('fleet-ops/settings/entity-editing-settings');
|
|
72
|
+
this.entityEditingSettings = entityEditingSettings;
|
|
73
|
+
this.isEntityFieldsEditable = isEntityFieldsEditable;
|
|
74
|
+
}
|
|
17
75
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.url = linkUrl;
|
|
22
|
-
})
|
|
23
|
-
.finally(() => {
|
|
24
|
-
this.isLoading = false;
|
|
25
|
-
});
|
|
76
|
+
@task *saveEntityEditingSettings() {
|
|
77
|
+
const { entityEditingSettings, isEntityFieldsEditable } = this;
|
|
78
|
+
yield this.fetch.post('fleet-ops/settings/entity-editing-settings', { entityEditingSettings, isEntityFieldsEditable });
|
|
26
79
|
}
|
|
27
80
|
}
|
|
@@ -2,8 +2,8 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
-
import contextComponentCallback from '
|
|
6
|
-
import applyContextComponentArguments from '
|
|
5
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
7
7
|
|
|
8
8
|
export default class ContactFormPanelComponent extends Component {
|
|
9
9
|
/**
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import ContactPanelDetailComponent from './contact-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class ContactPanelComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -5,8 +5,8 @@ import { action } from '@ember/object';
|
|
|
5
5
|
import { dasherize, camelize } from '@ember/string';
|
|
6
6
|
import { task } from 'ember-concurrency-decorators';
|
|
7
7
|
import isObject from '@fleetbase/ember-core/utils/is-object';
|
|
8
|
-
import contextComponentCallback from '
|
|
9
|
-
import applyContextComponentArguments from '
|
|
8
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
9
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
10
10
|
import getCustomFieldTypeMap from '../utils/get-custom-field-type-map';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -3,8 +3,8 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
|
|
6
|
-
import contextComponentCallback from '
|
|
7
|
-
import applyContextComponentArguments from '
|
|
6
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
7
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
8
8
|
|
|
9
9
|
export default class DriverFormPanelComponent extends Component {
|
|
10
10
|
/**
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import DriverPanelDetailComponent from './driver-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class DriverPanelComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import { task } from 'ember-concurrency-decorators';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
import getRoutingHost from '@fleetbase/ember-core/utils/get-routing-host';
|
|
10
10
|
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
|
|
11
11
|
import findClosestWaypoint from '@fleetbase/ember-core/utils/find-closest-waypoint';
|
|
@@ -3,8 +3,8 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { underscore } from '@ember/string';
|
|
6
|
-
import contextComponentCallback from '
|
|
7
|
-
import applyContextComponentArguments from '
|
|
6
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
7
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
8
8
|
|
|
9
9
|
export default class FleetFormPanelComponent extends Component {
|
|
10
10
|
/**
|
|
@@ -5,7 +5,7 @@ import { isBlank } from '@ember/utils';
|
|
|
5
5
|
import { action, set } from '@ember/object';
|
|
6
6
|
import { timeout } from 'ember-concurrency';
|
|
7
7
|
import { task } from 'ember-concurrency-decorators';
|
|
8
|
-
import contextComponentCallback from '
|
|
8
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
9
9
|
|
|
10
10
|
export default class FleetPanelDriverListingComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -5,7 +5,7 @@ import { isBlank } from '@ember/utils';
|
|
|
5
5
|
import { action, set } from '@ember/object';
|
|
6
6
|
import { timeout } from 'ember-concurrency';
|
|
7
7
|
import { task } from 'ember-concurrency-decorators';
|
|
8
|
-
import contextComponentCallback from '
|
|
8
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
9
9
|
|
|
10
10
|
export default class FleetPanelVehicleListingComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -6,8 +6,8 @@ import { isArray } from '@ember/array';
|
|
|
6
6
|
import FleetPanelDetailComponent from './fleet-panel/details';
|
|
7
7
|
import FleetPanelDriverListingComponent from './fleet-panel/driver-listing';
|
|
8
8
|
import FleetPanelVehicleListingComponent from './fleet-panel/vehicle-listing';
|
|
9
|
-
import contextComponentCallback from '
|
|
10
|
-
import applyContextComponentArguments from '
|
|
9
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
10
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
11
11
|
|
|
12
12
|
export default class FleetPanelComponent extends Component {
|
|
13
13
|
/**
|
|
@@ -2,8 +2,8 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
-
import contextComponentCallback from '
|
|
6
|
-
import applyContextComponentArguments from '
|
|
5
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
7
7
|
|
|
8
8
|
export default class FuelReportFormPanelComponent extends Component {
|
|
9
9
|
/**
|
|
@@ -4,8 +4,8 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import FuelReportPanelDetailsComponent from './fuel-report-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class FuelReportPanelComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -4,8 +4,8 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import getWithDefault from '@fleetbase/ember-core/utils/get-with-default';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
import getIssueTypes from '../utils/get-issue-types';
|
|
10
10
|
import getIssueCategories from '../utils/get-issue-categories';
|
|
11
11
|
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import IssuePanelDetailComponent from './issue-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
export default class IssuePanelComponent extends Component {
|
|
10
10
|
/**
|
|
11
11
|
* Service for fetching data.
|
|
@@ -3,8 +3,8 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
|
-
import contextComponentCallback from '
|
|
7
|
-
import applyContextComponentArguments from '
|
|
6
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
7
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
8
8
|
import LiveMapDrawerVehicleListingComponent from './live-map-drawer/vehicle-listing';
|
|
9
9
|
import LiveMapDrawerDriverListingComponent from './live-map-drawer/driver-listing';
|
|
10
10
|
import LiveMapDrawerPlaceListingComponent from './live-map-drawer/place-listing';
|
|
@@ -9,7 +9,7 @@ import { later } from '@ember/runloop';
|
|
|
9
9
|
import { task } from 'ember-concurrency-decorators';
|
|
10
10
|
import generateUUID from '@fleetbase/ember-core/utils/generate-uuid';
|
|
11
11
|
import createFlowActivity from '../../utils/create-flow-activity';
|
|
12
|
-
import contextComponentCallback from '
|
|
12
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Manages the activity flow for order configuration, allowing users to create, edit, and view a sequence of activities.
|
|
@@ -6,7 +6,7 @@ import { isArray } from '@ember/array';
|
|
|
6
6
|
import { later } from '@ember/runloop';
|
|
7
7
|
import { task } from 'ember-concurrency-decorators';
|
|
8
8
|
import isObject from '@fleetbase/ember-core/utils/is-object';
|
|
9
|
-
import contextComponentCallback from '
|
|
9
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Component class for managing custom fields within an order configuration.
|
|
@@ -8,7 +8,7 @@ import { task } from 'ember-concurrency-decorators';
|
|
|
8
8
|
import getWithDefault from '@fleetbase/ember-core/utils/get-with-default';
|
|
9
9
|
import ObjectProxy from '@ember/object/proxy';
|
|
10
10
|
import createCustomEntity from '../../utils/create-custom-entity';
|
|
11
|
-
import contextComponentCallback from '
|
|
11
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Component class for managing order configuration entities.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import contextComponentCallback from '
|
|
3
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
4
4
|
|
|
5
5
|
export default class OrderConfigManagerOverlayComponent extends Component {
|
|
6
6
|
/**
|
|
@@ -9,8 +9,8 @@ import { dasherize } from '@ember/string';
|
|
|
9
9
|
import { task } from 'ember-concurrency-decorators';
|
|
10
10
|
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
11
11
|
import getModelName from '@fleetbase/ember-core/utils/get-model-name';
|
|
12
|
-
import contextComponentCallback from '
|
|
13
|
-
import applyContextComponentArguments from '
|
|
12
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
13
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
14
14
|
import OrderConfigManagerDetailsComponent from './order-config-manager/details';
|
|
15
15
|
import OrderConfigManagerCustomFieldsComponent from './order-config-manager/custom-fields';
|
|
16
16
|
import OrderConfigManagerActivityFlowComponent from './order-config-manager/activity-flow';
|
|
@@ -4,8 +4,8 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { isBlank } from '@ember/utils';
|
|
6
6
|
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class PlaceFormPanelComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import PlacePanelDetailComponent from './place-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class PlacePanelComponent extends Component {
|
|
11
11
|
/**
|
|
@@ -2,8 +2,8 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
-
import contextComponentCallback from '
|
|
6
|
-
import applyContextComponentArguments from '
|
|
5
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
7
7
|
import Point from '@fleetbase/fleetops-data/utils/geojson/point';
|
|
8
8
|
|
|
9
9
|
export default class VehicleFormPanelComponent extends Component {
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import VehiclePanelDetailComponent from './vehicle-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Represents the vehicle panel component, handling vehicle information display and editing.
|
|
@@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import apiUrl from '@fleetbase/ember-core/utils/api-url';
|
|
7
|
-
import contextComponentCallback from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
8
|
|
|
9
9
|
export default class VendorFormPanelCreateFormComponent extends Component {
|
|
10
10
|
/**
|
|
@@ -2,8 +2,8 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
-
import contextComponentCallback from '
|
|
6
|
-
import applyContextComponentArguments from '
|
|
5
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
7
7
|
import getVendorTypeOptions from '../utils/get-vendor-type-options';
|
|
8
8
|
import getVendorStatusOptions from '../utils/get-vendor-status-options';
|
|
9
9
|
|
|
@@ -4,8 +4,8 @@ import { action } from '@ember/object';
|
|
|
4
4
|
import { inject as service } from '@ember/service';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
6
|
import VendorPanelDetailComponent from './vendor-panel/details';
|
|
7
|
-
import contextComponentCallback from '
|
|
8
|
-
import applyContextComponentArguments from '
|
|
7
|
+
import contextComponentCallback from '@fleetbase/ember-core/utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '@fleetbase/ember-core/utils/apply-context-component-arguments';
|
|
9
9
|
|
|
10
10
|
export default class VendorPanelComponent extends Component {
|
|
11
11
|
/**
|
package/composer.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleetbase/fleetops-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.21",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fleetbase-extension",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"require": {
|
|
24
24
|
"php": "^8.0",
|
|
25
|
-
"fleetbase/core-api": "^1.4.
|
|
25
|
+
"fleetbase/core-api": "^1.4.14",
|
|
26
26
|
"barryvdh/laravel-dompdf": "^2.0",
|
|
27
27
|
"brick/geo": "0.7.2",
|
|
28
28
|
"cknow/laravel-money": "^7.1",
|
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetbase/fleetops-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.21",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"fleetbase": {
|
|
6
6
|
"route": "fleet-ops"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/core": "^7.23.2",
|
|
45
|
-
"@fleetbase/ember-core": "^0.2.
|
|
45
|
+
"@fleetbase/ember-core": "^0.2.8",
|
|
46
46
|
"@fleetbase/ember-ui": "^0.2.11",
|
|
47
47
|
"@fleetbase/fleetops-data": "^0.1.14",
|
|
48
48
|
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
|
@@ -22,6 +22,25 @@ return [
|
|
|
22
22
|
'db' => env('DB_CONNECTION', 'mysql')
|
|
23
23
|
],
|
|
24
24
|
|
|
25
|
+
/*
|
|
26
|
+
|--------------------------------------------------------------------------
|
|
27
|
+
| OSRM
|
|
28
|
+
|--------------------------------------------------------------------------
|
|
29
|
+
*/
|
|
30
|
+
'osrm' => [
|
|
31
|
+
'host' => env('OSRM_HOST', 'https://bundle.routing.fleetbase.io')
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
|--------------------------------------------------------------------------
|
|
36
|
+
| Distance Matrix Calculator
|
|
37
|
+
| Options: "calculate", "google", "osrm"
|
|
38
|
+
|--------------------------------------------------------------------------
|
|
39
|
+
*/
|
|
40
|
+
'distance_matrix' => [
|
|
41
|
+
'provider' => env('DISTANCE_MATRIX_PROVIDER', 'calculate')
|
|
42
|
+
],
|
|
43
|
+
|
|
25
44
|
/*
|
|
26
45
|
|--------------------------------------------------------------------------
|
|
27
46
|
| Navigator App
|