@fleetbase/fleetops-engine 0.4.17 → 0.4.19
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-form-panel.hbs +19 -0
- package/addon/components/activity-form-panel.js +18 -0
- package/addon/components/live-map.js +14 -7
- package/addon/components/order-config-manager/details.js +15 -6
- package/addon/components/order-config-manager.js +20 -7
- package/addon/controllers/operations/order-config.js +2 -1
- package/addon/controllers/operations/orders/index/new.js +5 -0
- package/addon/controllers/operations/service-rates/index/new.js +23 -2
- package/addon/routes/operations/service-rates/index/edit.js +14 -5
- package/addon/routes/operations/service-rates/index/new.js +2 -6
- package/addon/services/location.js +54 -44
- package/addon/templates/operations/service-rates/index/new.hbs +10 -1
- package/composer.json +3 -3
- package/extension.json +1 -1
- package/package.json +3 -3
- package/server/config/api.php +3 -650
- package/server/config/fleetops.php +127 -4
- package/server/migrations/2024_03_12_033527_add_public_id_column_to_order_configs_table.php +34 -0
- package/server/migrations/2024_03_13_061249_add_order_config_uuid_column_to_service_rates_table.php +28 -0
- package/server/seeders/OrderConfigSeeder.php +2 -130
- package/server/src/Console/Commands/FixLegacyOrderConfigs.php +17 -11
- package/server/src/Http/Controllers/Api/v1/OrderController.php +25 -3
- package/server/src/Http/Controllers/Api/v1/ServiceQuoteController.php +10 -5
- package/server/src/Http/Controllers/Internal/v1/OrderConfigController.php +61 -0
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +12 -2
- package/server/src/Http/Controllers/Internal/v1/ServiceRateController.php +3 -0
- package/server/src/Http/Requests/CreateOrderRequest.php +32 -13
- package/server/src/Http/Requests/Internal/CreateOrderConfigRequest.php +40 -0
- package/server/src/Http/Requests/Internal/CreateOrderRequest.php +97 -0
- package/server/src/Http/Requests/Internal/DeleteOrderConfigRequest.php +0 -0
- package/server/src/Http/Resources/v1/Order.php +1 -1
- package/server/src/Http/Resources/v1/ServiceRate.php +34 -31
- package/server/src/Models/OrderConfig.php +48 -0
- package/server/src/Models/ServiceRate.php +9 -0
- package/server/src/Observers/CompanyObserver.php +20 -0
- package/server/src/Providers/FleetOpsServiceProvider.php +1 -0
- package/server/src/Support/FleetOps.php +137 -0
- package/translations/en-us.yaml +6 -1
|
@@ -16,6 +16,25 @@
|
|
|
16
16
|
<span class="dark:text-gray-100 text-sm ml-2">{{t "fleet-ops.component.activity-form-panel.completes-order"}}</span>
|
|
17
17
|
</Toggle>
|
|
18
18
|
</InputGroup>
|
|
19
|
+
<InputGroup @helpText={{t "fleet-ops.component.activity-form-panel.require-pod-help-text"}}>
|
|
20
|
+
<Toggle @isToggled={{this.activity.require_pod}} @onToggle={{fn (mut this.activity.require_pod)}} @helpText={{t "fleet-ops.component.activity-form-panel.require-pod-help-text"}}>
|
|
21
|
+
<span class="dark:text-gray-100 text-sm mx-2">{{t "fleet-ops.component.activity-form-panel.require-pod"}}</span>
|
|
22
|
+
</Toggle>
|
|
23
|
+
</InputGroup>
|
|
24
|
+
{{#if this.activity.require_pod}}
|
|
25
|
+
<InputGroup @name={{t "fleet-ops.component.activity-form-panel.select-pod-method"}}>
|
|
26
|
+
<select class="form-select w-full has--placeholder" {{on "change" this.setProofOfDeliveryMethod}}>
|
|
27
|
+
<option selected disabled>
|
|
28
|
+
{{t "fleet-ops.component.activity-form-panel.pod-method-placeholder"}}
|
|
29
|
+
</option>
|
|
30
|
+
{{#each this.podOptions as |podOption|}}
|
|
31
|
+
<option value={{podOption}} selected={{eq this.activity.pod_method podOption}}>
|
|
32
|
+
{{smart-humanize podOption}}
|
|
33
|
+
</option>
|
|
34
|
+
{{/each}}
|
|
35
|
+
</select>
|
|
36
|
+
</InputGroup>
|
|
37
|
+
{{/if}}
|
|
19
38
|
<ActivityLogicBuilder @activity={{this.activity}} @onChange={{this.updateActivityLogic}} class="mb-4" />
|
|
20
39
|
<ActivityEventSelector @activity={{this.activity}} @onChange={{this.updateActivityEvents}} />
|
|
21
40
|
<Spacer @height="300px" />
|
|
@@ -25,6 +25,13 @@ export default class ActivityFormPanelComponent extends Component {
|
|
|
25
25
|
*/
|
|
26
26
|
@tracked targetActivity;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Proof of delivery options.
|
|
30
|
+
*
|
|
31
|
+
* @memberof ActivityFormPanelComponent
|
|
32
|
+
*/
|
|
33
|
+
@tracked podOptions = ['scan', 'signature', 'photo'];
|
|
34
|
+
|
|
28
35
|
/**
|
|
29
36
|
* Constructor for ActivityFormPanelComponent.
|
|
30
37
|
* Applies context component arguments upon instantiation.
|
|
@@ -46,6 +53,17 @@ export default class ActivityFormPanelComponent extends Component {
|
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Sets the proof of delivery method to be used for this activity.
|
|
58
|
+
*
|
|
59
|
+
* @param {Event} event
|
|
60
|
+
* @memberof ActivityFormPanelComponent
|
|
61
|
+
*/
|
|
62
|
+
@action setProofOfDeliveryMethod(event) {
|
|
63
|
+
const value = event.target.value;
|
|
64
|
+
this.activity.set('pod_method', value);
|
|
65
|
+
}
|
|
66
|
+
|
|
49
67
|
/**
|
|
50
68
|
* Action method to set the activity code. It uses the underscore function to format
|
|
51
69
|
* the code and updates the status by capitalizing each word.
|
|
@@ -280,7 +280,6 @@ export default class LiveMapComponent extends Component {
|
|
|
280
280
|
this.tileSourceUrl = 'https://{s}.tile.jawg.io/jawg-matrix/{z}/{x}/{y}{r}.png?access-token=';
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
this.ready();
|
|
284
283
|
this.setupComponent();
|
|
285
284
|
}
|
|
286
285
|
|
|
@@ -332,7 +331,6 @@ export default class LiveMapComponent extends Component {
|
|
|
332
331
|
})
|
|
333
332
|
.finally(() => {
|
|
334
333
|
this.listen();
|
|
335
|
-
this.ready();
|
|
336
334
|
});
|
|
337
335
|
}
|
|
338
336
|
|
|
@@ -386,14 +384,23 @@ export default class LiveMapComponent extends Component {
|
|
|
386
384
|
* if available, or null if the function is skipped.
|
|
387
385
|
*/
|
|
388
386
|
async setInitialCoordinates() {
|
|
389
|
-
|
|
387
|
+
try {
|
|
388
|
+
const { latitude, longitude } = await this.location.getUserLocation();
|
|
389
|
+
|
|
390
|
+
this.latitude = latitude || this.location.DEFAULT_LATITUDE;
|
|
391
|
+
this.longitude = longitude || this.location.DEFAULT_LONGITUDE;
|
|
392
|
+
} catch (error) {
|
|
393
|
+
this.latitude = this.location.DEFAULT_LATITUDE;
|
|
394
|
+
this.longitude = this.location.DEFAULT_LONGITUDE;
|
|
395
|
+
}
|
|
390
396
|
|
|
391
|
-
this.latitude = latitude;
|
|
392
|
-
this.longitude = longitude;
|
|
393
397
|
this.ready();
|
|
394
398
|
|
|
395
|
-
//
|
|
396
|
-
this.universe.trigger('fleet-ops.live-map.has_coordinates', {
|
|
399
|
+
// Trigger that initial coordinates are set to live map component
|
|
400
|
+
this.universe.trigger('fleet-ops.live-map.has_coordinates', {
|
|
401
|
+
latitude: this.latitude,
|
|
402
|
+
longitude: this.longitude,
|
|
403
|
+
});
|
|
397
404
|
}
|
|
398
405
|
|
|
399
406
|
/**
|
|
@@ -81,16 +81,25 @@ export default class OrderConfigManagerDetailsComponent extends Component {
|
|
|
81
81
|
title: this.intl.t('fleet-ops.component.order-config-manager.details.delete.delete-title'),
|
|
82
82
|
body: this.intl.t('fleet-ops.component.order-config-manager.details.delete.delete-body-message'),
|
|
83
83
|
acceptButtonText: this.intl.t('fleet-ops.component.order-config-manager.details.delete.confirm-delete'),
|
|
84
|
-
confirm: () => {
|
|
84
|
+
confirm: (modal) => {
|
|
85
85
|
if (typeof this.args.onConfigDeleting === 'function') {
|
|
86
86
|
this.args.onConfigDeleting(this.config);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
modal.startLoading();
|
|
90
|
+
return this.config
|
|
91
|
+
.destroyRecord()
|
|
92
|
+
.then(() => {
|
|
93
|
+
if (typeof this.args.onConfigDeleted === 'function') {
|
|
94
|
+
this.args.onConfigDeleted(this.config);
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
.catch((error) => {
|
|
98
|
+
this.notifications.serverError(error);
|
|
99
|
+
})
|
|
100
|
+
.finally(() => {
|
|
101
|
+
modal.done();
|
|
102
|
+
});
|
|
94
103
|
},
|
|
95
104
|
});
|
|
96
105
|
}
|
|
@@ -5,6 +5,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
5
5
|
import { inject as service } from '@ember/service';
|
|
6
6
|
import { action } from '@ember/object';
|
|
7
7
|
import { isArray } from '@ember/array';
|
|
8
|
+
import { dasherize } from '@ember/string';
|
|
8
9
|
import { task } from 'ember-concurrency-decorators';
|
|
9
10
|
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
10
11
|
import getModelName from '@fleetbase/ember-core/utils/get-model-name';
|
|
@@ -156,14 +157,26 @@ export default class OrderConfigManagerComponent extends Component {
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
modal.startLoading();
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
orderConfig.set('key', dasherize(orderConfig.name));
|
|
161
|
+
orderConfig
|
|
162
|
+
.save()
|
|
163
|
+
.then((newOrderConfig) => {
|
|
164
|
+
this.notifications.success(this.intl.t('fleet-ops.component.order-config-manager.create-success-message'));
|
|
165
|
+
this.loadOrderConfigs.perform({
|
|
166
|
+
onAfter: () => {
|
|
167
|
+
this.selectConfig(newOrderConfig);
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
modal.done();
|
|
171
|
+
})
|
|
172
|
+
.catch((error) => {
|
|
173
|
+
modal.stopLoading();
|
|
174
|
+
this.notifications.serverError(error);
|
|
165
175
|
});
|
|
166
|
-
|
|
176
|
+
},
|
|
177
|
+
decline: (modal) => {
|
|
178
|
+
orderConfig.destroyRecord();
|
|
179
|
+
modal.done();
|
|
167
180
|
},
|
|
168
181
|
});
|
|
169
182
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Controller from '@ember/controller';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
|
+
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
4
5
|
|
|
5
6
|
export default class OperationsOrderConfigController extends Controller {
|
|
6
7
|
@tracked tab = 'details';
|
|
@@ -26,7 +27,7 @@ export default class OperationsOrderConfigController extends Controller {
|
|
|
26
27
|
* @memberof OperationsOrderConfigController
|
|
27
28
|
*/
|
|
28
29
|
@action onConfigChanged(config) {
|
|
29
|
-
this.config = config.id;
|
|
30
|
+
this.config = isModel(config) ? config.id : null;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
/**
|
|
@@ -534,6 +534,11 @@ export default class OperationsOrdersIndexNewController extends BaseController {
|
|
|
534
534
|
params.facilitator = this.order.facilitator.public_id;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
+
// filter by order config type
|
|
538
|
+
if (this.orderConfig) {
|
|
539
|
+
params.service_type = this.orderConfig.key;
|
|
540
|
+
}
|
|
541
|
+
|
|
537
542
|
if (shouldCheck) {
|
|
538
543
|
try {
|
|
539
544
|
serviceRates = await this.fetch.get(`service-rates/for-route`, params);
|
|
@@ -48,11 +48,11 @@ export default class OperationsServiceRatesIndexNewController extends BaseContro
|
|
|
48
48
|
@tracked serviceRate = this.store.createRecord('service-rate', { per_meter_unit: 'm' });
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Available order configs.
|
|
52
52
|
*
|
|
53
53
|
* @var {Array}
|
|
54
54
|
*/
|
|
55
|
-
@tracked
|
|
55
|
+
@tracked orderConfigs = [];
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Service areas.
|
|
@@ -75,6 +75,13 @@ export default class OperationsServiceRatesIndexNewController extends BaseContro
|
|
|
75
75
|
*/
|
|
76
76
|
@tracked isCreatingServiceRate = false;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The current selected order config.
|
|
80
|
+
*
|
|
81
|
+
* @var {OrderConfigModel|null}
|
|
82
|
+
*/
|
|
83
|
+
@tracked orderConfig;
|
|
84
|
+
|
|
78
85
|
/**
|
|
79
86
|
* True if updating service rate.
|
|
80
87
|
*
|
|
@@ -279,6 +286,20 @@ export default class OperationsServiceRatesIndexNewController extends BaseContro
|
|
|
279
286
|
});
|
|
280
287
|
}
|
|
281
288
|
|
|
289
|
+
@action setConfig(event) {
|
|
290
|
+
const orderConfigId = event.target.value;
|
|
291
|
+
if (!orderConfigId) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const orderConfig = this.store.peekRecord('order-config', orderConfigId);
|
|
296
|
+
if (orderConfig) {
|
|
297
|
+
this.orderConfig = orderConfig;
|
|
298
|
+
this.serviceRate.set('order_config_uuid', orderConfig.id);
|
|
299
|
+
this.serviceRate.set('service_type', orderConfig.key);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
282
303
|
/**
|
|
283
304
|
* Adds a per drop-off rate fee
|
|
284
305
|
*/
|
|
@@ -7,8 +7,20 @@ export default class OperationsServiceRatesIndexEditRoute extends Route {
|
|
|
7
7
|
@service currentUser;
|
|
8
8
|
@service notifications;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Re-use the new service rate form template.
|
|
12
|
+
*
|
|
13
|
+
* @memberof OperationsServiceRatesIndexEditRoute
|
|
14
|
+
*/
|
|
10
15
|
templateName = 'operations.service-rates.index.new';
|
|
11
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Handle any async error.
|
|
19
|
+
*
|
|
20
|
+
* @param {*} error
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @memberof OperationsServiceRatesIndexEditRoute
|
|
23
|
+
*/
|
|
12
24
|
@action error(error) {
|
|
13
25
|
this.notifications.serverError(error);
|
|
14
26
|
return this.transitionTo('operations.service-rates.index');
|
|
@@ -33,10 +45,7 @@ export default class OperationsServiceRatesIndexEditRoute extends Route {
|
|
|
33
45
|
controller.parcelFees = model.parcel_fees;
|
|
34
46
|
}
|
|
35
47
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
controller.serviceTypes = serviceTypes;
|
|
40
|
-
controller.serviceAreas = serviceAreas;
|
|
48
|
+
controller.orderConfigs = await this.store.findAll('order-config');
|
|
49
|
+
controller.serviceAreas = await this.store.findAll('service-area');
|
|
41
50
|
}
|
|
42
51
|
}
|
|
@@ -3,13 +3,9 @@ import { inject as service } from '@ember/service';
|
|
|
3
3
|
|
|
4
4
|
export default class OperationsServiceRatesIndexNewRoute extends Route {
|
|
5
5
|
@service store;
|
|
6
|
-
@service currentUser;
|
|
7
6
|
|
|
8
7
|
async setupController(controller) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
controller.serviceTypes = serviceTypes;
|
|
13
|
-
controller.serviceAreas = serviceAreas;
|
|
8
|
+
controller.orderConfigs = await this.store.findAll('order-config');
|
|
9
|
+
controller.serviceAreas = await this.store.findAll('service-area');
|
|
14
10
|
}
|
|
15
11
|
}
|
|
@@ -78,66 +78,74 @@ export default class LocationService extends Service {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Attempts to fetch the user's location from various sources
|
|
82
|
-
*
|
|
81
|
+
* Attempts to fetch the user's location from various sources including cached data,
|
|
82
|
+
* navigator geolocation, or WHOIS data. It first tries to get the cached coordinates.
|
|
83
|
+
* If not available or outdated, it tries the browser's geolocation API.
|
|
84
|
+
* As a fallback, it uses WHOIS data associated with the user's account.
|
|
85
|
+
*
|
|
83
86
|
* @returns {Promise<Object>} A promise that resolves to an object containing latitude and longitude.
|
|
84
87
|
*/
|
|
85
|
-
getUserLocation() {
|
|
86
|
-
|
|
88
|
+
async getUserLocation() {
|
|
89
|
+
// If the location has already been located, return the existing coordinates
|
|
90
|
+
if (this.located) {
|
|
91
|
+
return { latitude: this.latitude, longitude: this.longitude };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
const coordinates = await this.fetch.cachedGet('fleet-ops/live/coordinates', {}, { expirationInterval: 1, expirationIntervalUnit: 'hour' });
|
|
96
|
+
|
|
87
97
|
if (isBlank(coordinates)) {
|
|
88
|
-
return this.getUserLocationFromNavigator()
|
|
89
|
-
this.updateLocation(navigatorCoordinates);
|
|
90
|
-
return navigatorCoordinates;
|
|
91
|
-
});
|
|
98
|
+
return await this.getUserLocationFromNavigator();
|
|
92
99
|
}
|
|
93
100
|
|
|
94
|
-
if (isArray(coordinates)) {
|
|
95
|
-
|
|
101
|
+
if (isArray(coordinates) && coordinates.length > 0) {
|
|
102
|
+
// Ensure the coordinates array contains valid data
|
|
103
|
+
const validCoordinates = coordinates.find((point) => point.coordinates[0] !== 0 && point.coordinates[1] !== 0);
|
|
96
104
|
if (validCoordinates) {
|
|
97
|
-
const [longitude, latitude] =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
longitude,
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
this.updateLocation(userCoordinates);
|
|
104
|
-
return userCoordinates;
|
|
105
|
+
const [longitude, latitude] = validCoordinates.coordinates;
|
|
106
|
+
this.updateLocation({ latitude, longitude });
|
|
107
|
+
return { latitude, longitude };
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
return this.getUserLocationFromWhois();
|
|
109
|
-
})
|
|
111
|
+
return await this.getUserLocationFromWhois();
|
|
112
|
+
} catch (error) {
|
|
113
|
+
return await this.getUserLocationFromWhois();
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
/**
|
|
113
118
|
* Retrieves the user's location using the browser's navigator geolocation API.
|
|
114
|
-
*
|
|
119
|
+
* It creates a promise that resolves with the geolocation if successful,
|
|
120
|
+
* or with WHOIS data as a fallback in case of failure or absence of navigator geolocation.
|
|
121
|
+
*
|
|
122
|
+
* @returns {Promise<Object>} A promise that resolves to geolocation coordinates or WHOIS data.
|
|
115
123
|
*/
|
|
116
|
-
getUserLocationFromNavigator() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
);
|
|
124
|
+
async getUserLocationFromNavigator() {
|
|
125
|
+
if (window.navigator && window.navigator.geolocation) {
|
|
126
|
+
try {
|
|
127
|
+
const position = await new Promise((resolve, reject) => {
|
|
128
|
+
navigator.geolocation.getCurrentPosition(resolve, reject, {
|
|
129
|
+
enableHighAccuracy: true,
|
|
130
|
+
timeout: 600,
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
const { latitude, longitude } = position.coords;
|
|
134
|
+
this.updateLocation({ latitude, longitude });
|
|
135
|
+
return { latitude, longitude };
|
|
136
|
+
} catch (error) {
|
|
137
|
+
return await this.getUserLocationFromWhois();
|
|
131
138
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
});
|
|
139
|
+
} else {
|
|
140
|
+
return await this.getUserLocationFromWhois();
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
/**
|
|
139
|
-
* Retrieves the user's location based on WHOIS data associated with
|
|
140
|
-
*
|
|
145
|
+
* Retrieves the user's location based on WHOIS data associated with their account.
|
|
146
|
+
* Defaults to predefined coordinates if WHOIS data is not available.
|
|
147
|
+
*
|
|
148
|
+
* @returns {Object} An object containing latitude and longitude from WHOIS data or default values.
|
|
141
149
|
*/
|
|
142
150
|
getUserLocationFromWhois() {
|
|
143
151
|
const whois = this.currentUser.getOption('whois');
|
|
@@ -151,8 +159,10 @@ export default class LocationService extends Service {
|
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
/**
|
|
154
|
-
* Updates the service's tracked properties with the new location data
|
|
155
|
-
*
|
|
162
|
+
* Updates the service's tracked properties with the new location data.
|
|
163
|
+
* Triggers an event to notify other parts of the application that the user's location has been updated.
|
|
164
|
+
*
|
|
165
|
+
* @param {Object} coordinates - An object containing the latitude and longitude to be set.
|
|
156
166
|
*/
|
|
157
167
|
updateLocation({ latitude, longitude }) {
|
|
158
168
|
this.latitude = latitude;
|
|
@@ -17,7 +17,16 @@
|
|
|
17
17
|
|
|
18
18
|
<div class="input-group">
|
|
19
19
|
<InputLabel @labelText={{t "fleet-ops.operations.service-rates.index.new.service-order-label"}} @helpText={{t "fleet-ops.operations.service-rates.index.new.service-order-help-text"}} />
|
|
20
|
-
<
|
|
20
|
+
<select class="form-select w-full has--placeholder" {{on "change" this.setConfig}}>
|
|
21
|
+
<option selected disabled>
|
|
22
|
+
{{t "fleet-ops.operations.service-rates.index.new.service-order-placeholder"}}
|
|
23
|
+
</option>
|
|
24
|
+
{{#each this.orderConfigs as |orderConfig|}}
|
|
25
|
+
<option value={{orderConfig.id}} selected={{eq orderConfig.id this.serviceRate.order_config_uuid}}>
|
|
26
|
+
{{orderConfig.name}}
|
|
27
|
+
</option>
|
|
28
|
+
{{/each}}
|
|
29
|
+
</select>
|
|
21
30
|
</div>
|
|
22
31
|
|
|
23
32
|
<div class="input-group">
|
package/composer.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleetbase/fleetops-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
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.12",
|
|
26
26
|
"barryvdh/laravel-dompdf": "^2.0",
|
|
27
27
|
"brick/geo": "0.7.2",
|
|
28
28
|
"cknow/laravel-money": "^7.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"autoload": {
|
|
46
46
|
"psr-4": {
|
|
47
47
|
"Fleetbase\\FleetOps\\": "server/src/",
|
|
48
|
-
"Fleetbase\\FleetOps\\Seeders\\": "seeders/"
|
|
48
|
+
"Fleetbase\\FleetOps\\Seeders\\": "server/seeders/"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"autoload-dev": {
|
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.19",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"fleetbase": {
|
|
6
6
|
"route": "fleet-ops"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/core": "^7.23.2",
|
|
45
|
-
"@fleetbase/ember-core": "^0.2.
|
|
45
|
+
"@fleetbase/ember-core": "^0.2.6",
|
|
46
46
|
"@fleetbase/ember-ui": "^0.2.11",
|
|
47
|
-
"@fleetbase/fleetops-data": "^0.1.
|
|
47
|
+
"@fleetbase/fleetops-data": "^0.1.14",
|
|
48
48
|
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
|
49
49
|
"@fortawesome/ember-fontawesome": "^0.4.1",
|
|
50
50
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|