@bringg/dashboard-sdk 9.54.0 → 9.54.1107-pre
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/dist/PlannedRoutes/Entity/PlannedRoutesEntity.d.ts +2 -1
- package/dist/PlannedRoutes/Entity/PlannedRoutesEntity.js +9 -1
- package/dist/PlannedRoutes/Entity/PlannedRoutesEntity.js.map +1 -1
- package/dist/PlannedRoutes/PlannedRoutes.consts.d.ts +15 -0
- package/dist/PlannedRoutes/PlannedRoutes.consts.js +8 -0
- package/dist/PlannedRoutes/PlannedRoutes.consts.js.map +1 -1
- package/dist/PlannedRoutes/PlannedRoutesApi.d.ts +2 -0
- package/dist/PlannedRoutes/PlannedRoutesApi.js +3 -0
- package/dist/PlannedRoutes/PlannedRoutesApi.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/Task/v2/task-merger.js +6 -2
- package/dist/Task/v2/task-merger.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +27 -4
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +5 -5
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ConflictingPlannedRoutesResponse } from '@bringg/types';
|
|
|
2
2
|
import { CommonOptions } from '../../Core/RouteGenerator';
|
|
3
3
|
import StoreEntity from '../../Core/StoreEntity';
|
|
4
4
|
import Session from '../../Services/Identity/Session';
|
|
5
|
-
import { PlannedRoutesResponse } from '../PlannedRoutes.consts';
|
|
5
|
+
import { PlannedRoutesResponse, WeatherConditionData } from '../PlannedRoutes.consts';
|
|
6
6
|
export declare const extractor: (response: PlannedRoutesResponse) => import("@bringg/types").PlannedRoute[];
|
|
7
7
|
declare class PlannedRoutesEntity extends StoreEntity<Bringg.PlannedRoute> {
|
|
8
8
|
constructor(session: Session);
|
|
@@ -11,5 +11,6 @@ declare class PlannedRoutesEntity extends StoreEntity<Bringg.PlannedRoute> {
|
|
|
11
11
|
getBatch(ids: number[], commonOptions?: CommonOptions): Promise<Bringg.PlannedRoute[]>;
|
|
12
12
|
getBatchByTeamIds(team_ids: number[], commonOptions?: CommonOptions): Promise<Bringg.PlannedRoute[]>;
|
|
13
13
|
conflictPlannedRoutes(run_id: number): Promise<ConflictingPlannedRoutesResponse>;
|
|
14
|
+
getWeatherConditions(routeIds: number[]): Promise<WeatherConditionData[]>;
|
|
14
15
|
}
|
|
15
16
|
export default PlannedRoutesEntity;
|
|
@@ -27,7 +27,8 @@ var Routes = {
|
|
|
27
27
|
GET_PLANNED_ROUTES_BY_TEAM: '/teams/{:teamId}/planned_routes',
|
|
28
28
|
GET_BATCH_BY_TEAM_IDS: '/planned_routes/batch_get',
|
|
29
29
|
GET_BATCH: '/planned_routes/batch_get_by_ids',
|
|
30
|
-
POST_CONFLICT_PLANNED_ROUTES: '/data-query-service/conflicting-planned-routes'
|
|
30
|
+
POST_CONFLICT_PLANNED_ROUTES: '/data-query-service/conflicting-planned-routes',
|
|
31
|
+
GET_WEATHER_CONDITIONS: '/data-query-service/weather'
|
|
31
32
|
};
|
|
32
33
|
var PlannedRoutesEntity = /** @class */ (function (_super) {
|
|
33
34
|
__extends(PlannedRoutesEntity, _super);
|
|
@@ -74,6 +75,13 @@ var PlannedRoutesEntity = /** @class */ (function (_super) {
|
|
|
74
75
|
PlannedRoutesEntity.prototype.conflictPlannedRoutes = function (run_id) {
|
|
75
76
|
return this.service.routeGenerator.post(Routes.POST_CONFLICT_PLANNED_ROUTES).withPayload({ run_id: run_id }).invoke();
|
|
76
77
|
};
|
|
78
|
+
PlannedRoutesEntity.prototype.getWeatherConditions = function (routeIds) {
|
|
79
|
+
return this.service.routeGenerator
|
|
80
|
+
.get(Routes.GET_WEATHER_CONDITIONS)
|
|
81
|
+
.withQueryString({ route_ids: routeIds })
|
|
82
|
+
.setException("Could not fetch weather conditions for routes ".concat(routeIds.toString()))
|
|
83
|
+
.invoke();
|
|
84
|
+
};
|
|
77
85
|
return PlannedRoutesEntity;
|
|
78
86
|
}(StoreEntity_1.default));
|
|
79
87
|
exports.default = PlannedRoutesEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlannedRoutesEntity.js","sourceRoot":"","sources":["../../../src/PlannedRoutes/Entity/PlannedRoutesEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,4CAA+C;AAE/C,uEAAiD;AAI1C,IAAM,SAAS,GAAG,UAAC,QAA+B,IAAK,OAAA,QAAQ,CAAC,cAAc,EAAvB,CAAuB,CAAC;AAAzE,QAAA,SAAS,aAAgE;AAEtF,IAAM,MAAM,GAAG;IACd,0BAA0B,EAAE,iCAAiC;IAC7D,qBAAqB,EAAE,2BAA2B;IAClD,SAAS,EAAE,kCAAkC;IAC7C,4BAA4B,EAAE,gDAAgD;
|
|
1
|
+
{"version":3,"file":"PlannedRoutesEntity.js","sourceRoot":"","sources":["../../../src/PlannedRoutes/Entity/PlannedRoutesEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,4CAA+C;AAE/C,uEAAiD;AAI1C,IAAM,SAAS,GAAG,UAAC,QAA+B,IAAK,OAAA,QAAQ,CAAC,cAAc,EAAvB,CAAuB,CAAC;AAAzE,QAAA,SAAS,aAAgE;AAEtF,IAAM,MAAM,GAAG;IACd,0BAA0B,EAAE,iCAAiC;IAC7D,qBAAqB,EAAE,2BAA2B;IAClD,SAAS,EAAE,kCAAkC;IAC7C,4BAA4B,EAAE,gDAAgD;IAC9E,sBAAsB,EAAE,6BAA6B;CACrD,CAAC;AAEF;IAAkC,uCAAgC;IACjE,6BAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,gBAAgB;YAC5B,MAAM,EAAE,CAAC,mBAAU,CAAC,MAAM,CAAC;SAC3B,CAAC;IACH,CAAC;IAED,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A5B,UAA6B,MAAc;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/G,CAAC;IAEM,kDAAoB,GAA3B,UAA4B,QAAkB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;aAChC,GAAG,CAAC,MAAM,CAAC,sBAAsB,CAAC;aAClC,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;aACxC,YAAY,CAAC,wDAAiD,QAAQ,CAAC,QAAQ,EAAE,CAAE,CAAC;aACpF,MAAM,EAAE,CAAC;IACZ,CAAC;IACF,0BAAC;AAAD,CAAC,AAtDD,CAAkC,qBAAW,GAsD5C;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -3,3 +3,18 @@ export type PlannedRoutesResponse = {
|
|
|
3
3
|
success: boolean;
|
|
4
4
|
planned_routes: PlannedRoute[];
|
|
5
5
|
};
|
|
6
|
+
export declare enum Severity {
|
|
7
|
+
green = 1,
|
|
8
|
+
yellow = 2,
|
|
9
|
+
orange = 3,
|
|
10
|
+
red = 4
|
|
11
|
+
}
|
|
12
|
+
export type RouteCondition = 'rain' | 'snow' | 'thunderstorm' | 'cyclone' | 'road work' | 'flood' | 'ice on road' | 'traffic jam' | 'crash';
|
|
13
|
+
export interface WeatherConditionData {
|
|
14
|
+
severity: Severity;
|
|
15
|
+
weather_risk: boolean;
|
|
16
|
+
traffic_risk: boolean;
|
|
17
|
+
explanation: string;
|
|
18
|
+
expected_delay_percent: number;
|
|
19
|
+
conditions_list: RouteCondition[];
|
|
20
|
+
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Severity = void 0;
|
|
4
|
+
var Severity;
|
|
5
|
+
(function (Severity) {
|
|
6
|
+
Severity[Severity["green"] = 1] = "green";
|
|
7
|
+
Severity[Severity["yellow"] = 2] = "yellow";
|
|
8
|
+
Severity[Severity["orange"] = 3] = "orange";
|
|
9
|
+
Severity[Severity["red"] = 4] = "red";
|
|
10
|
+
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
3
11
|
//# sourceMappingURL=PlannedRoutes.consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlannedRoutes.consts.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutes.consts.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"PlannedRoutes.consts.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutes.consts.ts"],"names":[],"mappings":";;;AAOA,IAAY,QAKX;AALD,WAAY,QAAQ;IACnB,yCAAS,CAAA;IACT,2CAAU,CAAA;IACV,2CAAU,CAAA;IACV,qCAAO,CAAA;AACR,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PlannedRoute } from '@bringg/types';
|
|
2
2
|
import { CommonOptions } from '../Core/RouteGenerator';
|
|
3
3
|
import Session from '../Services/Identity/Session';
|
|
4
|
+
import { WeatherConditionData } from './PlannedRoutes.consts';
|
|
4
5
|
export default class PlannedRoutes {
|
|
5
6
|
private plannedRoutesEntity;
|
|
6
7
|
constructor(session: Session);
|
|
@@ -9,4 +10,5 @@ export default class PlannedRoutes {
|
|
|
9
10
|
getBatchByTeamIds(teamIds: number[], commonOptions?: CommonOptions): Promise<PlannedRoute[]>;
|
|
10
11
|
getBatch(ids: number[], options?: CommonOptions): Promise<PlannedRoute[]>;
|
|
11
12
|
conflictPlannedRoutes(runId: number): Promise<import("@bringg/types").ConflictingPlannedRoutesResponse>;
|
|
13
|
+
getWeatherConditions(routeIds: number[]): Promise<WeatherConditionData[]>;
|
|
12
14
|
}
|
|
@@ -23,6 +23,9 @@ var PlannedRoutes = /** @class */ (function () {
|
|
|
23
23
|
PlannedRoutes.prototype.conflictPlannedRoutes = function (runId) {
|
|
24
24
|
return this.plannedRoutesEntity.conflictPlannedRoutes(runId);
|
|
25
25
|
};
|
|
26
|
+
PlannedRoutes.prototype.getWeatherConditions = function (routeIds) {
|
|
27
|
+
return this.plannedRoutesEntity.getWeatherConditions(routeIds);
|
|
28
|
+
};
|
|
26
29
|
return PlannedRoutes;
|
|
27
30
|
}());
|
|
28
31
|
exports.default = PlannedRoutes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlannedRoutesApi.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutesApi.ts"],"names":[],"mappings":";;;;;AAIA,qFAA+D;
|
|
1
|
+
{"version":3,"file":"PlannedRoutesApi.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutesApi.ts"],"names":[],"mappings":";;;;;AAIA,qFAA+D;AAG/D;IAGC,uBAAY,OAAgB;QAC3B,IAAI,CAAC,mBAAmB,GAAG,IAAI,6BAAmB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAEM,oCAAY,GAAnB,UAAoB,MAAc,EAAE,aAA6B;QAChE,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrE,CAAC;IAEM,8BAAM,GAAb;QACC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC;IAEM,yCAAiB,GAAxB,UAAyB,OAAiB,EAAE,aAA6B;QACxE,OAAO,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC3E,CAAC;IAEM,gCAAQ,GAAf,UAAgB,GAAa,EAAE,OAAuB;QACrD,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAEM,6CAAqB,GAA5B,UAA6B,KAAa;QACzC,OAAO,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;IAEM,4CAAoB,GAA3B,UAA4B,QAAkB;QAC7C,OAAO,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAChE,CAAC;IACF,oBAAC;AAAD,CAAC,AA9BD,IA8BC"}
|
|
@@ -56,7 +56,7 @@ var lodash_1 = require("lodash");
|
|
|
56
56
|
var BringgException_1 = require("../Core/BringgException");
|
|
57
57
|
var Logger_1 = __importDefault(require("../Core/Logger"));
|
|
58
58
|
var abort_1 = require("../utils/abort");
|
|
59
|
-
var version = '9.54.
|
|
59
|
+
var version = '9.54.1107-pre';
|
|
60
60
|
function logErrorResponse(response) {
|
|
61
61
|
var data = response.data, status = response.status;
|
|
62
62
|
try {
|
|
@@ -26,6 +26,7 @@ var removeInventories = function (result, isTaskNewFromRealtimeEvent, hasInvento
|
|
|
26
26
|
}
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
|
+
var LOAD_ACTIONS = ['load', 'loadPlanningTasks', 'loadOpenTasks', 'loadInvalid'];
|
|
29
30
|
function mergeTaskIntoExisting(_a) {
|
|
30
31
|
var tasksStore = _a.tasksStore, task = _a.task, _b = _a.shouldRemoveInventories, shouldRemoveInventories = _b === void 0 ? false : _b, params = _a.params;
|
|
31
32
|
var way_points = task.way_points;
|
|
@@ -36,8 +37,11 @@ function mergeTaskIntoExisting(_a) {
|
|
|
36
37
|
var hasInventoriesInStore = !!(existingTask === null || existingTask === void 0 ? void 0 : existingTask.task_inventories);
|
|
37
38
|
var result = merge_mapper_1.mergeMapper.mergeIntoExisting(tasksStore, task);
|
|
38
39
|
if (shouldRemoveInventories) {
|
|
39
|
-
var
|
|
40
|
-
|
|
40
|
+
var isLoadAction = LOAD_ACTIONS.includes(params === null || params === void 0 ? void 0 : params.action);
|
|
41
|
+
if (!isLoadAction) {
|
|
42
|
+
var isTaskNewFromRealtimeEvent = !existingTask;
|
|
43
|
+
return removeInventories(result, isTaskNewFromRealtimeEvent, hasInventoriesInStore);
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
return result;
|
|
43
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-merger.js","sourceRoot":"","sources":["../../../src/Task/v2/task-merger.ts"],"names":[],"mappings":";;;AAEA,wDAAsD;AAItD,SAAS,kBAAkB,CAAC,SAAgB;IAC3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QAC9B,OAAO,KAAK,CAAC;KACb;IAED,OAAO,SAAS,CAAC,KAAK,CAAC,UAAA,IAAI;QAC1B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;YACxC,OAAO,IAAI,CAAC;SACZ;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;SACtC;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,IAAM,iBAAiB,GAAG,UACzB,MAAgC,EAChC,0BAAmC,EACnC,qBAA8B;IAE9B,IAAM,mBAAmB,GACxB,MAAM,CAAC,IAAI;QACX,MAAM,CAAC,IAAI,CAAC,gBAAgB;QAC5B,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC;QAChD,CAAC,qBAAqB,CAAC;IAExB,IAAI,mBAAmB,IAAI,0BAA0B,EAAE;QACtD,OAAO,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;KACvC;IAED,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,SAAS,qBAAqB,CAAC,EAU9B;QATA,UAAU,gBAAA,EACV,IAAI,UAAA,EACJ,+BAA+B,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAC/B,MA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M,CAAC;AACf,CAAC;AAEY,QAAA,UAAU,GAAG,EAAE,qBAAqB,uBAAA,EAAE,CAAC"}
|
|
@@ -16333,7 +16333,8 @@ var Routes = {
|
|
|
16333
16333
|
GET_PLANNED_ROUTES_BY_TEAM: '/teams/{:teamId}/planned_routes',
|
|
16334
16334
|
GET_BATCH_BY_TEAM_IDS: '/planned_routes/batch_get',
|
|
16335
16335
|
GET_BATCH: '/planned_routes/batch_get_by_ids',
|
|
16336
|
-
POST_CONFLICT_PLANNED_ROUTES: '/data-query-service/conflicting-planned-routes'
|
|
16336
|
+
POST_CONFLICT_PLANNED_ROUTES: '/data-query-service/conflicting-planned-routes',
|
|
16337
|
+
GET_WEATHER_CONDITIONS: '/data-query-service/weather'
|
|
16337
16338
|
};
|
|
16338
16339
|
var PlannedRoutesEntity = /** @class */ (function (_super) {
|
|
16339
16340
|
__extends(PlannedRoutesEntity, _super);
|
|
@@ -16380,6 +16381,13 @@ var PlannedRoutesEntity = /** @class */ (function (_super) {
|
|
|
16380
16381
|
PlannedRoutesEntity.prototype.conflictPlannedRoutes = function (run_id) {
|
|
16381
16382
|
return this.service.routeGenerator.post(Routes.POST_CONFLICT_PLANNED_ROUTES).withPayload({ run_id: run_id }).invoke();
|
|
16382
16383
|
};
|
|
16384
|
+
PlannedRoutesEntity.prototype.getWeatherConditions = function (routeIds) {
|
|
16385
|
+
return this.service.routeGenerator
|
|
16386
|
+
.get(Routes.GET_WEATHER_CONDITIONS)
|
|
16387
|
+
.withQueryString({ route_ids: routeIds })
|
|
16388
|
+
.setException("Could not fetch weather conditions for routes ".concat(routeIds.toString()))
|
|
16389
|
+
.invoke();
|
|
16390
|
+
};
|
|
16383
16391
|
return PlannedRoutesEntity;
|
|
16384
16392
|
}(StoreEntity_1.default));
|
|
16385
16393
|
exports["default"] = PlannedRoutesEntity;
|
|
@@ -16393,6 +16401,14 @@ exports["default"] = PlannedRoutesEntity;
|
|
|
16393
16401
|
"use strict";
|
|
16394
16402
|
|
|
16395
16403
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
16404
|
+
exports.Severity = void 0;
|
|
16405
|
+
var Severity;
|
|
16406
|
+
(function (Severity) {
|
|
16407
|
+
Severity[Severity["green"] = 1] = "green";
|
|
16408
|
+
Severity[Severity["yellow"] = 2] = "yellow";
|
|
16409
|
+
Severity[Severity["orange"] = 3] = "orange";
|
|
16410
|
+
Severity[Severity["red"] = 4] = "red";
|
|
16411
|
+
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
16396
16412
|
//# sourceMappingURL=PlannedRoutes.consts.js.map
|
|
16397
16413
|
|
|
16398
16414
|
/***/ }),
|
|
@@ -16426,6 +16442,9 @@ var PlannedRoutes = /** @class */ (function () {
|
|
|
16426
16442
|
PlannedRoutes.prototype.conflictPlannedRoutes = function (runId) {
|
|
16427
16443
|
return this.plannedRoutesEntity.conflictPlannedRoutes(runId);
|
|
16428
16444
|
};
|
|
16445
|
+
PlannedRoutes.prototype.getWeatherConditions = function (routeIds) {
|
|
16446
|
+
return this.plannedRoutesEntity.getWeatherConditions(routeIds);
|
|
16447
|
+
};
|
|
16429
16448
|
return PlannedRoutes;
|
|
16430
16449
|
}());
|
|
16431
16450
|
exports["default"] = PlannedRoutes;
|
|
@@ -22426,7 +22445,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
22426
22445
|
var BringgException_1 = __webpack_require__(43605);
|
|
22427
22446
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
22428
22447
|
var abort_1 = __webpack_require__(34179);
|
|
22429
|
-
var version = '9.54.
|
|
22448
|
+
var version = '9.54.1107-pre';
|
|
22430
22449
|
function logErrorResponse(response) {
|
|
22431
22450
|
var data = response.data, status = response.status;
|
|
22432
22451
|
try {
|
|
@@ -25176,6 +25195,7 @@ var removeInventories = function (result, isTaskNewFromRealtimeEvent, hasInvento
|
|
|
25176
25195
|
}
|
|
25177
25196
|
return result;
|
|
25178
25197
|
};
|
|
25198
|
+
var LOAD_ACTIONS = ['load', 'loadPlanningTasks', 'loadOpenTasks', 'loadInvalid'];
|
|
25179
25199
|
function mergeTaskIntoExisting(_a) {
|
|
25180
25200
|
var tasksStore = _a.tasksStore, task = _a.task, _b = _a.shouldRemoveInventories, shouldRemoveInventories = _b === void 0 ? false : _b, params = _a.params;
|
|
25181
25201
|
var way_points = task.way_points;
|
|
@@ -25186,8 +25206,11 @@ function mergeTaskIntoExisting(_a) {
|
|
|
25186
25206
|
var hasInventoriesInStore = !!(existingTask === null || existingTask === void 0 ? void 0 : existingTask.task_inventories);
|
|
25187
25207
|
var result = merge_mapper_1.mergeMapper.mergeIntoExisting(tasksStore, task);
|
|
25188
25208
|
if (shouldRemoveInventories) {
|
|
25189
|
-
var
|
|
25190
|
-
|
|
25209
|
+
var isLoadAction = LOAD_ACTIONS.includes(params === null || params === void 0 ? void 0 : params.action);
|
|
25210
|
+
if (!isLoadAction) {
|
|
25211
|
+
var isTaskNewFromRealtimeEvent = !existingTask;
|
|
25212
|
+
return removeInventories(result, isTaskNewFromRealtimeEvent, hasInventoriesInStore);
|
|
25213
|
+
}
|
|
25191
25214
|
}
|
|
25192
25215
|
return result;
|
|
25193
25216
|
}
|