@crystaldesign/web-planner-logic 25.3.0-beta.18 → 25.3.0-beta.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/build/cjs/{DivaBoxPlanner-de468027.js → DivaBoxPlanner-1a7853f2.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-1dd1defa.js → DivaStandardPlanner-ceca3901.js} +2 -2
- package/build/cjs/{DoorPlanner-752ec417.js → DoorPlanner-a0385fd8.js} +1 -1
- package/build/cjs/{Host3DSignalR-87835538.js → Host3DSignalR-7fab26d7.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-65d46ddd.js → LiviqueWWSHandler-62f9e3c6.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-57e8727d.js → PfisterWWSHandler-7977e1d8.js} +1 -1
- package/build/cjs/{PlannerHandler2D-26e34923.js → PlannerHandler2D-ff44402a.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-44baa629.js → SeriousBasketHandler-503bc153.js} +1 -1
- package/build/cjs/{ShelfPlanner-ed71e8b6.js → ShelfPlanner-3fec6ada.js} +1 -1
- package/build/cjs/{StandardWWSHandler-cc2decaf.js → StandardWWSHandler-3f920d18.js} +1 -1
- package/build/cjs/{index-2ecdfcea.js → index-bc62cd46.js} +341 -312
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-7c18cb20.js → DivaBoxPlanner-48803ce3.js} +2 -2
- package/build/esm/{DivaStandardPlanner-cf1719d1.js → DivaStandardPlanner-ce7927f6.js} +2 -2
- package/build/esm/{DoorPlanner-fcdcf791.js → DoorPlanner-f893f34e.js} +1 -1
- package/build/esm/{Host3DSignalR-de2d0fb4.js → Host3DSignalR-b2645aac.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-6abc6ed0.js → LiviqueWWSHandler-7a582c3d.js} +1 -1
- package/build/esm/{PfisterWWSHandler-3592cb0a.js → PfisterWWSHandler-9f3a0b55.js} +1 -1
- package/build/esm/{PlannerHandler2D-412d4225.js → PlannerHandler2D-d57ebcdc.js} +1 -1
- package/build/esm/{SeriousBasketHandler-a4bfc054.js → SeriousBasketHandler-19a9ff95.js} +1 -1
- package/build/esm/{ShelfPlanner-79da7b85.js → ShelfPlanner-1e795caa.js} +1 -1
- package/build/esm/{StandardWWSHandler-7fb93076.js → StandardWWSHandler-454f0faa.js} +1 -1
- package/build/esm/{index-5e88a132.js → index-30e0f4dc.js} +341 -312
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -24089,7 +24089,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24089
24089
|
break;
|
|
24090
24090
|
}
|
|
24091
24091
|
_context.next = 4;
|
|
24092
|
-
return import('./ShelfPlanner-
|
|
24092
|
+
return import('./ShelfPlanner-1e795caa.js');
|
|
24093
24093
|
case 4:
|
|
24094
24094
|
_yield$import = _context.sent;
|
|
24095
24095
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -25057,7 +25057,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25057
25057
|
value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
|
|
25058
25058
|
function () {
|
|
25059
25059
|
var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
|
|
25060
|
-
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId
|
|
25060
|
+
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
|
|
25061
25061
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25062
25062
|
while (1) switch (_context.prev = _context.next) {
|
|
25063
25063
|
case 0:
|
|
@@ -25081,12 +25081,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25081
25081
|
articleCodex: articleCodex
|
|
25082
25082
|
}
|
|
25083
25083
|
}));
|
|
25084
|
-
(
|
|
25085
|
-
|
|
25086
|
-
title: set.i18n.t('modals.error_accured')
|
|
25087
|
-
});
|
|
25088
|
-
return _context.abrupt("return", false);
|
|
25089
|
-
case 13:
|
|
25084
|
+
throw new Error('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!');
|
|
25085
|
+
case 12:
|
|
25090
25086
|
case "end":
|
|
25091
25087
|
return _context.stop();
|
|
25092
25088
|
}
|
|
@@ -28785,7 +28781,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28785
28781
|
break;
|
|
28786
28782
|
}
|
|
28787
28783
|
_context5.next = 3;
|
|
28788
|
-
return import('./DoorPlanner-
|
|
28784
|
+
return import('./DoorPlanner-f893f34e.js');
|
|
28789
28785
|
case 3:
|
|
28790
28786
|
_yield$import = _context5.sent;
|
|
28791
28787
|
DoorPlanner = _yield$import["default"];
|
|
@@ -35579,7 +35575,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35579
35575
|
break;
|
|
35580
35576
|
case 3:
|
|
35581
35577
|
_context12.next = 5;
|
|
35582
|
-
return import('./PfisterWWSHandler-
|
|
35578
|
+
return import('./PfisterWWSHandler-9f3a0b55.js');
|
|
35583
35579
|
case 5:
|
|
35584
35580
|
_yield$import = _context12.sent;
|
|
35585
35581
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35587,7 +35583,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35587
35583
|
return _context12.abrupt("break", 27);
|
|
35588
35584
|
case 9:
|
|
35589
35585
|
_context12.next = 11;
|
|
35590
|
-
return import('./LiviqueWWSHandler-
|
|
35586
|
+
return import('./LiviqueWWSHandler-7a582c3d.js');
|
|
35591
35587
|
case 11:
|
|
35592
35588
|
_yield$import2 = _context12.sent;
|
|
35593
35589
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35595,7 +35591,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35595
35591
|
return _context12.abrupt("break", 27);
|
|
35596
35592
|
case 15:
|
|
35597
35593
|
_context12.next = 17;
|
|
35598
|
-
return import('./SeriousBasketHandler-
|
|
35594
|
+
return import('./SeriousBasketHandler-19a9ff95.js');
|
|
35599
35595
|
case 17:
|
|
35600
35596
|
_yield$import3 = _context12.sent;
|
|
35601
35597
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35603,7 +35599,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35603
35599
|
return _context12.abrupt("break", 27);
|
|
35604
35600
|
case 21:
|
|
35605
35601
|
_context12.next = 23;
|
|
35606
|
-
return import('./StandardWWSHandler-
|
|
35602
|
+
return import('./StandardWWSHandler-454f0faa.js');
|
|
35607
35603
|
case 23:
|
|
35608
35604
|
_yield$import4 = _context12.sent;
|
|
35609
35605
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -37025,7 +37021,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37025
37021
|
while (1) switch (_context3.prev = _context3.next) {
|
|
37026
37022
|
case 0:
|
|
37027
37023
|
_context3.next = 2;
|
|
37028
|
-
return import('./Host3DSignalR-
|
|
37024
|
+
return import('./Host3DSignalR-b2645aac.js');
|
|
37029
37025
|
case 2:
|
|
37030
37026
|
_yield$import = _context3.sent;
|
|
37031
37027
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38579,7 +38575,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38579
38575
|
break;
|
|
38580
38576
|
case 8:
|
|
38581
38577
|
_context4.next = 10;
|
|
38582
|
-
return import('./DivaStandardPlanner-
|
|
38578
|
+
return import('./DivaStandardPlanner-ce7927f6.js');
|
|
38583
38579
|
case 10:
|
|
38584
38580
|
_yield$import = _context4.sent;
|
|
38585
38581
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38590,7 +38586,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38590
38586
|
return _context4.abrupt("break", 21);
|
|
38591
38587
|
case 15:
|
|
38592
38588
|
_context4.next = 17;
|
|
38593
|
-
return import('./DivaBoxPlanner-
|
|
38589
|
+
return import('./DivaBoxPlanner-48803ce3.js');
|
|
38594
38590
|
case 17:
|
|
38595
38591
|
_yield$import2 = _context4.sent;
|
|
38596
38592
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -40344,7 +40340,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40344
40340
|
key: "initialize",
|
|
40345
40341
|
value: function () {
|
|
40346
40342
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40347
|
-
var viewReadyPromise, loadSuccessful
|
|
40343
|
+
var viewReadyPromise, loadSuccessful;
|
|
40348
40344
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40349
40345
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40350
40346
|
case 0:
|
|
@@ -40373,59 +40369,97 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40373
40369
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
40374
40370
|
}
|
|
40375
40371
|
if (!loadSuccessful) {
|
|
40376
|
-
_context14.next =
|
|
40372
|
+
_context14.next = 27;
|
|
40377
40373
|
break;
|
|
40378
40374
|
}
|
|
40375
|
+
_context14.prev = 15;
|
|
40376
|
+
_context14.next = 18;
|
|
40377
|
+
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
40378
|
+
case 18:
|
|
40379
|
+
return _context14.abrupt("return", _context14.sent);
|
|
40380
|
+
case 21:
|
|
40381
|
+
_context14.prev = 21;
|
|
40382
|
+
_context14.t0 = _context14["catch"](15);
|
|
40383
|
+
this.onInitializationError();
|
|
40384
|
+
return _context14.abrupt("return", false);
|
|
40385
|
+
case 25:
|
|
40386
|
+
_context14.next = 30;
|
|
40387
|
+
break;
|
|
40388
|
+
case 27:
|
|
40389
|
+
this.onInitializationError();
|
|
40390
|
+
//fehler beim laden vom basket..
|
|
40391
|
+
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40392
|
+
return _context14.abrupt("return", false);
|
|
40393
|
+
case 30:
|
|
40394
|
+
case "end":
|
|
40395
|
+
return _context14.stop();
|
|
40396
|
+
}
|
|
40397
|
+
}, _callee14, this, [[15, 21]]);
|
|
40398
|
+
}));
|
|
40399
|
+
function initialize() {
|
|
40400
|
+
return _initialize.apply(this, arguments);
|
|
40401
|
+
}
|
|
40402
|
+
return initialize;
|
|
40403
|
+
}()
|
|
40404
|
+
}, {
|
|
40405
|
+
key: "initializeSets",
|
|
40406
|
+
value: function () {
|
|
40407
|
+
var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
40408
|
+
var _this$actions16, _set$getDivaArticles;
|
|
40409
|
+
var _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
40410
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
40411
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
40412
|
+
case 0:
|
|
40379
40413
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40380
|
-
|
|
40414
|
+
_context15.next = 9;
|
|
40381
40415
|
break;
|
|
40382
40416
|
}
|
|
40383
40417
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
40384
|
-
|
|
40418
|
+
_context15.next = 9;
|
|
40385
40419
|
break;
|
|
40386
40420
|
}
|
|
40387
|
-
|
|
40421
|
+
_context15.next = 4;
|
|
40388
40422
|
return viewReadyPromise;
|
|
40389
|
-
case
|
|
40390
|
-
|
|
40423
|
+
case 4:
|
|
40424
|
+
_context15.next = 6;
|
|
40391
40425
|
return this.initView();
|
|
40392
|
-
case
|
|
40426
|
+
case 6:
|
|
40393
40427
|
this.subscribeToWebPlannerEvents();
|
|
40394
40428
|
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
40395
|
-
return
|
|
40396
|
-
case
|
|
40429
|
+
return _context15.abrupt("return", true);
|
|
40430
|
+
case 9:
|
|
40397
40431
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
40398
40432
|
initSetState = this.getInitStateForSet();
|
|
40399
40433
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
40400
|
-
|
|
40434
|
+
_context15.next = 14;
|
|
40401
40435
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
40402
|
-
case
|
|
40436
|
+
case 14:
|
|
40403
40437
|
set = this.actSet();
|
|
40404
40438
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
40405
40439
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
40406
|
-
|
|
40440
|
+
_context15.next = 23;
|
|
40407
40441
|
break;
|
|
40408
40442
|
}
|
|
40409
|
-
|
|
40443
|
+
_context15.next = 19;
|
|
40410
40444
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
40411
|
-
case
|
|
40412
|
-
result =
|
|
40445
|
+
case 19:
|
|
40446
|
+
result = _context15.sent;
|
|
40413
40447
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
40414
|
-
|
|
40448
|
+
_context15.next = 24;
|
|
40415
40449
|
break;
|
|
40416
|
-
case
|
|
40450
|
+
case 23:
|
|
40417
40451
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
40418
40452
|
if (loadSuccessful.type != 'ProductList') {
|
|
40419
40453
|
productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
|
|
40420
40454
|
}
|
|
40421
40455
|
}
|
|
40422
|
-
case
|
|
40423
|
-
|
|
40456
|
+
case 24:
|
|
40457
|
+
_context15.next = 26;
|
|
40424
40458
|
return viewReadyPromise;
|
|
40425
|
-
case
|
|
40426
|
-
|
|
40459
|
+
case 26:
|
|
40460
|
+
_context15.next = 28;
|
|
40427
40461
|
return this.initView();
|
|
40428
|
-
case
|
|
40462
|
+
case 28:
|
|
40429
40463
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40430
40464
|
type: 'onConfiguratorReady'
|
|
40431
40465
|
});
|
|
@@ -40435,7 +40469,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40435
40469
|
});
|
|
40436
40470
|
}
|
|
40437
40471
|
this.subscribeToWebPlannerEvents();
|
|
40438
|
-
this.divaBasketHandler.actBasket;
|
|
40439
40472
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
40440
40473
|
initializationId = undefined;
|
|
40441
40474
|
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
@@ -40460,25 +40493,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40460
40493
|
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
40461
40494
|
initializationId: initializationId
|
|
40462
40495
|
}, false);
|
|
40463
|
-
|
|
40496
|
+
_context15.next = 37;
|
|
40464
40497
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
40465
|
-
case
|
|
40466
|
-
return
|
|
40467
|
-
case
|
|
40468
|
-
this.onInitializationError();
|
|
40469
|
-
//fehler beim laden vom basket..
|
|
40470
|
-
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40471
|
-
return _context14.abrupt("return", false);
|
|
40472
|
-
case 59:
|
|
40498
|
+
case 37:
|
|
40499
|
+
return _context15.abrupt("return", true);
|
|
40500
|
+
case 38:
|
|
40473
40501
|
case "end":
|
|
40474
|
-
return
|
|
40502
|
+
return _context15.stop();
|
|
40475
40503
|
}
|
|
40476
|
-
},
|
|
40504
|
+
}, _callee15, this);
|
|
40477
40505
|
}));
|
|
40478
|
-
function
|
|
40479
|
-
return
|
|
40506
|
+
function initializeSets(_x53, _x54) {
|
|
40507
|
+
return _initializeSets.apply(this, arguments);
|
|
40480
40508
|
}
|
|
40481
|
-
return
|
|
40509
|
+
return initializeSets;
|
|
40482
40510
|
}()
|
|
40483
40511
|
}, {
|
|
40484
40512
|
key: "updatePlannerConfig",
|
|
@@ -40537,11 +40565,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40537
40565
|
var _this$plannerConfig$a3;
|
|
40538
40566
|
if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
|
|
40539
40567
|
var _this$plannerConfig$a2, _this$i18n$t, _this$i18n4, _onErrorHandling$erro;
|
|
40568
|
+
var isWeb = this.api.getApplicationEnvironment() == 'WEB';
|
|
40540
40569
|
(_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
|
|
40541
40570
|
title: (_this$i18n$t = (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured')) !== null && _this$i18n$t !== void 0 ? _this$i18n$t : 'An error occured. Please try again later.',
|
|
40542
40571
|
accept: true,
|
|
40543
40572
|
callback: function callback(accepted) {
|
|
40544
|
-
if (accepted &&
|
|
40573
|
+
if (accepted && isWeb) {
|
|
40545
40574
|
var _this2$state;
|
|
40546
40575
|
_this2.callEvent('onWebPlanerClose');
|
|
40547
40576
|
((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
|
|
@@ -40568,7 +40597,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40568
40597
|
var _this$plannerConfig$a6, _this$i18n7, _this$plannerConfig$a7, _this$plannerConfig$c;
|
|
40569
40598
|
(_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openModal({
|
|
40570
40599
|
accept: true,
|
|
40571
|
-
title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.
|
|
40600
|
+
title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured33')
|
|
40572
40601
|
});
|
|
40573
40602
|
(_this$plannerConfig$a7 = this.plannerConfig.actions) === null || _this$plannerConfig$a7 === void 0 || _this$plannerConfig$a7.openComponent({
|
|
40574
40603
|
type: 'SELLER',
|
|
@@ -40605,23 +40634,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40605
40634
|
}, {
|
|
40606
40635
|
key: "initView",
|
|
40607
40636
|
value: (function () {
|
|
40608
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40637
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
|
40609
40638
|
var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
|
|
40610
|
-
return _regeneratorRuntime.wrap(function
|
|
40611
|
-
while (1) switch (
|
|
40639
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40640
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
40612
40641
|
case 0:
|
|
40613
40642
|
set = this.actSet();
|
|
40614
40643
|
plannerMode = this.getPlannerMode();
|
|
40615
40644
|
this.initConfiguratorMode(plannerMode);
|
|
40616
40645
|
if (!(plannerMode == 'ProductList')) {
|
|
40617
|
-
|
|
40646
|
+
_context16.next = 7;
|
|
40618
40647
|
break;
|
|
40619
40648
|
}
|
|
40620
40649
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40621
|
-
|
|
40650
|
+
_context16.next = 17;
|
|
40622
40651
|
break;
|
|
40623
40652
|
case 7:
|
|
40624
|
-
|
|
40653
|
+
_context16.next = 9;
|
|
40625
40654
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
40626
40655
|
case 9:
|
|
40627
40656
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -40635,13 +40664,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40635
40664
|
this.onBasketInitialized();
|
|
40636
40665
|
this.checkMatchingProducts('onInit');
|
|
40637
40666
|
case 17:
|
|
40638
|
-
|
|
40667
|
+
_context16.next = 19;
|
|
40639
40668
|
return this.runInitMode(plannerMode);
|
|
40640
40669
|
case 19:
|
|
40641
40670
|
case "end":
|
|
40642
|
-
return
|
|
40671
|
+
return _context16.stop();
|
|
40643
40672
|
}
|
|
40644
|
-
},
|
|
40673
|
+
}, _callee16, this);
|
|
40645
40674
|
}));
|
|
40646
40675
|
function initView() {
|
|
40647
40676
|
return _initView.apply(this, arguments);
|
|
@@ -40662,26 +40691,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40662
40691
|
}, {
|
|
40663
40692
|
key: "runInitMode",
|
|
40664
40693
|
value: function () {
|
|
40665
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40694
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(plannerMode) {
|
|
40666
40695
|
var _this$state3;
|
|
40667
40696
|
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40668
|
-
return _regeneratorRuntime.wrap(function
|
|
40669
|
-
while (1) switch (
|
|
40697
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
40698
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
40670
40699
|
case 0:
|
|
40671
40700
|
doDefault = true;
|
|
40672
40701
|
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
40673
|
-
|
|
40702
|
+
_context17.next = 10;
|
|
40674
40703
|
break;
|
|
40675
40704
|
}
|
|
40676
40705
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
40677
40706
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
40678
40707
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
40679
40708
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
40680
|
-
|
|
40709
|
+
_context17.next = 7;
|
|
40681
40710
|
return this.saveToBasketWrapper();
|
|
40682
40711
|
case 7:
|
|
40683
40712
|
doDefault = false;
|
|
40684
|
-
|
|
40713
|
+
_context17.next = 11;
|
|
40685
40714
|
break;
|
|
40686
40715
|
case 10:
|
|
40687
40716
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.dimensions.isMobile) {
|
|
@@ -40705,11 +40734,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40705
40734
|
}
|
|
40706
40735
|
case 12:
|
|
40707
40736
|
case "end":
|
|
40708
|
-
return
|
|
40737
|
+
return _context17.stop();
|
|
40709
40738
|
}
|
|
40710
|
-
},
|
|
40739
|
+
}, _callee17, this);
|
|
40711
40740
|
}));
|
|
40712
|
-
function runInitMode(
|
|
40741
|
+
function runInitMode(_x55) {
|
|
40713
40742
|
return _runInitMode.apply(this, arguments);
|
|
40714
40743
|
}
|
|
40715
40744
|
return runInitMode;
|
|
@@ -40717,16 +40746,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40717
40746
|
}, {
|
|
40718
40747
|
key: "addSetToActPlanningByDivaNr",
|
|
40719
40748
|
value: function () {
|
|
40720
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40749
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(divaNr) {
|
|
40721
40750
|
var _this$updateViewPlann10;
|
|
40722
40751
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
40723
|
-
return _regeneratorRuntime.wrap(function
|
|
40724
|
-
while (1) switch (
|
|
40752
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40753
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40725
40754
|
case 0:
|
|
40726
40755
|
set = this.actSet();
|
|
40727
40756
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
40728
40757
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
40729
|
-
|
|
40758
|
+
_context18.next = 5;
|
|
40730
40759
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40731
40760
|
case 5:
|
|
40732
40761
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -40734,30 +40763,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40734
40763
|
i = 0;
|
|
40735
40764
|
case 8:
|
|
40736
40765
|
if (!(i < orderSets.length)) {
|
|
40737
|
-
|
|
40766
|
+
_context18.next = 24;
|
|
40738
40767
|
break;
|
|
40739
40768
|
}
|
|
40740
40769
|
orderset = orderSets[i];
|
|
40741
40770
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40742
40771
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40743
40772
|
if (!loadedSet) {
|
|
40744
|
-
|
|
40773
|
+
_context18.next = 18;
|
|
40745
40774
|
break;
|
|
40746
40775
|
}
|
|
40747
|
-
|
|
40776
|
+
_context18.next = 15;
|
|
40748
40777
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40749
40778
|
case 15:
|
|
40750
40779
|
this.checkMatchingProducts('onAdd');
|
|
40751
|
-
|
|
40780
|
+
_context18.next = 20;
|
|
40752
40781
|
break;
|
|
40753
40782
|
case 18:
|
|
40754
|
-
|
|
40783
|
+
_context18.next = 20;
|
|
40755
40784
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40756
40785
|
case 20:
|
|
40757
40786
|
this.cleanUpEmptySets(true);
|
|
40758
40787
|
case 21:
|
|
40759
40788
|
i++;
|
|
40760
|
-
|
|
40789
|
+
_context18.next = 8;
|
|
40761
40790
|
break;
|
|
40762
40791
|
case 24:
|
|
40763
40792
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -40769,11 +40798,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40769
40798
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40770
40799
|
case 31:
|
|
40771
40800
|
case "end":
|
|
40772
|
-
return
|
|
40801
|
+
return _context18.stop();
|
|
40773
40802
|
}
|
|
40774
|
-
},
|
|
40803
|
+
}, _callee18, this);
|
|
40775
40804
|
}));
|
|
40776
|
-
function addSetToActPlanningByDivaNr(
|
|
40805
|
+
function addSetToActPlanningByDivaNr(_x56) {
|
|
40777
40806
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
40778
40807
|
}
|
|
40779
40808
|
return addSetToActPlanningByDivaNr;
|
|
@@ -40806,28 +40835,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40806
40835
|
}, {
|
|
40807
40836
|
key: "setActSetCurConfigStepKey",
|
|
40808
40837
|
value: function () {
|
|
40809
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40838
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(curConfigStepKey) {
|
|
40810
40839
|
var set;
|
|
40811
|
-
return _regeneratorRuntime.wrap(function
|
|
40812
|
-
while (1) switch (
|
|
40840
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40841
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40813
40842
|
case 0:
|
|
40814
40843
|
set = this.actSet();
|
|
40815
40844
|
if (set) {
|
|
40816
|
-
|
|
40845
|
+
_context19.next = 3;
|
|
40817
40846
|
break;
|
|
40818
40847
|
}
|
|
40819
|
-
return
|
|
40848
|
+
return _context19.abrupt("return");
|
|
40820
40849
|
case 3:
|
|
40821
40850
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40822
|
-
|
|
40851
|
+
_context19.next = 6;
|
|
40823
40852
|
return setHandlerInstance.updateNavigation(set);
|
|
40824
40853
|
case 6:
|
|
40825
40854
|
case "end":
|
|
40826
|
-
return
|
|
40855
|
+
return _context19.stop();
|
|
40827
40856
|
}
|
|
40828
|
-
},
|
|
40857
|
+
}, _callee19, this);
|
|
40829
40858
|
}));
|
|
40830
|
-
function setActSetCurConfigStepKey(
|
|
40859
|
+
function setActSetCurConfigStepKey(_x57) {
|
|
40831
40860
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
40832
40861
|
}
|
|
40833
40862
|
return setActSetCurConfigStepKey;
|
|
@@ -40976,17 +41005,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40976
41005
|
}, {
|
|
40977
41006
|
key: "deletePlannerElement",
|
|
40978
41007
|
value: function () {
|
|
40979
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41008
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, denyElementSelectionClear) {
|
|
40980
41009
|
var _this$updateViewPlann11;
|
|
40981
41010
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40982
|
-
return _regeneratorRuntime.wrap(function
|
|
40983
|
-
while (1) switch (
|
|
41011
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
41012
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40984
41013
|
case 0:
|
|
40985
41014
|
set = this.sets[setId];
|
|
40986
|
-
|
|
41015
|
+
_context20.next = 3;
|
|
40987
41016
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40988
41017
|
case 3:
|
|
40989
|
-
result =
|
|
41018
|
+
result = _context20.sent;
|
|
40990
41019
|
this.updateConfigStructure();
|
|
40991
41020
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40992
41021
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40997,17 +41026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40997
41026
|
}
|
|
40998
41027
|
this.updatePriceInView();
|
|
40999
41028
|
this.checkMatchingProducts('onDelete');
|
|
41000
|
-
|
|
41029
|
+
_context20.next = 14;
|
|
41001
41030
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
41002
41031
|
case 14:
|
|
41003
41032
|
this.plannerChangeLog('onDeletePlanner');
|
|
41004
41033
|
case 15:
|
|
41005
41034
|
case "end":
|
|
41006
|
-
return
|
|
41035
|
+
return _context20.stop();
|
|
41007
41036
|
}
|
|
41008
|
-
},
|
|
41037
|
+
}, _callee20, this);
|
|
41009
41038
|
}));
|
|
41010
|
-
function deletePlannerElement(
|
|
41039
|
+
function deletePlannerElement(_x58, _x59, _x60) {
|
|
41011
41040
|
return _deletePlannerElement.apply(this, arguments);
|
|
41012
41041
|
}
|
|
41013
41042
|
return deletePlannerElement;
|
|
@@ -41021,17 +41050,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41021
41050
|
}, {
|
|
41022
41051
|
key: "copyPlannerElement",
|
|
41023
41052
|
value: (function () {
|
|
41024
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41053
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
|
|
41025
41054
|
var _this$updateViewPlann12;
|
|
41026
41055
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
41027
|
-
return _regeneratorRuntime.wrap(function
|
|
41028
|
-
while (1) switch (
|
|
41056
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
41057
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
41029
41058
|
case 0:
|
|
41030
41059
|
set = this.sets[setId];
|
|
41031
|
-
|
|
41060
|
+
_context21.next = 3;
|
|
41032
41061
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
41033
41062
|
case 3:
|
|
41034
|
-
newSelectedArticle =
|
|
41063
|
+
newSelectedArticle = _context21.sent;
|
|
41035
41064
|
this.updateConfigStructure();
|
|
41036
41065
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
41037
41066
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -41045,14 +41074,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41045
41074
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
41046
41075
|
}
|
|
41047
41076
|
this.checkMatchingProducts('onCopy');
|
|
41048
|
-
return
|
|
41077
|
+
return _context21.abrupt("return", newConfigStepKey);
|
|
41049
41078
|
case 13:
|
|
41050
41079
|
case "end":
|
|
41051
|
-
return
|
|
41080
|
+
return _context21.stop();
|
|
41052
41081
|
}
|
|
41053
|
-
},
|
|
41082
|
+
}, _callee21, this);
|
|
41054
41083
|
}));
|
|
41055
|
-
function copyPlannerElement(
|
|
41084
|
+
function copyPlannerElement(_x61, _x62, _x63, _x64) {
|
|
41056
41085
|
return _copyPlannerElement.apply(this, arguments);
|
|
41057
41086
|
}
|
|
41058
41087
|
return copyPlannerElement;
|
|
@@ -41081,33 +41110,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41081
41110
|
}, {
|
|
41082
41111
|
key: "getFreePlacesOnGrids",
|
|
41083
41112
|
value: function () {
|
|
41084
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41113
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(gridGroup, from) {
|
|
41085
41114
|
var _this$updateFreePlace;
|
|
41086
41115
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
41087
|
-
return _regeneratorRuntime.wrap(function
|
|
41088
|
-
while (1) switch (
|
|
41116
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
41117
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
41089
41118
|
case 0:
|
|
41090
41119
|
set = this.actSet();
|
|
41091
41120
|
if (set) {
|
|
41092
|
-
|
|
41121
|
+
_context22.next = 3;
|
|
41093
41122
|
break;
|
|
41094
41123
|
}
|
|
41095
41124
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
41096
41125
|
case 3:
|
|
41097
41126
|
if (!gridGroup) {
|
|
41098
|
-
|
|
41127
|
+
_context22.next = 9;
|
|
41099
41128
|
break;
|
|
41100
41129
|
}
|
|
41101
|
-
|
|
41130
|
+
_context22.next = 6;
|
|
41102
41131
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
41103
41132
|
case 6:
|
|
41104
|
-
|
|
41105
|
-
|
|
41133
|
+
_context22.t0 = _context22.sent;
|
|
41134
|
+
_context22.next = 10;
|
|
41106
41135
|
break;
|
|
41107
41136
|
case 9:
|
|
41108
|
-
|
|
41137
|
+
_context22.t0 = undefined;
|
|
41109
41138
|
case 10:
|
|
41110
|
-
freeShelfGrids =
|
|
41139
|
+
freeShelfGrids = _context22.t0;
|
|
41111
41140
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
41112
41141
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
41113
41142
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -41115,17 +41144,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41115
41144
|
freeShelfGrids: freeShelfGrids,
|
|
41116
41145
|
plannedShelfGrids: plannedShelfGrids
|
|
41117
41146
|
});
|
|
41118
|
-
return
|
|
41147
|
+
return _context22.abrupt("return", {
|
|
41119
41148
|
freeShelfGrids: freeShelfGrids,
|
|
41120
41149
|
plannedShelfGrids: plannedShelfGrids
|
|
41121
41150
|
});
|
|
41122
41151
|
case 16:
|
|
41123
41152
|
case "end":
|
|
41124
|
-
return
|
|
41153
|
+
return _context22.stop();
|
|
41125
41154
|
}
|
|
41126
|
-
},
|
|
41155
|
+
}, _callee22, this);
|
|
41127
41156
|
}));
|
|
41128
|
-
function getFreePlacesOnGrids(
|
|
41157
|
+
function getFreePlacesOnGrids(_x65, _x66) {
|
|
41129
41158
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
41130
41159
|
}
|
|
41131
41160
|
return getFreePlacesOnGrids;
|
|
@@ -41142,36 +41171,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41142
41171
|
}, {
|
|
41143
41172
|
key: "moveShelfItemToGrid",
|
|
41144
41173
|
value: function () {
|
|
41145
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41174
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
41146
41175
|
var set, newGridId;
|
|
41147
|
-
return _regeneratorRuntime.wrap(function
|
|
41148
|
-
while (1) switch (
|
|
41176
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
41177
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
41149
41178
|
case 0:
|
|
41150
41179
|
set = this.actSet();
|
|
41151
41180
|
if (set) {
|
|
41152
|
-
|
|
41181
|
+
_context23.next = 3;
|
|
41153
41182
|
break;
|
|
41154
41183
|
}
|
|
41155
|
-
return
|
|
41184
|
+
return _context23.abrupt("return");
|
|
41156
41185
|
case 3:
|
|
41157
|
-
|
|
41186
|
+
_context23.next = 5;
|
|
41158
41187
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
41159
41188
|
case 5:
|
|
41160
|
-
newGridId =
|
|
41189
|
+
newGridId = _context23.sent;
|
|
41161
41190
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
41162
41191
|
if (!newGridId) {
|
|
41163
|
-
|
|
41192
|
+
_context23.next = 10;
|
|
41164
41193
|
break;
|
|
41165
41194
|
}
|
|
41166
|
-
|
|
41195
|
+
_context23.next = 10;
|
|
41167
41196
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
41168
41197
|
case 10:
|
|
41169
41198
|
case "end":
|
|
41170
|
-
return
|
|
41199
|
+
return _context23.stop();
|
|
41171
41200
|
}
|
|
41172
|
-
},
|
|
41201
|
+
}, _callee23, this);
|
|
41173
41202
|
}));
|
|
41174
|
-
function moveShelfItemToGrid(
|
|
41203
|
+
function moveShelfItemToGrid(_x67, _x68, _x69, _x70) {
|
|
41175
41204
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
41176
41205
|
}
|
|
41177
41206
|
return moveShelfItemToGrid;
|
|
@@ -41179,27 +41208,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41179
41208
|
}, {
|
|
41180
41209
|
key: "resetArticle",
|
|
41181
41210
|
value: function () {
|
|
41182
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41211
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(basketId) {
|
|
41183
41212
|
var set;
|
|
41184
|
-
return _regeneratorRuntime.wrap(function
|
|
41185
|
-
while (1) switch (
|
|
41213
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
41214
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
41186
41215
|
case 0:
|
|
41187
41216
|
set = this.actSet();
|
|
41188
41217
|
if (set) {
|
|
41189
|
-
|
|
41218
|
+
_context24.next = 3;
|
|
41190
41219
|
break;
|
|
41191
41220
|
}
|
|
41192
|
-
return
|
|
41221
|
+
return _context24.abrupt("return");
|
|
41193
41222
|
case 3:
|
|
41194
|
-
|
|
41223
|
+
_context24.next = 5;
|
|
41195
41224
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
41196
41225
|
case 5:
|
|
41197
41226
|
case "end":
|
|
41198
|
-
return
|
|
41227
|
+
return _context24.stop();
|
|
41199
41228
|
}
|
|
41200
|
-
},
|
|
41229
|
+
}, _callee24, this);
|
|
41201
41230
|
}));
|
|
41202
|
-
function resetArticle(
|
|
41231
|
+
function resetArticle(_x71) {
|
|
41203
41232
|
return _resetArticle.apply(this, arguments);
|
|
41204
41233
|
}
|
|
41205
41234
|
return resetArticle;
|
|
@@ -41229,10 +41258,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41229
41258
|
}, {
|
|
41230
41259
|
key: "checkMatchingProducts",
|
|
41231
41260
|
value: function () {
|
|
41232
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41261
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(from) {
|
|
41233
41262
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
41234
|
-
return _regeneratorRuntime.wrap(function
|
|
41235
|
-
while (1) switch (
|
|
41263
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
41264
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
41236
41265
|
case 0:
|
|
41237
41266
|
set = this.actSet();
|
|
41238
41267
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -41246,20 +41275,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41246
41275
|
}
|
|
41247
41276
|
}
|
|
41248
41277
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
41249
|
-
|
|
41278
|
+
_context25.next = 6;
|
|
41250
41279
|
break;
|
|
41251
41280
|
}
|
|
41252
|
-
|
|
41281
|
+
_context25.next = 5;
|
|
41253
41282
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
41254
41283
|
case 5:
|
|
41255
41284
|
this.updatePriceInView();
|
|
41256
41285
|
case 6:
|
|
41257
41286
|
case "end":
|
|
41258
|
-
return
|
|
41287
|
+
return _context25.stop();
|
|
41259
41288
|
}
|
|
41260
|
-
},
|
|
41289
|
+
}, _callee25, this);
|
|
41261
41290
|
}));
|
|
41262
|
-
function checkMatchingProducts(
|
|
41291
|
+
function checkMatchingProducts(_x72) {
|
|
41263
41292
|
return _checkMatchingProducts.apply(this, arguments);
|
|
41264
41293
|
}
|
|
41265
41294
|
return checkMatchingProducts;
|
|
@@ -41336,7 +41365,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41336
41365
|
}, {
|
|
41337
41366
|
key: "saveToBasketWrapper",
|
|
41338
41367
|
value: function () {
|
|
41339
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41368
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
41340
41369
|
var _this$actions27,
|
|
41341
41370
|
_this$actions27$toggl,
|
|
41342
41371
|
_this$actions28,
|
|
@@ -41345,8 +41374,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41345
41374
|
_this$actions32,
|
|
41346
41375
|
_this$i18n14;
|
|
41347
41376
|
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions26, result, _this$actions29, _this$i18n8, _this$i18n9, _this$actions30, _this$i18n10, _this$i18n11, _this$actions31, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
|
|
41348
|
-
return _regeneratorRuntime.wrap(function
|
|
41349
|
-
while (1) switch (
|
|
41377
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
41378
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41350
41379
|
case 0:
|
|
41351
41380
|
returnTo = this.getReturnTo(event);
|
|
41352
41381
|
finalEvent = {
|
|
@@ -41354,50 +41383,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41354
41383
|
saveBasket: true
|
|
41355
41384
|
};
|
|
41356
41385
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
41357
|
-
|
|
41386
|
+
_context26.next = 21;
|
|
41358
41387
|
break;
|
|
41359
41388
|
}
|
|
41360
41389
|
product = undefined;
|
|
41361
41390
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
41362
|
-
|
|
41391
|
+
_context26.next = 10;
|
|
41363
41392
|
break;
|
|
41364
41393
|
}
|
|
41365
41394
|
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
41366
|
-
|
|
41395
|
+
_context26.next = 8;
|
|
41367
41396
|
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
41368
41397
|
case 8:
|
|
41369
|
-
_result =
|
|
41398
|
+
_result = _context26.sent;
|
|
41370
41399
|
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
41371
41400
|
case 10:
|
|
41372
|
-
|
|
41401
|
+
_context26.next = 12;
|
|
41373
41402
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
41374
41403
|
case 12:
|
|
41375
|
-
finalEvent =
|
|
41404
|
+
finalEvent = _context26.sent;
|
|
41376
41405
|
if (finalEvent) {
|
|
41377
|
-
|
|
41406
|
+
_context26.next = 17;
|
|
41378
41407
|
break;
|
|
41379
41408
|
}
|
|
41380
|
-
return
|
|
41409
|
+
return _context26.abrupt("return", 'canceled');
|
|
41381
41410
|
case 17:
|
|
41382
41411
|
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
41383
|
-
|
|
41412
|
+
_context26.next = 20;
|
|
41384
41413
|
break;
|
|
41385
41414
|
}
|
|
41386
41415
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
|
|
41387
41416
|
type: finalEvent.event
|
|
41388
41417
|
});
|
|
41389
|
-
return
|
|
41418
|
+
return _context26.abrupt("return", 'canceled');
|
|
41390
41419
|
case 20:
|
|
41391
41420
|
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
41392
41421
|
case 21:
|
|
41393
41422
|
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || (_this$actions27$toggl = _this$actions27.toggleLoading) === null || _this$actions27$toggl === void 0 || _this$actions27$toggl.call(_this$actions27, 'Planner_Saving', false, true);
|
|
41394
|
-
|
|
41423
|
+
_context26.next = 24;
|
|
41395
41424
|
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
41396
41425
|
case 24:
|
|
41397
|
-
result =
|
|
41426
|
+
result = _context26.sent;
|
|
41398
41427
|
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, false);
|
|
41399
41428
|
if (!(result === 'canceled')) {
|
|
41400
|
-
|
|
41429
|
+
_context26.next = 30;
|
|
41401
41430
|
break;
|
|
41402
41431
|
}
|
|
41403
41432
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -41405,10 +41434,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41405
41434
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
41406
41435
|
accept: true
|
|
41407
41436
|
});
|
|
41408
|
-
return
|
|
41437
|
+
return _context26.abrupt("return", result);
|
|
41409
41438
|
case 30:
|
|
41410
|
-
|
|
41411
|
-
|
|
41439
|
+
_context26.t0 = returnTo;
|
|
41440
|
+
_context26.next = _context26.t0 === 'OPEN_PDF' ? 33 : _context26.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
|
|
41412
41441
|
break;
|
|
41413
41442
|
case 33:
|
|
41414
41443
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -41428,7 +41457,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41428
41457
|
}
|
|
41429
41458
|
});
|
|
41430
41459
|
}
|
|
41431
|
-
return
|
|
41460
|
+
return _context26.abrupt("break", 36);
|
|
41432
41461
|
case 35:
|
|
41433
41462
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
|
|
41434
41463
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
@@ -41436,20 +41465,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41436
41465
|
});
|
|
41437
41466
|
case 36:
|
|
41438
41467
|
if (!(result == 'noArticleToSave')) {
|
|
41439
|
-
|
|
41468
|
+
_context26.next = 39;
|
|
41440
41469
|
break;
|
|
41441
41470
|
}
|
|
41442
41471
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
41443
|
-
return
|
|
41472
|
+
return _context26.abrupt("return", 'canceled');
|
|
41444
41473
|
case 39:
|
|
41445
|
-
return
|
|
41474
|
+
return _context26.abrupt("return", result);
|
|
41446
41475
|
case 40:
|
|
41447
41476
|
case "end":
|
|
41448
|
-
return
|
|
41477
|
+
return _context26.stop();
|
|
41449
41478
|
}
|
|
41450
|
-
},
|
|
41479
|
+
}, _callee26, this);
|
|
41451
41480
|
}));
|
|
41452
|
-
function saveToBasketWrapper(
|
|
41481
|
+
function saveToBasketWrapper(_x73, _x74, _x75) {
|
|
41453
41482
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
41454
41483
|
}
|
|
41455
41484
|
return saveToBasketWrapper;
|
|
@@ -41457,43 +41486,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41457
41486
|
}, {
|
|
41458
41487
|
key: "saveToBasket",
|
|
41459
41488
|
value: function () {
|
|
41460
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41489
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
|
|
41461
41490
|
var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
41462
41491
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
41463
|
-
return _regeneratorRuntime.wrap(function
|
|
41464
|
-
while (1) switch (
|
|
41492
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41493
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41465
41494
|
case 0:
|
|
41466
41495
|
set = this.actSet();
|
|
41467
41496
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
41468
|
-
|
|
41497
|
+
_context27.next = 3;
|
|
41469
41498
|
break;
|
|
41470
41499
|
}
|
|
41471
|
-
return
|
|
41500
|
+
return _context27.abrupt("return", 'noArticleToSave');
|
|
41472
41501
|
case 3:
|
|
41473
41502
|
actBasket = this.divaBasketHandler.actBasket;
|
|
41474
41503
|
returnTo = this.getReturnTo(event);
|
|
41475
41504
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
41476
|
-
|
|
41505
|
+
_context27.next = 13;
|
|
41477
41506
|
break;
|
|
41478
41507
|
}
|
|
41479
41508
|
oldReturnTo = returnTo;
|
|
41480
41509
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
41481
|
-
|
|
41510
|
+
_context27.next = 10;
|
|
41482
41511
|
return this.handleFavorites('SAVE');
|
|
41483
41512
|
case 10:
|
|
41484
|
-
result =
|
|
41513
|
+
result = _context27.sent;
|
|
41485
41514
|
if (result === 'canceled') {
|
|
41486
41515
|
this.ReturnTo = oldReturnTo;
|
|
41487
41516
|
}
|
|
41488
|
-
return
|
|
41517
|
+
return _context27.abrupt("return", result);
|
|
41489
41518
|
case 13:
|
|
41490
|
-
|
|
41491
|
-
|
|
41492
|
-
|
|
41519
|
+
_context27.t0 = this.divaBasketHandler;
|
|
41520
|
+
_context27.t1 = this.divaBasketHandler.actDivaNr;
|
|
41521
|
+
_context27.next = 17;
|
|
41493
41522
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41494
41523
|
case 17:
|
|
41495
|
-
|
|
41496
|
-
|
|
41524
|
+
_context27.t2 = _context27.sent;
|
|
41525
|
+
_context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
|
|
41497
41526
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
41498
41527
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
41499
41528
|
returnTo = this.ReturnTo;
|
|
@@ -41508,11 +41537,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41508
41537
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
41509
41538
|
actBasket.Updated = Date.now();
|
|
41510
41539
|
if (!returnTo) {
|
|
41511
|
-
|
|
41540
|
+
_context27.next = 52;
|
|
41512
41541
|
break;
|
|
41513
41542
|
}
|
|
41514
|
-
|
|
41515
|
-
|
|
41543
|
+
_context27.t3 = returnTo;
|
|
41544
|
+
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
41516
41545
|
break;
|
|
41517
41546
|
case 28:
|
|
41518
41547
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
|
|
@@ -41526,7 +41555,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41526
41555
|
basketData: actBasket
|
|
41527
41556
|
}
|
|
41528
41557
|
});
|
|
41529
|
-
return
|
|
41558
|
+
return _context27.abrupt("break", 52);
|
|
41530
41559
|
case 31:
|
|
41531
41560
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
|
|
41532
41561
|
type: 'SELLER',
|
|
@@ -41538,23 +41567,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41538
41567
|
basketData: actBasket
|
|
41539
41568
|
}
|
|
41540
41569
|
});
|
|
41541
|
-
return
|
|
41570
|
+
return _context27.abrupt("break", 52);
|
|
41542
41571
|
case 33:
|
|
41543
41572
|
if (!(event == 'onSaveProduct')) {
|
|
41544
|
-
|
|
41573
|
+
_context27.next = 43;
|
|
41545
41574
|
break;
|
|
41546
41575
|
}
|
|
41547
41576
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
41548
41577
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
41549
|
-
|
|
41578
|
+
_context27.next = 37;
|
|
41550
41579
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41551
41580
|
case 37:
|
|
41552
|
-
|
|
41581
|
+
_context27.next = 39;
|
|
41553
41582
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41554
41583
|
case 39:
|
|
41555
|
-
newDivaNr =
|
|
41584
|
+
newDivaNr = _context27.sent;
|
|
41556
41585
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41557
|
-
|
|
41586
|
+
_context27.next = 51;
|
|
41558
41587
|
break;
|
|
41559
41588
|
case 43:
|
|
41560
41589
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -41563,32 +41592,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41563
41592
|
}
|
|
41564
41593
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41565
41594
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41566
|
-
|
|
41595
|
+
_context27.next = 48;
|
|
41567
41596
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41568
41597
|
case 48:
|
|
41569
|
-
_result2 =
|
|
41598
|
+
_result2 = _context27.sent;
|
|
41570
41599
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41571
|
-
|
|
41600
|
+
_context27.next = 51;
|
|
41572
41601
|
break;
|
|
41573
41602
|
}
|
|
41574
|
-
return
|
|
41603
|
+
return _context27.abrupt("return", 'canceled');
|
|
41575
41604
|
case 51:
|
|
41576
|
-
return
|
|
41605
|
+
return _context27.abrupt("break", 52);
|
|
41577
41606
|
case 52:
|
|
41578
41607
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41579
41608
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
41580
|
-
|
|
41609
|
+
_context27.next = 56;
|
|
41581
41610
|
return this.addToBasket(actBasket, event);
|
|
41582
41611
|
case 56:
|
|
41583
|
-
product =
|
|
41584
|
-
return
|
|
41612
|
+
product = _context27.sent;
|
|
41613
|
+
return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
41585
41614
|
case 58:
|
|
41586
41615
|
case "end":
|
|
41587
|
-
return
|
|
41616
|
+
return _context27.stop();
|
|
41588
41617
|
}
|
|
41589
|
-
},
|
|
41618
|
+
}, _callee27, this);
|
|
41590
41619
|
}));
|
|
41591
|
-
function saveToBasket(
|
|
41620
|
+
function saveToBasket(_x76, _x77, _x78) {
|
|
41592
41621
|
return _saveToBasket.apply(this, arguments);
|
|
41593
41622
|
}
|
|
41594
41623
|
return saveToBasket;
|
|
@@ -41822,23 +41851,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41822
41851
|
}, {
|
|
41823
41852
|
key: "getBasketDataWithEkText",
|
|
41824
41853
|
value: function () {
|
|
41825
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41826
|
-
return _regeneratorRuntime.wrap(function
|
|
41827
|
-
while (1) switch (
|
|
41854
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
|
|
41855
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
41856
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41828
41857
|
case 0:
|
|
41829
|
-
|
|
41830
|
-
|
|
41831
|
-
|
|
41858
|
+
_context28.t0 = this.divaBasketHandler;
|
|
41859
|
+
_context28.t1 = this.divaBasketHandler.actDivaNr;
|
|
41860
|
+
_context28.next = 4;
|
|
41832
41861
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41833
41862
|
case 4:
|
|
41834
|
-
|
|
41835
|
-
|
|
41836
|
-
return
|
|
41863
|
+
_context28.t2 = _context28.sent;
|
|
41864
|
+
_context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
|
|
41865
|
+
return _context28.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41837
41866
|
case 7:
|
|
41838
41867
|
case "end":
|
|
41839
|
-
return
|
|
41868
|
+
return _context28.stop();
|
|
41840
41869
|
}
|
|
41841
|
-
},
|
|
41870
|
+
}, _callee28, this);
|
|
41842
41871
|
}));
|
|
41843
41872
|
function getBasketDataWithEkText() {
|
|
41844
41873
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41864,7 +41893,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41864
41893
|
}, {
|
|
41865
41894
|
key: "addToBasket",
|
|
41866
41895
|
value: function () {
|
|
41867
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41896
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
|
|
41868
41897
|
var _this$actions36,
|
|
41869
41898
|
_this$actions37,
|
|
41870
41899
|
_this$actions38,
|
|
@@ -41884,44 +41913,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41884
41913
|
to,
|
|
41885
41914
|
variants,
|
|
41886
41915
|
products,
|
|
41887
|
-
|
|
41888
|
-
return _regeneratorRuntime.wrap(function
|
|
41889
|
-
while (1) switch (
|
|
41916
|
+
_args29 = arguments;
|
|
41917
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
41918
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
41890
41919
|
case 0:
|
|
41891
|
-
event =
|
|
41892
|
-
|
|
41893
|
-
|
|
41920
|
+
event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
|
|
41921
|
+
_context29.t0 = event;
|
|
41922
|
+
_context29.next = _context29.t0 === 'onWebPlanerPrint' ? 5 : _context29.t0 === 'onWebPlanerSave' ? 7 : _context29.t0 === 'onWebPlanerShare' ? 9 : _context29.t0 === 'onRequestConsulation' ? 11 : _context29.t0 === 'onSave' ? 13 : _context29.t0 === 'onSendEmail' ? 15 : _context29.t0 === 'onSaveProduct' ? 20 : _context29.t0 === 'dontSaveBasket' ? 27 : _context29.t0 === 'onAddToBasket' ? 28 : _context29.t0 === 'onSendContactForm' ? 30 : 33;
|
|
41894
41923
|
break;
|
|
41895
41924
|
case 5:
|
|
41896
41925
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41897
41926
|
type: 'onWebPlanerPrint',
|
|
41898
41927
|
data: actBasket.getAsJson()
|
|
41899
41928
|
});
|
|
41900
|
-
return
|
|
41929
|
+
return _context29.abrupt("break", 35);
|
|
41901
41930
|
case 7:
|
|
41902
41931
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41903
41932
|
type: 'onWebPlanerSave',
|
|
41904
41933
|
data: actBasket.getAsJson()
|
|
41905
41934
|
});
|
|
41906
|
-
return
|
|
41935
|
+
return _context29.abrupt("break", 35);
|
|
41907
41936
|
case 9:
|
|
41908
41937
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41909
41938
|
type: 'onWebPlanerShare',
|
|
41910
41939
|
data: actBasket.getAsJson()
|
|
41911
41940
|
});
|
|
41912
|
-
return
|
|
41941
|
+
return _context29.abrupt("break", 35);
|
|
41913
41942
|
case 11:
|
|
41914
41943
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41915
41944
|
type: 'onRequestConsulation',
|
|
41916
41945
|
data: actBasket.getAsJson()
|
|
41917
41946
|
});
|
|
41918
|
-
return
|
|
41947
|
+
return _context29.abrupt("break", 35);
|
|
41919
41948
|
case 13:
|
|
41920
41949
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41921
41950
|
type: 'onSave',
|
|
41922
41951
|
data: actBasket.getAsJson()
|
|
41923
41952
|
});
|
|
41924
|
-
return
|
|
41953
|
+
return _context29.abrupt("break", 35);
|
|
41925
41954
|
case 15:
|
|
41926
41955
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41927
41956
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41956,51 +41985,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41956
41985
|
type: 'onAddToBasket',
|
|
41957
41986
|
data: actBasket.getAsJson()
|
|
41958
41987
|
});
|
|
41959
|
-
return
|
|
41988
|
+
return _context29.abrupt("break", 35);
|
|
41960
41989
|
case 20:
|
|
41961
41990
|
this.actSet().CatalogData;
|
|
41962
|
-
|
|
41991
|
+
_context29.next = 23;
|
|
41963
41992
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41964
41993
|
case 23:
|
|
41965
|
-
products =
|
|
41994
|
+
products = _context29.sent;
|
|
41966
41995
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41967
41996
|
type: 'onAddToBasket',
|
|
41968
41997
|
data: actBasket.getAsJson()
|
|
41969
41998
|
});
|
|
41970
41999
|
if (!products) {
|
|
41971
|
-
|
|
42000
|
+
_context29.next = 27;
|
|
41972
42001
|
break;
|
|
41973
42002
|
}
|
|
41974
|
-
return
|
|
42003
|
+
return _context29.abrupt("return", products[0]);
|
|
41975
42004
|
case 27:
|
|
41976
42005
|
case 28:
|
|
41977
42006
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41978
42007
|
type: 'onAddToBasket',
|
|
41979
42008
|
data: actBasket.getAsJson()
|
|
41980
42009
|
});
|
|
41981
|
-
return
|
|
42010
|
+
return _context29.abrupt("break", 35);
|
|
41982
42011
|
case 30:
|
|
41983
42012
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
41984
42013
|
type: 'onAddToBasket',
|
|
41985
42014
|
data: actBasket.getAsJson()
|
|
41986
42015
|
});
|
|
41987
42016
|
this.openContactForm(this.divaBasketHandler);
|
|
41988
|
-
return
|
|
42017
|
+
return _context29.abrupt("break", 35);
|
|
41989
42018
|
case 33:
|
|
41990
42019
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
41991
42020
|
type: event,
|
|
41992
42021
|
data: actBasket.getAsJson()
|
|
41993
42022
|
});
|
|
41994
|
-
return
|
|
42023
|
+
return _context29.abrupt("break", 35);
|
|
41995
42024
|
case 35:
|
|
41996
|
-
return
|
|
42025
|
+
return _context29.abrupt("return");
|
|
41997
42026
|
case 36:
|
|
41998
42027
|
case "end":
|
|
41999
|
-
return
|
|
42028
|
+
return _context29.stop();
|
|
42000
42029
|
}
|
|
42001
|
-
},
|
|
42030
|
+
}, _callee29, this);
|
|
42002
42031
|
}));
|
|
42003
|
-
function addToBasket(
|
|
42032
|
+
function addToBasket(_x79) {
|
|
42004
42033
|
return _addToBasket.apply(this, arguments);
|
|
42005
42034
|
}
|
|
42006
42035
|
return addToBasket;
|
|
@@ -42275,9 +42304,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42275
42304
|
key: "initApiForLogicOnly",
|
|
42276
42305
|
value: //just for testing purposes
|
|
42277
42306
|
function () {
|
|
42278
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42279
|
-
return _regeneratorRuntime.wrap(function
|
|
42280
|
-
while (1) switch (
|
|
42307
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
42308
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
42309
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
42281
42310
|
case 0:
|
|
42282
42311
|
//empty services
|
|
42283
42312
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -42290,17 +42319,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42290
42319
|
jwt: jwt,
|
|
42291
42320
|
apiKey: apiKey
|
|
42292
42321
|
}), handler);
|
|
42293
|
-
|
|
42322
|
+
_context30.next = 3;
|
|
42294
42323
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
42295
42324
|
case 3:
|
|
42296
42325
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
42297
42326
|
case 4:
|
|
42298
42327
|
case "end":
|
|
42299
|
-
return
|
|
42328
|
+
return _context30.stop();
|
|
42300
42329
|
}
|
|
42301
|
-
},
|
|
42330
|
+
}, _callee30, this);
|
|
42302
42331
|
}));
|
|
42303
|
-
function initApiForLogicOnly(
|
|
42332
|
+
function initApiForLogicOnly(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
|
|
42304
42333
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
42305
42334
|
}
|
|
42306
42335
|
return initApiForLogicOnly;
|
|
@@ -42313,16 +42342,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42313
42342
|
}, {
|
|
42314
42343
|
key: "loadBasket",
|
|
42315
42344
|
value: function () {
|
|
42316
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42317
|
-
return _regeneratorRuntime.wrap(function
|
|
42318
|
-
while (1) switch (
|
|
42345
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
42346
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
42347
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
42319
42348
|
case 0:
|
|
42320
|
-
return
|
|
42349
|
+
return _context31.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
42321
42350
|
case 1:
|
|
42322
42351
|
case "end":
|
|
42323
|
-
return
|
|
42352
|
+
return _context31.stop();
|
|
42324
42353
|
}
|
|
42325
|
-
},
|
|
42354
|
+
}, _callee31, this);
|
|
42326
42355
|
}));
|
|
42327
42356
|
function loadBasket() {
|
|
42328
42357
|
return _loadBasket.apply(this, arguments);
|
|
@@ -42337,39 +42366,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42337
42366
|
}, {
|
|
42338
42367
|
key: "initBasket",
|
|
42339
42368
|
value: function () {
|
|
42340
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42369
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(init3D, ignoreFavorites) {
|
|
42341
42370
|
var initSetState, set, basket;
|
|
42342
|
-
return _regeneratorRuntime.wrap(function
|
|
42343
|
-
while (1) switch (
|
|
42371
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
42372
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
42344
42373
|
case 0:
|
|
42345
42374
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
42346
42375
|
initSetState = this.getInitStateForSet(!init3D);
|
|
42347
42376
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
42348
|
-
|
|
42377
|
+
_context32.next = 5;
|
|
42349
42378
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
42350
42379
|
case 5:
|
|
42351
42380
|
//TODO check if when basket gets repaired the product match gets called
|
|
42352
42381
|
set = this.actSet();
|
|
42353
42382
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
42354
42383
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
42355
|
-
|
|
42384
|
+
_context32.next = 10;
|
|
42356
42385
|
break;
|
|
42357
42386
|
}
|
|
42358
|
-
|
|
42387
|
+
_context32.next = 10;
|
|
42359
42388
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
42360
42389
|
case 10:
|
|
42361
|
-
|
|
42390
|
+
_context32.next = 12;
|
|
42362
42391
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
42363
42392
|
case 12:
|
|
42364
|
-
basket =
|
|
42365
|
-
return
|
|
42393
|
+
basket = _context32.sent;
|
|
42394
|
+
return _context32.abrupt("return", basket);
|
|
42366
42395
|
case 14:
|
|
42367
42396
|
case "end":
|
|
42368
|
-
return
|
|
42397
|
+
return _context32.stop();
|
|
42369
42398
|
}
|
|
42370
|
-
},
|
|
42399
|
+
}, _callee32, this);
|
|
42371
42400
|
}));
|
|
42372
|
-
function initBasket(
|
|
42401
|
+
function initBasket(_x87, _x88) {
|
|
42373
42402
|
return _initBasket.apply(this, arguments);
|
|
42374
42403
|
}
|
|
42375
42404
|
return initBasket;
|
|
@@ -42383,21 +42412,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42383
42412
|
}, {
|
|
42384
42413
|
key: "getValidVariantsLength",
|
|
42385
42414
|
value: function () {
|
|
42386
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42415
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
42387
42416
|
var set;
|
|
42388
|
-
return _regeneratorRuntime.wrap(function
|
|
42389
|
-
while (1) switch (
|
|
42417
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
42418
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
42390
42419
|
case 0:
|
|
42391
42420
|
set = this.actSet();
|
|
42392
|
-
|
|
42421
|
+
_context33.next = 3;
|
|
42393
42422
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
42394
42423
|
case 3:
|
|
42395
|
-
return
|
|
42424
|
+
return _context33.abrupt("return", _context33.sent.length);
|
|
42396
42425
|
case 4:
|
|
42397
42426
|
case "end":
|
|
42398
|
-
return
|
|
42427
|
+
return _context33.stop();
|
|
42399
42428
|
}
|
|
42400
|
-
},
|
|
42429
|
+
}, _callee33, this);
|
|
42401
42430
|
}));
|
|
42402
42431
|
function getValidVariantsLength() {
|
|
42403
42432
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -42407,46 +42436,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42407
42436
|
}, {
|
|
42408
42437
|
key: "handleFavorites",
|
|
42409
42438
|
value: function () {
|
|
42410
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42439
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(mode) {
|
|
42411
42440
|
var _this5 = this;
|
|
42412
42441
|
var set, i;
|
|
42413
|
-
return _regeneratorRuntime.wrap(function
|
|
42414
|
-
while (1) switch (
|
|
42442
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
42443
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
42415
42444
|
case 0:
|
|
42416
42445
|
set = this.actSet();
|
|
42417
42446
|
i = 0;
|
|
42418
42447
|
case 2:
|
|
42419
42448
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
42420
|
-
|
|
42449
|
+
_context34.next = 11;
|
|
42421
42450
|
break;
|
|
42422
42451
|
}
|
|
42423
|
-
|
|
42452
|
+
_context34.next = 5;
|
|
42424
42453
|
return DivaUtils.Sleep(200);
|
|
42425
42454
|
case 5:
|
|
42426
42455
|
i++;
|
|
42427
42456
|
if (!(i > 1000)) {
|
|
42428
|
-
|
|
42457
|
+
_context34.next = 9;
|
|
42429
42458
|
break;
|
|
42430
42459
|
}
|
|
42431
42460
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
42432
|
-
return
|
|
42461
|
+
return _context34.abrupt("break", 11);
|
|
42433
42462
|
case 9:
|
|
42434
|
-
|
|
42463
|
+
_context34.next = 2;
|
|
42435
42464
|
break;
|
|
42436
42465
|
case 11:
|
|
42437
|
-
|
|
42466
|
+
_context34.next = 13;
|
|
42438
42467
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
42439
42468
|
return _this5.update2DGrid(set);
|
|
42440
42469
|
}, this.actions);
|
|
42441
42470
|
case 13:
|
|
42442
|
-
return
|
|
42471
|
+
return _context34.abrupt("return", _context34.sent);
|
|
42443
42472
|
case 14:
|
|
42444
42473
|
case "end":
|
|
42445
|
-
return
|
|
42474
|
+
return _context34.stop();
|
|
42446
42475
|
}
|
|
42447
|
-
},
|
|
42476
|
+
}, _callee34, this);
|
|
42448
42477
|
}));
|
|
42449
|
-
function handleFavorites(
|
|
42478
|
+
function handleFavorites(_x89) {
|
|
42450
42479
|
return _handleFavorites.apply(this, arguments);
|
|
42451
42480
|
}
|
|
42452
42481
|
return handleFavorites;
|
|
@@ -42459,48 +42488,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42459
42488
|
}, {
|
|
42460
42489
|
key: "initSapOrderLinesFromBasket",
|
|
42461
42490
|
value: function () {
|
|
42462
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42491
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(divaNr, init3D, onlyLoadOldBakset) {
|
|
42463
42492
|
var result, oldBasket, basket;
|
|
42464
|
-
return _regeneratorRuntime.wrap(function
|
|
42465
|
-
while (1) switch (
|
|
42493
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
42494
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
42466
42495
|
case 0:
|
|
42467
42496
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
42468
|
-
|
|
42497
|
+
_context35.next = 3;
|
|
42469
42498
|
return this.loadBasket();
|
|
42470
42499
|
case 3:
|
|
42471
|
-
result =
|
|
42500
|
+
result = _context35.sent;
|
|
42472
42501
|
if (!onlyLoadOldBakset) {
|
|
42473
|
-
|
|
42502
|
+
_context35.next = 6;
|
|
42474
42503
|
break;
|
|
42475
42504
|
}
|
|
42476
|
-
return
|
|
42505
|
+
return _context35.abrupt("return", {
|
|
42477
42506
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
42478
42507
|
cache: {}
|
|
42479
42508
|
});
|
|
42480
42509
|
case 6:
|
|
42481
42510
|
if (!(result === false)) {
|
|
42482
|
-
|
|
42511
|
+
_context35.next = 8;
|
|
42483
42512
|
break;
|
|
42484
42513
|
}
|
|
42485
42514
|
throw new Error('Could not load basket! ' + divaNr);
|
|
42486
42515
|
case 8:
|
|
42487
42516
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
42488
|
-
|
|
42517
|
+
_context35.next = 11;
|
|
42489
42518
|
return this.initBasket(init3D);
|
|
42490
42519
|
case 11:
|
|
42491
|
-
basket =
|
|
42492
|
-
return
|
|
42520
|
+
basket = _context35.sent;
|
|
42521
|
+
return _context35.abrupt("return", {
|
|
42493
42522
|
basket: basket,
|
|
42494
42523
|
oldBasket: oldBasket,
|
|
42495
42524
|
cache: this.api.getJsonDataCache()
|
|
42496
42525
|
});
|
|
42497
42526
|
case 13:
|
|
42498
42527
|
case "end":
|
|
42499
|
-
return
|
|
42528
|
+
return _context35.stop();
|
|
42500
42529
|
}
|
|
42501
|
-
},
|
|
42530
|
+
}, _callee35, this);
|
|
42502
42531
|
}));
|
|
42503
|
-
function initSapOrderLinesFromBasket(
|
|
42532
|
+
function initSapOrderLinesFromBasket(_x90, _x91, _x92) {
|
|
42504
42533
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
42505
42534
|
}
|
|
42506
42535
|
return initSapOrderLinesFromBasket;
|