@fleetbase/fleetops-engine 0.0.8 → 0.1.0
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.
|
@@ -3,13 +3,12 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action, computed, set } from '@ember/object';
|
|
5
5
|
import { isArray } from '@ember/array';
|
|
6
|
-
import {
|
|
6
|
+
import { isBlank } from '@ember/utils';
|
|
7
7
|
import { dasherize } from '@ember/string';
|
|
8
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 config from 'ember-get-config';
|
|
13
12
|
|
|
14
13
|
const DEFAULT_LATITUDE = 1.369;
|
|
15
14
|
const DEFAULT_LONGITUDE = 103.8864;
|
|
@@ -17,6 +16,7 @@ const DEFAULT_LONGITUDE = 103.8864;
|
|
|
17
16
|
export default class LiveMapComponent extends Component {
|
|
18
17
|
@service store;
|
|
19
18
|
@service fetch;
|
|
19
|
+
@service socket;
|
|
20
20
|
@service currentUser;
|
|
21
21
|
@service notifications;
|
|
22
22
|
@service serviceAreas;
|
|
@@ -146,7 +146,7 @@ export default class LiveMapComponent extends Component {
|
|
|
146
146
|
if (index > 0) {
|
|
147
147
|
const options = this.currentContextMenuItems.objectAt(index);
|
|
148
148
|
|
|
149
|
-
if (!
|
|
149
|
+
if (!isBlank(options)) {
|
|
150
150
|
options.text = this.isDrawControlsVisible ? 'Hide draw controls...' : 'Enable draw controls...';
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -322,7 +322,7 @@ export default class LiveMapComponent extends Component {
|
|
|
322
322
|
*/
|
|
323
323
|
|
|
324
324
|
@action removeDrawingControl() {
|
|
325
|
-
if (
|
|
325
|
+
if (isBlank(this.drawControl)) {
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -681,10 +681,9 @@ export default class LiveMapComponent extends Component {
|
|
|
681
681
|
* Functions are used to fetch date or handle socket callbacks/initializations.
|
|
682
682
|
*
|
|
683
683
|
*/
|
|
684
|
-
|
|
685
684
|
@action watchDrivers(drivers = []) {
|
|
686
685
|
// setup socket
|
|
687
|
-
const socket =
|
|
686
|
+
const socket = this.socket.instance();
|
|
688
687
|
|
|
689
688
|
// listen for stivers
|
|
690
689
|
for (let i = 0; i < drivers.length; i++) {
|
|
@@ -4,11 +4,11 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action, computed, set } from '@ember/object';
|
|
5
5
|
import { equal } from '@ember/object/computed';
|
|
6
6
|
import isModel from '@fleetbase/ember-core/utils/is-model';
|
|
7
|
-
import config from 'ember-get-config';
|
|
8
7
|
|
|
9
8
|
export default class OrderConfigComponent extends Component {
|
|
10
9
|
@service modalsManager;
|
|
11
10
|
@service fetch;
|
|
11
|
+
@service socket;
|
|
12
12
|
@service store;
|
|
13
13
|
@service notifications;
|
|
14
14
|
@service crud;
|
|
@@ -259,7 +259,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
259
259
|
const channelId = `${extension.id}:${this.currentUser.id}`;
|
|
260
260
|
|
|
261
261
|
// setup socket
|
|
262
|
-
const socket =
|
|
262
|
+
const socket = this.socket.instance();
|
|
263
263
|
|
|
264
264
|
// get channel
|
|
265
265
|
const channel = socket.subscribe(channelId);
|
package/package.json
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
"name": "@fleetbase/fleetops-engine",
|
|
3
3
|
"extension": "Fleet Ops",
|
|
4
4
|
"icon": "route",
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "0.1.0",
|
|
6
6
|
"priority": 0,
|
|
7
|
+
"fleetbase": {
|
|
8
|
+
"dashboard": "int/v1/fleet-ops/dashboard"
|
|
9
|
+
},
|
|
7
10
|
"description": "Fleetbase Fleet-Ops extension provides a fleet management and last mile delivery operations system module.",
|
|
8
11
|
"keywords": [
|
|
9
12
|
"fleetbase-extension",
|
|
@@ -36,8 +39,8 @@
|
|
|
36
39
|
"test:ember-compatibility": "ember try:each"
|
|
37
40
|
},
|
|
38
41
|
"dependencies": {
|
|
39
|
-
"@fleetbase/ember-core": "^0.0.
|
|
40
|
-
"@fleetbase/ember-ui": "^0.0.
|
|
42
|
+
"@fleetbase/ember-core": "^0.0.4",
|
|
43
|
+
"@fleetbase/ember-ui": "^0.0.7",
|
|
41
44
|
"@fleetbase/fleetops-data": "^0.0.2",
|
|
42
45
|
"@fleetbase/leaflet-routing-machine": "^3.2.15",
|
|
43
46
|
"@fortawesome/ember-fontawesome": "^0.4.1",
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
"ember-cli-es6-transform": "^1.0.0",
|
|
52
55
|
"ember-cli-htmlbars": "^6.1.0",
|
|
53
56
|
"ember-leaflet": "^5.1.1",
|
|
54
|
-
"ember-radio-button": "3.0.0-beta.1",
|
|
57
|
+
"ember-radio-button": "^3.0.0-beta.1",
|
|
55
58
|
"ember-wormhole": "^0.6.0",
|
|
56
59
|
"leaflet": "^1.9.4",
|
|
57
60
|
"leaflet-contextmenu": "^1.4.0",
|