@crystaldesign/web-planner-logic 25.1.1-rc.2 → 25.1.1-rc.4
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-05f5c87f.js → DivaBoxPlanner-d67753b0.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-da9dedf9.js → DivaStandardPlanner-4fada785.js} +2 -2
- package/build/cjs/{DoorPlanner-18fbe3e0.js → DoorPlanner-accb68c2.js} +1 -1
- package/build/cjs/{Host3DSignalR-a3adb49e.js → Host3DSignalR-e244a4ad.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-e2132a76.js → LiviqueWWSHandler-bfda2dd6.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-be21ea22.js → PfisterWWSHandler-65553ee6.js} +1 -1
- package/build/cjs/{PlannerHandler2D-e03bbd6f.js → PlannerHandler2D-55f0da44.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-b68b4e78.js → SeriousBasketHandler-0efbc620.js} +1 -1
- package/build/cjs/{ShelfPlanner-d0876962.js → ShelfPlanner-fb00965d.js} +1 -1
- package/build/cjs/{StandardWWSHandler-38dc10cd.js → StandardWWSHandler-893bab24.js} +1 -1
- package/build/cjs/{index-4b62cc1a.js → index-10acad68.js} +896 -800
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-853509f6.js → DivaBoxPlanner-4f414fd5.js} +2 -2
- package/build/esm/{DivaStandardPlanner-59084a0f.js → DivaStandardPlanner-ad8a2dd7.js} +2 -2
- package/build/esm/{DoorPlanner-f70b9496.js → DoorPlanner-0a145dd6.js} +1 -1
- package/build/esm/{Host3DSignalR-46ebbf05.js → Host3DSignalR-01d307c2.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-e6eae72b.js → LiviqueWWSHandler-6b584c37.js} +1 -1
- package/build/esm/{PfisterWWSHandler-afca2bc9.js → PfisterWWSHandler-b7e1ed72.js} +1 -1
- package/build/esm/{PlannerHandler2D-44ed0367.js → PlannerHandler2D-d574af79.js} +1 -1
- package/build/esm/{SeriousBasketHandler-9c064215.js → SeriousBasketHandler-069a795c.js} +1 -1
- package/build/esm/{ShelfPlanner-50ca81aa.js → ShelfPlanner-66bdce62.js} +1 -1
- package/build/esm/{StandardWWSHandler-1035f751.js → StandardWWSHandler-37a30338.js} +1 -1
- package/build/esm/{index-5bde0a2f.js → index-992871cb.js} +896 -800
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -23982,7 +23982,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23982
23982
|
break;
|
|
23983
23983
|
}
|
|
23984
23984
|
_context.next = 4;
|
|
23985
|
-
return import('./ShelfPlanner-
|
|
23985
|
+
return import('./ShelfPlanner-66bdce62.js');
|
|
23986
23986
|
case 4:
|
|
23987
23987
|
_yield$import = _context.sent;
|
|
23988
23988
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -28659,7 +28659,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28659
28659
|
break;
|
|
28660
28660
|
}
|
|
28661
28661
|
_context5.next = 3;
|
|
28662
|
-
return import('./DoorPlanner-
|
|
28662
|
+
return import('./DoorPlanner-0a145dd6.js');
|
|
28663
28663
|
case 3:
|
|
28664
28664
|
_yield$import = _context5.sent;
|
|
28665
28665
|
DoorPlanner = _yield$import["default"];
|
|
@@ -32434,13 +32434,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32434
32434
|
}()
|
|
32435
32435
|
}, {
|
|
32436
32436
|
key: "moveShelfItem",
|
|
32437
|
-
value: function
|
|
32438
|
-
var
|
|
32439
|
-
|
|
32440
|
-
return
|
|
32437
|
+
value: function () {
|
|
32438
|
+
var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, grid, initialIndex, finalIndex) {
|
|
32439
|
+
var article;
|
|
32440
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context18) {
|
|
32441
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
32442
|
+
case 0:
|
|
32443
|
+
article = set.getArticleByBasketId(grid.basketId);
|
|
32444
|
+
if (!(article && article.shelfPlanner)) {
|
|
32445
|
+
_context18.next = 5;
|
|
32446
|
+
break;
|
|
32447
|
+
}
|
|
32448
|
+
_context18.next = 4;
|
|
32449
|
+
return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
|
|
32450
|
+
case 4:
|
|
32451
|
+
return _context18.abrupt("return", _context18.sent);
|
|
32452
|
+
case 5:
|
|
32453
|
+
return _context18.abrupt("return", 'NOTHING_CHANGED');
|
|
32454
|
+
case 6:
|
|
32455
|
+
case "end":
|
|
32456
|
+
return _context18.stop();
|
|
32457
|
+
}
|
|
32458
|
+
}, _callee16);
|
|
32459
|
+
}));
|
|
32460
|
+
function moveShelfItem(_x52, _x53, _x54, _x55) {
|
|
32461
|
+
return _moveShelfItem.apply(this, arguments);
|
|
32441
32462
|
}
|
|
32442
|
-
return
|
|
32443
|
-
}
|
|
32463
|
+
return moveShelfItem;
|
|
32464
|
+
}()
|
|
32444
32465
|
}, {
|
|
32445
32466
|
key: "selectShelfAccArticle",
|
|
32446
32467
|
value: function selectShelfAccArticle(set, gridGroup, targetArticles, articleCodex) {
|
|
@@ -32457,11 +32478,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32457
32478
|
}, {
|
|
32458
32479
|
key: "getFreeShelfGrids",
|
|
32459
32480
|
value: function () {
|
|
32460
|
-
var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32481
|
+
var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, gridGroup) {
|
|
32461
32482
|
var _article$shelfPlanner;
|
|
32462
32483
|
var articles, article, articleCodex, accessoire, ret;
|
|
32463
|
-
return _regeneratorRuntime.wrap(function
|
|
32464
|
-
while (1) switch (
|
|
32484
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context19) {
|
|
32485
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
32465
32486
|
case 0:
|
|
32466
32487
|
articles = set.getDivaArticlesByGridGroup(gridGroup);
|
|
32467
32488
|
article = Object.values(articles).find(function (a) {
|
|
@@ -32470,38 +32491,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32470
32491
|
});
|
|
32471
32492
|
articleCodex = article === null || article === void 0 || (_article$shelfPlanner = article.shelfPlanner) === null || _article$shelfPlanner === void 0 ? void 0 : _article$shelfPlanner.getSelectedAccessoireById(gridGroup);
|
|
32472
32493
|
if (!(!article || !articleCodex)) {
|
|
32473
|
-
|
|
32494
|
+
_context19.next = 5;
|
|
32474
32495
|
break;
|
|
32475
32496
|
}
|
|
32476
|
-
return
|
|
32497
|
+
return _context19.abrupt("return", undefined);
|
|
32477
32498
|
case 5:
|
|
32478
|
-
|
|
32499
|
+
_context19.next = 7;
|
|
32479
32500
|
return this.addArticleToActSet(set, articleCodex, {
|
|
32480
32501
|
relatedToBasketId: article.basketId,
|
|
32481
32502
|
relatedToShelf: article.basketId,
|
|
32482
32503
|
relatedToShelfGrid: 0
|
|
32483
32504
|
}, false, 'toDeleteShelf');
|
|
32484
32505
|
case 7:
|
|
32485
|
-
accessoire =
|
|
32486
|
-
|
|
32506
|
+
accessoire = _context19.sent;
|
|
32507
|
+
_context19.next = 10;
|
|
32487
32508
|
return accessoire.updateShelfPlannerState({});
|
|
32488
32509
|
case 10:
|
|
32489
32510
|
articleHandlerInstance.initCfgValues(accessoire, {});
|
|
32490
|
-
|
|
32511
|
+
_context19.next = 13;
|
|
32491
32512
|
return articleHandlerInstance.updateCfgValues(accessoire, {}, {}, true, true);
|
|
32492
32513
|
case 13:
|
|
32493
32514
|
ret = this.getFreePlaces(gridGroup, articles, accessoire);
|
|
32494
|
-
|
|
32515
|
+
_context19.next = 16;
|
|
32495
32516
|
return this.deleteElementFromSet(set, accessoire, undefined, undefined, true);
|
|
32496
32517
|
case 16:
|
|
32497
|
-
return
|
|
32518
|
+
return _context19.abrupt("return", ret);
|
|
32498
32519
|
case 17:
|
|
32499
32520
|
case "end":
|
|
32500
|
-
return
|
|
32521
|
+
return _context19.stop();
|
|
32501
32522
|
}
|
|
32502
|
-
},
|
|
32523
|
+
}, _callee17, this);
|
|
32503
32524
|
}));
|
|
32504
|
-
function getFreeShelfGrids(
|
|
32525
|
+
function getFreeShelfGrids(_x56, _x57) {
|
|
32505
32526
|
return _getFreeShelfGrids.apply(this, arguments);
|
|
32506
32527
|
}
|
|
32507
32528
|
return getFreeShelfGrids;
|
|
@@ -32560,62 +32581,62 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32560
32581
|
}, {
|
|
32561
32582
|
key: "moveShelfItemToGrid",
|
|
32562
32583
|
value: function () {
|
|
32563
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32584
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
32564
32585
|
var _oldGrid$Cells$find;
|
|
32565
32586
|
var artices, accessoire, oldParent, newParent, oldGrid, newGrid, index;
|
|
32566
|
-
return _regeneratorRuntime.wrap(function
|
|
32567
|
-
while (1) switch (
|
|
32587
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context20) {
|
|
32588
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
32568
32589
|
case 0:
|
|
32569
32590
|
artices = set.getDivaArticles();
|
|
32570
32591
|
accessoire = artices[accessoireBasketId];
|
|
32571
32592
|
oldParent = accessoire.accessoireParentArticle;
|
|
32572
32593
|
newParent = artices[parentBasketId];
|
|
32573
32594
|
if (!(accessoire.relatedToShelfGrid === undefined)) {
|
|
32574
|
-
|
|
32595
|
+
_context20.next = 6;
|
|
32575
32596
|
break;
|
|
32576
32597
|
}
|
|
32577
|
-
return
|
|
32598
|
+
return _context20.abrupt("return");
|
|
32578
32599
|
case 6:
|
|
32579
32600
|
if (oldParent !== null && oldParent !== void 0 && oldParent.shelfPlanner) {
|
|
32580
|
-
|
|
32601
|
+
_context20.next = 8;
|
|
32581
32602
|
break;
|
|
32582
32603
|
}
|
|
32583
|
-
return
|
|
32604
|
+
return _context20.abrupt("return");
|
|
32584
32605
|
case 8:
|
|
32585
32606
|
if (newParent !== null && newParent !== void 0 && newParent.shelfPlanner) {
|
|
32586
|
-
|
|
32607
|
+
_context20.next = 10;
|
|
32587
32608
|
break;
|
|
32588
32609
|
}
|
|
32589
|
-
return
|
|
32610
|
+
return _context20.abrupt("return");
|
|
32590
32611
|
case 10:
|
|
32591
32612
|
oldGrid = oldParent.shelfPlanner.getGridByIndex(accessoire.relatedToShelfGrid);
|
|
32592
32613
|
newGrid = newParent.shelfPlanner.getGridByGridName(gridName);
|
|
32593
32614
|
if (oldGrid) {
|
|
32594
|
-
|
|
32615
|
+
_context20.next = 14;
|
|
32595
32616
|
break;
|
|
32596
32617
|
}
|
|
32597
|
-
return
|
|
32618
|
+
return _context20.abrupt("return");
|
|
32598
32619
|
case 14:
|
|
32599
32620
|
if (newGrid) {
|
|
32600
|
-
|
|
32621
|
+
_context20.next = 16;
|
|
32601
32622
|
break;
|
|
32602
32623
|
}
|
|
32603
|
-
return
|
|
32624
|
+
return _context20.abrupt("return");
|
|
32604
32625
|
case 16:
|
|
32605
32626
|
index = oldGrid === null || oldGrid === void 0 || (_oldGrid$Cells$find = oldGrid.Cells.find(function (c, i) {
|
|
32606
32627
|
var _c$Article;
|
|
32607
32628
|
return c.Index === c.InUse && ((_c$Article = c.Article) === null || _c$Article === void 0 ? void 0 : _c$Article.basketId) == accessoire.basketId;
|
|
32608
32629
|
})) === null || _oldGrid$Cells$find === void 0 ? void 0 : _oldGrid$Cells$find.Index;
|
|
32609
32630
|
if (!(index === undefined)) {
|
|
32610
|
-
|
|
32631
|
+
_context20.next = 19;
|
|
32611
32632
|
break;
|
|
32612
32633
|
}
|
|
32613
|
-
return
|
|
32634
|
+
return _context20.abrupt("return");
|
|
32614
32635
|
case 19:
|
|
32615
|
-
|
|
32636
|
+
_context20.next = 21;
|
|
32616
32637
|
return oldParent.shelfPlanner.deleteAccessoireOfCellInGrid(accessoire.relatedToShelfGrid, index);
|
|
32617
32638
|
case 21:
|
|
32618
|
-
|
|
32639
|
+
_context20.next = 23;
|
|
32619
32640
|
return newParent.shelfPlanner.addAccessoireInCellInGrid(accessoire, newGrid.ShelfIndex, cellIndex, 'fitsOn');
|
|
32620
32641
|
case 23:
|
|
32621
32642
|
accessoire.relatedToShelfGrid = newGrid.ShelfIndex;
|
|
@@ -32627,17 +32648,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32627
32648
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(oldParent.basketId).basketId);
|
|
32628
32649
|
}
|
|
32629
32650
|
set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(newParent.basketId).basketId);
|
|
32630
|
-
|
|
32651
|
+
_context20.next = 28;
|
|
32631
32652
|
return this.updateArticlesOptionStatesOfActSet(set, {}, [oldParent.basketId, newParent.basketId]);
|
|
32632
32653
|
case 28:
|
|
32633
|
-
return
|
|
32654
|
+
return _context20.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
|
|
32634
32655
|
case 29:
|
|
32635
32656
|
case "end":
|
|
32636
|
-
return
|
|
32657
|
+
return _context20.stop();
|
|
32637
32658
|
}
|
|
32638
|
-
},
|
|
32659
|
+
}, _callee18, this);
|
|
32639
32660
|
}));
|
|
32640
|
-
function moveShelfItemToGrid(
|
|
32661
|
+
function moveShelfItemToGrid(_x58, _x59, _x60, _x61, _x62) {
|
|
32641
32662
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
32642
32663
|
}
|
|
32643
32664
|
return moveShelfItemToGrid;
|
|
@@ -32645,33 +32666,33 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32645
32666
|
}, {
|
|
32646
32667
|
key: "deleteAccessorieOnShelfPlanner",
|
|
32647
32668
|
value: function () {
|
|
32648
|
-
var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32669
|
+
var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, gridIndex, cellIndex, parentBasketId, dontReload) {
|
|
32649
32670
|
var _parentArticle$shelfP2;
|
|
32650
32671
|
var parentArticle, articeToDelete, _parentArticle$shelfP3;
|
|
32651
|
-
return _regeneratorRuntime.wrap(function
|
|
32652
|
-
while (1) switch (
|
|
32672
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context21) {
|
|
32673
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
32653
32674
|
case 0:
|
|
32654
32675
|
parentArticle = set.getArticleByBasketId(parentBasketId);
|
|
32655
|
-
|
|
32676
|
+
_context21.next = 3;
|
|
32656
32677
|
return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP2 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP2 === void 0 ? void 0 : _parentArticle$shelfP2.deleteAccessoireOfCellInGrid(gridIndex, cellIndex);
|
|
32657
32678
|
case 3:
|
|
32658
|
-
articeToDelete =
|
|
32679
|
+
articeToDelete = _context21.sent;
|
|
32659
32680
|
if (!articeToDelete) {
|
|
32660
|
-
|
|
32681
|
+
_context21.next = 9;
|
|
32661
32682
|
break;
|
|
32662
32683
|
}
|
|
32663
|
-
|
|
32684
|
+
_context21.next = 7;
|
|
32664
32685
|
return this.deleteElementFromSet(set, articeToDelete, false, undefined, dontReload);
|
|
32665
32686
|
case 7:
|
|
32666
|
-
|
|
32687
|
+
_context21.next = 9;
|
|
32667
32688
|
return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged({});
|
|
32668
32689
|
case 9:
|
|
32669
32690
|
case "end":
|
|
32670
|
-
return
|
|
32691
|
+
return _context21.stop();
|
|
32671
32692
|
}
|
|
32672
|
-
},
|
|
32693
|
+
}, _callee19, this);
|
|
32673
32694
|
}));
|
|
32674
|
-
function deleteAccessorieOnShelfPlanner(
|
|
32695
|
+
function deleteAccessorieOnShelfPlanner(_x63, _x64, _x65, _x66, _x67) {
|
|
32675
32696
|
return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
|
|
32676
32697
|
}
|
|
32677
32698
|
return deleteAccessorieOnShelfPlanner;
|
|
@@ -32679,25 +32700,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32679
32700
|
}, {
|
|
32680
32701
|
key: "updatePlannerTrans",
|
|
32681
32702
|
value: function () {
|
|
32682
|
-
var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32703
|
+
var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
|
|
32683
32704
|
var updateConfig;
|
|
32684
|
-
return _regeneratorRuntime.wrap(function
|
|
32685
|
-
while (1) switch (
|
|
32705
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context22) {
|
|
32706
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
32686
32707
|
case 0:
|
|
32687
32708
|
updateConfig = set.plannerHandler.updatePlannerTrans(set.getSetId(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
|
|
32688
32709
|
if (!updateConfig) {
|
|
32689
|
-
|
|
32710
|
+
_context22.next = 4;
|
|
32690
32711
|
break;
|
|
32691
32712
|
}
|
|
32692
|
-
|
|
32713
|
+
_context22.next = 4;
|
|
32693
32714
|
return this.updateArticlesOptionStatesOfActSet(set, {}, [], true, 'initializingAfterTrans');
|
|
32694
32715
|
case 4:
|
|
32695
32716
|
case "end":
|
|
32696
|
-
return
|
|
32717
|
+
return _context22.stop();
|
|
32697
32718
|
}
|
|
32698
|
-
},
|
|
32719
|
+
}, _callee20, this);
|
|
32699
32720
|
}));
|
|
32700
|
-
function updatePlannerTrans(
|
|
32721
|
+
function updatePlannerTrans(_x68, _x69, _x70, _x71, _x72, _x73, _x74) {
|
|
32701
32722
|
return _updatePlannerTrans.apply(this, arguments);
|
|
32702
32723
|
}
|
|
32703
32724
|
return updatePlannerTrans;
|
|
@@ -32773,10 +32794,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32773
32794
|
}, {
|
|
32774
32795
|
key: "deleteAccessoire",
|
|
32775
32796
|
value: function () {
|
|
32776
|
-
var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32797
|
+
var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, articleCodex, parentBasketId) {
|
|
32777
32798
|
var divaArticles, articlesToDelete, key, articleToDelete, maxQuantity, i;
|
|
32778
|
-
return _regeneratorRuntime.wrap(function
|
|
32779
|
-
while (1) switch (
|
|
32799
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context23) {
|
|
32800
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
32780
32801
|
case 0:
|
|
32781
32802
|
divaArticles = set.getDivaArticles();
|
|
32782
32803
|
articlesToDelete = [];
|
|
@@ -32788,7 +32809,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32788
32809
|
}
|
|
32789
32810
|
}
|
|
32790
32811
|
if (!(articlesToDelete.length > 0)) {
|
|
32791
|
-
|
|
32812
|
+
_context23.next = 17;
|
|
32792
32813
|
break;
|
|
32793
32814
|
}
|
|
32794
32815
|
articlesToDelete.sort(function (a, b) {
|
|
@@ -32802,27 +32823,27 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32802
32823
|
}
|
|
32803
32824
|
}
|
|
32804
32825
|
if (!(articleToDelete.quantity > 1)) {
|
|
32805
|
-
|
|
32826
|
+
_context23.next = 14;
|
|
32806
32827
|
break;
|
|
32807
32828
|
}
|
|
32808
|
-
|
|
32829
|
+
_context23.next = 11;
|
|
32809
32830
|
return articleHandlerInstance.updateAccessoireQuantity(articleToDelete, articleToDelete.quantity - 1);
|
|
32810
32831
|
case 11:
|
|
32811
|
-
return
|
|
32832
|
+
return _context23.abrupt("return", true);
|
|
32812
32833
|
case 14:
|
|
32813
|
-
|
|
32834
|
+
_context23.next = 16;
|
|
32814
32835
|
return this.deleteElementFromSet(articleToDelete.set, articleToDelete);
|
|
32815
32836
|
case 16:
|
|
32816
|
-
return
|
|
32837
|
+
return _context23.abrupt("return", _context23.sent);
|
|
32817
32838
|
case 17:
|
|
32818
|
-
return
|
|
32839
|
+
return _context23.abrupt("return", false);
|
|
32819
32840
|
case 18:
|
|
32820
32841
|
case "end":
|
|
32821
|
-
return
|
|
32842
|
+
return _context23.stop();
|
|
32822
32843
|
}
|
|
32823
|
-
},
|
|
32844
|
+
}, _callee21, this);
|
|
32824
32845
|
}));
|
|
32825
|
-
function deleteAccessoire(
|
|
32846
|
+
function deleteAccessoire(_x75, _x76, _x77) {
|
|
32826
32847
|
return _deleteAccessoire.apply(this, arguments);
|
|
32827
32848
|
}
|
|
32828
32849
|
return deleteAccessoire;
|
|
@@ -32948,19 +32969,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32948
32969
|
}, {
|
|
32949
32970
|
key: "configSingleIsChanged",
|
|
32950
32971
|
value: (function () {
|
|
32951
|
-
var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
32972
|
+
var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, newIsConfigSingle, groupedOptions, groupedArticles) {
|
|
32952
32973
|
var _set$getArticleByBask4, variantValues, key;
|
|
32953
|
-
return _regeneratorRuntime.wrap(function
|
|
32954
|
-
while (1) switch (
|
|
32974
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context24) {
|
|
32975
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
32955
32976
|
case 0:
|
|
32956
32977
|
set.configSingle = newIsConfigSingle;
|
|
32957
32978
|
if (!(!set.configSingle && !set.CatalogData.onConfigSingleDontGeneralize && groupedOptions && groupedArticles)) {
|
|
32958
|
-
|
|
32979
|
+
_context24.next = 7;
|
|
32959
32980
|
break;
|
|
32960
32981
|
}
|
|
32961
32982
|
variantValues = (_set$getArticleByBask4 = set.getArticleByBasketId(groupedArticles[0])) === null || _set$getArticleByBask4 === void 0 ? void 0 : _set$getArticleByBask4.VariantValues;
|
|
32962
32983
|
if (!variantValues) {
|
|
32963
|
-
|
|
32984
|
+
_context24.next = 7;
|
|
32964
32985
|
break;
|
|
32965
32986
|
}
|
|
32966
32987
|
for (key in variantValues) {
|
|
@@ -32968,15 +32989,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32968
32989
|
delete variantValues[key];
|
|
32969
32990
|
}
|
|
32970
32991
|
}
|
|
32971
|
-
|
|
32992
|
+
_context24.next = 7;
|
|
32972
32993
|
return this.updateArticlesOptionStatesOfActSet(set, variantValues, groupedArticles);
|
|
32973
32994
|
case 7:
|
|
32974
32995
|
case "end":
|
|
32975
|
-
return
|
|
32996
|
+
return _context24.stop();
|
|
32976
32997
|
}
|
|
32977
|
-
},
|
|
32998
|
+
}, _callee22, this);
|
|
32978
32999
|
}));
|
|
32979
|
-
function configSingleIsChanged(
|
|
33000
|
+
function configSingleIsChanged(_x78, _x79, _x80, _x81) {
|
|
32980
33001
|
return _configSingleIsChanged.apply(this, arguments);
|
|
32981
33002
|
}
|
|
32982
33003
|
return configSingleIsChanged;
|
|
@@ -33073,26 +33094,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33073
33094
|
}, {
|
|
33074
33095
|
key: "loadConfigItemsOfActSetByConfigStepKey",
|
|
33075
33096
|
value: function () {
|
|
33076
|
-
var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33097
|
+
var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configStepKey, visible) {
|
|
33077
33098
|
var _configItems$option;
|
|
33078
33099
|
var configItems, paletteType, filterType, stepInfo, contentItemId;
|
|
33079
|
-
return _regeneratorRuntime.wrap(function
|
|
33080
|
-
while (1) switch (
|
|
33100
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context25) {
|
|
33101
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
33081
33102
|
case 0:
|
|
33082
|
-
|
|
33103
|
+
_context25.next = 2;
|
|
33083
33104
|
return configTreeHandler.getConifgItemsForView(set, configStepKey);
|
|
33084
33105
|
case 2:
|
|
33085
|
-
configItems =
|
|
33106
|
+
configItems = _context25.sent;
|
|
33086
33107
|
paletteType = set.configTree.getCurPaletteType(set, configStepKey);
|
|
33087
33108
|
configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
|
|
33088
|
-
|
|
33109
|
+
_context25.next = 7;
|
|
33089
33110
|
return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType);
|
|
33090
33111
|
case 7:
|
|
33091
|
-
configItems.configItems =
|
|
33112
|
+
configItems.configItems = _context25.sent;
|
|
33092
33113
|
filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
|
|
33093
33114
|
stepInfo = set.configTree.getStepInfo(configStepKey);
|
|
33094
33115
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
33095
|
-
return
|
|
33116
|
+
return _context25.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
|
|
33096
33117
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
33097
33118
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
33098
33119
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -33105,11 +33126,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33105
33126
|
}));
|
|
33106
33127
|
case 12:
|
|
33107
33128
|
case "end":
|
|
33108
|
-
return
|
|
33129
|
+
return _context25.stop();
|
|
33109
33130
|
}
|
|
33110
|
-
},
|
|
33131
|
+
}, _callee23, this);
|
|
33111
33132
|
}));
|
|
33112
|
-
function loadConfigItemsOfActSetByConfigStepKey(
|
|
33133
|
+
function loadConfigItemsOfActSetByConfigStepKey(_x82, _x83, _x84) {
|
|
33113
33134
|
return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
|
|
33114
33135
|
}
|
|
33115
33136
|
return loadConfigItemsOfActSetByConfigStepKey;
|
|
@@ -33151,29 +33172,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33151
33172
|
}, {
|
|
33152
33173
|
key: "variantsEvaluator",
|
|
33153
33174
|
value: (function () {
|
|
33154
|
-
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33175
|
+
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, configStepKey, paletteType) {
|
|
33155
33176
|
var _set$ViewConfig,
|
|
33156
33177
|
_set$api$ReturnToFrom,
|
|
33157
33178
|
_set$CatalogData$show,
|
|
33158
33179
|
_set$CatalogData$hide,
|
|
33159
33180
|
_this = this;
|
|
33160
33181
|
var opt, previewType, targetArticles, variants;
|
|
33161
|
-
return _regeneratorRuntime.wrap(function
|
|
33162
|
-
while (1) switch (
|
|
33182
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context26) {
|
|
33183
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
33163
33184
|
case 0:
|
|
33164
33185
|
opt = set.CatalogData.getOption(configItems[0].op);
|
|
33165
33186
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
33166
33187
|
if (!(!opt || !previewType || opt.mergeIDMToOPG || opt.isDescribingState || configItems[0].isOPVG || configItems.length == 1 || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR') || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)))) {
|
|
33167
|
-
|
|
33188
|
+
_context26.next = 4;
|
|
33168
33189
|
break;
|
|
33169
33190
|
}
|
|
33170
|
-
return
|
|
33191
|
+
return _context26.abrupt("return", configItems);
|
|
33171
33192
|
case 4:
|
|
33172
33193
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
33173
|
-
|
|
33194
|
+
_context26.next = 7;
|
|
33174
33195
|
return this.calcVariants(set, configItems, targetArticles, opt.codex);
|
|
33175
33196
|
case 7:
|
|
33176
|
-
variants =
|
|
33197
|
+
variants = _context26.sent;
|
|
33177
33198
|
if (previewType) {
|
|
33178
33199
|
configItems.map(function (c, index) {
|
|
33179
33200
|
return c.pricePreviewPromise = {
|
|
@@ -33182,14 +33203,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33182
33203
|
};
|
|
33183
33204
|
});
|
|
33184
33205
|
}
|
|
33185
|
-
return
|
|
33206
|
+
return _context26.abrupt("return", configItems);
|
|
33186
33207
|
case 10:
|
|
33187
33208
|
case "end":
|
|
33188
|
-
return
|
|
33209
|
+
return _context26.stop();
|
|
33189
33210
|
}
|
|
33190
|
-
},
|
|
33211
|
+
}, _callee24, this);
|
|
33191
33212
|
}));
|
|
33192
|
-
function variantsEvaluator(
|
|
33213
|
+
function variantsEvaluator(_x85, _x86, _x87, _x88) {
|
|
33193
33214
|
return _variantsEvaluator.apply(this, arguments);
|
|
33194
33215
|
}
|
|
33195
33216
|
return variantsEvaluator;
|
|
@@ -33197,10 +33218,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33197
33218
|
}, {
|
|
33198
33219
|
key: "calcVariants",
|
|
33199
33220
|
value: function () {
|
|
33200
|
-
var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33221
|
+
var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(realSet, configItems, targetArticles, optionCodex) {
|
|
33201
33222
|
var variantInfo, set, articles, origPrice, articleConfigs, i, basketId, totalConfig, key, parentNames, _i5, configItem, _configItem$parentNam, _configItem$parentNam2;
|
|
33202
|
-
return _regeneratorRuntime.wrap(function
|
|
33203
|
-
while (1) switch (
|
|
33223
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context27) {
|
|
33224
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
33204
33225
|
case 0:
|
|
33205
33226
|
variantInfo = [];
|
|
33206
33227
|
set = realSet.cloneSet();
|
|
@@ -33225,37 +33246,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33225
33246
|
_i5 = 0;
|
|
33226
33247
|
case 10:
|
|
33227
33248
|
if (!(_i5 < configItems.length)) {
|
|
33228
|
-
|
|
33249
|
+
_context27.next = 23;
|
|
33229
33250
|
break;
|
|
33230
33251
|
}
|
|
33231
33252
|
configItem = configItems[_i5];
|
|
33232
33253
|
if (!(configItem.parentName && configItem.isParentOPVG || configItem.idmOpgValCodex)) {
|
|
33233
|
-
|
|
33254
|
+
_context27.next = 19;
|
|
33234
33255
|
break;
|
|
33235
33256
|
}
|
|
33236
33257
|
if (!parentNames.includes((_configItem$parentNam = configItem.parentName) !== null && _configItem$parentNam !== void 0 ? _configItem$parentNam : configItem.idmOpgValCodex)) {
|
|
33237
|
-
|
|
33258
|
+
_context27.next = 18;
|
|
33238
33259
|
break;
|
|
33239
33260
|
}
|
|
33240
33261
|
variantInfo.push(variantInfo[_i5 - 1]);
|
|
33241
|
-
return
|
|
33262
|
+
return _context27.abrupt("continue", 20);
|
|
33242
33263
|
case 18:
|
|
33243
33264
|
parentNames.push((_configItem$parentNam2 = configItem.parentName) !== null && _configItem$parentNam2 !== void 0 ? _configItem$parentNam2 : configItem.idmOpgValCodex);
|
|
33244
33265
|
case 19:
|
|
33245
33266
|
variantInfo.push(this.getVariant(set, configItem, articleConfigs, totalConfig, targetArticles, optionCodex, origPrice, _i5, variantInfo[_i5 - 1]));
|
|
33246
33267
|
case 20:
|
|
33247
33268
|
_i5++;
|
|
33248
|
-
|
|
33269
|
+
_context27.next = 10;
|
|
33249
33270
|
break;
|
|
33250
33271
|
case 23:
|
|
33251
|
-
return
|
|
33272
|
+
return _context27.abrupt("return", variantInfo);
|
|
33252
33273
|
case 24:
|
|
33253
33274
|
case "end":
|
|
33254
|
-
return
|
|
33275
|
+
return _context27.stop();
|
|
33255
33276
|
}
|
|
33256
|
-
},
|
|
33277
|
+
}, _callee25, this);
|
|
33257
33278
|
}));
|
|
33258
|
-
function calcVariants(
|
|
33279
|
+
function calcVariants(_x89, _x90, _x91, _x92) {
|
|
33259
33280
|
return _calcVariants.apply(this, arguments);
|
|
33260
33281
|
}
|
|
33261
33282
|
return calcVariants;
|
|
@@ -33263,23 +33284,23 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33263
33284
|
}, {
|
|
33264
33285
|
key: "getVariant",
|
|
33265
33286
|
value: function () {
|
|
33266
|
-
var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33287
|
+
var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
|
|
33267
33288
|
var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, basketId, origConfig, key, hash, dataHash, _i6, endTime, calcTime, price, priceObj;
|
|
33268
|
-
return _regeneratorRuntime.wrap(function
|
|
33269
|
-
while (1) switch (
|
|
33289
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context28) {
|
|
33290
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
33270
33291
|
case 0:
|
|
33271
33292
|
firstPrice = undefined;
|
|
33272
33293
|
prevProm = undefined;
|
|
33273
33294
|
if (!previousPromise) {
|
|
33274
|
-
|
|
33295
|
+
_context28.next = 9;
|
|
33275
33296
|
break;
|
|
33276
33297
|
}
|
|
33277
|
-
|
|
33298
|
+
_context28.next = 5;
|
|
33278
33299
|
return previousPromise;
|
|
33279
33300
|
case 5:
|
|
33280
|
-
prevProm =
|
|
33301
|
+
prevProm = _context28.sent;
|
|
33281
33302
|
firstPrice = prevProm.firstPrice;
|
|
33282
|
-
|
|
33303
|
+
_context28.next = 10;
|
|
33283
33304
|
break;
|
|
33284
33305
|
case 9:
|
|
33285
33306
|
firstPrice = set.getSetPrice();
|
|
@@ -33312,11 +33333,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33312
33333
|
hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
|
|
33313
33334
|
dataHash = set.CatalogData.getVariantsPriceByHash(hash);
|
|
33314
33335
|
if (!dataHash) {
|
|
33315
|
-
|
|
33336
|
+
_context28.next = 21;
|
|
33316
33337
|
break;
|
|
33317
33338
|
}
|
|
33318
33339
|
LOG$9.debug('calcingVariant from Option:' + optionCodex + ' and index: ' + index + ' hash hit!', dataHash, [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))), targetArticles);
|
|
33319
|
-
return
|
|
33340
|
+
return _context28.abrupt("return", _objectSpread$9(_objectSpread$9({}, dataHash), {}, {
|
|
33320
33341
|
origPrice: origPrice,
|
|
33321
33342
|
firstPrice: firstPrice
|
|
33322
33343
|
}));
|
|
@@ -33324,14 +33345,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33324
33345
|
_i6 = 0;
|
|
33325
33346
|
case 22:
|
|
33326
33347
|
if (!(_i6 < variantValues.length)) {
|
|
33327
|
-
|
|
33348
|
+
_context28.next = 28;
|
|
33328
33349
|
break;
|
|
33329
33350
|
}
|
|
33330
|
-
|
|
33351
|
+
_context28.next = 25;
|
|
33331
33352
|
return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i6], [targetArticles[_i6]], true, 'calcVariant');
|
|
33332
33353
|
case 25:
|
|
33333
33354
|
_i6++;
|
|
33334
|
-
|
|
33355
|
+
_context28.next = 22;
|
|
33335
33356
|
break;
|
|
33336
33357
|
case 28:
|
|
33337
33358
|
endTime = new Date();
|
|
@@ -33349,14 +33370,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33349
33370
|
hashObj: [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))
|
|
33350
33371
|
};
|
|
33351
33372
|
set.CatalogData.setVariantsPriceByHash(hash, priceObj);
|
|
33352
|
-
return
|
|
33373
|
+
return _context28.abrupt("return", priceObj);
|
|
33353
33374
|
case 35:
|
|
33354
33375
|
case "end":
|
|
33355
|
-
return
|
|
33376
|
+
return _context28.stop();
|
|
33356
33377
|
}
|
|
33357
|
-
},
|
|
33378
|
+
}, _callee26, this);
|
|
33358
33379
|
}));
|
|
33359
|
-
function getVariant(
|
|
33380
|
+
function getVariant(_x93, _x94, _x95, _x96, _x97, _x98, _x99, _x100, _x101) {
|
|
33360
33381
|
return _getVariant.apply(this, arguments);
|
|
33361
33382
|
}
|
|
33362
33383
|
return getVariant;
|
|
@@ -33364,53 +33385,53 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33364
33385
|
}, {
|
|
33365
33386
|
key: "checkIfPriceDiffers",
|
|
33366
33387
|
value: function () {
|
|
33367
|
-
var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33388
|
+
var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(promises) {
|
|
33368
33389
|
var results, i, price, j;
|
|
33369
|
-
return _regeneratorRuntime.wrap(function
|
|
33370
|
-
while (1) switch (
|
|
33390
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context29) {
|
|
33391
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
33371
33392
|
case 0:
|
|
33372
33393
|
results = [];
|
|
33373
33394
|
i = 0;
|
|
33374
33395
|
case 2:
|
|
33375
33396
|
if (!(i < promises.length)) {
|
|
33376
|
-
|
|
33397
|
+
_context29.next = 19;
|
|
33377
33398
|
break;
|
|
33378
33399
|
}
|
|
33379
|
-
|
|
33380
|
-
|
|
33400
|
+
_context29.t0 = results;
|
|
33401
|
+
_context29.next = 6;
|
|
33381
33402
|
return promises[i];
|
|
33382
33403
|
case 6:
|
|
33383
|
-
|
|
33384
|
-
|
|
33404
|
+
_context29.t1 = _context29.sent;
|
|
33405
|
+
_context29.t0.push.call(_context29.t0, _context29.t1);
|
|
33385
33406
|
price = results[0].price;
|
|
33386
33407
|
j = 1;
|
|
33387
33408
|
case 10:
|
|
33388
33409
|
if (!(j < results.length)) {
|
|
33389
|
-
|
|
33410
|
+
_context29.next = 16;
|
|
33390
33411
|
break;
|
|
33391
33412
|
}
|
|
33392
33413
|
if (!(price !== results[j].price)) {
|
|
33393
|
-
|
|
33414
|
+
_context29.next = 13;
|
|
33394
33415
|
break;
|
|
33395
33416
|
}
|
|
33396
|
-
return
|
|
33417
|
+
return _context29.abrupt("return", true);
|
|
33397
33418
|
case 13:
|
|
33398
33419
|
j++;
|
|
33399
|
-
|
|
33420
|
+
_context29.next = 10;
|
|
33400
33421
|
break;
|
|
33401
33422
|
case 16:
|
|
33402
33423
|
i++;
|
|
33403
|
-
|
|
33424
|
+
_context29.next = 2;
|
|
33404
33425
|
break;
|
|
33405
33426
|
case 19:
|
|
33406
|
-
return
|
|
33427
|
+
return _context29.abrupt("return", false);
|
|
33407
33428
|
case 20:
|
|
33408
33429
|
case "end":
|
|
33409
|
-
return
|
|
33430
|
+
return _context29.stop();
|
|
33410
33431
|
}
|
|
33411
|
-
},
|
|
33432
|
+
}, _callee27);
|
|
33412
33433
|
}));
|
|
33413
|
-
function checkIfPriceDiffers(
|
|
33434
|
+
function checkIfPriceDiffers(_x102) {
|
|
33414
33435
|
return _checkIfPriceDiffers.apply(this, arguments);
|
|
33415
33436
|
}
|
|
33416
33437
|
return checkIfPriceDiffers;
|
|
@@ -33424,11 +33445,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33424
33445
|
}, {
|
|
33425
33446
|
key: "updateArticlesOptionStatesOfActSet",
|
|
33426
33447
|
value: (function () {
|
|
33427
|
-
var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33448
|
+
var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
|
|
33428
33449
|
var _Object$keys, _resultPlannerUpdate;
|
|
33429
33450
|
var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
|
|
33430
|
-
return _regeneratorRuntime.wrap(function
|
|
33431
|
-
while (1) switch (
|
|
33451
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context30) {
|
|
33452
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
33432
33453
|
case 0:
|
|
33433
33454
|
elementsToDeleteById = [];
|
|
33434
33455
|
targetArticlesToUpdateOnly = [];
|
|
@@ -33440,50 +33461,50 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33440
33461
|
} else {
|
|
33441
33462
|
targetArticlesToUpdateOnly = targetArticlesWithNewValues;
|
|
33442
33463
|
}
|
|
33443
|
-
|
|
33464
|
+
_context30.next = 5;
|
|
33444
33465
|
return articleHandlerInstance.updateArticlesOptionStates(myValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
|
|
33445
33466
|
case 5:
|
|
33446
|
-
retValues =
|
|
33467
|
+
retValues = _context30.sent;
|
|
33447
33468
|
targetArticlesWithNewValues = retValues.targetArticlesToUpdate;
|
|
33448
33469
|
if (!(retValues.partlistArticlesToLoad.length > 0)) {
|
|
33449
|
-
|
|
33470
|
+
_context30.next = 16;
|
|
33450
33471
|
break;
|
|
33451
33472
|
}
|
|
33452
33473
|
diff = targetArticlesToUpdateOnly.length - Object.keys(set.getDivaArticles()).length;
|
|
33453
33474
|
if (!(diff == 0 || partlistDiff == diff)) {
|
|
33454
|
-
|
|
33475
|
+
_context30.next = 14;
|
|
33455
33476
|
break;
|
|
33456
33477
|
}
|
|
33457
|
-
|
|
33478
|
+
_context30.next = 12;
|
|
33458
33479
|
return articleHandlerInstance.correctPartlistArticlesByGlobalRules(set, retValues.partlistArticlesToLoad, set.CatalogData.bundleRules, {
|
|
33459
33480
|
doChange: false
|
|
33460
33481
|
});
|
|
33461
33482
|
case 12:
|
|
33462
|
-
|
|
33483
|
+
_context30.next = 16;
|
|
33463
33484
|
break;
|
|
33464
33485
|
case 14:
|
|
33465
|
-
|
|
33486
|
+
_context30.next = 16;
|
|
33466
33487
|
return this.updateArticlesOptionStatesOfActSet(set, {}, targetArticlesWithNewValues, ignorePlanner, from, diff);
|
|
33467
33488
|
case 16:
|
|
33468
33489
|
if (!(from !== 'initializingPartlist')) {
|
|
33469
|
-
|
|
33490
|
+
_context30.next = 19;
|
|
33470
33491
|
break;
|
|
33471
33492
|
}
|
|
33472
|
-
|
|
33493
|
+
_context30.next = 19;
|
|
33473
33494
|
return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
|
|
33474
33495
|
case 19:
|
|
33475
33496
|
if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
|
|
33476
33497
|
|
|
33477
33498
|
//Update Planner - check if planner data changed
|
|
33478
33499
|
if (!(!ignorePlanner && from != 'calcVariant')) {
|
|
33479
|
-
|
|
33500
|
+
_context30.next = 55;
|
|
33480
33501
|
break;
|
|
33481
33502
|
}
|
|
33482
33503
|
targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
|
|
33483
|
-
|
|
33504
|
+
_context30.next = 24;
|
|
33484
33505
|
return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
|
|
33485
33506
|
case 24:
|
|
33486
|
-
resultPlannerUpdate =
|
|
33507
|
+
resultPlannerUpdate = _context30.sent;
|
|
33487
33508
|
elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
|
|
33488
33509
|
for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
|
|
33489
33510
|
articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
|
|
@@ -33493,35 +33514,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33493
33514
|
}
|
|
33494
33515
|
}
|
|
33495
33516
|
if (!resultPlannerUpdate.doDeleteBackGrid) {
|
|
33496
|
-
|
|
33517
|
+
_context30.next = 34;
|
|
33497
33518
|
break;
|
|
33498
33519
|
}
|
|
33499
|
-
|
|
33520
|
+
_context30.next = 30;
|
|
33500
33521
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
|
|
33501
33522
|
case 30:
|
|
33502
|
-
result =
|
|
33523
|
+
result = _context30.sent;
|
|
33503
33524
|
//Others are deleted recursive
|
|
33504
33525
|
if (result.selectElementId) {
|
|
33505
33526
|
resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
|
|
33506
33527
|
}
|
|
33507
|
-
|
|
33528
|
+
_context30.next = 41;
|
|
33508
33529
|
break;
|
|
33509
33530
|
case 34:
|
|
33510
33531
|
i = 0;
|
|
33511
33532
|
case 35:
|
|
33512
33533
|
if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
|
|
33513
|
-
|
|
33534
|
+
_context30.next = 41;
|
|
33514
33535
|
break;
|
|
33515
33536
|
}
|
|
33516
|
-
|
|
33537
|
+
_context30.next = 38;
|
|
33517
33538
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
|
|
33518
33539
|
case 38:
|
|
33519
33540
|
i++;
|
|
33520
|
-
|
|
33541
|
+
_context30.next = 35;
|
|
33521
33542
|
break;
|
|
33522
33543
|
case 41:
|
|
33523
33544
|
if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
|
|
33524
|
-
|
|
33545
|
+
_context30.next = 54;
|
|
33525
33546
|
break;
|
|
33526
33547
|
}
|
|
33527
33548
|
//Todo copy these elements
|
|
@@ -33529,20 +33550,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33529
33550
|
i = 0;
|
|
33530
33551
|
case 44:
|
|
33531
33552
|
if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
|
|
33532
|
-
|
|
33553
|
+
_context30.next = 52;
|
|
33533
33554
|
break;
|
|
33534
33555
|
}
|
|
33535
|
-
|
|
33556
|
+
_context30.next = 47;
|
|
33536
33557
|
return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
|
|
33537
33558
|
case 47:
|
|
33538
|
-
newArticle =
|
|
33559
|
+
newArticle = _context30.sent;
|
|
33539
33560
|
articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
|
|
33540
33561
|
case 49:
|
|
33541
33562
|
i++;
|
|
33542
|
-
|
|
33563
|
+
_context30.next = 44;
|
|
33543
33564
|
break;
|
|
33544
33565
|
case 52:
|
|
33545
|
-
|
|
33566
|
+
_context30.next = 54;
|
|
33546
33567
|
return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
|
|
33547
33568
|
dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
|
|
33548
33569
|
copyType: resultPlannerUpdate.copyType,
|
|
@@ -33555,18 +33576,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33555
33576
|
if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
|
|
33556
33577
|
this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]);
|
|
33557
33578
|
}
|
|
33558
|
-
return
|
|
33579
|
+
return _context30.abrupt("return", {
|
|
33559
33580
|
articleCountChanged: elementsToDeleteById.length > 0,
|
|
33560
33581
|
elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
|
|
33561
33582
|
setId: set.getSetId()
|
|
33562
33583
|
});
|
|
33563
33584
|
case 57:
|
|
33564
33585
|
case "end":
|
|
33565
|
-
return
|
|
33586
|
+
return _context30.stop();
|
|
33566
33587
|
}
|
|
33567
|
-
},
|
|
33588
|
+
}, _callee28, this);
|
|
33568
33589
|
}));
|
|
33569
|
-
function updateArticlesOptionStatesOfActSet(
|
|
33590
|
+
function updateArticlesOptionStatesOfActSet(_x103, _x104, _x105, _x106, _x107, _x108) {
|
|
33570
33591
|
return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
|
|
33571
33592
|
}
|
|
33572
33593
|
return updateArticlesOptionStatesOfActSet;
|
|
@@ -33620,32 +33641,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33620
33641
|
}, {
|
|
33621
33642
|
key: "updateEdoArticles",
|
|
33622
33643
|
value: function () {
|
|
33623
|
-
var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33644
|
+
var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, edoArticlesToLoad) {
|
|
33624
33645
|
var oldBasketIds, i, article, newArticles, _i7, _i8;
|
|
33625
|
-
return _regeneratorRuntime.wrap(function
|
|
33626
|
-
while (1) switch (
|
|
33646
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context31) {
|
|
33647
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
33627
33648
|
case 0:
|
|
33628
33649
|
if (!(set.edoExtraArticles.length > 0 || edoArticlesToLoad.length > 0)) {
|
|
33629
|
-
|
|
33650
|
+
_context31.next = 22;
|
|
33630
33651
|
break;
|
|
33631
33652
|
}
|
|
33632
33653
|
oldBasketIds = _toConsumableArray(set.edoExtraArticles);
|
|
33633
33654
|
i = 0;
|
|
33634
33655
|
case 3:
|
|
33635
33656
|
if (!(i < set.edoExtraArticles.length)) {
|
|
33636
|
-
|
|
33657
|
+
_context31.next = 11;
|
|
33637
33658
|
break;
|
|
33638
33659
|
}
|
|
33639
33660
|
article = set.getArticleByBasketId(set.edoExtraArticles[i]);
|
|
33640
33661
|
if (!article) {
|
|
33641
|
-
|
|
33662
|
+
_context31.next = 8;
|
|
33642
33663
|
break;
|
|
33643
33664
|
}
|
|
33644
|
-
|
|
33665
|
+
_context31.next = 8;
|
|
33645
33666
|
return this.deleteElementFromSet(set, article);
|
|
33646
33667
|
case 8:
|
|
33647
33668
|
i++;
|
|
33648
|
-
|
|
33669
|
+
_context31.next = 3;
|
|
33649
33670
|
break;
|
|
33650
33671
|
case 11:
|
|
33651
33672
|
set.edoExtraArticles = [];
|
|
@@ -33653,18 +33674,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33653
33674
|
_i7 = 0;
|
|
33654
33675
|
case 14:
|
|
33655
33676
|
if (!(_i7 < edoArticlesToLoad.length)) {
|
|
33656
|
-
|
|
33677
|
+
_context31.next = 21;
|
|
33657
33678
|
break;
|
|
33658
33679
|
}
|
|
33659
|
-
|
|
33680
|
+
_context31.next = 17;
|
|
33660
33681
|
return this.addArticleToActSet(set, edoArticlesToLoad[_i7].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i7]), {}, {
|
|
33661
33682
|
basketId: oldBasketIds[_i7]
|
|
33662
33683
|
}), true);
|
|
33663
33684
|
case 17:
|
|
33664
|
-
newArticles[_i7] =
|
|
33685
|
+
newArticles[_i7] = _context31.sent;
|
|
33665
33686
|
case 18:
|
|
33666
33687
|
_i7++;
|
|
33667
|
-
|
|
33688
|
+
_context31.next = 14;
|
|
33668
33689
|
break;
|
|
33669
33690
|
case 21:
|
|
33670
33691
|
for (_i8 = 0; _i8 < newArticles.length; _i8++) {
|
|
@@ -33672,11 +33693,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33672
33693
|
}
|
|
33673
33694
|
case 22:
|
|
33674
33695
|
case "end":
|
|
33675
|
-
return
|
|
33696
|
+
return _context31.stop();
|
|
33676
33697
|
}
|
|
33677
|
-
},
|
|
33698
|
+
}, _callee29, this);
|
|
33678
33699
|
}));
|
|
33679
|
-
function updateEdoArticles(
|
|
33700
|
+
function updateEdoArticles(_x109, _x110) {
|
|
33680
33701
|
return _updateEdoArticles.apply(this, arguments);
|
|
33681
33702
|
}
|
|
33682
33703
|
return updateEdoArticles;
|
|
@@ -33842,11 +33863,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33842
33863
|
}, {
|
|
33843
33864
|
key: "fillOrderLinesAndOrderSets",
|
|
33844
33865
|
value: function () {
|
|
33845
|
-
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
33866
|
+
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
|
|
33846
33867
|
var _set$getMatchingProdu2, _set$getMatchingProdu3;
|
|
33847
33868
|
var orderSets, basketData, set, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, customDimensions, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
|
|
33848
|
-
return _regeneratorRuntime.wrap(function
|
|
33849
|
-
while (1) switch (
|
|
33869
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context32) {
|
|
33870
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
33850
33871
|
case 0:
|
|
33851
33872
|
orderSets = [];
|
|
33852
33873
|
basketData = divaBasketHandler.actBasket;
|
|
@@ -33858,32 +33879,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33858
33879
|
}
|
|
33859
33880
|
basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
|
|
33860
33881
|
basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
|
|
33861
|
-
|
|
33882
|
+
_context32.t0 = _regeneratorRuntime.keys(sets);
|
|
33862
33883
|
case 8:
|
|
33863
|
-
if ((
|
|
33864
|
-
|
|
33884
|
+
if ((_context32.t1 = _context32.t0()).done) {
|
|
33885
|
+
_context32.next = 32;
|
|
33865
33886
|
break;
|
|
33866
33887
|
}
|
|
33867
|
-
key =
|
|
33888
|
+
key = _context32.t1.value;
|
|
33868
33889
|
_set = sets[key];
|
|
33869
33890
|
catalogData = _set.CatalogData;
|
|
33870
33891
|
articles = _set.getDivaArticles();
|
|
33871
|
-
|
|
33892
|
+
_context32.next = 15;
|
|
33872
33893
|
return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
|
|
33873
33894
|
case 15:
|
|
33874
|
-
newOrderSet =
|
|
33895
|
+
newOrderSet = _context32.sent;
|
|
33875
33896
|
basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
|
|
33876
|
-
|
|
33897
|
+
_context32.next = 19;
|
|
33877
33898
|
return _set.getCustomDimensionsOfActSet();
|
|
33878
33899
|
case 19:
|
|
33879
|
-
customDimensions =
|
|
33900
|
+
customDimensions = _context32.sent;
|
|
33880
33901
|
OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
|
|
33881
33902
|
articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
|
|
33882
33903
|
if (OrderLinesOfActSet.length) {
|
|
33883
|
-
|
|
33904
|
+
_context32.next = 24;
|
|
33884
33905
|
break;
|
|
33885
33906
|
}
|
|
33886
|
-
return
|
|
33907
|
+
return _context32.abrupt("continue", 8);
|
|
33887
33908
|
case 24:
|
|
33888
33909
|
OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
|
|
33889
33910
|
if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
|
|
@@ -33905,7 +33926,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33905
33926
|
}
|
|
33906
33927
|
newOrderSet.setOrderLines(OrderLinesOfActSet);
|
|
33907
33928
|
orderSets.push(newOrderSet);
|
|
33908
|
-
|
|
33929
|
+
_context32.next = 8;
|
|
33909
33930
|
break;
|
|
33910
33931
|
case 32:
|
|
33911
33932
|
//fill diva3DProject for renderings & AR Converter
|
|
@@ -33913,7 +33934,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33913
33934
|
i = 0;
|
|
33914
33935
|
case 34:
|
|
33915
33936
|
if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
|
|
33916
|
-
|
|
33937
|
+
_context32.next = 49;
|
|
33917
33938
|
break;
|
|
33918
33939
|
}
|
|
33919
33940
|
oderSetsIsInActPlanning = false;
|
|
@@ -33921,18 +33942,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33921
33942
|
j = 0;
|
|
33922
33943
|
case 38:
|
|
33923
33944
|
if (!(j < orderSets.length)) {
|
|
33924
|
-
|
|
33945
|
+
_context32.next = 45;
|
|
33925
33946
|
break;
|
|
33926
33947
|
}
|
|
33927
33948
|
if (!(orderSets[j].SetID == setId)) {
|
|
33928
|
-
|
|
33949
|
+
_context32.next = 42;
|
|
33929
33950
|
break;
|
|
33930
33951
|
}
|
|
33931
33952
|
oderSetsIsInActPlanning = true;
|
|
33932
|
-
return
|
|
33953
|
+
return _context32.abrupt("break", 45);
|
|
33933
33954
|
case 42:
|
|
33934
33955
|
j++;
|
|
33935
|
-
|
|
33956
|
+
_context32.next = 38;
|
|
33936
33957
|
break;
|
|
33937
33958
|
case 45:
|
|
33938
33959
|
if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
|
|
@@ -33940,7 +33961,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33940
33961
|
}
|
|
33941
33962
|
case 46:
|
|
33942
33963
|
i++;
|
|
33943
|
-
|
|
33964
|
+
_context32.next = 34;
|
|
33944
33965
|
break;
|
|
33945
33966
|
case 49:
|
|
33946
33967
|
basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
|
|
@@ -33949,14 +33970,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33949
33970
|
} else {
|
|
33950
33971
|
basketData.setOrderSets(orderSets);
|
|
33951
33972
|
}
|
|
33952
|
-
return
|
|
33973
|
+
return _context32.abrupt("return", basketData);
|
|
33953
33974
|
case 52:
|
|
33954
33975
|
case "end":
|
|
33955
|
-
return
|
|
33976
|
+
return _context32.stop();
|
|
33956
33977
|
}
|
|
33957
|
-
},
|
|
33978
|
+
}, _callee30, this);
|
|
33958
33979
|
}));
|
|
33959
|
-
function fillOrderLinesAndOrderSets(
|
|
33980
|
+
function fillOrderLinesAndOrderSets(_x111, _x112, _x113, _x114, _x115) {
|
|
33960
33981
|
return _fillOrderLinesAndOrderSets.apply(this, arguments);
|
|
33961
33982
|
}
|
|
33962
33983
|
return fillOrderLinesAndOrderSets;
|
|
@@ -34040,11 +34061,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34040
34061
|
}, {
|
|
34041
34062
|
key: "getOrderSet",
|
|
34042
34063
|
value: function () {
|
|
34043
|
-
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34064
|
+
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, catalogData, divaNr, repairOnly, returnTo) {
|
|
34044
34065
|
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
34045
34066
|
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
34046
|
-
return _regeneratorRuntime.wrap(function
|
|
34047
|
-
while (1) switch (
|
|
34067
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context33) {
|
|
34068
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
34048
34069
|
case 0:
|
|
34049
34070
|
dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
|
|
34050
34071
|
DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -34056,7 +34077,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34056
34077
|
hqRenderScript = undefined;
|
|
34057
34078
|
dimensions = {};
|
|
34058
34079
|
if (dontGenerateImages) {
|
|
34059
|
-
|
|
34080
|
+
_context33.next = 28;
|
|
34060
34081
|
break;
|
|
34061
34082
|
}
|
|
34062
34083
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -34064,10 +34085,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34064
34085
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
34065
34086
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
34066
34087
|
}
|
|
34067
|
-
|
|
34088
|
+
_context33.next = 15;
|
|
34068
34089
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
34069
34090
|
case 15:
|
|
34070
|
-
_yield$Promise$all =
|
|
34091
|
+
_yield$Promise$all = _context33.sent;
|
|
34071
34092
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
34072
34093
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
34073
34094
|
setImage = _yield$Promise$all2$.url;
|
|
@@ -34075,10 +34096,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34075
34096
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
34076
34097
|
alternateSetImages = _yield$Promise$all2[2];
|
|
34077
34098
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
34078
|
-
|
|
34099
|
+
_context33.next = 25;
|
|
34079
34100
|
return Promise.all([promiseHQRenderScript]);
|
|
34080
34101
|
case 25:
|
|
34081
|
-
_yield$Promise$all3 =
|
|
34102
|
+
_yield$Promise$all3 = _context33.sent;
|
|
34082
34103
|
_yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
|
|
34083
34104
|
hqRenderScript = _yield$Promise$all4[0];
|
|
34084
34105
|
case 28:
|
|
@@ -34140,14 +34161,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34140
34161
|
MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
|
|
34141
34162
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
34142
34163
|
});
|
|
34143
|
-
return
|
|
34164
|
+
return _context33.abrupt("return", orderSet);
|
|
34144
34165
|
case 34:
|
|
34145
34166
|
case "end":
|
|
34146
|
-
return
|
|
34167
|
+
return _context33.stop();
|
|
34147
34168
|
}
|
|
34148
|
-
},
|
|
34169
|
+
}, _callee31, this);
|
|
34149
34170
|
}));
|
|
34150
|
-
function getOrderSet(
|
|
34171
|
+
function getOrderSet(_x116, _x117, _x118, _x119, _x120) {
|
|
34151
34172
|
return _getOrderSet.apply(this, arguments);
|
|
34152
34173
|
}
|
|
34153
34174
|
return getOrderSet;
|
|
@@ -34160,31 +34181,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34160
34181
|
}, {
|
|
34161
34182
|
key: "getSetImage",
|
|
34162
34183
|
value: (function () {
|
|
34163
|
-
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34184
|
+
var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, overwriteLastSavedRendering) {
|
|
34164
34185
|
var is3D, _yield$set$plannerHan, dimensions, url;
|
|
34165
|
-
return _regeneratorRuntime.wrap(function
|
|
34166
|
-
while (1) switch (
|
|
34186
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context34) {
|
|
34187
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
34167
34188
|
case 0:
|
|
34168
34189
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34169
34190
|
if (!is3D) {
|
|
34170
|
-
|
|
34191
|
+
_context34.next = 10;
|
|
34171
34192
|
break;
|
|
34172
34193
|
}
|
|
34173
|
-
|
|
34194
|
+
_context34.next = 4;
|
|
34174
34195
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
34175
34196
|
case 4:
|
|
34176
|
-
|
|
34197
|
+
_context34.next = 6;
|
|
34177
34198
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
34178
34199
|
case 6:
|
|
34179
|
-
_yield$set$plannerHan =
|
|
34200
|
+
_yield$set$plannerHan = _context34.sent;
|
|
34180
34201
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
34181
34202
|
url = _yield$set$plannerHan.url;
|
|
34182
|
-
return
|
|
34203
|
+
return _context34.abrupt("return", {
|
|
34183
34204
|
dimensions: dimensions,
|
|
34184
34205
|
url: url
|
|
34185
34206
|
});
|
|
34186
34207
|
case 10:
|
|
34187
|
-
return
|
|
34208
|
+
return _context34.abrupt("return", {
|
|
34188
34209
|
dimensions: {
|
|
34189
34210
|
w: undefined,
|
|
34190
34211
|
h: undefined,
|
|
@@ -34193,11 +34214,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34193
34214
|
});
|
|
34194
34215
|
case 11:
|
|
34195
34216
|
case "end":
|
|
34196
|
-
return
|
|
34217
|
+
return _context34.stop();
|
|
34197
34218
|
}
|
|
34198
|
-
},
|
|
34219
|
+
}, _callee32);
|
|
34199
34220
|
}));
|
|
34200
|
-
function getSetImage(
|
|
34221
|
+
function getSetImage(_x121, _x122) {
|
|
34201
34222
|
return _getSetImage.apply(this, arguments);
|
|
34202
34223
|
}
|
|
34203
34224
|
return getSetImage;
|
|
@@ -34205,45 +34226,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34205
34226
|
}, {
|
|
34206
34227
|
key: "getHQRenderScript",
|
|
34207
34228
|
value: function () {
|
|
34208
|
-
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34229
|
+
var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, divaNr) {
|
|
34209
34230
|
var is3D, hqRenderScript, createdHQRenderScript;
|
|
34210
|
-
return _regeneratorRuntime.wrap(function
|
|
34211
|
-
while (1) switch (
|
|
34231
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context35) {
|
|
34232
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
34212
34233
|
case 0:
|
|
34213
34234
|
//if not 3d
|
|
34214
34235
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
34215
34236
|
if (is3D) {
|
|
34216
|
-
|
|
34237
|
+
_context35.next = 3;
|
|
34217
34238
|
break;
|
|
34218
34239
|
}
|
|
34219
|
-
return
|
|
34240
|
+
return _context35.abrupt("return");
|
|
34220
34241
|
case 3:
|
|
34221
|
-
|
|
34242
|
+
_context35.next = 5;
|
|
34222
34243
|
return set.plannerHandler.saveSetHQRenderScript();
|
|
34223
34244
|
case 5:
|
|
34224
34245
|
hqRenderScript = set.plannerHandler.getSetHQRenderScript();
|
|
34225
34246
|
if (hqRenderScript) {
|
|
34226
|
-
|
|
34247
|
+
_context35.next = 8;
|
|
34227
34248
|
break;
|
|
34228
34249
|
}
|
|
34229
|
-
return
|
|
34250
|
+
return _context35.abrupt("return");
|
|
34230
34251
|
case 8:
|
|
34231
|
-
|
|
34252
|
+
_context35.next = 10;
|
|
34232
34253
|
return set.api.postHQRenderScript({
|
|
34233
34254
|
divaNr: divaNr,
|
|
34234
34255
|
hqRenderscript: hqRenderScript,
|
|
34235
34256
|
organization: set.api.OrganizationId
|
|
34236
34257
|
});
|
|
34237
34258
|
case 10:
|
|
34238
|
-
createdHQRenderScript =
|
|
34239
|
-
return
|
|
34259
|
+
createdHQRenderScript = _context35.sent;
|
|
34260
|
+
return _context35.abrupt("return", createdHQRenderScript);
|
|
34240
34261
|
case 12:
|
|
34241
34262
|
case "end":
|
|
34242
|
-
return
|
|
34263
|
+
return _context35.stop();
|
|
34243
34264
|
}
|
|
34244
|
-
},
|
|
34265
|
+
}, _callee33);
|
|
34245
34266
|
}));
|
|
34246
|
-
function getHQRenderScript(
|
|
34267
|
+
function getHQRenderScript(_x123, _x124) {
|
|
34247
34268
|
return _getHQRenderScript.apply(this, arguments);
|
|
34248
34269
|
}
|
|
34249
34270
|
return getHQRenderScript;
|
|
@@ -34257,34 +34278,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34257
34278
|
}, {
|
|
34258
34279
|
key: "getAlternateSetImages",
|
|
34259
34280
|
value: (function () {
|
|
34260
|
-
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34281
|
+
var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
|
|
34261
34282
|
var is2D, catalogData, setImages;
|
|
34262
|
-
return _regeneratorRuntime.wrap(function
|
|
34263
|
-
while (1) switch (
|
|
34283
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context36) {
|
|
34284
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
34264
34285
|
case 0:
|
|
34265
34286
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
34266
34287
|
if (!(is2D || set.onlyRunLogic)) {
|
|
34267
|
-
|
|
34288
|
+
_context36.next = 3;
|
|
34268
34289
|
break;
|
|
34269
34290
|
}
|
|
34270
|
-
return
|
|
34291
|
+
return _context36.abrupt("return", []);
|
|
34271
34292
|
case 3:
|
|
34272
34293
|
catalogData = set.CatalogData;
|
|
34273
|
-
|
|
34294
|
+
_context36.next = 6;
|
|
34274
34295
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
34275
34296
|
case 6:
|
|
34276
|
-
|
|
34297
|
+
_context36.next = 8;
|
|
34277
34298
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
34278
34299
|
case 8:
|
|
34279
|
-
setImages =
|
|
34280
|
-
return
|
|
34300
|
+
setImages = _context36.sent;
|
|
34301
|
+
return _context36.abrupt("return", setImages);
|
|
34281
34302
|
case 10:
|
|
34282
34303
|
case "end":
|
|
34283
|
-
return
|
|
34304
|
+
return _context36.stop();
|
|
34284
34305
|
}
|
|
34285
|
-
},
|
|
34306
|
+
}, _callee34);
|
|
34286
34307
|
}));
|
|
34287
|
-
function getAlternateSetImages(
|
|
34308
|
+
function getAlternateSetImages(_x125) {
|
|
34288
34309
|
return _getAlternateSetImages.apply(this, arguments);
|
|
34289
34310
|
}
|
|
34290
34311
|
return getAlternateSetImages;
|
|
@@ -34292,30 +34313,30 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34292
34313
|
}, {
|
|
34293
34314
|
key: "get2DSetImage",
|
|
34294
34315
|
value: function () {
|
|
34295
|
-
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34316
|
+
var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set) {
|
|
34296
34317
|
var urlToPlanning2D, catalogData, planning2DAsJPGBase64;
|
|
34297
|
-
return _regeneratorRuntime.wrap(function
|
|
34298
|
-
while (1) switch (
|
|
34318
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context37) {
|
|
34319
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
34299
34320
|
case 0:
|
|
34300
34321
|
urlToPlanning2D = undefined, catalogData = set.CatalogData;
|
|
34301
34322
|
planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
|
|
34302
34323
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
34303
|
-
|
|
34324
|
+
_context37.next = 6;
|
|
34304
34325
|
break;
|
|
34305
34326
|
}
|
|
34306
|
-
|
|
34327
|
+
_context37.next = 5;
|
|
34307
34328
|
return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
|
|
34308
34329
|
case 5:
|
|
34309
|
-
urlToPlanning2D =
|
|
34330
|
+
urlToPlanning2D = _context37.sent;
|
|
34310
34331
|
case 6:
|
|
34311
|
-
return
|
|
34332
|
+
return _context37.abrupt("return", urlToPlanning2D);
|
|
34312
34333
|
case 7:
|
|
34313
34334
|
case "end":
|
|
34314
|
-
return
|
|
34335
|
+
return _context37.stop();
|
|
34315
34336
|
}
|
|
34316
|
-
},
|
|
34337
|
+
}, _callee35);
|
|
34317
34338
|
}));
|
|
34318
|
-
function get2DSetImage(
|
|
34339
|
+
function get2DSetImage(_x126) {
|
|
34319
34340
|
return _get2DSetImage.apply(this, arguments);
|
|
34320
34341
|
}
|
|
34321
34342
|
return get2DSetImage;
|
|
@@ -34355,25 +34376,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34355
34376
|
}, {
|
|
34356
34377
|
key: "addOrderSetArticlesToExistingSet",
|
|
34357
34378
|
value: function () {
|
|
34358
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34359
|
-
return _regeneratorRuntime.wrap(function
|
|
34360
|
-
while (1) switch (
|
|
34379
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set, orderSet, lastSetToInitialize) {
|
|
34380
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context38) {
|
|
34381
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
34361
34382
|
case 0:
|
|
34362
34383
|
//TODO: GLOBAL STUFF
|
|
34363
34384
|
//this.updateActSet(set);
|
|
34364
34385
|
orderSet.changeBasketIds();
|
|
34365
|
-
|
|
34386
|
+
_context38.next = 3;
|
|
34366
34387
|
return this.initOrderLineArticles(set, orderSet);
|
|
34367
34388
|
case 3:
|
|
34368
|
-
|
|
34389
|
+
_context38.next = 5;
|
|
34369
34390
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
34370
34391
|
case 5:
|
|
34371
34392
|
case "end":
|
|
34372
|
-
return
|
|
34393
|
+
return _context38.stop();
|
|
34373
34394
|
}
|
|
34374
|
-
},
|
|
34395
|
+
}, _callee36, this);
|
|
34375
34396
|
}));
|
|
34376
|
-
function addOrderSetArticlesToExistingSet(
|
|
34397
|
+
function addOrderSetArticlesToExistingSet(_x127, _x128, _x129) {
|
|
34377
34398
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
34378
34399
|
}
|
|
34379
34400
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -35424,7 +35445,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35424
35445
|
break;
|
|
35425
35446
|
case 3:
|
|
35426
35447
|
_context12.next = 5;
|
|
35427
|
-
return import('./PfisterWWSHandler-
|
|
35448
|
+
return import('./PfisterWWSHandler-b7e1ed72.js');
|
|
35428
35449
|
case 5:
|
|
35429
35450
|
_yield$import = _context12.sent;
|
|
35430
35451
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35432,7 +35453,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35432
35453
|
return _context12.abrupt("break", 27);
|
|
35433
35454
|
case 9:
|
|
35434
35455
|
_context12.next = 11;
|
|
35435
|
-
return import('./LiviqueWWSHandler-
|
|
35456
|
+
return import('./LiviqueWWSHandler-6b584c37.js');
|
|
35436
35457
|
case 11:
|
|
35437
35458
|
_yield$import2 = _context12.sent;
|
|
35438
35459
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35440,7 +35461,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35440
35461
|
return _context12.abrupt("break", 27);
|
|
35441
35462
|
case 15:
|
|
35442
35463
|
_context12.next = 17;
|
|
35443
|
-
return import('./SeriousBasketHandler-
|
|
35464
|
+
return import('./SeriousBasketHandler-069a795c.js');
|
|
35444
35465
|
case 17:
|
|
35445
35466
|
_yield$import3 = _context12.sent;
|
|
35446
35467
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35448,7 +35469,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35448
35469
|
return _context12.abrupt("break", 27);
|
|
35449
35470
|
case 21:
|
|
35450
35471
|
_context12.next = 23;
|
|
35451
|
-
return import('./StandardWWSHandler-
|
|
35472
|
+
return import('./StandardWWSHandler-37a30338.js');
|
|
35452
35473
|
case 23:
|
|
35453
35474
|
_yield$import4 = _context12.sent;
|
|
35454
35475
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -36891,7 +36912,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36891
36912
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36892
36913
|
case 0:
|
|
36893
36914
|
_context3.next = 2;
|
|
36894
|
-
return import('./Host3DSignalR-
|
|
36915
|
+
return import('./Host3DSignalR-01d307c2.js');
|
|
36895
36916
|
case 2:
|
|
36896
36917
|
_yield$import = _context3.sent;
|
|
36897
36918
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38456,7 +38477,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38456
38477
|
break;
|
|
38457
38478
|
case 8:
|
|
38458
38479
|
_context4.next = 10;
|
|
38459
|
-
return import('./DivaStandardPlanner-
|
|
38480
|
+
return import('./DivaStandardPlanner-ad8a2dd7.js');
|
|
38460
38481
|
case 10:
|
|
38461
38482
|
_yield$import = _context4.sent;
|
|
38462
38483
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38467,7 +38488,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38467
38488
|
return _context4.abrupt("break", 21);
|
|
38468
38489
|
case 15:
|
|
38469
38490
|
_context4.next = 17;
|
|
38470
|
-
return import('./DivaBoxPlanner-
|
|
38491
|
+
return import('./DivaBoxPlanner-4f414fd5.js');
|
|
38471
38492
|
case 17:
|
|
38472
38493
|
_yield$import2 = _context4.sent;
|
|
38473
38494
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -39853,32 +39874,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39853
39874
|
return _ref5.apply(this, arguments);
|
|
39854
39875
|
};
|
|
39855
39876
|
}());
|
|
39856
|
-
_defineProperty(this, "moveShelfItem", function (
|
|
39857
|
-
var
|
|
39858
|
-
|
|
39859
|
-
|
|
39860
|
-
|
|
39861
|
-
|
|
39862
|
-
|
|
39863
|
-
|
|
39864
|
-
|
|
39865
|
-
|
|
39866
|
-
|
|
39867
|
-
|
|
39868
|
-
|
|
39877
|
+
_defineProperty(this, "moveShelfItem", /*#__PURE__*/function () {
|
|
39878
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(paletteId, grid, initialIndex, finalIndex, configStepKey) {
|
|
39879
|
+
var _this$updateViewPlann4;
|
|
39880
|
+
var set, result, _this$updatePlannerMs, _this$i18n3;
|
|
39881
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
39882
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
39883
|
+
case 0:
|
|
39884
|
+
set = _this.actSet();
|
|
39885
|
+
_context6.next = 3;
|
|
39886
|
+
return setHandlerInstance.moveShelfItem(set, grid, initialIndex, finalIndex);
|
|
39887
|
+
case 3:
|
|
39888
|
+
result = _context6.sent;
|
|
39889
|
+
if (result == 'RESETTED_CELLS') {
|
|
39890
|
+
(_this$updatePlannerMs = _this.updatePlannerMsgContainer) === null || _this$updatePlannerMs === void 0 || _this$updatePlannerMs.call(_this, 'COULD_NOT_MOVE_SHELVES', true, 'INFO', (_this$i18n3 = _this.i18n()) === null || _this$i18n3 === void 0 ? void 0 : _this$i18n3.t('configurator.move_resetted'), true);
|
|
39891
|
+
}
|
|
39892
|
+
_this.updateConfigStructure();
|
|
39893
|
+
_this.loadShelfPlannerItems(paletteId, configStepKey, 'move sheld');
|
|
39894
|
+
(_this$updateViewPlann4 = _this.updateViewPlannerElements) === null || _this$updateViewPlann4 === void 0 || _this$updateViewPlann4.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39895
|
+
_this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
39896
|
+
case 9:
|
|
39897
|
+
case "end":
|
|
39898
|
+
return _context6.stop();
|
|
39899
|
+
}
|
|
39900
|
+
}, _callee6);
|
|
39901
|
+
}));
|
|
39902
|
+
return function (_x18, _x19, _x20, _x21, _x22) {
|
|
39903
|
+
return _ref6.apply(this, arguments);
|
|
39904
|
+
};
|
|
39905
|
+
}());
|
|
39869
39906
|
_defineProperty(this, "moveDoors", function (movedDoor, targetDoor) {
|
|
39870
39907
|
setHandlerInstance.moveDoors(_this.actSet(), movedDoor, targetDoor);
|
|
39871
39908
|
_this.updatePlannerView('MOVE_DOORS');
|
|
39872
39909
|
});
|
|
39873
39910
|
_defineProperty(this, "deleteAccessorieOnShelfPlanner", /*#__PURE__*/function () {
|
|
39874
|
-
var
|
|
39911
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(paletteId, gridIndex, cellIndex, parentBasketId, configStepKey) {
|
|
39875
39912
|
var _this$updateViewPlann5;
|
|
39876
39913
|
var set;
|
|
39877
|
-
return _regeneratorRuntime.wrap(function
|
|
39878
|
-
while (1) switch (
|
|
39914
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
39915
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
39879
39916
|
case 0:
|
|
39880
39917
|
set = _this.actSet();
|
|
39881
|
-
|
|
39918
|
+
_context7.next = 3;
|
|
39882
39919
|
return setHandlerInstance.deleteAccessorieOnShelfPlanner(set, gridIndex, cellIndex, parentBasketId);
|
|
39883
39920
|
case 3:
|
|
39884
39921
|
_this.updateConfigStructure();
|
|
@@ -39891,12 +39928,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39891
39928
|
_this.plannerChangeLog('onDeletePlanner');
|
|
39892
39929
|
case 11:
|
|
39893
39930
|
case "end":
|
|
39894
|
-
return
|
|
39931
|
+
return _context7.stop();
|
|
39895
39932
|
}
|
|
39896
|
-
},
|
|
39933
|
+
}, _callee7);
|
|
39897
39934
|
}));
|
|
39898
|
-
return function (
|
|
39899
|
-
return
|
|
39935
|
+
return function (_x23, _x24, _x25, _x26, _x27) {
|
|
39936
|
+
return _ref7.apply(this, arguments);
|
|
39900
39937
|
};
|
|
39901
39938
|
}());
|
|
39902
39939
|
/**
|
|
@@ -39907,12 +39944,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39907
39944
|
* @param transState
|
|
39908
39945
|
*/
|
|
39909
39946
|
_defineProperty(this, "updatePlannerTrans", /*#__PURE__*/function () {
|
|
39910
|
-
var
|
|
39947
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(setId, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
|
|
39911
39948
|
var _this$updateElementSe3;
|
|
39912
|
-
return _regeneratorRuntime.wrap(function
|
|
39913
|
-
while (1) switch (
|
|
39949
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
39950
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
39914
39951
|
case 0:
|
|
39915
|
-
|
|
39952
|
+
_context8.next = 2;
|
|
39916
39953
|
return setHandlerInstance.updatePlannerTrans(_this.actSet(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
|
|
39917
39954
|
case 2:
|
|
39918
39955
|
if (transState == 'END') {
|
|
@@ -39921,12 +39958,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39921
39958
|
}
|
|
39922
39959
|
case 3:
|
|
39923
39960
|
case "end":
|
|
39924
|
-
return
|
|
39961
|
+
return _context8.stop();
|
|
39925
39962
|
}
|
|
39926
|
-
},
|
|
39963
|
+
}, _callee8);
|
|
39927
39964
|
}));
|
|
39928
|
-
return function (
|
|
39929
|
-
return
|
|
39965
|
+
return function (_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
|
|
39966
|
+
return _ref8.apply(this, arguments);
|
|
39930
39967
|
};
|
|
39931
39968
|
}());
|
|
39932
39969
|
/**
|
|
@@ -39945,18 +39982,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39945
39982
|
}
|
|
39946
39983
|
});
|
|
39947
39984
|
_defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
39948
|
-
var
|
|
39985
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
39949
39986
|
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
|
|
39950
39987
|
var set, ret;
|
|
39951
|
-
return _regeneratorRuntime.wrap(function
|
|
39952
|
-
while (1) switch (
|
|
39988
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
39989
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
39953
39990
|
case 0:
|
|
39954
39991
|
set = _this.actSet();
|
|
39955
39992
|
(_this$actions11 = _this.actions) === null || _this$actions11 === void 0 || (_this$actions11$toggl = _this$actions11.toggleLoading) === null || _this$actions11$toggl === void 0 || _this$actions11$toggl.call(_this$actions11, 'LoadingArticles_' + accessoireItem.articleCodex, false, true);
|
|
39956
|
-
|
|
39993
|
+
_context9.next = 4;
|
|
39957
39994
|
return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
|
|
39958
39995
|
case 4:
|
|
39959
|
-
ret =
|
|
39996
|
+
ret = _context9.sent;
|
|
39960
39997
|
(_this$actions12 = _this.actions) === null || _this$actions12 === void 0 || (_this$actions12$toggl = _this$actions12.toggleLoading) === null || _this$actions12$toggl === void 0 || _this$actions12$toggl.call(_this$actions12, 'LoadingArticles_' + accessoireItem.articleCodex, false, false);
|
|
39961
39998
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
39962
39999
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
@@ -39966,25 +40003,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39966
40003
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
39967
40004
|
case 12:
|
|
39968
40005
|
case "end":
|
|
39969
|
-
return
|
|
40006
|
+
return _context9.stop();
|
|
39970
40007
|
}
|
|
39971
|
-
},
|
|
40008
|
+
}, _callee9);
|
|
39972
40009
|
}));
|
|
39973
|
-
return function (
|
|
39974
|
-
return
|
|
40010
|
+
return function (_x35, _x36, _x37, _x38) {
|
|
40011
|
+
return _ref9.apply(this, arguments);
|
|
39975
40012
|
};
|
|
39976
40013
|
}());
|
|
39977
40014
|
_defineProperty(this, "deleteAccessoire", /*#__PURE__*/function () {
|
|
39978
|
-
var
|
|
40015
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(articleCodex, parentBasketId) {
|
|
39979
40016
|
var set, wasDeleted, _this$updateViewPlann6;
|
|
39980
|
-
return _regeneratorRuntime.wrap(function
|
|
39981
|
-
while (1) switch (
|
|
40017
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
40018
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
39982
40019
|
case 0:
|
|
39983
40020
|
set = _this.actSet();
|
|
39984
|
-
|
|
40021
|
+
_context10.next = 3;
|
|
39985
40022
|
return setHandlerInstance.deleteAccessoire(set, articleCodex, parentBasketId);
|
|
39986
40023
|
case 3:
|
|
39987
|
-
wasDeleted =
|
|
40024
|
+
wasDeleted = _context10.sent;
|
|
39988
40025
|
if (wasDeleted) {
|
|
39989
40026
|
_this.updateConfigStructure();
|
|
39990
40027
|
(_this$updateViewPlann6 = _this.updateViewPlannerElements) === null || _this$updateViewPlann6 === void 0 || _this$updateViewPlann6.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
@@ -39994,15 +40031,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39994
40031
|
}
|
|
39995
40032
|
_this.checkMatchingProducts('onAccessoireDelete');
|
|
39996
40033
|
_this.plannerChangeLog('onDeletePlanner');
|
|
39997
|
-
return
|
|
40034
|
+
return _context10.abrupt("return", wasDeleted);
|
|
39998
40035
|
case 8:
|
|
39999
40036
|
case "end":
|
|
40000
|
-
return
|
|
40037
|
+
return _context10.stop();
|
|
40001
40038
|
}
|
|
40002
|
-
},
|
|
40039
|
+
}, _callee10);
|
|
40003
40040
|
}));
|
|
40004
|
-
return function (
|
|
40005
|
-
return
|
|
40041
|
+
return function (_x39, _x40) {
|
|
40042
|
+
return _ref10.apply(this, arguments);
|
|
40006
40043
|
};
|
|
40007
40044
|
}());
|
|
40008
40045
|
_defineProperty(this, "loadPaletteInfos", function (configStepKey, activeArticles, targetArticles) {
|
|
@@ -40025,13 +40062,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40025
40062
|
* @param configStepKey act ConfigStep
|
|
40026
40063
|
*/
|
|
40027
40064
|
_defineProperty(this, "configSingleIsChanged", /*#__PURE__*/function () {
|
|
40028
|
-
var
|
|
40065
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(doConfigSingle, configStepKey, groupedOptions, groupedArticles, optionCodex, tabGroupKey) {
|
|
40029
40066
|
var set;
|
|
40030
|
-
return _regeneratorRuntime.wrap(function
|
|
40031
|
-
while (1) switch (
|
|
40067
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
40068
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
40032
40069
|
case 0:
|
|
40033
40070
|
set = _this.actSet();
|
|
40034
|
-
|
|
40071
|
+
_context11.next = 3;
|
|
40035
40072
|
return setHandlerInstance.configSingleIsChanged(set, doConfigSingle, groupedOptions, groupedArticles);
|
|
40036
40073
|
case 3:
|
|
40037
40074
|
_this.updatePriceInView();
|
|
@@ -40041,15 +40078,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40041
40078
|
configStepKey = setHandlerInstance.getNewConfigStepKeyInOption(set, configStepKey, optionCodex, tabGroupKey);
|
|
40042
40079
|
_this.updatePlannerView('CONFIG_SINGLE_IS_CHANGED');
|
|
40043
40080
|
}
|
|
40044
|
-
return
|
|
40081
|
+
return _context11.abrupt("return", configStepKey);
|
|
40045
40082
|
case 7:
|
|
40046
40083
|
case "end":
|
|
40047
|
-
return
|
|
40084
|
+
return _context11.stop();
|
|
40048
40085
|
}
|
|
40049
|
-
},
|
|
40086
|
+
}, _callee11);
|
|
40050
40087
|
}));
|
|
40051
|
-
return function (
|
|
40052
|
-
return
|
|
40088
|
+
return function (_x41, _x42, _x43, _x44, _x45, _x46) {
|
|
40089
|
+
return _ref11.apply(this, arguments);
|
|
40053
40090
|
};
|
|
40054
40091
|
}());
|
|
40055
40092
|
/**
|
|
@@ -40063,23 +40100,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40063
40100
|
*/
|
|
40064
40101
|
//onConfigItemClick ist ein Click auf das Item der ConfigPalette um die OPV zu ändern
|
|
40065
40102
|
_defineProperty(this, "doConfigure", /*#__PURE__*/function () {
|
|
40066
|
-
var
|
|
40103
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(myValues, targetArticles, dontUpdatePlannerView, dontCallEvents) {
|
|
40067
40104
|
var _this$actions13, _this$actions13$toggl, _this$actions14, _this$actions14$toggl;
|
|
40068
40105
|
var set, returnValues, structure, _returnValues$element, _this$updateViewPlann8, _this$updateElementSe4;
|
|
40069
|
-
return _regeneratorRuntime.wrap(function
|
|
40070
|
-
while (1) switch (
|
|
40106
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
40107
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
40071
40108
|
case 0:
|
|
40072
40109
|
set = _this.actSet();
|
|
40073
40110
|
(_this$actions13 = _this.actions) === null || _this$actions13 === void 0 || (_this$actions13$toggl = _this$actions13.toggleLoading) === null || _this$actions13$toggl === void 0 || _this$actions13$toggl.call(_this$actions13, 'doConfigure', false, true);
|
|
40074
|
-
|
|
40111
|
+
_context12.next = 4;
|
|
40075
40112
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, myValues, targetArticles, undefined, 'FromViewClick');
|
|
40076
40113
|
case 4:
|
|
40077
|
-
returnValues =
|
|
40114
|
+
returnValues = _context12.sent;
|
|
40078
40115
|
(_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
|
|
40079
40116
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
40080
40117
|
_this.checkMatchingProducts('onConfig');
|
|
40081
40118
|
if (dontUpdatePlannerView) {
|
|
40082
|
-
|
|
40119
|
+
_context12.next = 18;
|
|
40083
40120
|
break;
|
|
40084
40121
|
}
|
|
40085
40122
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -40093,79 +40130,79 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40093
40130
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
40094
40131
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
40095
40132
|
_this.updateWebConfiguratorTitle();
|
|
40096
|
-
|
|
40133
|
+
_context12.next = 18;
|
|
40097
40134
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
40098
40135
|
case 18:
|
|
40099
40136
|
if (dontCallEvents) {
|
|
40100
|
-
|
|
40137
|
+
_context12.next = 21;
|
|
40101
40138
|
break;
|
|
40102
40139
|
}
|
|
40103
|
-
|
|
40140
|
+
_context12.next = 21;
|
|
40104
40141
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
40105
40142
|
case 21:
|
|
40106
40143
|
_this.configuratorChangeLog('onConfiguratorStep', myValues);
|
|
40107
40144
|
case 22:
|
|
40108
40145
|
case "end":
|
|
40109
|
-
return
|
|
40146
|
+
return _context12.stop();
|
|
40110
40147
|
}
|
|
40111
|
-
},
|
|
40148
|
+
}, _callee12);
|
|
40112
40149
|
}));
|
|
40113
|
-
return function (
|
|
40114
|
-
return
|
|
40150
|
+
return function (_x47, _x48, _x49, _x50) {
|
|
40151
|
+
return _ref12.apply(this, arguments);
|
|
40115
40152
|
};
|
|
40116
40153
|
}());
|
|
40117
40154
|
_defineProperty(this, "fillBaksetforOnWebPlanerConfigChange", /*#__PURE__*/function () {
|
|
40118
|
-
var
|
|
40155
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(myValues, isInit) {
|
|
40119
40156
|
var _myValues;
|
|
40120
40157
|
var set, articles, article;
|
|
40121
|
-
return _regeneratorRuntime.wrap(function
|
|
40122
|
-
while (1) switch (
|
|
40158
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
40159
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
40123
40160
|
case 0:
|
|
40124
40161
|
if (_this.eventIsManagedByClient('onWebPlanerConfigChange')) {
|
|
40125
|
-
|
|
40162
|
+
_context13.next = 2;
|
|
40126
40163
|
break;
|
|
40127
40164
|
}
|
|
40128
|
-
return
|
|
40165
|
+
return _context13.abrupt("return");
|
|
40129
40166
|
case 2:
|
|
40130
40167
|
set = _this.actSet();
|
|
40131
40168
|
if (set) {
|
|
40132
|
-
|
|
40169
|
+
_context13.next = 5;
|
|
40133
40170
|
break;
|
|
40134
40171
|
}
|
|
40135
|
-
return
|
|
40172
|
+
return _context13.abrupt("return");
|
|
40136
40173
|
case 5:
|
|
40137
40174
|
if (myValues) {
|
|
40138
|
-
|
|
40175
|
+
_context13.next = 11;
|
|
40139
40176
|
break;
|
|
40140
40177
|
}
|
|
40141
40178
|
//get first option of the first article
|
|
40142
40179
|
articles = set.getDivaArticles();
|
|
40143
40180
|
article = articles[Object.keys(articles)[0]];
|
|
40144
40181
|
if (article) {
|
|
40145
|
-
|
|
40182
|
+
_context13.next = 10;
|
|
40146
40183
|
break;
|
|
40147
40184
|
}
|
|
40148
|
-
return
|
|
40185
|
+
return _context13.abrupt("return");
|
|
40149
40186
|
case 10:
|
|
40150
40187
|
myValues = article === null || article === void 0 ? void 0 : article.VariantValuesWithoutFreetext;
|
|
40151
40188
|
case 11:
|
|
40152
|
-
|
|
40153
|
-
|
|
40154
|
-
|
|
40189
|
+
_context13.t0 = _this.divaBasketHandler;
|
|
40190
|
+
_context13.t1 = set;
|
|
40191
|
+
_context13.next = 15;
|
|
40155
40192
|
return setHandlerInstance.fillOrderLinesAndOrderSets(_this.sets, _this.divaBasketHandler, true, _this.doAllowSetPlanner(), _this.ReturnTo);
|
|
40156
40193
|
case 15:
|
|
40157
|
-
|
|
40158
|
-
|
|
40159
|
-
|
|
40160
|
-
return
|
|
40194
|
+
_context13.t2 = _context13.sent;
|
|
40195
|
+
_context13.t3 = Object.keys((_myValues = myValues) !== null && _myValues !== void 0 ? _myValues : {});
|
|
40196
|
+
_context13.t4 = isInit;
|
|
40197
|
+
return _context13.abrupt("return", _context13.t0.fillBaksetforOnWebPlanerConfigChange.call(_context13.t0, _context13.t1, _context13.t2, _context13.t3, _context13.t4));
|
|
40161
40198
|
case 19:
|
|
40162
40199
|
case "end":
|
|
40163
|
-
return
|
|
40200
|
+
return _context13.stop();
|
|
40164
40201
|
}
|
|
40165
|
-
},
|
|
40202
|
+
}, _callee13);
|
|
40166
40203
|
}));
|
|
40167
|
-
return function (
|
|
40168
|
-
return
|
|
40204
|
+
return function (_x51, _x52) {
|
|
40205
|
+
return _ref13.apply(this, arguments);
|
|
40169
40206
|
};
|
|
40170
40207
|
}());
|
|
40171
40208
|
_defineProperty(this, "getPosNr", function (basketId) {
|
|
@@ -40203,10 +40240,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40203
40240
|
return _createClass(DivaWebPlanner, [{
|
|
40204
40241
|
key: "initialize",
|
|
40205
40242
|
value: function () {
|
|
40206
|
-
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40243
|
+
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40207
40244
|
var viewReadyPromise, loadSuccessful, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
40208
|
-
return _regeneratorRuntime.wrap(function
|
|
40209
|
-
while (1) switch (
|
|
40245
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40246
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
40210
40247
|
case 0:
|
|
40211
40248
|
this.api = new DivaApiHandler(this.plannerConfig, this.handler);
|
|
40212
40249
|
this.api.setI18n(this.i18n);
|
|
@@ -40220,58 +40257,58 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40220
40257
|
warningTime: 2000,
|
|
40221
40258
|
errorTime: 4000
|
|
40222
40259
|
});
|
|
40223
|
-
|
|
40260
|
+
_context14.next = 8;
|
|
40224
40261
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
40225
40262
|
case 8:
|
|
40226
40263
|
this.plannerHandler = new DivaPlannerHandler(false);
|
|
40227
40264
|
viewReadyPromise = this.initViewApiDependencies();
|
|
40228
|
-
|
|
40265
|
+
_context14.next = 12;
|
|
40229
40266
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40230
40267
|
case 12:
|
|
40231
|
-
loadSuccessful =
|
|
40268
|
+
loadSuccessful = _context14.sent;
|
|
40232
40269
|
if (this.plannerConfig.configuratorSessionId === undefined && (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils.businessMetrics.getConfiguratorSessionId() === undefined)) {
|
|
40233
40270
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
40234
40271
|
}
|
|
40235
40272
|
if (!loadSuccessful) {
|
|
40236
|
-
|
|
40273
|
+
_context14.next = 56;
|
|
40237
40274
|
break;
|
|
40238
40275
|
}
|
|
40239
40276
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40240
|
-
|
|
40277
|
+
_context14.next = 24;
|
|
40241
40278
|
break;
|
|
40242
40279
|
}
|
|
40243
40280
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
40244
|
-
|
|
40281
|
+
_context14.next = 24;
|
|
40245
40282
|
break;
|
|
40246
40283
|
}
|
|
40247
|
-
|
|
40284
|
+
_context14.next = 19;
|
|
40248
40285
|
return viewReadyPromise;
|
|
40249
40286
|
case 19:
|
|
40250
|
-
|
|
40287
|
+
_context14.next = 21;
|
|
40251
40288
|
return this.initView();
|
|
40252
40289
|
case 21:
|
|
40253
40290
|
this.subscribeToWebPlannerEvents();
|
|
40254
40291
|
(_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);
|
|
40255
|
-
return
|
|
40292
|
+
return _context14.abrupt("return", true);
|
|
40256
40293
|
case 24:
|
|
40257
40294
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
40258
40295
|
initSetState = this.getInitStateForSet();
|
|
40259
40296
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
40260
|
-
|
|
40297
|
+
_context14.next = 29;
|
|
40261
40298
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
40262
40299
|
case 29:
|
|
40263
40300
|
set = this.actSet();
|
|
40264
40301
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
40265
40302
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
40266
|
-
|
|
40303
|
+
_context14.next = 38;
|
|
40267
40304
|
break;
|
|
40268
40305
|
}
|
|
40269
|
-
|
|
40306
|
+
_context14.next = 34;
|
|
40270
40307
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
40271
40308
|
case 34:
|
|
40272
|
-
result =
|
|
40309
|
+
result = _context14.sent;
|
|
40273
40310
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
40274
|
-
|
|
40311
|
+
_context14.next = 39;
|
|
40275
40312
|
break;
|
|
40276
40313
|
case 38:
|
|
40277
40314
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -40280,10 +40317,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40280
40317
|
}
|
|
40281
40318
|
}
|
|
40282
40319
|
case 39:
|
|
40283
|
-
|
|
40320
|
+
_context14.next = 41;
|
|
40284
40321
|
return viewReadyPromise;
|
|
40285
40322
|
case 41:
|
|
40286
|
-
|
|
40323
|
+
_context14.next = 43;
|
|
40287
40324
|
return this.initView();
|
|
40288
40325
|
case 43:
|
|
40289
40326
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
@@ -40320,20 +40357,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40320
40357
|
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
40321
40358
|
initializationId: initializationId
|
|
40322
40359
|
}, false);
|
|
40323
|
-
|
|
40360
|
+
_context14.next = 53;
|
|
40324
40361
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
40325
40362
|
case 53:
|
|
40326
|
-
return
|
|
40363
|
+
return _context14.abrupt("return", true);
|
|
40327
40364
|
case 56:
|
|
40328
40365
|
this.onInitializationError();
|
|
40329
40366
|
//fehler beim laden vom basket..
|
|
40330
40367
|
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40331
|
-
return
|
|
40368
|
+
return _context14.abrupt("return", false);
|
|
40332
40369
|
case 59:
|
|
40333
40370
|
case "end":
|
|
40334
|
-
return
|
|
40371
|
+
return _context14.stop();
|
|
40335
40372
|
}
|
|
40336
|
-
},
|
|
40373
|
+
}, _callee14, this);
|
|
40337
40374
|
}));
|
|
40338
40375
|
function initialize() {
|
|
40339
40376
|
return _initialize.apply(this, arguments);
|
|
@@ -40465,23 +40502,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40465
40502
|
}, {
|
|
40466
40503
|
key: "initView",
|
|
40467
40504
|
value: (function () {
|
|
40468
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40505
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
|
|
40469
40506
|
var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
|
|
40470
|
-
return _regeneratorRuntime.wrap(function
|
|
40471
|
-
while (1) switch (
|
|
40507
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
40508
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
40472
40509
|
case 0:
|
|
40473
40510
|
set = this.actSet();
|
|
40474
40511
|
plannerMode = this.getPlannerMode();
|
|
40475
40512
|
this.initConfiguratorMode(plannerMode);
|
|
40476
40513
|
if (!(plannerMode == 'ProductList')) {
|
|
40477
|
-
|
|
40514
|
+
_context15.next = 7;
|
|
40478
40515
|
break;
|
|
40479
40516
|
}
|
|
40480
40517
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40481
|
-
|
|
40518
|
+
_context15.next = 17;
|
|
40482
40519
|
break;
|
|
40483
40520
|
case 7:
|
|
40484
|
-
|
|
40521
|
+
_context15.next = 9;
|
|
40485
40522
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
40486
40523
|
case 9:
|
|
40487
40524
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -40495,13 +40532,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40495
40532
|
this.onBasketInitialized();
|
|
40496
40533
|
this.checkMatchingProducts('onInit');
|
|
40497
40534
|
case 17:
|
|
40498
|
-
|
|
40535
|
+
_context15.next = 19;
|
|
40499
40536
|
return this.runInitMode(plannerMode);
|
|
40500
40537
|
case 19:
|
|
40501
40538
|
case "end":
|
|
40502
|
-
return
|
|
40539
|
+
return _context15.stop();
|
|
40503
40540
|
}
|
|
40504
|
-
},
|
|
40541
|
+
}, _callee15, this);
|
|
40505
40542
|
}));
|
|
40506
40543
|
function initView() {
|
|
40507
40544
|
return _initView.apply(this, arguments);
|
|
@@ -40522,26 +40559,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40522
40559
|
}, {
|
|
40523
40560
|
key: "runInitMode",
|
|
40524
40561
|
value: function () {
|
|
40525
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40562
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
|
|
40526
40563
|
var _this$state3;
|
|
40527
40564
|
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40528
|
-
return _regeneratorRuntime.wrap(function
|
|
40529
|
-
while (1) switch (
|
|
40565
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40566
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
40530
40567
|
case 0:
|
|
40531
40568
|
doDefault = true;
|
|
40532
40569
|
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
40533
|
-
|
|
40570
|
+
_context16.next = 10;
|
|
40534
40571
|
break;
|
|
40535
40572
|
}
|
|
40536
40573
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
40537
40574
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
40538
40575
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
40539
40576
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
40540
|
-
|
|
40577
|
+
_context16.next = 7;
|
|
40541
40578
|
return this.saveToBasketWrapper();
|
|
40542
40579
|
case 7:
|
|
40543
40580
|
doDefault = false;
|
|
40544
|
-
|
|
40581
|
+
_context16.next = 11;
|
|
40545
40582
|
break;
|
|
40546
40583
|
case 10:
|
|
40547
40584
|
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) {
|
|
@@ -40565,11 +40602,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40565
40602
|
}
|
|
40566
40603
|
case 12:
|
|
40567
40604
|
case "end":
|
|
40568
|
-
return
|
|
40605
|
+
return _context16.stop();
|
|
40569
40606
|
}
|
|
40570
|
-
},
|
|
40607
|
+
}, _callee16, this);
|
|
40571
40608
|
}));
|
|
40572
|
-
function runInitMode(
|
|
40609
|
+
function runInitMode(_x53) {
|
|
40573
40610
|
return _runInitMode.apply(this, arguments);
|
|
40574
40611
|
}
|
|
40575
40612
|
return runInitMode;
|
|
@@ -40577,16 +40614,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40577
40614
|
}, {
|
|
40578
40615
|
key: "addSetToActPlanningByDivaNr",
|
|
40579
40616
|
value: function () {
|
|
40580
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40617
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(divaNr) {
|
|
40581
40618
|
var _this$updateViewPlann10;
|
|
40582
40619
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
40583
|
-
return _regeneratorRuntime.wrap(function
|
|
40584
|
-
while (1) switch (
|
|
40620
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
40621
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
40585
40622
|
case 0:
|
|
40586
40623
|
set = this.actSet();
|
|
40587
40624
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
40588
40625
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
40589
|
-
|
|
40626
|
+
_context17.next = 5;
|
|
40590
40627
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40591
40628
|
case 5:
|
|
40592
40629
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -40594,30 +40631,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40594
40631
|
i = 0;
|
|
40595
40632
|
case 8:
|
|
40596
40633
|
if (!(i < orderSets.length)) {
|
|
40597
|
-
|
|
40634
|
+
_context17.next = 24;
|
|
40598
40635
|
break;
|
|
40599
40636
|
}
|
|
40600
40637
|
orderset = orderSets[i];
|
|
40601
40638
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40602
40639
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40603
40640
|
if (!loadedSet) {
|
|
40604
|
-
|
|
40641
|
+
_context17.next = 18;
|
|
40605
40642
|
break;
|
|
40606
40643
|
}
|
|
40607
|
-
|
|
40644
|
+
_context17.next = 15;
|
|
40608
40645
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40609
40646
|
case 15:
|
|
40610
40647
|
this.checkMatchingProducts('onAdd');
|
|
40611
|
-
|
|
40648
|
+
_context17.next = 20;
|
|
40612
40649
|
break;
|
|
40613
40650
|
case 18:
|
|
40614
|
-
|
|
40651
|
+
_context17.next = 20;
|
|
40615
40652
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40616
40653
|
case 20:
|
|
40617
40654
|
this.cleanUpEmptySets(true);
|
|
40618
40655
|
case 21:
|
|
40619
40656
|
i++;
|
|
40620
|
-
|
|
40657
|
+
_context17.next = 8;
|
|
40621
40658
|
break;
|
|
40622
40659
|
case 24:
|
|
40623
40660
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -40629,11 +40666,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40629
40666
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40630
40667
|
case 31:
|
|
40631
40668
|
case "end":
|
|
40632
|
-
return
|
|
40669
|
+
return _context17.stop();
|
|
40633
40670
|
}
|
|
40634
|
-
},
|
|
40671
|
+
}, _callee17, this);
|
|
40635
40672
|
}));
|
|
40636
|
-
function addSetToActPlanningByDivaNr(
|
|
40673
|
+
function addSetToActPlanningByDivaNr(_x54) {
|
|
40637
40674
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
40638
40675
|
}
|
|
40639
40676
|
return addSetToActPlanningByDivaNr;
|
|
@@ -40666,28 +40703,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40666
40703
|
}, {
|
|
40667
40704
|
key: "setActSetCurConfigStepKey",
|
|
40668
40705
|
value: function () {
|
|
40669
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40706
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(curConfigStepKey) {
|
|
40670
40707
|
var set;
|
|
40671
|
-
return _regeneratorRuntime.wrap(function
|
|
40672
|
-
while (1) switch (
|
|
40708
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40709
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40673
40710
|
case 0:
|
|
40674
40711
|
set = this.actSet();
|
|
40675
40712
|
if (set) {
|
|
40676
|
-
|
|
40713
|
+
_context18.next = 3;
|
|
40677
40714
|
break;
|
|
40678
40715
|
}
|
|
40679
|
-
return
|
|
40716
|
+
return _context18.abrupt("return");
|
|
40680
40717
|
case 3:
|
|
40681
40718
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40682
|
-
|
|
40719
|
+
_context18.next = 6;
|
|
40683
40720
|
return setHandlerInstance.updateNavigation(set);
|
|
40684
40721
|
case 6:
|
|
40685
40722
|
case "end":
|
|
40686
|
-
return
|
|
40723
|
+
return _context18.stop();
|
|
40687
40724
|
}
|
|
40688
|
-
},
|
|
40725
|
+
}, _callee18, this);
|
|
40689
40726
|
}));
|
|
40690
|
-
function setActSetCurConfigStepKey(
|
|
40727
|
+
function setActSetCurConfigStepKey(_x55) {
|
|
40691
40728
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
40692
40729
|
}
|
|
40693
40730
|
return setActSetCurConfigStepKey;
|
|
@@ -40836,17 +40873,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40836
40873
|
}, {
|
|
40837
40874
|
key: "deletePlannerElement",
|
|
40838
40875
|
value: function () {
|
|
40839
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40876
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, denyElementSelectionClear) {
|
|
40840
40877
|
var _this$updateViewPlann11;
|
|
40841
40878
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40842
|
-
return _regeneratorRuntime.wrap(function
|
|
40843
|
-
while (1) switch (
|
|
40879
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40880
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40844
40881
|
case 0:
|
|
40845
40882
|
set = this.sets[setId];
|
|
40846
|
-
|
|
40883
|
+
_context19.next = 3;
|
|
40847
40884
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40848
40885
|
case 3:
|
|
40849
|
-
result =
|
|
40886
|
+
result = _context19.sent;
|
|
40850
40887
|
this.updateConfigStructure();
|
|
40851
40888
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40852
40889
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40857,17 +40894,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40857
40894
|
}
|
|
40858
40895
|
this.updatePriceInView();
|
|
40859
40896
|
this.checkMatchingProducts('onDelete');
|
|
40860
|
-
|
|
40897
|
+
_context19.next = 14;
|
|
40861
40898
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40862
40899
|
case 14:
|
|
40863
40900
|
this.plannerChangeLog('onDeletePlanner');
|
|
40864
40901
|
case 15:
|
|
40865
40902
|
case "end":
|
|
40866
|
-
return
|
|
40903
|
+
return _context19.stop();
|
|
40867
40904
|
}
|
|
40868
|
-
},
|
|
40905
|
+
}, _callee19, this);
|
|
40869
40906
|
}));
|
|
40870
|
-
function deletePlannerElement(
|
|
40907
|
+
function deletePlannerElement(_x56, _x57, _x58) {
|
|
40871
40908
|
return _deletePlannerElement.apply(this, arguments);
|
|
40872
40909
|
}
|
|
40873
40910
|
return deletePlannerElement;
|
|
@@ -40881,17 +40918,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40881
40918
|
}, {
|
|
40882
40919
|
key: "copyPlannerElement",
|
|
40883
40920
|
value: (function () {
|
|
40884
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40921
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, curConfigKey, copyInfo) {
|
|
40885
40922
|
var _this$updateViewPlann12;
|
|
40886
40923
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
40887
|
-
return _regeneratorRuntime.wrap(function
|
|
40888
|
-
while (1) switch (
|
|
40924
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
40925
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40889
40926
|
case 0:
|
|
40890
40927
|
set = this.sets[setId];
|
|
40891
|
-
|
|
40928
|
+
_context20.next = 3;
|
|
40892
40929
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
40893
40930
|
case 3:
|
|
40894
|
-
newSelectedArticle =
|
|
40931
|
+
newSelectedArticle = _context20.sent;
|
|
40895
40932
|
this.updateConfigStructure();
|
|
40896
40933
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40897
40934
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -40905,14 +40942,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40905
40942
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40906
40943
|
}
|
|
40907
40944
|
this.checkMatchingProducts('onCopy');
|
|
40908
|
-
return
|
|
40945
|
+
return _context20.abrupt("return", newConfigStepKey);
|
|
40909
40946
|
case 13:
|
|
40910
40947
|
case "end":
|
|
40911
|
-
return
|
|
40948
|
+
return _context20.stop();
|
|
40912
40949
|
}
|
|
40913
|
-
},
|
|
40950
|
+
}, _callee20, this);
|
|
40914
40951
|
}));
|
|
40915
|
-
function copyPlannerElement(
|
|
40952
|
+
function copyPlannerElement(_x59, _x60, _x61, _x62) {
|
|
40916
40953
|
return _copyPlannerElement.apply(this, arguments);
|
|
40917
40954
|
}
|
|
40918
40955
|
return copyPlannerElement;
|
|
@@ -40941,33 +40978,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40941
40978
|
}, {
|
|
40942
40979
|
key: "getFreePlacesOnGrids",
|
|
40943
40980
|
value: function () {
|
|
40944
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40981
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(gridGroup, from) {
|
|
40945
40982
|
var _this$updateFreePlace;
|
|
40946
40983
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
40947
|
-
return _regeneratorRuntime.wrap(function
|
|
40948
|
-
while (1) switch (
|
|
40984
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
40985
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
40949
40986
|
case 0:
|
|
40950
40987
|
set = this.actSet();
|
|
40951
40988
|
if (set) {
|
|
40952
|
-
|
|
40989
|
+
_context21.next = 3;
|
|
40953
40990
|
break;
|
|
40954
40991
|
}
|
|
40955
40992
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
40956
40993
|
case 3:
|
|
40957
40994
|
if (!gridGroup) {
|
|
40958
|
-
|
|
40995
|
+
_context21.next = 9;
|
|
40959
40996
|
break;
|
|
40960
40997
|
}
|
|
40961
|
-
|
|
40998
|
+
_context21.next = 6;
|
|
40962
40999
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
40963
41000
|
case 6:
|
|
40964
|
-
|
|
40965
|
-
|
|
41001
|
+
_context21.t0 = _context21.sent;
|
|
41002
|
+
_context21.next = 10;
|
|
40966
41003
|
break;
|
|
40967
41004
|
case 9:
|
|
40968
|
-
|
|
41005
|
+
_context21.t0 = undefined;
|
|
40969
41006
|
case 10:
|
|
40970
|
-
freeShelfGrids =
|
|
41007
|
+
freeShelfGrids = _context21.t0;
|
|
40971
41008
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
40972
41009
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
40973
41010
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -40975,17 +41012,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40975
41012
|
freeShelfGrids: freeShelfGrids,
|
|
40976
41013
|
plannedShelfGrids: plannedShelfGrids
|
|
40977
41014
|
});
|
|
40978
|
-
return
|
|
41015
|
+
return _context21.abrupt("return", {
|
|
40979
41016
|
freeShelfGrids: freeShelfGrids,
|
|
40980
41017
|
plannedShelfGrids: plannedShelfGrids
|
|
40981
41018
|
});
|
|
40982
41019
|
case 16:
|
|
40983
41020
|
case "end":
|
|
40984
|
-
return
|
|
41021
|
+
return _context21.stop();
|
|
40985
41022
|
}
|
|
40986
|
-
},
|
|
41023
|
+
}, _callee21, this);
|
|
40987
41024
|
}));
|
|
40988
|
-
function getFreePlacesOnGrids(
|
|
41025
|
+
function getFreePlacesOnGrids(_x63, _x64) {
|
|
40989
41026
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
40990
41027
|
}
|
|
40991
41028
|
return getFreePlacesOnGrids;
|
|
@@ -41002,36 +41039,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41002
41039
|
}, {
|
|
41003
41040
|
key: "moveShelfItemToGrid",
|
|
41004
41041
|
value: function () {
|
|
41005
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41042
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
41006
41043
|
var set, newGridId;
|
|
41007
|
-
return _regeneratorRuntime.wrap(function
|
|
41008
|
-
while (1) switch (
|
|
41044
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
41045
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
41009
41046
|
case 0:
|
|
41010
41047
|
set = this.actSet();
|
|
41011
41048
|
if (set) {
|
|
41012
|
-
|
|
41049
|
+
_context22.next = 3;
|
|
41013
41050
|
break;
|
|
41014
41051
|
}
|
|
41015
|
-
return
|
|
41052
|
+
return _context22.abrupt("return");
|
|
41016
41053
|
case 3:
|
|
41017
|
-
|
|
41054
|
+
_context22.next = 5;
|
|
41018
41055
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
41019
41056
|
case 5:
|
|
41020
|
-
newGridId =
|
|
41057
|
+
newGridId = _context22.sent;
|
|
41021
41058
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
41022
41059
|
if (!newGridId) {
|
|
41023
|
-
|
|
41060
|
+
_context22.next = 10;
|
|
41024
41061
|
break;
|
|
41025
41062
|
}
|
|
41026
|
-
|
|
41063
|
+
_context22.next = 10;
|
|
41027
41064
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
41028
41065
|
case 10:
|
|
41029
41066
|
case "end":
|
|
41030
|
-
return
|
|
41067
|
+
return _context22.stop();
|
|
41031
41068
|
}
|
|
41032
|
-
},
|
|
41069
|
+
}, _callee22, this);
|
|
41033
41070
|
}));
|
|
41034
|
-
function moveShelfItemToGrid(
|
|
41071
|
+
function moveShelfItemToGrid(_x65, _x66, _x67, _x68) {
|
|
41035
41072
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
41036
41073
|
}
|
|
41037
41074
|
return moveShelfItemToGrid;
|
|
@@ -41039,27 +41076,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41039
41076
|
}, {
|
|
41040
41077
|
key: "resetArticle",
|
|
41041
41078
|
value: function () {
|
|
41042
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41079
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(basketId) {
|
|
41043
41080
|
var set;
|
|
41044
|
-
return _regeneratorRuntime.wrap(function
|
|
41045
|
-
while (1) switch (
|
|
41081
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
41082
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
41046
41083
|
case 0:
|
|
41047
41084
|
set = this.actSet();
|
|
41048
41085
|
if (set) {
|
|
41049
|
-
|
|
41086
|
+
_context23.next = 3;
|
|
41050
41087
|
break;
|
|
41051
41088
|
}
|
|
41052
|
-
return
|
|
41089
|
+
return _context23.abrupt("return");
|
|
41053
41090
|
case 3:
|
|
41054
|
-
|
|
41091
|
+
_context23.next = 5;
|
|
41055
41092
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
41056
41093
|
case 5:
|
|
41057
41094
|
case "end":
|
|
41058
|
-
return
|
|
41095
|
+
return _context23.stop();
|
|
41059
41096
|
}
|
|
41060
|
-
},
|
|
41097
|
+
}, _callee23, this);
|
|
41061
41098
|
}));
|
|
41062
|
-
function resetArticle(
|
|
41099
|
+
function resetArticle(_x69) {
|
|
41063
41100
|
return _resetArticle.apply(this, arguments);
|
|
41064
41101
|
}
|
|
41065
41102
|
return resetArticle;
|
|
@@ -41089,10 +41126,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41089
41126
|
}, {
|
|
41090
41127
|
key: "checkMatchingProducts",
|
|
41091
41128
|
value: function () {
|
|
41092
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41129
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(from) {
|
|
41093
41130
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
41094
|
-
return _regeneratorRuntime.wrap(function
|
|
41095
|
-
while (1) switch (
|
|
41131
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
41132
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
41096
41133
|
case 0:
|
|
41097
41134
|
set = this.actSet();
|
|
41098
41135
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -41106,20 +41143,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41106
41143
|
}
|
|
41107
41144
|
}
|
|
41108
41145
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
41109
|
-
|
|
41146
|
+
_context24.next = 6;
|
|
41110
41147
|
break;
|
|
41111
41148
|
}
|
|
41112
|
-
|
|
41149
|
+
_context24.next = 5;
|
|
41113
41150
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
41114
41151
|
case 5:
|
|
41115
41152
|
this.updatePriceInView();
|
|
41116
41153
|
case 6:
|
|
41117
41154
|
case "end":
|
|
41118
|
-
return
|
|
41155
|
+
return _context24.stop();
|
|
41119
41156
|
}
|
|
41120
|
-
},
|
|
41157
|
+
}, _callee24, this);
|
|
41121
41158
|
}));
|
|
41122
|
-
function checkMatchingProducts(
|
|
41159
|
+
function checkMatchingProducts(_x70) {
|
|
41123
41160
|
return _checkMatchingProducts.apply(this, arguments);
|
|
41124
41161
|
}
|
|
41125
41162
|
return checkMatchingProducts;
|
|
@@ -41196,7 +41233,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41196
41233
|
}, {
|
|
41197
41234
|
key: "saveToBasketWrapper",
|
|
41198
41235
|
value: function () {
|
|
41199
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41236
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
|
|
41200
41237
|
var _this$actions27,
|
|
41201
41238
|
_this$actions27$toggl,
|
|
41202
41239
|
_this$actions28,
|
|
@@ -41205,8 +41242,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41205
41242
|
_this$actions32,
|
|
41206
41243
|
_this$i18n14;
|
|
41207
41244
|
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;
|
|
41208
|
-
return _regeneratorRuntime.wrap(function
|
|
41209
|
-
while (1) switch (
|
|
41245
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
41246
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
41210
41247
|
case 0:
|
|
41211
41248
|
returnTo = this.getReturnTo(event);
|
|
41212
41249
|
finalEvent = {
|
|
@@ -41214,50 +41251,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41214
41251
|
saveBasket: true
|
|
41215
41252
|
};
|
|
41216
41253
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
41217
|
-
|
|
41254
|
+
_context25.next = 21;
|
|
41218
41255
|
break;
|
|
41219
41256
|
}
|
|
41220
41257
|
product = undefined;
|
|
41221
41258
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
41222
|
-
|
|
41259
|
+
_context25.next = 10;
|
|
41223
41260
|
break;
|
|
41224
41261
|
}
|
|
41225
41262
|
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
41226
|
-
|
|
41263
|
+
_context25.next = 8;
|
|
41227
41264
|
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
41228
41265
|
case 8:
|
|
41229
|
-
_result =
|
|
41266
|
+
_result = _context25.sent;
|
|
41230
41267
|
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
41231
41268
|
case 10:
|
|
41232
|
-
|
|
41269
|
+
_context25.next = 12;
|
|
41233
41270
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
41234
41271
|
case 12:
|
|
41235
|
-
finalEvent =
|
|
41272
|
+
finalEvent = _context25.sent;
|
|
41236
41273
|
if (finalEvent) {
|
|
41237
|
-
|
|
41274
|
+
_context25.next = 17;
|
|
41238
41275
|
break;
|
|
41239
41276
|
}
|
|
41240
|
-
return
|
|
41277
|
+
return _context25.abrupt("return", 'canceled');
|
|
41241
41278
|
case 17:
|
|
41242
41279
|
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
41243
|
-
|
|
41280
|
+
_context25.next = 20;
|
|
41244
41281
|
break;
|
|
41245
41282
|
}
|
|
41246
41283
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
|
|
41247
41284
|
type: finalEvent.event
|
|
41248
41285
|
});
|
|
41249
|
-
return
|
|
41286
|
+
return _context25.abrupt("return", 'canceled');
|
|
41250
41287
|
case 20:
|
|
41251
41288
|
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
41252
41289
|
case 21:
|
|
41253
41290
|
(_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);
|
|
41254
|
-
|
|
41291
|
+
_context25.next = 24;
|
|
41255
41292
|
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
41256
41293
|
case 24:
|
|
41257
|
-
result =
|
|
41294
|
+
result = _context25.sent;
|
|
41258
41295
|
(_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);
|
|
41259
41296
|
if (!(result === 'canceled')) {
|
|
41260
|
-
|
|
41297
|
+
_context25.next = 30;
|
|
41261
41298
|
break;
|
|
41262
41299
|
}
|
|
41263
41300
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -41265,10 +41302,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41265
41302
|
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() : '',
|
|
41266
41303
|
accept: true
|
|
41267
41304
|
});
|
|
41268
|
-
return
|
|
41305
|
+
return _context25.abrupt("return", result);
|
|
41269
41306
|
case 30:
|
|
41270
|
-
|
|
41271
|
-
|
|
41307
|
+
_context25.t0 = returnTo;
|
|
41308
|
+
_context25.next = _context25.t0 === 'OPEN_PDF' ? 33 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
|
|
41272
41309
|
break;
|
|
41273
41310
|
case 33:
|
|
41274
41311
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -41288,7 +41325,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41288
41325
|
}
|
|
41289
41326
|
});
|
|
41290
41327
|
}
|
|
41291
|
-
return
|
|
41328
|
+
return _context25.abrupt("break", 36);
|
|
41292
41329
|
case 35:
|
|
41293
41330
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
|
|
41294
41331
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
@@ -41296,20 +41333,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41296
41333
|
});
|
|
41297
41334
|
case 36:
|
|
41298
41335
|
if (!(result == 'noArticleToSave')) {
|
|
41299
|
-
|
|
41336
|
+
_context25.next = 39;
|
|
41300
41337
|
break;
|
|
41301
41338
|
}
|
|
41302
41339
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
41303
|
-
return
|
|
41340
|
+
return _context25.abrupt("return", 'canceled');
|
|
41304
41341
|
case 39:
|
|
41305
|
-
return
|
|
41342
|
+
return _context25.abrupt("return", result);
|
|
41306
41343
|
case 40:
|
|
41307
41344
|
case "end":
|
|
41308
|
-
return
|
|
41345
|
+
return _context25.stop();
|
|
41309
41346
|
}
|
|
41310
|
-
},
|
|
41347
|
+
}, _callee25, this);
|
|
41311
41348
|
}));
|
|
41312
|
-
function saveToBasketWrapper(
|
|
41349
|
+
function saveToBasketWrapper(_x71, _x72, _x73) {
|
|
41313
41350
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
41314
41351
|
}
|
|
41315
41352
|
return saveToBasketWrapper;
|
|
@@ -41317,43 +41354,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41317
41354
|
}, {
|
|
41318
41355
|
key: "saveToBasket",
|
|
41319
41356
|
value: function () {
|
|
41320
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41357
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
41321
41358
|
var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
41322
41359
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
41323
|
-
return _regeneratorRuntime.wrap(function
|
|
41324
|
-
while (1) switch (
|
|
41360
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
41361
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41325
41362
|
case 0:
|
|
41326
41363
|
set = this.actSet();
|
|
41327
41364
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
41328
|
-
|
|
41365
|
+
_context26.next = 3;
|
|
41329
41366
|
break;
|
|
41330
41367
|
}
|
|
41331
|
-
return
|
|
41368
|
+
return _context26.abrupt("return", 'noArticleToSave');
|
|
41332
41369
|
case 3:
|
|
41333
41370
|
actBasket = this.divaBasketHandler.actBasket;
|
|
41334
41371
|
returnTo = this.getReturnTo(event);
|
|
41335
41372
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
41336
|
-
|
|
41373
|
+
_context26.next = 13;
|
|
41337
41374
|
break;
|
|
41338
41375
|
}
|
|
41339
41376
|
oldReturnTo = returnTo;
|
|
41340
41377
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
41341
|
-
|
|
41378
|
+
_context26.next = 10;
|
|
41342
41379
|
return this.handleFavorites('SAVE');
|
|
41343
41380
|
case 10:
|
|
41344
|
-
result =
|
|
41381
|
+
result = _context26.sent;
|
|
41345
41382
|
if (result === 'canceled') {
|
|
41346
41383
|
this.ReturnTo = oldReturnTo;
|
|
41347
41384
|
}
|
|
41348
|
-
return
|
|
41385
|
+
return _context26.abrupt("return", result);
|
|
41349
41386
|
case 13:
|
|
41350
|
-
|
|
41351
|
-
|
|
41352
|
-
|
|
41387
|
+
_context26.t0 = this.divaBasketHandler;
|
|
41388
|
+
_context26.t1 = this.divaBasketHandler.actDivaNr;
|
|
41389
|
+
_context26.next = 17;
|
|
41353
41390
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41354
41391
|
case 17:
|
|
41355
|
-
|
|
41356
|
-
|
|
41392
|
+
_context26.t2 = _context26.sent;
|
|
41393
|
+
_context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
|
|
41357
41394
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
41358
41395
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
41359
41396
|
returnTo = this.ReturnTo;
|
|
@@ -41368,11 +41405,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41368
41405
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
41369
41406
|
actBasket.Updated = Date.now();
|
|
41370
41407
|
if (!returnTo) {
|
|
41371
|
-
|
|
41408
|
+
_context26.next = 52;
|
|
41372
41409
|
break;
|
|
41373
41410
|
}
|
|
41374
|
-
|
|
41375
|
-
|
|
41411
|
+
_context26.t3 = returnTo;
|
|
41412
|
+
_context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context26.t3 === 'OPEN_PDF' ? 33 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context26.t3 === 'SAVE_BASKET' ? 33 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
41376
41413
|
break;
|
|
41377
41414
|
case 28:
|
|
41378
41415
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
|
|
@@ -41386,7 +41423,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41386
41423
|
basketData: actBasket
|
|
41387
41424
|
}
|
|
41388
41425
|
});
|
|
41389
|
-
return
|
|
41426
|
+
return _context26.abrupt("break", 52);
|
|
41390
41427
|
case 31:
|
|
41391
41428
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
|
|
41392
41429
|
type: 'SELLER',
|
|
@@ -41398,23 +41435,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41398
41435
|
basketData: actBasket
|
|
41399
41436
|
}
|
|
41400
41437
|
});
|
|
41401
|
-
return
|
|
41438
|
+
return _context26.abrupt("break", 52);
|
|
41402
41439
|
case 33:
|
|
41403
41440
|
if (!(event == 'onSaveProduct')) {
|
|
41404
|
-
|
|
41441
|
+
_context26.next = 43;
|
|
41405
41442
|
break;
|
|
41406
41443
|
}
|
|
41407
41444
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
41408
41445
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
41409
|
-
|
|
41446
|
+
_context26.next = 37;
|
|
41410
41447
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41411
41448
|
case 37:
|
|
41412
|
-
|
|
41449
|
+
_context26.next = 39;
|
|
41413
41450
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41414
41451
|
case 39:
|
|
41415
|
-
newDivaNr =
|
|
41452
|
+
newDivaNr = _context26.sent;
|
|
41416
41453
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41417
|
-
|
|
41454
|
+
_context26.next = 51;
|
|
41418
41455
|
break;
|
|
41419
41456
|
case 43:
|
|
41420
41457
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -41423,32 +41460,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41423
41460
|
}
|
|
41424
41461
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41425
41462
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41426
|
-
|
|
41463
|
+
_context26.next = 48;
|
|
41427
41464
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41428
41465
|
case 48:
|
|
41429
|
-
_result2 =
|
|
41466
|
+
_result2 = _context26.sent;
|
|
41430
41467
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41431
|
-
|
|
41468
|
+
_context26.next = 51;
|
|
41432
41469
|
break;
|
|
41433
41470
|
}
|
|
41434
|
-
return
|
|
41471
|
+
return _context26.abrupt("return", 'canceled');
|
|
41435
41472
|
case 51:
|
|
41436
|
-
return
|
|
41473
|
+
return _context26.abrupt("break", 52);
|
|
41437
41474
|
case 52:
|
|
41438
41475
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41439
41476
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
41440
|
-
|
|
41477
|
+
_context26.next = 56;
|
|
41441
41478
|
return this.addToBasket(actBasket, event);
|
|
41442
41479
|
case 56:
|
|
41443
|
-
product =
|
|
41444
|
-
return
|
|
41480
|
+
product = _context26.sent;
|
|
41481
|
+
return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
41445
41482
|
case 58:
|
|
41446
41483
|
case "end":
|
|
41447
|
-
return
|
|
41484
|
+
return _context26.stop();
|
|
41448
41485
|
}
|
|
41449
|
-
},
|
|
41486
|
+
}, _callee26, this);
|
|
41450
41487
|
}));
|
|
41451
|
-
function saveToBasket(
|
|
41488
|
+
function saveToBasket(_x74, _x75, _x76) {
|
|
41452
41489
|
return _saveToBasket.apply(this, arguments);
|
|
41453
41490
|
}
|
|
41454
41491
|
return saveToBasket;
|
|
@@ -41676,23 +41713,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41676
41713
|
}, {
|
|
41677
41714
|
key: "getBasketDataWithEkText",
|
|
41678
41715
|
value: function () {
|
|
41679
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41680
|
-
return _regeneratorRuntime.wrap(function
|
|
41681
|
-
while (1) switch (
|
|
41716
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
41717
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41718
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41682
41719
|
case 0:
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41720
|
+
_context27.t0 = this.divaBasketHandler;
|
|
41721
|
+
_context27.t1 = this.divaBasketHandler.actDivaNr;
|
|
41722
|
+
_context27.next = 4;
|
|
41686
41723
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41687
41724
|
case 4:
|
|
41688
|
-
|
|
41689
|
-
|
|
41690
|
-
return
|
|
41725
|
+
_context27.t2 = _context27.sent;
|
|
41726
|
+
_context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
|
|
41727
|
+
return _context27.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41691
41728
|
case 7:
|
|
41692
41729
|
case "end":
|
|
41693
|
-
return
|
|
41730
|
+
return _context27.stop();
|
|
41694
41731
|
}
|
|
41695
|
-
},
|
|
41732
|
+
}, _callee27, this);
|
|
41696
41733
|
}));
|
|
41697
41734
|
function getBasketDataWithEkText() {
|
|
41698
41735
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41718,7 +41755,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41718
41755
|
}, {
|
|
41719
41756
|
key: "addToBasket",
|
|
41720
41757
|
value: function () {
|
|
41721
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41758
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(actBasket) {
|
|
41722
41759
|
var _this$actions36,
|
|
41723
41760
|
_this$actions37,
|
|
41724
41761
|
_this$actions38,
|
|
@@ -41737,44 +41774,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41737
41774
|
to,
|
|
41738
41775
|
variants,
|
|
41739
41776
|
products,
|
|
41740
|
-
|
|
41741
|
-
return _regeneratorRuntime.wrap(function
|
|
41742
|
-
while (1) switch (
|
|
41777
|
+
_args28 = arguments;
|
|
41778
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
41779
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41743
41780
|
case 0:
|
|
41744
|
-
event =
|
|
41745
|
-
|
|
41746
|
-
|
|
41781
|
+
event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
|
|
41782
|
+
_context28.t0 = event;
|
|
41783
|
+
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 7 : _context28.t0 === 'onWebPlanerShare' ? 9 : _context28.t0 === 'onRequestConsulation' ? 11 : _context28.t0 === 'onSave' ? 13 : _context28.t0 === 'onSendEmail' ? 15 : _context28.t0 === 'onSaveProduct' ? 20 : _context28.t0 === 'dontSaveBasket' ? 27 : _context28.t0 === 'onAddToBasket' ? 28 : 30;
|
|
41747
41784
|
break;
|
|
41748
41785
|
case 5:
|
|
41749
41786
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41750
41787
|
type: 'onWebPlanerPrint',
|
|
41751
41788
|
data: actBasket.getAsJson()
|
|
41752
41789
|
});
|
|
41753
|
-
return
|
|
41790
|
+
return _context28.abrupt("break", 32);
|
|
41754
41791
|
case 7:
|
|
41755
41792
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41756
41793
|
type: 'onWebPlanerSave',
|
|
41757
41794
|
data: actBasket.getAsJson()
|
|
41758
41795
|
});
|
|
41759
|
-
return
|
|
41796
|
+
return _context28.abrupt("break", 32);
|
|
41760
41797
|
case 9:
|
|
41761
41798
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41762
41799
|
type: 'onWebPlanerShare',
|
|
41763
41800
|
data: actBasket.getAsJson()
|
|
41764
41801
|
});
|
|
41765
|
-
return
|
|
41802
|
+
return _context28.abrupt("break", 32);
|
|
41766
41803
|
case 11:
|
|
41767
41804
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41768
41805
|
type: 'onRequestConsulation',
|
|
41769
41806
|
data: actBasket.getAsJson()
|
|
41770
41807
|
});
|
|
41771
|
-
return
|
|
41808
|
+
return _context28.abrupt("break", 32);
|
|
41772
41809
|
case 13:
|
|
41773
41810
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41774
41811
|
type: 'onSave',
|
|
41775
41812
|
data: actBasket.getAsJson()
|
|
41776
41813
|
});
|
|
41777
|
-
return
|
|
41814
|
+
return _context28.abrupt("break", 32);
|
|
41778
41815
|
case 15:
|
|
41779
41816
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41780
41817
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41809,44 +41846,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41809
41846
|
type: 'onAddToBasket',
|
|
41810
41847
|
data: actBasket.getAsJson()
|
|
41811
41848
|
});
|
|
41812
|
-
return
|
|
41849
|
+
return _context28.abrupt("break", 32);
|
|
41813
41850
|
case 20:
|
|
41814
41851
|
this.actSet().CatalogData;
|
|
41815
|
-
|
|
41852
|
+
_context28.next = 23;
|
|
41816
41853
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41817
41854
|
case 23:
|
|
41818
|
-
products =
|
|
41855
|
+
products = _context28.sent;
|
|
41819
41856
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41820
41857
|
type: 'onAddToBasket',
|
|
41821
41858
|
data: actBasket.getAsJson()
|
|
41822
41859
|
});
|
|
41823
41860
|
if (!products) {
|
|
41824
|
-
|
|
41861
|
+
_context28.next = 27;
|
|
41825
41862
|
break;
|
|
41826
41863
|
}
|
|
41827
|
-
return
|
|
41864
|
+
return _context28.abrupt("return", products[0]);
|
|
41828
41865
|
case 27:
|
|
41829
41866
|
case 28:
|
|
41830
41867
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41831
41868
|
type: 'onAddToBasket',
|
|
41832
41869
|
data: actBasket.getAsJson()
|
|
41833
41870
|
});
|
|
41834
|
-
return
|
|
41871
|
+
return _context28.abrupt("break", 32);
|
|
41835
41872
|
case 30:
|
|
41836
41873
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
41837
41874
|
type: event,
|
|
41838
41875
|
data: actBasket.getAsJson()
|
|
41839
41876
|
});
|
|
41840
|
-
return
|
|
41877
|
+
return _context28.abrupt("break", 32);
|
|
41841
41878
|
case 32:
|
|
41842
|
-
return
|
|
41879
|
+
return _context28.abrupt("return");
|
|
41843
41880
|
case 33:
|
|
41844
41881
|
case "end":
|
|
41845
|
-
return
|
|
41882
|
+
return _context28.stop();
|
|
41846
41883
|
}
|
|
41847
|
-
},
|
|
41884
|
+
}, _callee28, this);
|
|
41848
41885
|
}));
|
|
41849
|
-
function addToBasket(
|
|
41886
|
+
function addToBasket(_x77) {
|
|
41850
41887
|
return _addToBasket.apply(this, arguments);
|
|
41851
41888
|
}
|
|
41852
41889
|
return addToBasket;
|
|
@@ -42116,9 +42153,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42116
42153
|
key: "initApiForLogicOnly",
|
|
42117
42154
|
value: //just for testing purposes
|
|
42118
42155
|
function () {
|
|
42119
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42120
|
-
return _regeneratorRuntime.wrap(function
|
|
42121
|
-
while (1) switch (
|
|
42156
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
42157
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
42158
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
42122
42159
|
case 0:
|
|
42123
42160
|
//empty services
|
|
42124
42161
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -42131,17 +42168,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42131
42168
|
jwt: jwt,
|
|
42132
42169
|
apiKey: apiKey
|
|
42133
42170
|
}), handler);
|
|
42134
|
-
|
|
42171
|
+
_context29.next = 3;
|
|
42135
42172
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
42136
42173
|
case 3:
|
|
42137
42174
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
42138
42175
|
case 4:
|
|
42139
42176
|
case "end":
|
|
42140
|
-
return
|
|
42177
|
+
return _context29.stop();
|
|
42141
42178
|
}
|
|
42142
|
-
},
|
|
42179
|
+
}, _callee29, this);
|
|
42143
42180
|
}));
|
|
42144
|
-
function initApiForLogicOnly(
|
|
42181
|
+
function initApiForLogicOnly(_x78, _x79, _x80, _x81, _x82, _x83, _x84) {
|
|
42145
42182
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
42146
42183
|
}
|
|
42147
42184
|
return initApiForLogicOnly;
|
|
@@ -42154,16 +42191,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42154
42191
|
}, {
|
|
42155
42192
|
key: "loadBasket",
|
|
42156
42193
|
value: function () {
|
|
42157
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42158
|
-
return _regeneratorRuntime.wrap(function
|
|
42159
|
-
while (1) switch (
|
|
42194
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
|
|
42195
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
42196
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
42160
42197
|
case 0:
|
|
42161
|
-
return
|
|
42198
|
+
return _context30.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
42162
42199
|
case 1:
|
|
42163
42200
|
case "end":
|
|
42164
|
-
return
|
|
42201
|
+
return _context30.stop();
|
|
42165
42202
|
}
|
|
42166
|
-
},
|
|
42203
|
+
}, _callee30, this);
|
|
42167
42204
|
}));
|
|
42168
42205
|
function loadBasket() {
|
|
42169
42206
|
return _loadBasket.apply(this, arguments);
|
|
@@ -42178,39 +42215,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42178
42215
|
}, {
|
|
42179
42216
|
key: "initBasket",
|
|
42180
42217
|
value: function () {
|
|
42181
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42218
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites) {
|
|
42182
42219
|
var initSetState, set, basket;
|
|
42183
|
-
return _regeneratorRuntime.wrap(function
|
|
42184
|
-
while (1) switch (
|
|
42220
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
42221
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
42185
42222
|
case 0:
|
|
42186
42223
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
42187
42224
|
initSetState = this.getInitStateForSet(!init3D);
|
|
42188
42225
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
42189
|
-
|
|
42226
|
+
_context31.next = 5;
|
|
42190
42227
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
42191
42228
|
case 5:
|
|
42192
42229
|
//TODO check if when basket gets repaired the product match gets called
|
|
42193
42230
|
set = this.actSet();
|
|
42194
42231
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
42195
42232
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
42196
|
-
|
|
42233
|
+
_context31.next = 10;
|
|
42197
42234
|
break;
|
|
42198
42235
|
}
|
|
42199
|
-
|
|
42236
|
+
_context31.next = 10;
|
|
42200
42237
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
42201
42238
|
case 10:
|
|
42202
|
-
|
|
42239
|
+
_context31.next = 12;
|
|
42203
42240
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
42204
42241
|
case 12:
|
|
42205
|
-
basket =
|
|
42206
|
-
return
|
|
42242
|
+
basket = _context31.sent;
|
|
42243
|
+
return _context31.abrupt("return", basket);
|
|
42207
42244
|
case 14:
|
|
42208
42245
|
case "end":
|
|
42209
|
-
return
|
|
42246
|
+
return _context31.stop();
|
|
42210
42247
|
}
|
|
42211
|
-
},
|
|
42248
|
+
}, _callee31, this);
|
|
42212
42249
|
}));
|
|
42213
|
-
function initBasket(
|
|
42250
|
+
function initBasket(_x85, _x86) {
|
|
42214
42251
|
return _initBasket.apply(this, arguments);
|
|
42215
42252
|
}
|
|
42216
42253
|
return initBasket;
|
|
@@ -42224,21 +42261,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42224
42261
|
}, {
|
|
42225
42262
|
key: "getValidVariantsLength",
|
|
42226
42263
|
value: function () {
|
|
42227
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42264
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
|
|
42228
42265
|
var set;
|
|
42229
|
-
return _regeneratorRuntime.wrap(function
|
|
42230
|
-
while (1) switch (
|
|
42266
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
42267
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
42231
42268
|
case 0:
|
|
42232
42269
|
set = this.actSet();
|
|
42233
|
-
|
|
42270
|
+
_context32.next = 3;
|
|
42234
42271
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
42235
42272
|
case 3:
|
|
42236
|
-
return
|
|
42273
|
+
return _context32.abrupt("return", _context32.sent.length);
|
|
42237
42274
|
case 4:
|
|
42238
42275
|
case "end":
|
|
42239
|
-
return
|
|
42276
|
+
return _context32.stop();
|
|
42240
42277
|
}
|
|
42241
|
-
},
|
|
42278
|
+
}, _callee32, this);
|
|
42242
42279
|
}));
|
|
42243
42280
|
function getValidVariantsLength() {
|
|
42244
42281
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -42248,46 +42285,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42248
42285
|
}, {
|
|
42249
42286
|
key: "handleFavorites",
|
|
42250
42287
|
value: function () {
|
|
42251
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42288
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(mode) {
|
|
42252
42289
|
var _this5 = this;
|
|
42253
42290
|
var set, i;
|
|
42254
|
-
return _regeneratorRuntime.wrap(function
|
|
42255
|
-
while (1) switch (
|
|
42291
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
42292
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
42256
42293
|
case 0:
|
|
42257
42294
|
set = this.actSet();
|
|
42258
42295
|
i = 0;
|
|
42259
42296
|
case 2:
|
|
42260
42297
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
42261
|
-
|
|
42298
|
+
_context33.next = 11;
|
|
42262
42299
|
break;
|
|
42263
42300
|
}
|
|
42264
|
-
|
|
42301
|
+
_context33.next = 5;
|
|
42265
42302
|
return DivaUtils.Sleep(200);
|
|
42266
42303
|
case 5:
|
|
42267
42304
|
i++;
|
|
42268
42305
|
if (!(i > 1000)) {
|
|
42269
|
-
|
|
42306
|
+
_context33.next = 9;
|
|
42270
42307
|
break;
|
|
42271
42308
|
}
|
|
42272
42309
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
42273
|
-
return
|
|
42310
|
+
return _context33.abrupt("break", 11);
|
|
42274
42311
|
case 9:
|
|
42275
|
-
|
|
42312
|
+
_context33.next = 2;
|
|
42276
42313
|
break;
|
|
42277
42314
|
case 11:
|
|
42278
|
-
|
|
42315
|
+
_context33.next = 13;
|
|
42279
42316
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
42280
42317
|
return _this5.update2DGrid(set);
|
|
42281
42318
|
}, this.actions);
|
|
42282
42319
|
case 13:
|
|
42283
|
-
return
|
|
42320
|
+
return _context33.abrupt("return", _context33.sent);
|
|
42284
42321
|
case 14:
|
|
42285
42322
|
case "end":
|
|
42286
|
-
return
|
|
42323
|
+
return _context33.stop();
|
|
42287
42324
|
}
|
|
42288
|
-
},
|
|
42325
|
+
}, _callee33, this);
|
|
42289
42326
|
}));
|
|
42290
|
-
function handleFavorites(
|
|
42327
|
+
function handleFavorites(_x87) {
|
|
42291
42328
|
return _handleFavorites.apply(this, arguments);
|
|
42292
42329
|
}
|
|
42293
42330
|
return handleFavorites;
|
|
@@ -42300,48 +42337,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42300
42337
|
}, {
|
|
42301
42338
|
key: "initSapOrderLinesFromBasket",
|
|
42302
42339
|
value: function () {
|
|
42303
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42340
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(divaNr, init3D, onlyLoadOldBakset) {
|
|
42304
42341
|
var result, oldBasket, basket;
|
|
42305
|
-
return _regeneratorRuntime.wrap(function
|
|
42306
|
-
while (1) switch (
|
|
42342
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
42343
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
42307
42344
|
case 0:
|
|
42308
42345
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
42309
|
-
|
|
42346
|
+
_context34.next = 3;
|
|
42310
42347
|
return this.loadBasket();
|
|
42311
42348
|
case 3:
|
|
42312
|
-
result =
|
|
42349
|
+
result = _context34.sent;
|
|
42313
42350
|
if (!onlyLoadOldBakset) {
|
|
42314
|
-
|
|
42351
|
+
_context34.next = 6;
|
|
42315
42352
|
break;
|
|
42316
42353
|
}
|
|
42317
|
-
return
|
|
42354
|
+
return _context34.abrupt("return", {
|
|
42318
42355
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
42319
42356
|
cache: {}
|
|
42320
42357
|
});
|
|
42321
42358
|
case 6:
|
|
42322
42359
|
if (!(result === false)) {
|
|
42323
|
-
|
|
42360
|
+
_context34.next = 8;
|
|
42324
42361
|
break;
|
|
42325
42362
|
}
|
|
42326
42363
|
throw new Error('Could not load basket! ' + divaNr);
|
|
42327
42364
|
case 8:
|
|
42328
42365
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
42329
|
-
|
|
42366
|
+
_context34.next = 11;
|
|
42330
42367
|
return this.initBasket(init3D);
|
|
42331
42368
|
case 11:
|
|
42332
|
-
basket =
|
|
42333
|
-
return
|
|
42369
|
+
basket = _context34.sent;
|
|
42370
|
+
return _context34.abrupt("return", {
|
|
42334
42371
|
basket: basket,
|
|
42335
42372
|
oldBasket: oldBasket,
|
|
42336
42373
|
cache: this.api.getJsonDataCache()
|
|
42337
42374
|
});
|
|
42338
42375
|
case 13:
|
|
42339
42376
|
case "end":
|
|
42340
|
-
return
|
|
42377
|
+
return _context34.stop();
|
|
42341
42378
|
}
|
|
42342
|
-
},
|
|
42379
|
+
}, _callee34, this);
|
|
42343
42380
|
}));
|
|
42344
|
-
function initSapOrderLinesFromBasket(
|
|
42381
|
+
function initSapOrderLinesFromBasket(_x88, _x89, _x90) {
|
|
42345
42382
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
42346
42383
|
}
|
|
42347
42384
|
return initSapOrderLinesFromBasket;
|
|
@@ -43564,145 +43601,204 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43564
43601
|
*/
|
|
43565
43602
|
}, {
|
|
43566
43603
|
key: "moveCell",
|
|
43567
|
-
value: function
|
|
43568
|
-
var
|
|
43569
|
-
|
|
43570
|
-
|
|
43571
|
-
|
|
43572
|
-
|
|
43573
|
-
|
|
43574
|
-
|
|
43575
|
-
|
|
43576
|
-
|
|
43577
|
-
|
|
43578
|
-
|
|
43579
|
-
|
|
43580
|
-
|
|
43581
|
-
|
|
43582
|
-
|
|
43583
|
-
|
|
43584
|
-
|
|
43585
|
-
|
|
43586
|
-
|
|
43587
|
-
|
|
43588
|
-
|
|
43589
|
-
|
|
43590
|
-
|
|
43591
|
-
|
|
43592
|
-
|
|
43593
|
-
|
|
43594
|
-
|
|
43595
|
-
|
|
43596
|
-
|
|
43597
|
-
|
|
43598
|
-
|
|
43599
|
-
|
|
43600
|
-
|
|
43601
|
-
|
|
43602
|
-
|
|
43603
|
-
|
|
43604
|
-
|
|
43605
|
-
|
|
43606
|
-
|
|
43607
|
-
|
|
43608
|
-
|
|
43609
|
-
|
|
43610
|
-
|
|
43611
|
-
|
|
43612
|
-
|
|
43613
|
-
|
|
43614
|
-
|
|
43615
|
-
|
|
43616
|
-
|
|
43617
|
-
|
|
43618
|
-
|
|
43619
|
-
|
|
43620
|
-
|
|
43621
|
-
|
|
43622
|
-
|
|
43623
|
-
|
|
43624
|
-
|
|
43625
|
-
|
|
43626
|
-
|
|
43627
|
-
|
|
43628
|
-
|
|
43629
|
-
|
|
43630
|
-
|
|
43631
|
-
|
|
43604
|
+
value: (function () {
|
|
43605
|
+
var _moveCell = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(initialIndex, finalIndex) {
|
|
43606
|
+
var _this2 = this;
|
|
43607
|
+
var cellsMoving, cellsMovingFinalPosition, cellsAjusting, cellsAtStart, cellsAtEnd, startAndFinalSwitched, tmp, i, _i5, cellsMovingCount, _i6, cellsAjustingCount, key, _i7, _i8, _cellsMovingCount, _i9, _cellsAjustingCount, _key, _i10, _key2, oldCells, _key3, _key4, _key5, _key6, _i11, _i12, accessoriesMoved, _loop2, _i13, resetCells, _i14, result, _i15;
|
|
43608
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context8) {
|
|
43609
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
43610
|
+
case 0:
|
|
43611
|
+
cellsMoving = {};
|
|
43612
|
+
cellsMovingFinalPosition = {};
|
|
43613
|
+
cellsAjusting = {};
|
|
43614
|
+
cellsAtStart = [];
|
|
43615
|
+
cellsAtEnd = [];
|
|
43616
|
+
startAndFinalSwitched = false;
|
|
43617
|
+
if (initialIndex > finalIndex) {
|
|
43618
|
+
tmp = finalIndex;
|
|
43619
|
+
finalIndex = initialIndex;
|
|
43620
|
+
initialIndex = tmp;
|
|
43621
|
+
startAndFinalSwitched = true;
|
|
43622
|
+
}
|
|
43623
|
+
|
|
43624
|
+
//ajust finalIndex maybe at the place is already an element
|
|
43625
|
+
if (!startAndFinalSwitched) {
|
|
43626
|
+
while (this.cells[finalIndex] && this.cells[finalIndex].InUse != -1 && this.cells[finalIndex + 1] !== undefined) {
|
|
43627
|
+
finalIndex++;
|
|
43628
|
+
}
|
|
43629
|
+
}
|
|
43630
|
+
for (i = 0; i < initialIndex; i++) {
|
|
43631
|
+
cellsAtStart.push(this.cells[i]);
|
|
43632
|
+
}
|
|
43633
|
+
if (!startAndFinalSwitched) {
|
|
43634
|
+
//moving up
|
|
43635
|
+
for (_i5 = 0; _i5 < this.cells.length; _i5++) {
|
|
43636
|
+
if (this.cells[_i5].InUse == initialIndex || this.cells[_i5].OnBoard == initialIndex) {
|
|
43637
|
+
cellsMoving[_i5] = this.cells[_i5];
|
|
43638
|
+
}
|
|
43639
|
+
}
|
|
43640
|
+
cellsMovingCount = Object.keys(cellsMoving).length;
|
|
43641
|
+
for (_i6 = initialIndex; _i6 <= finalIndex; _i6++) {
|
|
43642
|
+
if (!cellsMoving[_i6]) {
|
|
43643
|
+
cellsAjusting[_i6 - cellsMovingCount] = this.cells[_i6];
|
|
43644
|
+
}
|
|
43645
|
+
}
|
|
43646
|
+
cellsAjustingCount = Object.keys(cellsAjusting).length;
|
|
43647
|
+
for (key in cellsMoving) {
|
|
43648
|
+
cellsMovingFinalPosition[Number(key) + cellsAjustingCount] = cellsMoving[key];
|
|
43649
|
+
}
|
|
43650
|
+
for (_i7 = finalIndex + 1; _i7 < this.cells.length; _i7++) {
|
|
43651
|
+
cellsAtEnd.push(this.cells[_i7]);
|
|
43652
|
+
}
|
|
43653
|
+
} else {
|
|
43654
|
+
//moving down
|
|
43655
|
+
for (_i8 = 0; _i8 < this.cells.length; _i8++) {
|
|
43656
|
+
if (this.cells[_i8].InUse == finalIndex || this.cells[_i8].OnBoard == finalIndex) {
|
|
43657
|
+
cellsMoving[_i8] = this.cells[_i8];
|
|
43658
|
+
}
|
|
43659
|
+
}
|
|
43660
|
+
_cellsMovingCount = Object.keys(cellsMoving).length;
|
|
43661
|
+
for (_i9 = initialIndex; _i9 <= finalIndex; _i9++) {
|
|
43662
|
+
if (!cellsMoving[_i9]) {
|
|
43663
|
+
cellsAjusting[_i9 + _cellsMovingCount] = this.cells[_i9];
|
|
43664
|
+
}
|
|
43665
|
+
}
|
|
43666
|
+
_cellsAjustingCount = Object.keys(cellsAjusting).length;
|
|
43667
|
+
for (_key in cellsMoving) {
|
|
43668
|
+
cellsMovingFinalPosition[Number(_key) - _cellsAjustingCount] = cellsMoving[_key];
|
|
43669
|
+
}
|
|
43670
|
+
for (_i10 = finalIndex + _cellsMovingCount; _i10 < this.cells.length; _i10++) {
|
|
43671
|
+
cellsAtEnd.push(this.cells[_i10]);
|
|
43672
|
+
}
|
|
43673
|
+
}
|
|
43632
43674
|
|
|
43633
|
-
|
|
43634
|
-
|
|
43635
|
-
|
|
43636
|
-
|
|
43637
|
-
|
|
43638
|
-
|
|
43639
|
-
|
|
43640
|
-
|
|
43641
|
-
|
|
43642
|
-
|
|
43643
|
-
|
|
43644
|
-
|
|
43645
|
-
|
|
43646
|
-
|
|
43647
|
-
|
|
43648
|
-
|
|
43649
|
-
|
|
43650
|
-
|
|
43651
|
-
|
|
43652
|
-
|
|
43653
|
-
|
|
43654
|
-
|
|
43655
|
-
|
|
43656
|
-
|
|
43657
|
-
|
|
43658
|
-
|
|
43659
|
-
|
|
43660
|
-
|
|
43661
|
-
|
|
43662
|
-
|
|
43663
|
-
|
|
43675
|
+
// if an element gets moved which shouldnt be moved dont fill the cells with the new order and just cancel
|
|
43676
|
+
_context8.t0 = _regeneratorRuntime.keys(cellsAjusting);
|
|
43677
|
+
case 11:
|
|
43678
|
+
if ((_context8.t1 = _context8.t0()).done) {
|
|
43679
|
+
_context8.next = 17;
|
|
43680
|
+
break;
|
|
43681
|
+
}
|
|
43682
|
+
_key2 = _context8.t1.value;
|
|
43683
|
+
if (!(cellsAjusting[_key2].IsDisabled || cellsAjusting[_key2].NoMove)) {
|
|
43684
|
+
_context8.next = 15;
|
|
43685
|
+
break;
|
|
43686
|
+
}
|
|
43687
|
+
return _context8.abrupt("return");
|
|
43688
|
+
case 15:
|
|
43689
|
+
_context8.next = 11;
|
|
43690
|
+
break;
|
|
43691
|
+
case 17:
|
|
43692
|
+
oldCells = this.cells; // fill cells with new order
|
|
43693
|
+
this.cells = [];
|
|
43694
|
+
this.cells = cellsAtStart;
|
|
43695
|
+
if (!startAndFinalSwitched) {
|
|
43696
|
+
for (_key3 in cellsAjusting) {
|
|
43697
|
+
this.cells.push(cellsAjusting[_key3]);
|
|
43698
|
+
}
|
|
43699
|
+
for (_key4 in cellsMovingFinalPosition) {
|
|
43700
|
+
this.cells.push(cellsMovingFinalPosition[_key4]);
|
|
43701
|
+
}
|
|
43702
|
+
} else {
|
|
43703
|
+
for (_key5 in cellsMovingFinalPosition) {
|
|
43704
|
+
this.cells.push(cellsMovingFinalPosition[_key5]);
|
|
43705
|
+
}
|
|
43706
|
+
for (_key6 in cellsAjusting) {
|
|
43707
|
+
this.cells.push(cellsAjusting[_key6]);
|
|
43708
|
+
}
|
|
43709
|
+
}
|
|
43710
|
+
for (_i11 = 0; _i11 < cellsAtEnd.length; _i11++) {
|
|
43711
|
+
this.cells.push(cellsAtEnd[_i11]);
|
|
43712
|
+
}
|
|
43713
|
+
for (_i12 = 0; _i12 < this.cells.length; _i12++) {
|
|
43714
|
+
this.cells[_i12].moveCellToIndex(_i12);
|
|
43715
|
+
}
|
|
43664
43716
|
|
|
43665
|
-
|
|
43666
|
-
|
|
43667
|
-
|
|
43668
|
-
|
|
43669
|
-
|
|
43670
|
-
|
|
43671
|
-
|
|
43672
|
-
|
|
43673
|
-
|
|
43674
|
-
|
|
43675
|
-
|
|
43676
|
-
|
|
43677
|
-
|
|
43678
|
-
|
|
43679
|
-
|
|
43680
|
-
|
|
43681
|
-
|
|
43682
|
-
|
|
43683
|
-
|
|
43684
|
-
|
|
43685
|
-
|
|
43686
|
-
|
|
43687
|
-
|
|
43688
|
-
|
|
43689
|
-
|
|
43690
|
-
|
|
43691
|
-
|
|
43692
|
-
|
|
43693
|
-
|
|
43694
|
-
|
|
43695
|
-
|
|
43696
|
-
|
|
43717
|
+
//check for all the accessoires that moved during the process if they are allowed to be there
|
|
43718
|
+
accessoriesMoved = [];
|
|
43719
|
+
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
|
|
43720
|
+
var cell, _cell$Article3;
|
|
43721
|
+
return _regeneratorRuntime.wrap(function _loop2$(_context7) {
|
|
43722
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
43723
|
+
case 0:
|
|
43724
|
+
cell = _this2.cells[_i13];
|
|
43725
|
+
if (cell.Type == 'fitsOnParentRule' && cell.InUse > -1 && !accessoriesMoved.find(function (a) {
|
|
43726
|
+
var _cell$Article2;
|
|
43727
|
+
return ((_cell$Article2 = cell.Article) === null || _cell$Article2 === void 0 ? void 0 : _cell$Article2.basketId) == a.basketId;
|
|
43728
|
+
})) {
|
|
43729
|
+
accessoriesMoved.push({
|
|
43730
|
+
article: cell.Article,
|
|
43731
|
+
basketId: (_cell$Article3 = cell.Article) === null || _cell$Article3 === void 0 ? void 0 : _cell$Article3.basketId,
|
|
43732
|
+
index: cell.InUse
|
|
43733
|
+
});
|
|
43734
|
+
}
|
|
43735
|
+
case 2:
|
|
43736
|
+
case "end":
|
|
43737
|
+
return _context7.stop();
|
|
43738
|
+
}
|
|
43739
|
+
}, _loop2);
|
|
43740
|
+
});
|
|
43741
|
+
_i13 = 0;
|
|
43742
|
+
case 26:
|
|
43743
|
+
if (!(_i13 < this.cells.length)) {
|
|
43744
|
+
_context8.next = 31;
|
|
43745
|
+
break;
|
|
43746
|
+
}
|
|
43747
|
+
return _context8.delegateYield(_loop2(), "t2", 28);
|
|
43748
|
+
case 28:
|
|
43749
|
+
_i13++;
|
|
43750
|
+
_context8.next = 26;
|
|
43751
|
+
break;
|
|
43752
|
+
case 31:
|
|
43753
|
+
resetCells = false;
|
|
43754
|
+
_i14 = 0;
|
|
43755
|
+
case 33:
|
|
43756
|
+
if (!(_i14 < accessoriesMoved.length)) {
|
|
43757
|
+
_context8.next = 43;
|
|
43758
|
+
break;
|
|
43759
|
+
}
|
|
43760
|
+
result = this.tryFitOnShelf(accessoriesMoved[_i14].article, accessoriesMoved[_i14].index, accessoriesMoved[_i14].article.shelfPlanner, true);
|
|
43761
|
+
if (!(result && result.type === 'fitsOnParentRule' && result.index === accessoriesMoved[_i14].index)) {
|
|
43762
|
+
_context8.next = 38;
|
|
43763
|
+
break;
|
|
43764
|
+
}
|
|
43765
|
+
_context8.next = 40;
|
|
43766
|
+
break;
|
|
43767
|
+
case 38:
|
|
43768
|
+
resetCells = true;
|
|
43769
|
+
return _context8.abrupt("break", 43);
|
|
43770
|
+
case 40:
|
|
43771
|
+
_i14++;
|
|
43772
|
+
_context8.next = 33;
|
|
43773
|
+
break;
|
|
43774
|
+
case 43:
|
|
43775
|
+
if (resetCells) {
|
|
43776
|
+
this.cells = oldCells;
|
|
43777
|
+
for (_i15 = 0; _i15 < this.cells.length; _i15++) {
|
|
43778
|
+
this.cells[_i15].moveCellToIndex(_i15);
|
|
43779
|
+
}
|
|
43780
|
+
}
|
|
43781
|
+
this.updateRequredCells();
|
|
43782
|
+
_context8.next = 47;
|
|
43783
|
+
return this.updateMontageOption();
|
|
43784
|
+
case 47:
|
|
43785
|
+
return _context8.abrupt("return", resetCells ? 'RESETTED_CELLS' : 'SUCCESS');
|
|
43786
|
+
case 48:
|
|
43787
|
+
case "end":
|
|
43788
|
+
return _context8.stop();
|
|
43789
|
+
}
|
|
43790
|
+
}, _callee6, this);
|
|
43791
|
+
}));
|
|
43792
|
+
function moveCell(_x11, _x12) {
|
|
43793
|
+
return _moveCell.apply(this, arguments);
|
|
43697
43794
|
}
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
}
|
|
43701
|
-
|
|
43795
|
+
return moveCell;
|
|
43796
|
+
}()
|
|
43702
43797
|
/**
|
|
43703
43798
|
*
|
|
43704
43799
|
* @returns if one or more cells a still required return true
|
|
43705
43800
|
*/
|
|
43801
|
+
)
|
|
43706
43802
|
}, {
|
|
43707
43803
|
key: "areCellsStillRequired",
|
|
43708
43804
|
value: function areCellsStillRequired() {
|