@crystaldesign/web-planner-logic 24.12.0-beta.24 → 24.12.0-beta.26
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-13d3daa2.js → DivaBoxPlanner-6fa732f4.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-4f6be897.js → DivaStandardPlanner-15808d2b.js} +2 -2
- package/build/cjs/{DoorPlanner-40c989b0.js → DoorPlanner-22fb3b12.js} +1 -1
- package/build/cjs/{Host3DSignalR-f9b0c4f0.js → Host3DSignalR-bb33f234.js} +15 -14
- package/build/cjs/{LiviqueWWSHandler-84f677cc.js → LiviqueWWSHandler-086d6c7f.js} +2 -2
- package/build/cjs/{PfisterWWSHandler-c542faae.js → PfisterWWSHandler-57aec18d.js} +2 -2
- package/build/cjs/{PlannerHandler2D-cf6f5b31.js → PlannerHandler2D-8d51fc0d.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-cf892a55.js → SeriousBasketHandler-f799c493.js} +2 -2
- package/build/cjs/{ShelfPlanner-7177a33a.js → ShelfPlanner-2c734526.js} +1 -1
- package/build/cjs/{StandardWWSHandler-c4d2c718.js → StandardWWSHandler-d4a1c639.js} +2 -2
- package/build/cjs/{index-c9a480dc.js → index-25dd2b0f.js} +746 -1438
- package/build/cjs/index.js +1 -2
- package/build/esm/{DivaBoxPlanner-cc074c2d.js → DivaBoxPlanner-e34a256a.js} +2 -2
- package/build/esm/{DivaStandardPlanner-8eef31dd.js → DivaStandardPlanner-633a4688.js} +2 -2
- package/build/esm/{DoorPlanner-08904ad6.js → DoorPlanner-309fbb7f.js} +1 -1
- package/build/esm/{Host3DSignalR-3a1b12e0.js → Host3DSignalR-1f18aa3a.js} +15 -14
- package/build/esm/{LiviqueWWSHandler-50bd57bb.js → LiviqueWWSHandler-838c27e1.js} +2 -2
- package/build/esm/{PfisterWWSHandler-4a918d83.js → PfisterWWSHandler-45fc8115.js} +2 -2
- package/build/esm/{PlannerHandler2D-2e7fe819.js → PlannerHandler2D-89e0e7d2.js} +1 -1
- package/build/esm/{SeriousBasketHandler-4d4fd122.js → SeriousBasketHandler-d5a2b64f.js} +2 -2
- package/build/esm/{ShelfPlanner-26990450.js → ShelfPlanner-4277ee30.js} +1 -1
- package/build/esm/{StandardWWSHandler-572f394d.js → StandardWWSHandler-5d42af7c.js} +2 -2
- package/build/esm/{index-0d565477.js → index-c2899bda.js} +748 -1438
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -2
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -2
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleInfoType.d.ts +1 -2
- package/build/types/web-planner-logic/src/interface/Articles/ArticleInfoType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts +2 -2
- package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Basket/IDivaWWSHandler.d.ts +1 -3
- package/build/types/web-planner-logic/src/interface/Basket/IDivaWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +0 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Products/index.d.ts +6 -1
- package/build/types/web-planner-logic/src/interface/Products/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +6 -6
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +4 -11
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/LiviqueWWSHandler.d.ts +1 -3
- package/build/types/web-planner-logic/src/logic/Basket/LiviqueWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts +1 -3
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +1 -3
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/StandardWWSHandler.d.ts +1 -3
- package/build/types/web-planner-logic/src/logic/Basket/StandardWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts +1 -2
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +1 -2
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +5 -6
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +8 -8
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts +3 -44
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +3 -3
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -4
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +2 -2
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/cjs/ProductBasketHandler-8cfcadcd.js +0 -62
- package/build/esm/ProductBasketHandler-92131aa4.js +0 -55
- package/build/types/web-planner-logic/src/logic/Basket/ProductBasketHandler.d.ts +0 -14
- package/build/types/web-planner-logic/src/logic/Basket/ProductBasketHandler.d.ts.map +0 -1
- package/build/types/web-planner-logic/src/logic/Product/Product.d.ts +0 -71
- package/build/types/web-planner-logic/src/logic/Product/Product.d.ts.map +0 -1
|
@@ -8,7 +8,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import axios$1 from 'axios';
|
|
10
10
|
import DivaUtils, { DivaError, md5, nanoid } from '@crystaldesign/diva-utils';
|
|
11
|
-
import { PriceObjectData, VariantItemData, JsonConfigPriceData, OrderLineData, CompactOrderLineData, GroupsData, Favorites,
|
|
11
|
+
import { PriceObjectData, VariantItemData, JsonConfigPriceData, OrderLineData, CompactOrderLineData, GroupsData, Favorites, Favorite, ConfigVariantData, OrderSetData, BasketData } from '@crystaldesign/basket-model';
|
|
12
12
|
import BasketHandler from '@crystaldesign/basket-handler';
|
|
13
13
|
import { io } from 'socket.io-client';
|
|
14
14
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
@@ -414,7 +414,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
414
414
|
mediaServiceApiKey: data.divaMediaServiceApiKey,
|
|
415
415
|
language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
|
|
416
416
|
abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
|
|
417
|
-
checkForProductsInStock: data.checkForProductsInStock,
|
|
418
417
|
checkForProductsPrice: data.checkForProductsPrice,
|
|
419
418
|
doDisablePlanner2D: data.doDisablePlanner2D,
|
|
420
419
|
diva3dStaticBGImage: data.diva3dStaticBGImage != undefined ? data.diva3dStaticBGImage : false,
|
|
@@ -486,29 +485,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
486
485
|
var _this$apiConfig$host, _this$apiConfig10;
|
|
487
486
|
return (_this$apiConfig$host = (_this$apiConfig10 = this.apiConfig) === null || _this$apiConfig10 === void 0 ? void 0 : _this$apiConfig10.host3d) !== null && _this$apiConfig$host !== void 0 ? _this$apiConfig$host : '';
|
|
488
487
|
}
|
|
489
|
-
}, {
|
|
490
|
-
key: "doCheckForProductsInStock",
|
|
491
|
-
value: function doCheckForProductsInStock() {
|
|
492
|
-
var _this$divaWebConfigDa4;
|
|
493
|
-
return (_this$divaWebConfigDa4 = this.divaWebConfigData) === null || _this$divaWebConfigDa4 === void 0 ? void 0 : _this$divaWebConfigDa4.checkForProductsInStock;
|
|
494
|
-
}
|
|
495
488
|
}, {
|
|
496
489
|
key: "doCheckForProductsPrice",
|
|
497
490
|
value: function doCheckForProductsPrice() {
|
|
498
|
-
var _this$
|
|
499
|
-
return
|
|
491
|
+
var _this$divaWebConfigDa4;
|
|
492
|
+
return (_this$divaWebConfigDa4 = this.divaWebConfigData) === null || _this$divaWebConfigDa4 === void 0 ? void 0 : _this$divaWebConfigDa4.checkForProductsPrice;
|
|
500
493
|
}
|
|
501
494
|
}, {
|
|
502
495
|
key: "getReportConfigIdentifier",
|
|
503
496
|
value: function getReportConfigIdentifier() {
|
|
504
|
-
var _this$
|
|
505
|
-
return (_this$
|
|
497
|
+
var _this$divaWebConfigDa5;
|
|
498
|
+
return (_this$divaWebConfigDa5 = this.divaWebConfigData) === null || _this$divaWebConfigDa5 === void 0 ? void 0 : _this$divaWebConfigDa5.reportConfigIdentifier;
|
|
506
499
|
}
|
|
507
500
|
}, {
|
|
508
501
|
key: "getPrintOptions",
|
|
509
502
|
value: function getPrintOptions() {
|
|
510
|
-
var _this$
|
|
511
|
-
var reportConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_this$
|
|
503
|
+
var _this$divaWebConfigDa6;
|
|
504
|
+
var reportConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_this$divaWebConfigDa6 = this.divaWebConfigData) === null || _this$divaWebConfigDa6 === void 0 ? void 0 : _this$divaWebConfigDa6.reportConfig;
|
|
512
505
|
return {
|
|
513
506
|
Gdpr: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithGDPR),
|
|
514
507
|
PlanningSketch: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithPlanningSketch),
|
|
@@ -528,8 +521,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
528
521
|
}, {
|
|
529
522
|
key: "get3DRenderGroup",
|
|
530
523
|
value: function get3DRenderGroup() {
|
|
531
|
-
var _this$
|
|
532
|
-
return (_this$
|
|
524
|
+
var _this$divaWebConfigDa7, _this$divaWebConfigDa8;
|
|
525
|
+
return (_this$divaWebConfigDa7 = (_this$divaWebConfigDa8 = this.divaWebConfigData) === null || _this$divaWebConfigDa8 === void 0 ? void 0 : _this$divaWebConfigDa8.diva3dRenderGroup) !== null && _this$divaWebConfigDa7 !== void 0 ? _this$divaWebConfigDa7 : '';
|
|
533
526
|
}
|
|
534
527
|
}, {
|
|
535
528
|
key: "getServerId",
|
|
@@ -566,86 +559,86 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
566
559
|
}, {
|
|
567
560
|
key: "getDiva3dStaticBGImage",
|
|
568
561
|
value: function getDiva3dStaticBGImage() {
|
|
569
|
-
var _this$
|
|
570
|
-
return (_this$
|
|
562
|
+
var _this$divaWebConfigDa9;
|
|
563
|
+
return (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dStaticBGImage;
|
|
571
564
|
}
|
|
572
565
|
}, {
|
|
573
566
|
key: "getDiva3dStaticBGImage_DefaultRoomList",
|
|
574
567
|
value: function getDiva3dStaticBGImage_DefaultRoomList() {
|
|
575
|
-
var _this$
|
|
576
|
-
return ((_this$
|
|
568
|
+
var _this$divaWebConfigDa10, _this$divaWebConfigDa11;
|
|
569
|
+
return ((_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3dStaticBGImage_DefaultRoomList;
|
|
577
570
|
}
|
|
578
571
|
}, {
|
|
579
572
|
key: "getDiva3DAllowDefaultCatRoomList",
|
|
580
573
|
value: function getDiva3DAllowDefaultCatRoomList() {
|
|
581
|
-
var _this$
|
|
582
|
-
return (_this$
|
|
574
|
+
var _this$divaWebConfigDa12;
|
|
575
|
+
return (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.diva3DAllowDefaultCatRoomList;
|
|
583
576
|
}
|
|
584
577
|
}, {
|
|
585
578
|
key: "doAllowSetPlanner",
|
|
586
579
|
value: function doAllowSetPlanner() {
|
|
587
|
-
var _this$
|
|
588
|
-
return (_this$
|
|
580
|
+
var _this$divaWebConfigDa13;
|
|
581
|
+
return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.doAllowSetPlanner;
|
|
589
582
|
}
|
|
590
583
|
}, {
|
|
591
584
|
key: "getHidePlanner",
|
|
592
585
|
value: function getHidePlanner() {
|
|
593
|
-
var _this$
|
|
594
|
-
return !!((_this$
|
|
586
|
+
var _this$divaWebConfigDa14;
|
|
587
|
+
return !!((_this$divaWebConfigDa14 = this.divaWebConfigData) !== null && _this$divaWebConfigDa14 !== void 0 && (_this$divaWebConfigDa14 = _this$divaWebConfigDa14.viewConfig) !== null && _this$divaWebConfigDa14 !== void 0 && _this$divaWebConfigDa14.hidePlanner);
|
|
595
588
|
}
|
|
596
589
|
}, {
|
|
597
590
|
key: "getDoShowAR",
|
|
598
591
|
value: function getDoShowAR() {
|
|
599
|
-
var _this$
|
|
600
|
-
return (_this$
|
|
592
|
+
var _this$divaWebConfigDa15;
|
|
593
|
+
return (_this$divaWebConfigDa15 = this.divaWebConfigData) === null || _this$divaWebConfigDa15 === void 0 || (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) === null || _this$divaWebConfigDa15 === void 0 ? void 0 : _this$divaWebConfigDa15.enableAR;
|
|
601
594
|
}
|
|
602
595
|
}, {
|
|
603
596
|
key: "forceShowRTV",
|
|
604
597
|
value: function forceShowRTV() {
|
|
605
|
-
var _this$
|
|
606
|
-
return (_this$
|
|
598
|
+
var _this$divaWebConfigDa16;
|
|
599
|
+
return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.forceRTV;
|
|
607
600
|
}
|
|
608
601
|
}, {
|
|
609
602
|
key: "getDoShowRTV",
|
|
610
603
|
value: function getDoShowRTV() {
|
|
611
|
-
var _this$
|
|
612
|
-
return (_this$
|
|
604
|
+
var _this$divaWebConfigDa17;
|
|
605
|
+
return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.enableRTV;
|
|
613
606
|
}
|
|
614
607
|
}, {
|
|
615
608
|
key: "getEnableRTVUnityKombi",
|
|
616
609
|
value: function getEnableRTVUnityKombi() {
|
|
617
|
-
var _this$
|
|
618
|
-
return !!((_this$
|
|
610
|
+
var _this$divaWebConfigDa18;
|
|
611
|
+
return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.viewConfig.enableRtvUnityKombi);
|
|
619
612
|
}
|
|
620
613
|
}, {
|
|
621
614
|
key: "getDoDisablePlanner2D",
|
|
622
615
|
value: function getDoDisablePlanner2D() {
|
|
623
|
-
var _this$
|
|
624
|
-
return !!((_this$
|
|
616
|
+
var _this$divaWebConfigDa19;
|
|
617
|
+
return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.doDisablePlanner2D);
|
|
625
618
|
}
|
|
626
619
|
}, {
|
|
627
620
|
key: "getRoomListInProduct",
|
|
628
621
|
value: function getRoomListInProduct() {
|
|
629
|
-
var _this$
|
|
630
|
-
return !!((_this$
|
|
622
|
+
var _this$divaWebConfigDa20;
|
|
623
|
+
return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.roomListInProduct);
|
|
631
624
|
}
|
|
632
625
|
}, {
|
|
633
626
|
key: "getPlannerType",
|
|
634
627
|
value: function getPlannerType() {
|
|
635
|
-
var _this$
|
|
636
|
-
return (_this$
|
|
628
|
+
var _this$divaWebConfigDa21;
|
|
629
|
+
return (_this$divaWebConfigDa21 = this.divaWebConfigData) === null || _this$divaWebConfigDa21 === void 0 || (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) === null || _this$divaWebConfigDa21 === void 0 ? void 0 : _this$divaWebConfigDa21.plannerType;
|
|
637
630
|
}
|
|
638
631
|
}, {
|
|
639
632
|
key: "getLoadSupplierColors",
|
|
640
633
|
value: function getLoadSupplierColors() {
|
|
641
|
-
var _this$
|
|
642
|
-
return !!((_this$
|
|
634
|
+
var _this$divaWebConfigDa22;
|
|
635
|
+
return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.loadSupplierColors);
|
|
643
636
|
}
|
|
644
637
|
}, {
|
|
645
638
|
key: "showSelectionModeZero",
|
|
646
639
|
value: function showSelectionModeZero() {
|
|
647
|
-
var _this$
|
|
648
|
-
return !!((_this$
|
|
640
|
+
var _this$divaWebConfigDa23;
|
|
641
|
+
return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.showSelectionModeZero);
|
|
649
642
|
}
|
|
650
643
|
}, {
|
|
651
644
|
key: "ruleDescSeperator",
|
|
@@ -665,8 +658,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
665
658
|
}, {
|
|
666
659
|
key: "getDoCheckVariantData",
|
|
667
660
|
value: function getDoCheckVariantData() {
|
|
668
|
-
var _this$
|
|
669
|
-
return (_this$
|
|
661
|
+
var _this$divaWebConfigDa24;
|
|
662
|
+
return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.doCheckVariantData;
|
|
670
663
|
}
|
|
671
664
|
}, {
|
|
672
665
|
key: "setI18n",
|
|
@@ -759,50 +752,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
759
752
|
}, {
|
|
760
753
|
key: "getViewConfig",
|
|
761
754
|
value: function getViewConfig() {
|
|
762
|
-
var _this$
|
|
763
|
-
return (_this$
|
|
755
|
+
var _this$divaWebConfigDa25;
|
|
756
|
+
return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.viewConfig;
|
|
764
757
|
}
|
|
765
758
|
}, {
|
|
766
759
|
key: "getEmailConfig",
|
|
767
760
|
value: function getEmailConfig() {
|
|
768
|
-
var _this$
|
|
769
|
-
return (_this$
|
|
761
|
+
var _this$divaWebConfigDa26;
|
|
762
|
+
return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.emailConfig;
|
|
770
763
|
}
|
|
771
764
|
}, {
|
|
772
765
|
key: "getABTestCases",
|
|
773
766
|
value: function getABTestCases() {
|
|
774
|
-
var _this$
|
|
775
|
-
return (_this$
|
|
767
|
+
var _this$divaWebConfigDa27, _this$divaWebConfigDa28;
|
|
768
|
+
return (_this$divaWebConfigDa27 = (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.abTestCases) !== null && _this$divaWebConfigDa27 !== void 0 ? _this$divaWebConfigDa27 : [];
|
|
776
769
|
}
|
|
777
770
|
}, {
|
|
778
771
|
key: "getBarrierConfig",
|
|
779
772
|
value: function getBarrierConfig() {
|
|
780
|
-
var _this$
|
|
781
|
-
return (_this$
|
|
773
|
+
var _this$divaWebConfigDa29;
|
|
774
|
+
return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.barrierConfig;
|
|
782
775
|
}
|
|
783
776
|
}, {
|
|
784
777
|
key: "getTemplateConfig",
|
|
785
778
|
value: function getTemplateConfig() {
|
|
786
|
-
var _this$
|
|
787
|
-
return (_this$
|
|
779
|
+
var _this$divaWebConfigDa30;
|
|
780
|
+
return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.templateConfig;
|
|
788
781
|
}
|
|
789
782
|
}, {
|
|
790
783
|
key: "showDivaNr",
|
|
791
784
|
value: function showDivaNr() {
|
|
792
|
-
var _this$
|
|
793
|
-
return (_this$
|
|
785
|
+
var _this$divaWebConfigDa31;
|
|
786
|
+
return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.showDivaNr;
|
|
794
787
|
}
|
|
795
788
|
}, {
|
|
796
789
|
key: "onErrorHandling",
|
|
797
790
|
value: function onErrorHandling() {
|
|
798
|
-
var _this$
|
|
799
|
-
return (_this$
|
|
791
|
+
var _this$divaWebConfigDa32;
|
|
792
|
+
return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.onErrorHandling;
|
|
800
793
|
}
|
|
801
794
|
}, {
|
|
802
795
|
key: "diva3DRenderingDefault",
|
|
803
796
|
value: function diva3DRenderingDefault() {
|
|
804
|
-
var _this$
|
|
805
|
-
return (_this$
|
|
797
|
+
var _this$divaWebConfigDa33;
|
|
798
|
+
return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.diva3DRenderingDefault;
|
|
806
799
|
}
|
|
807
800
|
}, {
|
|
808
801
|
key: "getJwt",
|
|
@@ -817,8 +810,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
817
810
|
}, {
|
|
818
811
|
key: "getUseMask",
|
|
819
812
|
value: function getUseMask() {
|
|
820
|
-
var _this$
|
|
821
|
-
return (_this$
|
|
813
|
+
var _this$divaWebConfigDa34;
|
|
814
|
+
return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.useMask;
|
|
822
815
|
}
|
|
823
816
|
}, {
|
|
824
817
|
key: "apiUrl",
|
|
@@ -878,22 +871,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
878
871
|
}, {
|
|
879
872
|
key: "getBasketDataUrl",
|
|
880
873
|
value: function getBasketDataUrl(divaNr) {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
DivaNrAndDoc = _divaNr$split2[0],
|
|
886
|
-
variantId = _divaNr$split2[1];
|
|
887
|
-
var _DivaNrAndDoc$split = DivaNrAndDoc.split('-'),
|
|
888
|
-
_DivaNrAndDoc$split2 = _slicedToArray(_DivaNrAndDoc$split, 3),
|
|
889
|
-
_onlyDivaNr = _DivaNrAndDoc$split2[1],
|
|
890
|
-
_version = _DivaNrAndDoc$split2[2];
|
|
891
|
-
return '/baskets/configuration?divaNr=' + 'DIVA-' + _onlyDivaNr + (_version ? '&version=' + _version : '') + '&variantId=' + Number(variantId) + '&dontRepairBasket=true';
|
|
892
|
-
}
|
|
893
|
-
var _divaNr$split3 = divaNr.split('-'),
|
|
894
|
-
_divaNr$split4 = _slicedToArray(_divaNr$split3, 3),
|
|
895
|
-
onlyDivaNr = _divaNr$split4[1],
|
|
896
|
-
version = _divaNr$split4[2];
|
|
874
|
+
var _divaNr$split = divaNr.split('-'),
|
|
875
|
+
_divaNr$split2 = _slicedToArray(_divaNr$split, 3),
|
|
876
|
+
onlyDivaNr = _divaNr$split2[1],
|
|
877
|
+
version = _divaNr$split2[2];
|
|
897
878
|
return '/baskets/configuration?divaNr=' + 'DIVA-' + onlyDivaNr + (version ? '&version=' + version : '') + '&dontRepairBasket=true';
|
|
898
879
|
}
|
|
899
880
|
}, {
|
|
@@ -1023,9 +1004,9 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1023
1004
|
return '/baskets/uniqueDivaNr';
|
|
1024
1005
|
}
|
|
1025
1006
|
}, {
|
|
1026
|
-
key: "
|
|
1027
|
-
value: function
|
|
1028
|
-
return '/
|
|
1007
|
+
key: "checkMatchingProducts",
|
|
1008
|
+
value: function checkMatchingProducts() {
|
|
1009
|
+
return '/v1/products/matching';
|
|
1029
1010
|
}
|
|
1030
1011
|
}, {
|
|
1031
1012
|
key: "getAccountList",
|
|
@@ -1350,14 +1331,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1350
1331
|
}, {
|
|
1351
1332
|
key: "dontLoadAdditionalModelInfos",
|
|
1352
1333
|
get: function get() {
|
|
1353
|
-
var _this$
|
|
1354
|
-
return (_this$
|
|
1334
|
+
var _this$divaWebConfigDa35;
|
|
1335
|
+
return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.dontLoadAdditionalModelInfos;
|
|
1355
1336
|
}
|
|
1356
1337
|
}, {
|
|
1357
1338
|
key: "dontLoadCatalogEditorLiteMask",
|
|
1358
1339
|
get: function get() {
|
|
1359
|
-
var _this$
|
|
1360
|
-
return (_this$
|
|
1340
|
+
var _this$divaWebConfigDa36;
|
|
1341
|
+
return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.dontLoadCatalogEditorLiteMask;
|
|
1361
1342
|
}
|
|
1362
1343
|
}, {
|
|
1363
1344
|
key: "OrganizationId",
|
|
@@ -20474,7 +20455,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20474
20455
|
ruleDesc_locales: initParams.RuleDesc_locales,
|
|
20475
20456
|
toDeleteAfterInit: false,
|
|
20476
20457
|
doUpdatePlannerSize: false,
|
|
20477
|
-
shelfPlanData: initParams.
|
|
20458
|
+
shelfPlanData: initParams.ShelfPlandata ? DivaUtils.DecodeBasketJson(initParams.ShelfPlandata) : undefined,
|
|
20478
20459
|
typeNr: articleData.typeNr,
|
|
20479
20460
|
initDecisions: initParams.initDecisions,
|
|
20480
20461
|
previousPartlistArticles: initParams.PreviousPartlistArticles,
|
|
@@ -21791,6 +21772,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21791
21772
|
get: function get() {
|
|
21792
21773
|
return md5(this.CatalogData.catalogGuid + '_' + this.articleCodex + '_' + JSON.stringify(this.VariantValuesWithoutOPTandOPV).replace(/"/g, '@'));
|
|
21793
21774
|
}
|
|
21775
|
+
}, {
|
|
21776
|
+
key: "articleProductHash",
|
|
21777
|
+
get: function get() {
|
|
21778
|
+
var hash = this.catalogCodex + '_' + this.articleCodex + '_' + this.quantity + '_';
|
|
21779
|
+
for (var key in this.articleOptionStates) {
|
|
21780
|
+
var myArtOption = this.articleOptionStates[key];
|
|
21781
|
+
if (myArtOption.isDoShow && (!(myArtOption.idmVariantenArt == 95 || myArtOption.idmVariantenArt == 96 || myArtOption.idmVariantenArt == 97) || myArtOption.isVisibleFreeText) && myArtOption.val && myArtOption.visibleCount > 0 && !myArtOption.isDescribingState) {
|
|
21782
|
+
hash = hash + myArtOption.optionCodex.substring(3) + '_' + myArtOption.val.codex.substring(3) + (myArtOption.measureUnit && myArtOption.freeText !== undefined ? '_' + myArtOption.freeText : '') + (!myArtOption.measureUnit && myArtOption.isFreeText ? '_' + myArtOption.isFreeText : '');
|
|
21783
|
+
}
|
|
21784
|
+
}
|
|
21785
|
+
return md5(hash);
|
|
21786
|
+
}
|
|
21794
21787
|
}, {
|
|
21795
21788
|
key: "VariantValuesWithoutOPTandOPV",
|
|
21796
21789
|
get: function get() {
|
|
@@ -22863,6 +22856,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22863
22856
|
optionImgForPrint: optionImgForPrint,
|
|
22864
22857
|
optionsForPrint: optionsForPrint
|
|
22865
22858
|
});
|
|
22859
|
+
} else {
|
|
22860
|
+
LOG$c.debug('not loading partlistarticle: ' + articleCodex + ' cause quantity is zero');
|
|
22866
22861
|
}
|
|
22867
22862
|
}
|
|
22868
22863
|
return partlistArticlesToLoad;
|
|
@@ -23559,7 +23554,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23559
23554
|
break;
|
|
23560
23555
|
}
|
|
23561
23556
|
_context.next = 4;
|
|
23562
|
-
return import('./ShelfPlanner-
|
|
23557
|
+
return import('./ShelfPlanner-4277ee30.js');
|
|
23563
23558
|
case 4:
|
|
23564
23559
|
_yield$import = _context.sent;
|
|
23565
23560
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24331,12 +24326,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24331
24326
|
}
|
|
24332
24327
|
var myOptItem = {
|
|
24333
24328
|
BasketID: this.basketId,
|
|
24334
|
-
|
|
24329
|
+
OPT: OP.substring(3),
|
|
24335
24330
|
OPTName: myArtOption.optionOrigName,
|
|
24336
24331
|
OPTName_locales: myArtOption.optionName_locales,
|
|
24337
24332
|
OptionOCD: myArtOption.optionOcd,
|
|
24338
24333
|
OCD: myArtOption.ocd,
|
|
24339
|
-
|
|
24334
|
+
OPV: myArtOption.val.codex.substring(3),
|
|
24340
24335
|
vOPV: !this.CatalogData.dontUseVCodexInBasket ? myArtOption.vCodex : undefined,
|
|
24341
24336
|
OPVName: DivaUtils.stripTags(myArtOption.name),
|
|
24342
24337
|
OPVName_locales: DivaUtils.stripTagsFromDict((_myArtOption$valName_ = myArtOption.valName_locales) !== null && _myArtOption$valName_ !== void 0 ? _myArtOption$valName_ : {}),
|
|
@@ -24372,7 +24367,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24372
24367
|
}
|
|
24373
24368
|
}, {
|
|
24374
24369
|
key: "getConfigPriceData",
|
|
24375
|
-
value: function getConfigPriceData(
|
|
24370
|
+
value: function getConfigPriceData(VariantBasketDatas) {
|
|
24376
24371
|
var myPriceData = new JsonConfigPriceData();
|
|
24377
24372
|
myPriceData.BasePrices = [];
|
|
24378
24373
|
if (this.price != 0) {
|
|
@@ -24398,12 +24393,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24398
24393
|
} else {
|
|
24399
24394
|
if (checkPrice.IsPercentage) {
|
|
24400
24395
|
//Check if variantBasketdata is set as addPercentage
|
|
24401
|
-
//TODO klären mit Franz - ist das schon der richtige Ort? In dem Fall wird
|
|
24402
|
-
for (var _i10 = 0; _i10 <
|
|
24396
|
+
//TODO klären mit Franz - ist das schon der richtige Ort? In dem Fall wird VariantBasketDatas nicht als AddPercentage gekennzeichnet und im Checkout 1 wird CHF stattt % angezeigt.
|
|
24397
|
+
for (var _i10 = 0; _i10 < VariantBasketDatas.length; _i10++) {
|
|
24403
24398
|
var priceOPT = checkPrice.OPT.startsWith('OPT') ? checkPrice.OPT.substring(3) : checkPrice;
|
|
24404
|
-
if (
|
|
24399
|
+
if (VariantBasketDatas[_i10].OPT == priceOPT) {
|
|
24405
24400
|
if (!isNaN(checkPrice.Price)) {
|
|
24406
|
-
|
|
24401
|
+
VariantBasketDatas[_i10].AddPercentage = checkPrice.Price * 100;
|
|
24407
24402
|
}
|
|
24408
24403
|
}
|
|
24409
24404
|
}
|
|
@@ -24419,18 +24414,18 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24419
24414
|
var maxPrice = 0,
|
|
24420
24415
|
maxPriceOPT = '';
|
|
24421
24416
|
if (!myPriceData.BasePrice && !this.CatalogData.ignoreMaxPriceAsBP) {
|
|
24422
|
-
for (var _i11 = 0; _i11 <
|
|
24423
|
-
var variant =
|
|
24417
|
+
for (var _i11 = 0; _i11 < VariantBasketDatas.length; _i11++) {
|
|
24418
|
+
var variant = VariantBasketDatas[_i11];
|
|
24424
24419
|
if (variant.AddPrice && (!variant.AddPrice || variant.AddPrice > maxPrice)) {
|
|
24425
24420
|
maxPrice = variant.AddPrice;
|
|
24426
24421
|
maxPriceOPT = variant.OPT;
|
|
24427
24422
|
}
|
|
24428
24423
|
}
|
|
24429
24424
|
}
|
|
24430
|
-
for (var _i12 = 0; _i12 <
|
|
24425
|
+
for (var _i12 = 0; _i12 < VariantBasketDatas.length; _i12++) {
|
|
24431
24426
|
//WCTODO Prio 2 bei Maßauswahl
|
|
24432
24427
|
var CalcPrice = void 0,
|
|
24433
|
-
_variant =
|
|
24428
|
+
_variant = VariantBasketDatas[_i12],
|
|
24434
24429
|
isPercentage = false;
|
|
24435
24430
|
if (_variant.AddPercentage) {
|
|
24436
24431
|
isPercentage = true;
|
|
@@ -25045,7 +25040,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25045
25040
|
}
|
|
25046
25041
|
}
|
|
25047
25042
|
}
|
|
25048
|
-
if (value == undefined) {
|
|
25043
|
+
if (value == undefined && myArtOPS.isFreeText && !variantValues[_key + '_val']) {
|
|
25049
25044
|
val = myArtOPS.option.freetextDefaultValue;
|
|
25050
25045
|
if (val) {
|
|
25051
25046
|
value = val;
|
|
@@ -26920,7 +26915,9 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
26920
26915
|
_defineProperty(this, "_supplierColors", void 0);
|
|
26921
26916
|
/**Favorits state */
|
|
26922
26917
|
_defineProperty(this, "_handlelingCurrentFavorites", false);
|
|
26923
|
-
_defineProperty(this, "_favorites",
|
|
26918
|
+
_defineProperty(this, "_favorites", {
|
|
26919
|
+
VariantValues: {}
|
|
26920
|
+
});
|
|
26924
26921
|
//disabledVariants holds the state for explicitly variants that the user did not like so they got unselected in der summary
|
|
26925
26922
|
_defineProperty(this, "_disabledVariants", []);
|
|
26926
26923
|
//for viewSummarylist to not always calc all the different valid variants we cache them and reset them when favoritesselection is changes
|
|
@@ -28089,7 +28086,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28089
28086
|
break;
|
|
28090
28087
|
}
|
|
28091
28088
|
_context4.next = 3;
|
|
28092
|
-
return import('./DoorPlanner-
|
|
28089
|
+
return import('./DoorPlanner-309fbb7f.js');
|
|
28093
28090
|
case 3:
|
|
28094
28091
|
_yield$import = _context4.sent;
|
|
28095
28092
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28133,8 +28130,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28133
28130
|
set: function set(favorites) {
|
|
28134
28131
|
this._favorites = favorites;
|
|
28135
28132
|
}
|
|
28136
|
-
|
|
28137
|
-
//private disabledVariants: number[] = [];
|
|
28138
28133
|
}, {
|
|
28139
28134
|
key: "disabledVariants",
|
|
28140
28135
|
get: function get() {
|
|
@@ -28143,7 +28138,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28143
28138
|
set: function set(val) {
|
|
28144
28139
|
this._disabledVariants = val;
|
|
28145
28140
|
}
|
|
28146
|
-
//private allVariantsCache FavoritesVariants[]
|
|
28147
28141
|
}, {
|
|
28148
28142
|
key: "allVariantsCache",
|
|
28149
28143
|
get: function get() {
|
|
@@ -28266,558 +28260,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28266
28260
|
}]);
|
|
28267
28261
|
}();
|
|
28268
28262
|
|
|
28269
|
-
//Diese Klasse verwaltet Productlogiken
|
|
28270
|
-
var Product = /*#__PURE__*/function () {
|
|
28271
|
-
function Product(id, divaNr, articles, price, image, shortDescription, childProducts, dockingPointInfos, affiliate, retailerArticleNr, minQuantity, increments) {
|
|
28272
|
-
_classCallCheck(this, Product);
|
|
28273
|
-
_defineProperty(this, "id", void 0);
|
|
28274
|
-
_defineProperty(this, "productPrice", void 0);
|
|
28275
|
-
_defineProperty(this, "_divaNr", void 0);
|
|
28276
|
-
_defineProperty(this, "shortDescriptionData", void 0);
|
|
28277
|
-
_defineProperty(this, "imageData", void 0);
|
|
28278
|
-
_defineProperty(this, "articles", void 0);
|
|
28279
|
-
_defineProperty(this, "families", []);
|
|
28280
|
-
_defineProperty(this, "childProductsData", void 0);
|
|
28281
|
-
_defineProperty(this, "childProductsGroupedData", void 0);
|
|
28282
|
-
_defineProperty(this, "dockingPointInfos", void 0);
|
|
28283
|
-
_defineProperty(this, "_affiliate", void 0);
|
|
28284
|
-
_defineProperty(this, "_retailerArticleNr", void 0);
|
|
28285
|
-
_defineProperty(this, "_minQuantity", void 0);
|
|
28286
|
-
_defineProperty(this, "_increments", void 0);
|
|
28287
|
-
_defineProperty(this, "_curTargetArticles", void 0);
|
|
28288
|
-
this.id = id;
|
|
28289
|
-
this._divaNr = divaNr;
|
|
28290
|
-
this.articles = articles;
|
|
28291
|
-
this.productPrice = price;
|
|
28292
|
-
this.childProductsData = childProducts;
|
|
28293
|
-
this.shortDescriptionData = shortDescription;
|
|
28294
|
-
this.imageData = image;
|
|
28295
|
-
this.dockingPointInfos = dockingPointInfos;
|
|
28296
|
-
this._affiliate = affiliate;
|
|
28297
|
-
this._retailerArticleNr = retailerArticleNr;
|
|
28298
|
-
this._minQuantity = minQuantity === 1 ? undefined : minQuantity;
|
|
28299
|
-
this._increments = increments === 1 ? undefined : increments;
|
|
28300
|
-
this._curTargetArticles = [];
|
|
28301
|
-
if (this.childProductsData) {
|
|
28302
|
-
this.childProductsGroupedData = {};
|
|
28303
|
-
for (var i = 0; i < this.childProductsData.length; i++) {
|
|
28304
|
-
if (!this.childProductsGroupedData[this.childProductsData[i]]) this.childProductsGroupedData[this.childProductsData[i]] = 0;
|
|
28305
|
-
this.childProductsGroupedData[this.childProductsData[i]]++;
|
|
28306
|
-
}
|
|
28307
|
-
}
|
|
28308
|
-
}
|
|
28309
|
-
return _createClass(Product, [{
|
|
28310
|
-
key: "initFamilies",
|
|
28311
|
-
value: function initFamilies(families) {
|
|
28312
|
-
for (var i = 0; i < families.length; i++) {
|
|
28313
|
-
var _families$i$childProd;
|
|
28314
|
-
if ((_families$i$childProd = families[i].childProducts) !== null && _families$i$childProd !== void 0 && _families$i$childProd.includes(this.id)) this.families.push();
|
|
28315
|
-
}
|
|
28316
|
-
this.families = families;
|
|
28317
|
-
}
|
|
28318
|
-
}, {
|
|
28319
|
-
key: "price",
|
|
28320
|
-
get: function get() {
|
|
28321
|
-
return this.productPrice;
|
|
28322
|
-
}
|
|
28323
|
-
}, {
|
|
28324
|
-
key: "productId",
|
|
28325
|
-
get: function get() {
|
|
28326
|
-
return this.id;
|
|
28327
|
-
}
|
|
28328
|
-
}, {
|
|
28329
|
-
key: "divaNr",
|
|
28330
|
-
get: function get() {
|
|
28331
|
-
return this._divaNr;
|
|
28332
|
-
}
|
|
28333
|
-
}, {
|
|
28334
|
-
key: "isFamily",
|
|
28335
|
-
get: function get() {
|
|
28336
|
-
return this.childProducts !== undefined;
|
|
28337
|
-
}
|
|
28338
|
-
}, {
|
|
28339
|
-
key: "variantValues",
|
|
28340
|
-
get: function get() {
|
|
28341
|
-
return this.articles[0].variantValues;
|
|
28342
|
-
}
|
|
28343
|
-
}, {
|
|
28344
|
-
key: "childProducts",
|
|
28345
|
-
get: function get() {
|
|
28346
|
-
return this.childProductsData;
|
|
28347
|
-
}
|
|
28348
|
-
}, {
|
|
28349
|
-
key: "childProductsGrouped",
|
|
28350
|
-
get: function get() {
|
|
28351
|
-
return this.childProductsGroupedData;
|
|
28352
|
-
}
|
|
28353
|
-
}, {
|
|
28354
|
-
key: "shortDescription",
|
|
28355
|
-
get: function get() {
|
|
28356
|
-
return this.shortDescriptionData;
|
|
28357
|
-
}
|
|
28358
|
-
}, {
|
|
28359
|
-
key: "image",
|
|
28360
|
-
get: function get() {
|
|
28361
|
-
return this.imageData;
|
|
28362
|
-
}
|
|
28363
|
-
}, {
|
|
28364
|
-
key: "affiliate",
|
|
28365
|
-
get: function get() {
|
|
28366
|
-
return this._affiliate;
|
|
28367
|
-
}
|
|
28368
|
-
}, {
|
|
28369
|
-
key: "retailerArticleNr",
|
|
28370
|
-
get: function get() {
|
|
28371
|
-
return this._retailerArticleNr;
|
|
28372
|
-
}
|
|
28373
|
-
}, {
|
|
28374
|
-
key: "increments",
|
|
28375
|
-
get: function get() {
|
|
28376
|
-
// return 2;
|
|
28377
|
-
return this._increments;
|
|
28378
|
-
}
|
|
28379
|
-
}, {
|
|
28380
|
-
key: "minQuantity",
|
|
28381
|
-
get: function get() {
|
|
28382
|
-
// return 3;
|
|
28383
|
-
return this._minQuantity;
|
|
28384
|
-
}
|
|
28385
|
-
}, {
|
|
28386
|
-
key: "curTargetArticles",
|
|
28387
|
-
get: function get() {
|
|
28388
|
-
return this._curTargetArticles;
|
|
28389
|
-
},
|
|
28390
|
-
set: function set(targentArticles) {
|
|
28391
|
-
this._curTargetArticles = targentArticles;
|
|
28392
|
-
}
|
|
28393
|
-
}, {
|
|
28394
|
-
key: "DockingPointInfos",
|
|
28395
|
-
get: function get() {
|
|
28396
|
-
return this.dockingPointInfos;
|
|
28397
|
-
}
|
|
28398
|
-
}, {
|
|
28399
|
-
key: "CatalogCodexes",
|
|
28400
|
-
get: function get() {
|
|
28401
|
-
var catalogCodexes = [];
|
|
28402
|
-
for (var i = 0; i < this.articles.length; i++) {
|
|
28403
|
-
catalogCodexes.push(this.articles[i].catalogCodex);
|
|
28404
|
-
}
|
|
28405
|
-
return catalogCodexes;
|
|
28406
|
-
}
|
|
28407
|
-
}, {
|
|
28408
|
-
key: "findOPVCodexInVariantValues",
|
|
28409
|
-
value: function findOPVCodexInVariantValues(opt, opv) {
|
|
28410
|
-
return this.articles.find(function (article) {
|
|
28411
|
-
return article.variantValues.find(function (variant) {
|
|
28412
|
-
return variant.OPT === opt && variant.OPV === opv;
|
|
28413
|
-
});
|
|
28414
|
-
});
|
|
28415
|
-
}
|
|
28416
|
-
}]);
|
|
28417
|
-
}();
|
|
28418
|
-
|
|
28419
|
-
var DivaProductHandler = /*#__PURE__*/function () {
|
|
28420
|
-
function DivaProductHandler() {
|
|
28421
|
-
_classCallCheck(this, DivaProductHandler);
|
|
28422
|
-
_defineProperty(this, "singleProducts", {});
|
|
28423
|
-
_defineProperty(this, "familyProducts", {});
|
|
28424
|
-
_defineProperty(this, "singleProductsGrouped", {});
|
|
28425
|
-
// key is CatalogCodex and ArticleCodex
|
|
28426
|
-
//the number is the qunaitity of the current loaded product
|
|
28427
|
-
_defineProperty(this, "currentFamilies", {});
|
|
28428
|
-
_defineProperty(this, "currentSingleProducts", {});
|
|
28429
|
-
}
|
|
28430
|
-
return _createClass(DivaProductHandler, [{
|
|
28431
|
-
key: "addProducts",
|
|
28432
|
-
value: function addProducts(variants, families) {
|
|
28433
|
-
var newProducts = [];
|
|
28434
|
-
var newFamilies = [];
|
|
28435
|
-
for (var i = 0; i < variants.length; i++) {
|
|
28436
|
-
var _variant$discountedPr;
|
|
28437
|
-
var article = variants[i].articles[0];
|
|
28438
|
-
var variant = variants[i];
|
|
28439
|
-
var codex = article.catalogCodex + '_' + article.articleCodex;
|
|
28440
|
-
if (!this.singleProductsGrouped[codex]) this.singleProductsGrouped[codex] = {};
|
|
28441
|
-
this.singleProductsGrouped[codex][variants[i]._id] = new Product(variant._id, variant.divaNr, variant.articles, (_variant$discountedPr = variant.discountedPrice) !== null && _variant$discountedPr !== void 0 ? _variant$discountedPr : variant.addedPrice, variant.image, variant.shortDescription, undefined, variant.dockingPointInfos, variant.affiliate, variant.retailerArticleNr, variant.minQuantity, variant.increments);
|
|
28442
|
-
this.singleProducts[variant._id] = this.singleProductsGrouped[codex][variant._id];
|
|
28443
|
-
newProducts.push(this.singleProductsGrouped[codex][variant._id]);
|
|
28444
|
-
}
|
|
28445
|
-
if (families !== null && families !== void 0 && families.length) for (var _i = 0; _i < families.length; _i++) {
|
|
28446
|
-
var _family$discountedPri;
|
|
28447
|
-
var family = families[_i];
|
|
28448
|
-
this.familyProducts[family._id] = new Product(family._id, family.divaNr, family.articles, (_family$discountedPri = family.discountedPrice) !== null && _family$discountedPri !== void 0 ? _family$discountedPri : family.addedPrice, family.image, family.shortDescription, family.childProducts, family.dockingPointInfos, family.affiliate, family.retailerArticleNr, family.minQuantity, family.increments);
|
|
28449
|
-
newFamilies.push(this.familyProducts[family._id]);
|
|
28450
|
-
}
|
|
28451
|
-
for (var _i2 = 0; _i2 < newProducts.length; _i2++) {
|
|
28452
|
-
newProducts[_i2].initFamilies(newFamilies);
|
|
28453
|
-
}
|
|
28454
|
-
}
|
|
28455
|
-
}, {
|
|
28456
|
-
key: "loadProductsOfSets",
|
|
28457
|
-
value: function () {
|
|
28458
|
-
var _loadProductsOfSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(orderSets, involvedSetIds) {
|
|
28459
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
28460
|
-
while (1) switch (_context.prev = _context.next) {
|
|
28461
|
-
case 0:
|
|
28462
|
-
case "end":
|
|
28463
|
-
return _context.stop();
|
|
28464
|
-
}
|
|
28465
|
-
}, _callee);
|
|
28466
|
-
}));
|
|
28467
|
-
function loadProductsOfSets(_x, _x2) {
|
|
28468
|
-
return _loadProductsOfSets.apply(this, arguments);
|
|
28469
|
-
}
|
|
28470
|
-
return loadProductsOfSets;
|
|
28471
|
-
}()
|
|
28472
|
-
}, {
|
|
28473
|
-
key: "updateProducts",
|
|
28474
|
-
value: function () {
|
|
28475
|
-
var _updateProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, from, productId) {
|
|
28476
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
28477
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
28478
|
-
case 0:
|
|
28479
|
-
case "end":
|
|
28480
|
-
return _context2.stop();
|
|
28481
|
-
}
|
|
28482
|
-
}, _callee2);
|
|
28483
|
-
}));
|
|
28484
|
-
function updateProducts(_x3, _x4, _x5) {
|
|
28485
|
-
return _updateProducts.apply(this, arguments);
|
|
28486
|
-
}
|
|
28487
|
-
return updateProducts;
|
|
28488
|
-
}()
|
|
28489
|
-
}, {
|
|
28490
|
-
key: "updateArticleProducts",
|
|
28491
|
-
value: function updateArticleProducts(set) {
|
|
28492
|
-
var articles = set.getDivaArticles();
|
|
28493
|
-
var targetArticles = Object.keys(articles);
|
|
28494
|
-
for (var i = 0; i < targetArticles.length; i++) {
|
|
28495
|
-
var article = articles[targetArticles[i]];
|
|
28496
|
-
var productVariants = this.singleProductsGrouped[article.catalogCodex + '_' + article.articleCodex];
|
|
28497
|
-
for (var key in productVariants) {
|
|
28498
|
-
var product = productVariants[key];
|
|
28499
|
-
product.curTargetArticles = [];
|
|
28500
|
-
}
|
|
28501
|
-
}
|
|
28502
|
-
for (var _i3 = 0; _i3 < targetArticles.length; _i3++) {
|
|
28503
|
-
var _article = articles[targetArticles[_i3]];
|
|
28504
|
-
if (!_article) continue;
|
|
28505
|
-
var _productVariants = this.singleProductsGrouped[_article.catalogCodex + '_' + _article.articleCodex];
|
|
28506
|
-
var newProduct = undefined;
|
|
28507
|
-
var _loop = function _loop() {
|
|
28508
|
-
var product = _productVariants[_key];
|
|
28509
|
-
var productVariantValues = _article.VariantValuesWithoutOPTandOPVInObject;
|
|
28510
|
-
var notFound = false;
|
|
28511
|
-
var _loop2 = function _loop2(j) {
|
|
28512
|
-
if (!productVariantValues.find(function (item) {
|
|
28513
|
-
return item.OPT == product.variantValues[j].OPT && item.OPV == product.variantValues[j].OPV;
|
|
28514
|
-
})) {
|
|
28515
|
-
//only notFound set to true when the opt in general does exist in the productVariants only the value of it is different
|
|
28516
|
-
if (productVariantValues.find(function (item) {
|
|
28517
|
-
return item.OPT == product.variantValues[j].OPT;
|
|
28518
|
-
})) {
|
|
28519
|
-
notFound = true;
|
|
28520
|
-
return 1; // break
|
|
28521
|
-
}
|
|
28522
|
-
}
|
|
28523
|
-
};
|
|
28524
|
-
for (var j = 0; j < product.variantValues.length; j++) {
|
|
28525
|
-
if (_loop2(j)) break;
|
|
28526
|
-
}
|
|
28527
|
-
if (!notFound) {
|
|
28528
|
-
newProduct = product;
|
|
28529
|
-
newProduct.curTargetArticles.push(_article.basketId);
|
|
28530
|
-
return 1; // break
|
|
28531
|
-
}
|
|
28532
|
-
};
|
|
28533
|
-
for (var _key in _productVariants) {
|
|
28534
|
-
if (_loop()) break;
|
|
28535
|
-
}
|
|
28536
|
-
_article.curProduct = newProduct;
|
|
28537
|
-
}
|
|
28538
|
-
}
|
|
28539
|
-
}, {
|
|
28540
|
-
key: "updateFamilyProducts",
|
|
28541
|
-
value: function updateFamilyProducts() {
|
|
28542
|
-
this.currentFamilies = {};
|
|
28543
|
-
var familiesToCheck = this.getFamiliesToCheck();
|
|
28544
|
-
var biggestFamily;
|
|
28545
|
-
do {
|
|
28546
|
-
biggestFamily = this.findBiggestFamily(familiesToCheck);
|
|
28547
|
-
if (biggestFamily) {
|
|
28548
|
-
if (!this.currentFamilies[biggestFamily.productId]) this.currentFamilies[biggestFamily.productId] = 0;
|
|
28549
|
-
this.currentFamilies[biggestFamily.productId]++;
|
|
28550
|
-
}
|
|
28551
|
-
} while (biggestFamily);
|
|
28552
|
-
}
|
|
28553
|
-
}, {
|
|
28554
|
-
key: "getFamiliesToCheck",
|
|
28555
|
-
value: function getFamiliesToCheck() {
|
|
28556
|
-
var familiesToCheck = {};
|
|
28557
|
-
for (var key in this.familyProducts) {
|
|
28558
|
-
var familiy = this.familyProducts[key];
|
|
28559
|
-
if (!familiy.childProducts) continue;
|
|
28560
|
-
for (var i = 0; i < familiy.childProducts.length; i++) {
|
|
28561
|
-
if (this.currentSingleProducts[familiy.childProducts[i]]) {
|
|
28562
|
-
familiesToCheck[familiy.productId] = familiy;
|
|
28563
|
-
break;
|
|
28564
|
-
}
|
|
28565
|
-
}
|
|
28566
|
-
}
|
|
28567
|
-
return familiesToCheck;
|
|
28568
|
-
}
|
|
28569
|
-
}, {
|
|
28570
|
-
key: "findBiggestFamily",
|
|
28571
|
-
value: function findBiggestFamily(familiesToCheck) {
|
|
28572
|
-
var matchingFamilies = [];
|
|
28573
|
-
var biggestFamily = false;
|
|
28574
|
-
for (var iKey in familiesToCheck) {
|
|
28575
|
-
var family = familiesToCheck[iKey];
|
|
28576
|
-
var notFit = false;
|
|
28577
|
-
for (var jKey in family.childProductsGrouped) {
|
|
28578
|
-
//if product does not currently exist or the quantity is to small
|
|
28579
|
-
if (!this.currentSingleProducts[jKey] || this.currentSingleProducts[jKey] < family.childProductsGrouped[jKey]) {
|
|
28580
|
-
notFit = true;
|
|
28581
|
-
break;
|
|
28582
|
-
}
|
|
28583
|
-
}
|
|
28584
|
-
if (!notFit) matchingFamilies.push(family);
|
|
28585
|
-
}
|
|
28586
|
-
|
|
28587
|
-
//from all the matching families find the bigges one
|
|
28588
|
-
for (var i = 0; i < matchingFamilies.length; i++) {
|
|
28589
|
-
if (!biggestFamily || biggestFamily.childProducts.length > matchingFamilies[i].childProducts.length) {
|
|
28590
|
-
biggestFamily = matchingFamilies[i];
|
|
28591
|
-
}
|
|
28592
|
-
}
|
|
28593
|
-
if (biggestFamily) {
|
|
28594
|
-
//we found a final bigges familiy. Now subtract the familiy products quantity in the dictionary products for the next run
|
|
28595
|
-
for (var key in biggestFamily.childProductsGrouped) {
|
|
28596
|
-
biggestFamily.childProductsGrouped;
|
|
28597
|
-
this.currentSingleProducts[key] = this.currentSingleProducts[key] - biggestFamily.childProductsGrouped[key];
|
|
28598
|
-
}
|
|
28599
|
-
}
|
|
28600
|
-
return biggestFamily;
|
|
28601
|
-
}
|
|
28602
|
-
}, {
|
|
28603
|
-
key: "checkQuantitySteps",
|
|
28604
|
-
value: function () {
|
|
28605
|
-
var _checkQuantitySteps = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(set, from, productId) {
|
|
28606
|
-
var articles, somethingChanged, key, product, currentQuantity, deltaQuantity, whatToDo, article;
|
|
28607
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
28608
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
28609
|
-
case 0:
|
|
28610
|
-
articles = set.getDivaArticles();
|
|
28611
|
-
somethingChanged = false;
|
|
28612
|
-
_context3.t0 = _regeneratorRuntime.keys(this.currentSingleProducts);
|
|
28613
|
-
case 3:
|
|
28614
|
-
if ((_context3.t1 = _context3.t0()).done) {
|
|
28615
|
-
_context3.next = 38;
|
|
28616
|
-
break;
|
|
28617
|
-
}
|
|
28618
|
-
key = _context3.t1.value;
|
|
28619
|
-
product = this.singleProducts[key];
|
|
28620
|
-
currentQuantity = this.currentSingleProducts[key];
|
|
28621
|
-
deltaQuantity = 0;
|
|
28622
|
-
whatToDo = undefined;
|
|
28623
|
-
if (product.minQuantity !== undefined) {
|
|
28624
|
-
if (product.minQuantity > currentQuantity || product.increments !== undefined && product.increments > currentQuantity) {
|
|
28625
|
-
if (from == 'onDelete') {
|
|
28626
|
-
whatToDo = 'deleteArticle';
|
|
28627
|
-
deltaQuantity = currentQuantity;
|
|
28628
|
-
} else {
|
|
28629
|
-
whatToDo = 'increaseQunatity';
|
|
28630
|
-
deltaQuantity = product.minQuantity - currentQuantity;
|
|
28631
|
-
}
|
|
28632
|
-
somethingChanged = 'byMinQuantity';
|
|
28633
|
-
}
|
|
28634
|
-
}
|
|
28635
|
-
if (!(product.increments && whatToDo !== 'deleteArticle')) {
|
|
28636
|
-
_context3.next = 22;
|
|
28637
|
-
break;
|
|
28638
|
-
}
|
|
28639
|
-
case 11:
|
|
28640
|
-
if (!((currentQuantity + deltaQuantity) % product.increments !== 0 || from == 'onDelete' && productId == key)) {
|
|
28641
|
-
_context3.next = 22;
|
|
28642
|
-
break;
|
|
28643
|
-
}
|
|
28644
|
-
deltaQuantity++;
|
|
28645
|
-
somethingChanged = 'byImcrement';
|
|
28646
|
-
if (!(whatToDo !== 'increaseQunatity')) {
|
|
28647
|
-
_context3.next = 20;
|
|
28648
|
-
break;
|
|
28649
|
-
}
|
|
28650
|
-
if (!((currentQuantity - deltaQuantity) % product.increments === 0 && from != 'onAdd')) {
|
|
28651
|
-
_context3.next = 19;
|
|
28652
|
-
break;
|
|
28653
|
-
}
|
|
28654
|
-
if (!(product.minQuantity === undefined || product.minQuantity <= currentQuantity - deltaQuantity || currentQuantity - deltaQuantity === 0)) {
|
|
28655
|
-
_context3.next = 19;
|
|
28656
|
-
break;
|
|
28657
|
-
}
|
|
28658
|
-
whatToDo = 'decreaseQunatity';
|
|
28659
|
-
return _context3.abrupt("break", 22);
|
|
28660
|
-
case 19:
|
|
28661
|
-
if ((currentQuantity + deltaQuantity) % product.increments === 0 && from != 'onDelete') {
|
|
28662
|
-
whatToDo = 'increaseQunatity';
|
|
28663
|
-
}
|
|
28664
|
-
case 20:
|
|
28665
|
-
_context3.next = 11;
|
|
28666
|
-
break;
|
|
28667
|
-
case 22:
|
|
28668
|
-
if (!(whatToDo !== undefined)) {
|
|
28669
|
-
_context3.next = 36;
|
|
28670
|
-
break;
|
|
28671
|
-
}
|
|
28672
|
-
case 23:
|
|
28673
|
-
if (!(deltaQuantity !== 0)) {
|
|
28674
|
-
_context3.next = 36;
|
|
28675
|
-
break;
|
|
28676
|
-
}
|
|
28677
|
-
article = articles[product.curTargetArticles[0]]; //attention!! If an article has a quantity bigger than 1 this wont work!
|
|
28678
|
-
if (!(whatToDo === 'increaseQunatity')) {
|
|
28679
|
-
_context3.next = 30;
|
|
28680
|
-
break;
|
|
28681
|
-
}
|
|
28682
|
-
_context3.next = 28;
|
|
28683
|
-
return setHandlerInstance.addPlannerElement(set, article.articleCodex, {
|
|
28684
|
-
variantValues: article.VariantValues
|
|
28685
|
-
}, 'initializingProduct');
|
|
28686
|
-
case 28:
|
|
28687
|
-
_context3.next = 33;
|
|
28688
|
-
break;
|
|
28689
|
-
case 30:
|
|
28690
|
-
_context3.next = 32;
|
|
28691
|
-
return setHandlerInstance.deleteElementFromSet(set, article, false, undefined, true);
|
|
28692
|
-
case 32:
|
|
28693
|
-
product.curTargetArticles.splice(0, 1);
|
|
28694
|
-
case 33:
|
|
28695
|
-
deltaQuantity--;
|
|
28696
|
-
_context3.next = 23;
|
|
28697
|
-
break;
|
|
28698
|
-
case 36:
|
|
28699
|
-
_context3.next = 3;
|
|
28700
|
-
break;
|
|
28701
|
-
case 38:
|
|
28702
|
-
return _context3.abrupt("return", somethingChanged);
|
|
28703
|
-
case 39:
|
|
28704
|
-
case "end":
|
|
28705
|
-
return _context3.stop();
|
|
28706
|
-
}
|
|
28707
|
-
}, _callee3, this);
|
|
28708
|
-
}));
|
|
28709
|
-
function checkQuantitySteps(_x6, _x7, _x8) {
|
|
28710
|
-
return _checkQuantitySteps.apply(this, arguments);
|
|
28711
|
-
}
|
|
28712
|
-
return checkQuantitySteps;
|
|
28713
|
-
}()
|
|
28714
|
-
/**
|
|
28715
|
-
* this functions controlls if the list of configItems is available or not
|
|
28716
|
-
* @param configItems
|
|
28717
|
-
* @param variantsInfo
|
|
28718
|
-
* @param articles
|
|
28719
|
-
* @param targetArticles
|
|
28720
|
-
* @returns
|
|
28721
|
-
*/
|
|
28722
|
-
}, {
|
|
28723
|
-
key: "checkProductInStock",
|
|
28724
|
-
value: function checkProductInStock(configItems, variantsInfo, articles, targetArticles) {
|
|
28725
|
-
var productsKey = articles[targetArticles[0]].catalogCodex + '_' + articles[targetArticles[0]].articleCodex;
|
|
28726
|
-
var products = this.singleProductsGrouped[productsKey];
|
|
28727
|
-
var indexesToDelete = [];
|
|
28728
|
-
for (var i = 0; i < variantsInfo.length; i++) {
|
|
28729
|
-
var variantInStock = false;
|
|
28730
|
-
var variantInfo = variantsInfo[i];
|
|
28731
|
-
for (var key in products) {
|
|
28732
|
-
//***GUF***DEBUG HERE
|
|
28733
|
-
var productVariantValues = products[key].variantValues;
|
|
28734
|
-
var notFound = false;
|
|
28735
|
-
var _loop3 = function _loop3() {
|
|
28736
|
-
var variant = variantInfo.variants[j];
|
|
28737
|
-
if (!productVariantValues.find(function (item) {
|
|
28738
|
-
return variant.OPT === item.OPT && variant.OPV === item.OPV;
|
|
28739
|
-
})) {
|
|
28740
|
-
//only notFound set to true when the opt in general does exist in the productVariants only the value of it is different
|
|
28741
|
-
if (productVariantValues.find(function (item) {
|
|
28742
|
-
return variant.OPT === item.OPT;
|
|
28743
|
-
})) {
|
|
28744
|
-
notFound = true;
|
|
28745
|
-
return 1; // break
|
|
28746
|
-
}
|
|
28747
|
-
}
|
|
28748
|
-
};
|
|
28749
|
-
for (var j = 0; j < variantInfo.variants.length; j++) {
|
|
28750
|
-
if (_loop3()) break;
|
|
28751
|
-
}
|
|
28752
|
-
if (!notFound) {
|
|
28753
|
-
variantInStock = true;
|
|
28754
|
-
break;
|
|
28755
|
-
}
|
|
28756
|
-
}
|
|
28757
|
-
if (!variantInStock) {
|
|
28758
|
-
if (configItems[i]) {
|
|
28759
|
-
indexesToDelete.push(i);
|
|
28760
|
-
}
|
|
28761
|
-
}
|
|
28762
|
-
}
|
|
28763
|
-
for (var _i4 = indexesToDelete.length - 1; _i4 >= 0; _i4--) {
|
|
28764
|
-
configItems.splice(indexesToDelete[_i4], 1);
|
|
28765
|
-
}
|
|
28766
|
-
return configItems;
|
|
28767
|
-
}
|
|
28768
|
-
}, {
|
|
28769
|
-
key: "getPrice",
|
|
28770
|
-
value: function getPrice() {
|
|
28771
|
-
var price = 0;
|
|
28772
|
-
for (var key in this.currentSingleProducts) {
|
|
28773
|
-
price += this.singleProducts[key].price * this.currentSingleProducts[key];
|
|
28774
|
-
}
|
|
28775
|
-
for (var _key2 in this.currentFamilies) {
|
|
28776
|
-
price += this.singleProducts[_key2].price * this.currentFamilies[_key2];
|
|
28777
|
-
}
|
|
28778
|
-
return price;
|
|
28779
|
-
}
|
|
28780
|
-
}, {
|
|
28781
|
-
key: "getCurrentProducts",
|
|
28782
|
-
value: function getCurrentProducts() {
|
|
28783
|
-
var products = this.currentSingleProducts;
|
|
28784
|
-
for (var key in this.currentFamilies) {
|
|
28785
|
-
products[key] = this.currentFamilies[key];
|
|
28786
|
-
}
|
|
28787
|
-
return products;
|
|
28788
|
-
}
|
|
28789
|
-
}, {
|
|
28790
|
-
key: "getProductById",
|
|
28791
|
-
value: function getProductById(productId) {
|
|
28792
|
-
var product;
|
|
28793
|
-
product = this.singleProducts[productId];
|
|
28794
|
-
if (!product) this.familyProducts[productId];
|
|
28795
|
-
return product;
|
|
28796
|
-
}
|
|
28797
|
-
}, {
|
|
28798
|
-
key: "getBestMatch",
|
|
28799
|
-
value: function getBestMatch(articles) {
|
|
28800
|
-
var OPTION_CODEX = 'KOPFTEIL';
|
|
28801
|
-
if (!articles) return;
|
|
28802
|
-
for (var key in articles) {
|
|
28803
|
-
var _article$VariantValue;
|
|
28804
|
-
var article = articles[key];
|
|
28805
|
-
var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
|
|
28806
|
-
var products = this.singleProductsGrouped[article.catalogCodex + '_' + article.articleCodex];
|
|
28807
|
-
if (!products || !opv) continue;
|
|
28808
|
-
for (var pId in products) {
|
|
28809
|
-
var _products$pId$affilia;
|
|
28810
|
-
if ((_products$pId$affilia = products[pId].affiliate) !== null && _products$pId$affilia !== void 0 && _products$pId$affilia.length) if (products[pId].findOPVCodexInVariantValues(OPTION_CODEX, opv)) {
|
|
28811
|
-
return products[pId];
|
|
28812
|
-
}
|
|
28813
|
-
}
|
|
28814
|
-
}
|
|
28815
|
-
return undefined;
|
|
28816
|
-
}
|
|
28817
|
-
}]);
|
|
28818
|
-
}();
|
|
28819
|
-
var productHandlerInstance = new DivaProductHandler();
|
|
28820
|
-
|
|
28821
28263
|
var SummaryHandler = /*#__PURE__*/function () {
|
|
28822
28264
|
function SummaryHandler() {
|
|
28823
28265
|
_classCallCheck(this, SummaryHandler);
|
|
@@ -29155,30 +28597,16 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29155
28597
|
}, {
|
|
29156
28598
|
key: "getSummaryItems",
|
|
29157
28599
|
value: function () {
|
|
29158
|
-
var _getSummaryItems = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(sets, doConfigure
|
|
28600
|
+
var _getSummaryItems = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(sets, doConfigure) {
|
|
29159
28601
|
var ret, _key5, set, items, type;
|
|
29160
28602
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
29161
28603
|
while (1) switch (_context.prev = _context.next) {
|
|
29162
28604
|
case 0:
|
|
29163
28605
|
ret = [];
|
|
29164
|
-
if (!doAllowSetPlanner) {
|
|
29165
|
-
_context.next = 5;
|
|
29166
|
-
break;
|
|
29167
|
-
}
|
|
29168
|
-
ret = [{
|
|
29169
|
-
items: this.getArticlesForSummary(sets),
|
|
29170
|
-
type: 'SUMMARY_ARTICLES',
|
|
29171
|
-
name: 'ARTICLELIST',
|
|
29172
|
-
price: setHandlerInstance.getTotalPrice(sets),
|
|
29173
|
-
quantity: 1
|
|
29174
|
-
}];
|
|
29175
|
-
_context.next = 29;
|
|
29176
|
-
break;
|
|
29177
|
-
case 5:
|
|
29178
28606
|
_context.t0 = _regeneratorRuntime.keys(sets);
|
|
29179
|
-
case
|
|
28607
|
+
case 2:
|
|
29180
28608
|
if ((_context.t1 = _context.t0()).done) {
|
|
29181
|
-
_context.next =
|
|
28609
|
+
_context.next = 25;
|
|
29182
28610
|
break;
|
|
29183
28611
|
}
|
|
29184
28612
|
_key5 = _context.t1.value;
|
|
@@ -29186,9 +28614,9 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29186
28614
|
items = void 0;
|
|
29187
28615
|
type = this.getSummaryType(set);
|
|
29188
28616
|
_context.t2 = type;
|
|
29189
|
-
_context.next = _context.t2 === 'SUMMARY_PARTLIST' ?
|
|
28617
|
+
_context.next = _context.t2 === 'SUMMARY_PARTLIST' ? 10 : _context.t2 === 'SUMMARY_OPTIONTREE' ? 13 : _context.t2 === 'VARIANTS' ? 15 : _context.t2 === 'PARTLIST_AND_SPECIALOPTIONS' ? 21 : 23;
|
|
29190
28618
|
break;
|
|
29191
|
-
case
|
|
28619
|
+
case 10:
|
|
29192
28620
|
items = this.buildSummaryItemsOfPartlist(set);
|
|
29193
28621
|
ret.push({
|
|
29194
28622
|
items: items,
|
|
@@ -29197,33 +28625,33 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29197
28625
|
price: set.getSetPrice(),
|
|
29198
28626
|
quantity: 1
|
|
29199
28627
|
});
|
|
29200
|
-
return _context.abrupt("break",
|
|
29201
|
-
case
|
|
28628
|
+
return _context.abrupt("break", 23);
|
|
28629
|
+
case 13:
|
|
29202
28630
|
ret = ret.concat(this.getOptionTreeSummary(set));
|
|
29203
|
-
return _context.abrupt("break",
|
|
29204
|
-
case
|
|
28631
|
+
return _context.abrupt("break", 23);
|
|
28632
|
+
case 15:
|
|
29205
28633
|
_context.t3 = ret;
|
|
29206
|
-
_context.next =
|
|
28634
|
+
_context.next = 18;
|
|
29207
28635
|
return this.getVariantsSummary(doConfigure, set);
|
|
29208
|
-
case
|
|
28636
|
+
case 18:
|
|
29209
28637
|
_context.t4 = _context.sent;
|
|
29210
28638
|
_context.t3.push.call(_context.t3, _context.t4);
|
|
29211
|
-
return _context.abrupt("break",
|
|
29212
|
-
case
|
|
28639
|
+
return _context.abrupt("break", 23);
|
|
28640
|
+
case 21:
|
|
29213
28641
|
ret.push(this.buildSummaryItemsOfPartlistWithSpecialOptions(set));
|
|
29214
|
-
return _context.abrupt("break",
|
|
29215
|
-
case
|
|
29216
|
-
_context.next =
|
|
28642
|
+
return _context.abrupt("break", 23);
|
|
28643
|
+
case 23:
|
|
28644
|
+
_context.next = 2;
|
|
29217
28645
|
break;
|
|
29218
|
-
case
|
|
28646
|
+
case 25:
|
|
29219
28647
|
return _context.abrupt("return", ret);
|
|
29220
|
-
case
|
|
28648
|
+
case 26:
|
|
29221
28649
|
case "end":
|
|
29222
28650
|
return _context.stop();
|
|
29223
28651
|
}
|
|
29224
28652
|
}, _callee, this);
|
|
29225
28653
|
}));
|
|
29226
|
-
function getSummaryItems(_x, _x2
|
|
28654
|
+
function getSummaryItems(_x, _x2) {
|
|
29227
28655
|
return _getSummaryItems.apply(this, arguments);
|
|
29228
28656
|
}
|
|
29229
28657
|
return getSummaryItems;
|
|
@@ -29327,69 +28755,15 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29327
28755
|
}
|
|
29328
28756
|
return ret;
|
|
29329
28757
|
}
|
|
29330
|
-
}, {
|
|
29331
|
-
key: "getArticlesForSummary",
|
|
29332
|
-
value: function getArticlesForSummary(sets) {
|
|
29333
|
-
var ret = {};
|
|
29334
|
-
for (var setId in sets) {
|
|
29335
|
-
var set = sets[setId];
|
|
29336
|
-
var articles = set.getDivaArticles();
|
|
29337
|
-
for (var basketId in articles) {
|
|
29338
|
-
var article = articles[basketId];
|
|
29339
|
-
if (!article.curProduct) {
|
|
29340
|
-
var _key9 = article.catalogCodex + '_' + article.articleCodex + '_' + article.articleVariantDesc();
|
|
29341
|
-
if (ret[_key9]) {
|
|
29342
|
-
var _ret$_key9$targetArti;
|
|
29343
|
-
ret[_key9].quantity = ret[_key9].quantity + article.quantity;
|
|
29344
|
-
ret[_key9].targetBasketIds.push(article.basketId);
|
|
29345
|
-
(_ret$_key9$targetArti = ret[_key9].targetArticlePosNrs) === null || _ret$_key9$targetArti === void 0 || _ret$_key9$targetArti.push(article.posNr);
|
|
29346
|
-
} else {
|
|
29347
|
-
ret[_key9] = {
|
|
29348
|
-
setId: setId,
|
|
29349
|
-
title: article.name,
|
|
29350
|
-
title_locales: article.name_locales,
|
|
29351
|
-
description: article.actSizeText,
|
|
29352
|
-
isDefined: true,
|
|
29353
|
-
price: article.price,
|
|
29354
|
-
quantity: article.quantity,
|
|
29355
|
-
codex: article.articleCodex,
|
|
29356
|
-
targetBasketIds: [article.basketId],
|
|
29357
|
-
posNr: Object.keys(ret).length,
|
|
29358
|
-
image: article.imageUrl,
|
|
29359
|
-
targetArticlePosNrs: [article.posNr]
|
|
29360
|
-
};
|
|
29361
|
-
}
|
|
29362
|
-
}
|
|
29363
|
-
}
|
|
29364
|
-
}
|
|
29365
|
-
var curProducts = productHandlerInstance.getCurrentProducts();
|
|
29366
|
-
for (var _key10 in curProducts) {
|
|
29367
|
-
var product = productHandlerInstance.getProductById(_key10);
|
|
29368
|
-
ret[_key10] = {
|
|
29369
|
-
setId: 'PRODUCTS',
|
|
29370
|
-
title: product.shortDescription,
|
|
29371
|
-
description: '',
|
|
29372
|
-
isDefined: true,
|
|
29373
|
-
price: product.price,
|
|
29374
|
-
quantity: curProducts[_key10],
|
|
29375
|
-
codex: product.productId,
|
|
29376
|
-
targetBasketIds: [],
|
|
29377
|
-
posNr: Object.keys(ret).length,
|
|
29378
|
-
image: product.image,
|
|
29379
|
-
targetArticlePosNrs: []
|
|
29380
|
-
};
|
|
29381
|
-
}
|
|
29382
|
-
return ret;
|
|
29383
|
-
}
|
|
29384
28758
|
}, {
|
|
29385
28759
|
key: "getSummaryItemsOfAllSets",
|
|
29386
28760
|
value: function getSummaryItemsOfAllSets(sets, set) {
|
|
29387
28761
|
var summaryItemsOfAllSets = {};
|
|
29388
|
-
for (var
|
|
29389
|
-
var _set = sets[
|
|
28762
|
+
for (var _key9 in sets) {
|
|
28763
|
+
var _set = sets[_key9];
|
|
29390
28764
|
var articlePosNrs = this.getArticlesPosNr(_set.getDivaArticles(true));
|
|
29391
28765
|
var summaryItems = this.buildSummaryItems(articlePosNrs, _set);
|
|
29392
|
-
summaryItemsOfAllSets[
|
|
28766
|
+
summaryItemsOfAllSets[_key9] = {
|
|
29393
28767
|
setName: _set.CatalogData.catalogName,
|
|
29394
28768
|
setPrice: _set.getSetPrice(),
|
|
29395
28769
|
summaryItems: summaryItems
|
|
@@ -29403,10 +28777,10 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29403
28777
|
var groupedArticles = setHandlerInstance.getDockedGroupedArticles(set);
|
|
29404
28778
|
var retGroups = {};
|
|
29405
28779
|
var articlesCodexesOnIndex = {};
|
|
29406
|
-
for (var
|
|
29407
|
-
var basketId = groupedArticles[
|
|
28780
|
+
for (var _key10 in groupedArticles) {
|
|
28781
|
+
var basketId = groupedArticles[_key10][Object.keys(groupedArticles[_key10])[0]].basketId;
|
|
29408
28782
|
retGroups[basketId] = {
|
|
29409
|
-
articles: groupedArticles[
|
|
28783
|
+
articles: groupedArticles[_key10],
|
|
29410
28784
|
quantity: 1
|
|
29411
28785
|
};
|
|
29412
28786
|
}
|
|
@@ -29421,12 +28795,12 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29421
28795
|
articlesCodexesOnIndex[articleCodex].push(i);
|
|
29422
28796
|
}
|
|
29423
28797
|
}
|
|
29424
|
-
for (var
|
|
29425
|
-
if (articlesCodexesOnIndex[
|
|
28798
|
+
for (var _key11 in articlesCodexesOnIndex) {
|
|
28799
|
+
if (articlesCodexesOnIndex[_key11].length > 1) {
|
|
29426
28800
|
//group the single groups by the aricleCodex
|
|
29427
28801
|
var articles = [];
|
|
29428
|
-
for (var _i4 = 0; _i4 < articlesCodexesOnIndex[
|
|
29429
|
-
var _group = groupedArticles[articlesCodexesOnIndex[
|
|
28802
|
+
for (var _i4 = 0; _i4 < articlesCodexesOnIndex[_key11].length; _i4++) {
|
|
28803
|
+
var _group = groupedArticles[articlesCodexesOnIndex[_key11][_i4]];
|
|
29430
28804
|
articles.push({
|
|
29431
28805
|
article: _group[Object.keys(_group)[0]]
|
|
29432
28806
|
});
|
|
@@ -29482,12 +28856,12 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29482
28856
|
}
|
|
29483
28857
|
|
|
29484
28858
|
//old logic TODO: Delete in 2024
|
|
29485
|
-
if (Object.keys(tabGroups).length === 0) for (var
|
|
29486
|
-
var _ops = article.articleOptionStates[
|
|
28859
|
+
if (Object.keys(tabGroups).length === 0) for (var _key12 in article.articleOptionStates) {
|
|
28860
|
+
var _ops = article.articleOptionStates[_key12];
|
|
29487
28861
|
if (!_ops.isInvisible && (_ops.selectionmode != 0 || (_ops.visibleCount > 1 || _ops.isFreeText) && article.set.api.showSelectionModeZero()) && _ops.isDoShow && _ops.valCodex != 'OPVNR') {
|
|
29488
28862
|
var tabGroup = _ops.option.addOptionToTabgroupInPartlistSummary;
|
|
29489
28863
|
if (tabGroup) tabGroups.push({
|
|
29490
|
-
optionCodex:
|
|
28864
|
+
optionCodex: _key12,
|
|
29491
28865
|
tabGroup: tabGroup
|
|
29492
28866
|
});
|
|
29493
28867
|
}
|
|
@@ -29522,8 +28896,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29522
28896
|
}
|
|
29523
28897
|
|
|
29524
28898
|
//old logic TODO: Delete in 2024
|
|
29525
|
-
for (var
|
|
29526
|
-
var _optionState = article.articleOptionStates[
|
|
28899
|
+
for (var _key13 in article.articleOptionStates) {
|
|
28900
|
+
var _optionState = article.articleOptionStates[_key13];
|
|
29527
28901
|
if (_optionState.option.addOptionToTabgroupInPartlistSummary == tabGroup && !_optionState.isInvisible && _optionState.isDoShow && _optionState.visibleCount > 0 && _optionState.valCodex != 'OPVNR') {
|
|
29528
28902
|
opss.push(_optionState);
|
|
29529
28903
|
}
|
|
@@ -29687,7 +29061,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29687
29061
|
}
|
|
29688
29062
|
}, _callee3);
|
|
29689
29063
|
}));
|
|
29690
|
-
function getVariantsSummary(
|
|
29064
|
+
function getVariantsSummary(_x3, _x4) {
|
|
29691
29065
|
return _getVariantsSummary.apply(this, arguments);
|
|
29692
29066
|
}
|
|
29693
29067
|
return getVariantsSummary;
|
|
@@ -29715,8 +29089,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29715
29089
|
key: "getArticlesPrice",
|
|
29716
29090
|
value: function getArticlesPrice(articles) {
|
|
29717
29091
|
var price = 0;
|
|
29718
|
-
for (var
|
|
29719
|
-
price = price + articles[
|
|
29092
|
+
for (var _key14 in articles) {
|
|
29093
|
+
price = price + articles[_key14].price * articles[_key14].quantity;
|
|
29720
29094
|
}
|
|
29721
29095
|
return price;
|
|
29722
29096
|
}
|
|
@@ -29736,10 +29110,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29736
29110
|
return _createClass(DivaFavoritesHandler, [{
|
|
29737
29111
|
key: "initSet",
|
|
29738
29112
|
value: function initSet(set, orderSet) {
|
|
29739
|
-
var _orderSet$
|
|
29113
|
+
var _orderSet$TinyVariant;
|
|
29740
29114
|
set.favorites = orderSet !== null && orderSet !== void 0 && orderSet.Favorites ? orderSet.Favorites : new Favorites();
|
|
29741
|
-
if ((_orderSet$
|
|
29742
|
-
|
|
29115
|
+
if ((_orderSet$TinyVariant = orderSet.TinyVariantConfiguration) !== null && _orderSet$TinyVariant !== void 0 && _orderSet$TinyVariant.length) {
|
|
29116
|
+
var _orderSet$TinyVariant2;
|
|
29117
|
+
set.oldConfigVariants = _toConsumableArray((_orderSet$TinyVariant2 = orderSet.TinyVariantConfiguration) !== null && _orderSet$TinyVariant2 !== void 0 ? _orderSet$TinyVariant2 : []);
|
|
29743
29118
|
}
|
|
29744
29119
|
set.disabledVariants = [];
|
|
29745
29120
|
}
|
|
@@ -29959,8 +29334,9 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29959
29334
|
if (!((_set$oldConfigVariant = set.oldConfigVariants) !== null && _set$oldConfigVariant !== void 0 && _set$oldConfigVariant.length)) return 0;
|
|
29960
29335
|
var highestId = 0;
|
|
29961
29336
|
for (var i = 0; i < set.oldConfigVariants.length; i++) {
|
|
29962
|
-
|
|
29963
|
-
|
|
29337
|
+
var variant = set.oldConfigVariants[i];
|
|
29338
|
+
if (variant.VariantID && highestId < variant.VariantID) {
|
|
29339
|
+
highestId = variant.VariantID;
|
|
29964
29340
|
}
|
|
29965
29341
|
}
|
|
29966
29342
|
return highestId + 1;
|
|
@@ -29973,15 +29349,17 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29973
29349
|
for (var i = 0; i < set.oldConfigVariants.length; i++) {
|
|
29974
29350
|
var oldConfigVariant = set.oldConfigVariants[i];
|
|
29975
29351
|
var tryNext = false;
|
|
29976
|
-
|
|
29352
|
+
var _loop2 = function _loop2(basketId) {
|
|
29977
29353
|
var articleNew = variant.targetArticles[basketId];
|
|
29978
|
-
var articleOld = oldConfigVariant.
|
|
29354
|
+
var articleOld = oldConfigVariant.OrderSets[0].OrderLines.find(function (ol) {
|
|
29355
|
+
return ol.BasketID == basketId;
|
|
29356
|
+
});
|
|
29979
29357
|
if (!articleOld) {
|
|
29980
29358
|
tryNext = true;
|
|
29981
|
-
continue
|
|
29359
|
+
return 1; // continue
|
|
29982
29360
|
}
|
|
29983
|
-
var
|
|
29984
|
-
var option = articleOld.
|
|
29361
|
+
var _loop3 = function _loop3(opt) {
|
|
29362
|
+
var option = articleOld.VariantBasketDatas.find(function (v) {
|
|
29985
29363
|
return 'OPT' + v.OPT == opt;
|
|
29986
29364
|
});
|
|
29987
29365
|
if (!option) {
|
|
@@ -29995,9 +29373,12 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29995
29373
|
},
|
|
29996
29374
|
_ret;
|
|
29997
29375
|
for (var opt in articleNew) {
|
|
29998
|
-
_ret =
|
|
29376
|
+
_ret = _loop3(opt);
|
|
29999
29377
|
if (_ret === 0) continue;
|
|
30000
29378
|
}
|
|
29379
|
+
};
|
|
29380
|
+
for (var basketId in variant.targetArticles) {
|
|
29381
|
+
if (_loop2(basketId)) continue;
|
|
30001
29382
|
}
|
|
30002
29383
|
if (tryNext) continue;
|
|
30003
29384
|
return oldConfigVariant.VariantID;
|
|
@@ -30042,7 +29423,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30042
29423
|
var optionValue = set.CatalogData.getOptionValue(opvs[i]);
|
|
30043
29424
|
var optionValueName = optionValue === null || optionValue === void 0 ? void 0 : optionValue.name;
|
|
30044
29425
|
var optionValueImage = optionValue === null || optionValue === void 0 ? void 0 : optionValue.image;
|
|
30045
|
-
favorit = new
|
|
29426
|
+
favorit = new Favorite(opt, opvs[i], targetArticles, optionName, optionValueName, optionValueImage);
|
|
30046
29427
|
this.setFavorites(set, opt, opvs[i], favorit, remove);
|
|
30047
29428
|
}
|
|
30048
29429
|
set.disabledVariants = [];
|
|
@@ -30438,14 +29819,28 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30438
29819
|
var optionsMatching = {};
|
|
30439
29820
|
for (var basketId in variant.targetArticles) {
|
|
30440
29821
|
var articleVariantValues = variant.targetArticles[basketId];
|
|
29822
|
+
var _loop4 = function _loop4(opt) {
|
|
29823
|
+
var _articleWithOption$Va;
|
|
29824
|
+
if (optionsMatching[opt]) return 0; // continue
|
|
29825
|
+
var articleWithOption = oldConfig.OrderSets[0].OrderLines.find(function (ol) {
|
|
29826
|
+
return ol.VariantBasketDatas.find(function (v) {
|
|
29827
|
+
return 'OPT' + v.OPT === opt;
|
|
29828
|
+
});
|
|
29829
|
+
});
|
|
29830
|
+
if ('OPV' + (articleWithOption === null || articleWithOption === void 0 || (_articleWithOption$Va = articleWithOption.VariantBasketDatas.find(function (v) {
|
|
29831
|
+
return 'OPT' + v.OPT === opt;
|
|
29832
|
+
})) === null || _articleWithOption$Va === void 0 ? void 0 : _articleWithOption$Va.OPV) == articleVariantValues[opt]) {
|
|
29833
|
+
optionsMatching[opt] = true;
|
|
29834
|
+
} else {
|
|
29835
|
+
tryNext = true;
|
|
29836
|
+
return 1; // break
|
|
29837
|
+
}
|
|
29838
|
+
},
|
|
29839
|
+
_ret2;
|
|
30441
29840
|
for (var opt in articleVariantValues) {
|
|
30442
|
-
|
|
30443
|
-
if (
|
|
30444
|
-
|
|
30445
|
-
} else {
|
|
30446
|
-
tryNext = true;
|
|
30447
|
-
break;
|
|
30448
|
-
}
|
|
29841
|
+
_ret2 = _loop4(opt);
|
|
29842
|
+
if (_ret2 === 0) continue;
|
|
29843
|
+
if (_ret2 === 1) break;
|
|
30449
29844
|
}
|
|
30450
29845
|
if (tryNext) break;
|
|
30451
29846
|
}
|
|
@@ -31277,6 +30672,53 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31277
30672
|
}();
|
|
31278
30673
|
var configTreeHandler = new DivaConfigTreeHandler();
|
|
31279
30674
|
|
|
30675
|
+
//Diese Klasse verwaltet Productlogiken
|
|
30676
|
+
var DivaProductHandler = /*#__PURE__*/function () {
|
|
30677
|
+
function DivaProductHandler() {
|
|
30678
|
+
_classCallCheck(this, DivaProductHandler);
|
|
30679
|
+
}
|
|
30680
|
+
return _createClass(DivaProductHandler, [{
|
|
30681
|
+
key: "getPrice",
|
|
30682
|
+
value: function getPrice() {
|
|
30683
|
+
var price = 0;
|
|
30684
|
+
return price;
|
|
30685
|
+
}
|
|
30686
|
+
}, {
|
|
30687
|
+
key: "updateProducts",
|
|
30688
|
+
value: function () {
|
|
30689
|
+
var _updateProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(sets, api, from) {
|
|
30690
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30691
|
+
while (1) switch (_context.prev = _context.next) {
|
|
30692
|
+
case 0:
|
|
30693
|
+
({
|
|
30694
|
+
catalogs: sets.map(function (set) {
|
|
30695
|
+
return {
|
|
30696
|
+
articles: Object.values(set.getDivaArticles()).map(function (article) {
|
|
30697
|
+
return {
|
|
30698
|
+
codex: article.articleCodex,
|
|
30699
|
+
hash: article.articleProductHash
|
|
30700
|
+
};
|
|
30701
|
+
}),
|
|
30702
|
+
catalogGuid: set.CatalogData.catalogGuid
|
|
30703
|
+
};
|
|
30704
|
+
})
|
|
30705
|
+
});
|
|
30706
|
+
return _context.abrupt("return");
|
|
30707
|
+
case 2:
|
|
30708
|
+
case "end":
|
|
30709
|
+
return _context.stop();
|
|
30710
|
+
}
|
|
30711
|
+
}, _callee);
|
|
30712
|
+
}));
|
|
30713
|
+
function updateProducts(_x, _x2, _x3) {
|
|
30714
|
+
return _updateProducts.apply(this, arguments);
|
|
30715
|
+
}
|
|
30716
|
+
return updateProducts;
|
|
30717
|
+
}()
|
|
30718
|
+
}]);
|
|
30719
|
+
}();
|
|
30720
|
+
var productHandlerInstance = new DivaProductHandler();
|
|
30721
|
+
|
|
31280
30722
|
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31281
30723
|
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31282
30724
|
var LOG$8 = DivaUtils.initLog('Planner', 'DIVA-SET-HANDLER');
|
|
@@ -31325,11 +30767,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31325
30767
|
_context.next = 12;
|
|
31326
30768
|
return set.plannerHandler.initSet(set, catalogData, undefined);
|
|
31327
30769
|
case 12:
|
|
31328
|
-
_context.next = 14;
|
|
31329
|
-
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
31330
|
-
case 14:
|
|
31331
30770
|
return _context.abrupt("return", set);
|
|
31332
|
-
case
|
|
30771
|
+
case 13:
|
|
31333
30772
|
case "end":
|
|
31334
30773
|
return _context.stop();
|
|
31335
30774
|
}
|
|
@@ -31386,7 +30825,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31386
30825
|
PosNr: orderline.PosNr,
|
|
31387
30826
|
VariantValues: variantValues,
|
|
31388
30827
|
VariantItemData: orderline.VariantBasketDatas,
|
|
31389
|
-
|
|
30828
|
+
ShelfPlandata: orderline.ShelfPlandata,
|
|
31390
30829
|
elementId: (_orderline$ElementID = orderline.ElementID) !== null && _orderline$ElementID !== void 0 ? _orderline$ElementID : elements === null || elements === void 0 || (_elements$find = elements.find(function (element) {
|
|
31391
30830
|
return element.basketID == orderline.BasketID;
|
|
31392
30831
|
})) === null || _elements$find === void 0 ? void 0 : _elements$find.elementID
|
|
@@ -32113,19 +31552,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32113
31552
|
_context13.next = 16;
|
|
32114
31553
|
return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
|
|
32115
31554
|
case 16:
|
|
32116
|
-
if (!(from === 'initializing')) {
|
|
32117
|
-
_context13.next = 19;
|
|
32118
|
-
break;
|
|
32119
|
-
}
|
|
32120
|
-
_context13.next = 19;
|
|
32121
|
-
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
32122
|
-
case 19:
|
|
32123
31555
|
LOG$8.successTransaction('ON_PLAN_ARTICLE', {
|
|
32124
31556
|
art: articleCodex,
|
|
32125
31557
|
artName: newArticle.name
|
|
32126
31558
|
});
|
|
32127
31559
|
return _context13.abrupt("return", newArticle);
|
|
32128
|
-
case
|
|
31560
|
+
case 18:
|
|
32129
31561
|
case "end":
|
|
32130
31562
|
return _context13.stop();
|
|
32131
31563
|
}
|
|
@@ -32258,7 +31690,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32258
31690
|
key: "deleteElementFromSet",
|
|
32259
31691
|
value: function () {
|
|
32260
31692
|
var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload) {
|
|
32261
|
-
var _deletedArticle$doorP, _set$CatalogData
|
|
31693
|
+
var _deletedArticle$doorP, _set$CatalogData;
|
|
32262
31694
|
var setId, deletedArticle, articles, key, newSelectedElement, oldTransform, result, _set$getArticleByBask3, elementDeleted;
|
|
32263
31695
|
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
32264
31696
|
while (1) switch (_context16.prev = _context16.next) {
|
|
@@ -32318,20 +31750,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32318
31750
|
_context16.next = 27;
|
|
32319
31751
|
return this.updateArticlesOptionStatesOfActSet(set, {}, []);
|
|
32320
31752
|
case 27:
|
|
32321
|
-
if (dontReload) {
|
|
32322
|
-
_context16.next = 30;
|
|
32323
|
-
break;
|
|
32324
|
-
}
|
|
32325
|
-
_context16.next = 30;
|
|
32326
|
-
return productHandlerInstance.updateProducts(set, 'onDelete', deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$curPr = deletedArticle.curProduct) === null || _deletedArticle$curPr === void 0 ? void 0 : _deletedArticle$curPr.productId);
|
|
32327
|
-
case 30:
|
|
32328
31753
|
return _context16.abrupt("return", {
|
|
32329
31754
|
success: elementDeleted,
|
|
32330
31755
|
selectElementId: newSelectedElement,
|
|
32331
31756
|
setId: setId,
|
|
32332
31757
|
oldTransform: oldTransform
|
|
32333
31758
|
});
|
|
32334
|
-
case
|
|
31759
|
+
case 28:
|
|
32335
31760
|
case "end":
|
|
32336
31761
|
return _context16.stop();
|
|
32337
31762
|
}
|
|
@@ -33113,8 +32538,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33113
32538
|
key: "variantsEvaluator",
|
|
33114
32539
|
value: (function () {
|
|
33115
32540
|
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
33116
|
-
var _set$
|
|
33117
|
-
var opt,
|
|
32541
|
+
var _set$ViewConfig, _configItems$;
|
|
32542
|
+
var opt, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
33118
32543
|
return _regeneratorRuntime.wrap(function _callee23$(_context25) {
|
|
33119
32544
|
while (1) switch (_context25.prev = _context25.next) {
|
|
33120
32545
|
case 0:
|
|
@@ -33125,7 +32550,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33125
32550
|
}
|
|
33126
32551
|
return _context25.abrupt("return", configItems);
|
|
33127
32552
|
case 3:
|
|
33128
|
-
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
|
|
33129
32553
|
calcVariantsForPricePreview = false;
|
|
33130
32554
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
33131
32555
|
if (previewType) {
|
|
@@ -33135,27 +32559,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33135
32559
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
33136
32560
|
calcVariantsForPricePreview = false;
|
|
33137
32561
|
}
|
|
33138
|
-
if (!
|
|
33139
|
-
_context25.next =
|
|
32562
|
+
if (!calcVariantsForPricePreview) {
|
|
32563
|
+
_context25.next = 17;
|
|
33140
32564
|
break;
|
|
33141
32565
|
}
|
|
33142
32566
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
33143
32567
|
startTime = new Date();
|
|
33144
|
-
_context25.next =
|
|
32568
|
+
_context25.next = 13;
|
|
33145
32569
|
return this.calcVariants(set, configItems, targetArticles);
|
|
33146
|
-
case
|
|
32570
|
+
case 13:
|
|
33147
32571
|
variants = _context25.sent;
|
|
33148
32572
|
endTime = new Date();
|
|
33149
32573
|
if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
|
|
33150
32574
|
if (previewType) {
|
|
33151
32575
|
this.calcPricePreview(set, configItems, variants);
|
|
33152
32576
|
}
|
|
33153
|
-
|
|
33154
|
-
configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
|
|
33155
|
-
}
|
|
33156
|
-
case 19:
|
|
32577
|
+
case 17:
|
|
33157
32578
|
return _context25.abrupt("return", configItems);
|
|
33158
|
-
case
|
|
32579
|
+
case 18:
|
|
33159
32580
|
case "end":
|
|
33160
32581
|
return _context25.stop();
|
|
33161
32582
|
}
|
|
@@ -33329,29 +32750,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33329
32750
|
_context27.next = 19;
|
|
33330
32751
|
return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
|
|
33331
32752
|
case 19:
|
|
33332
|
-
if (!(from == 'FromViewClick')) {
|
|
33333
|
-
_context27.next = 22;
|
|
33334
|
-
break;
|
|
33335
|
-
}
|
|
33336
|
-
_context27.next = 22;
|
|
33337
|
-
return productHandlerInstance.updateProducts(set, 'onConfig');
|
|
33338
|
-
case 22:
|
|
33339
32753
|
if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
|
|
33340
32754
|
|
|
33341
32755
|
//Update Planner - check if planner data changed
|
|
33342
32756
|
if (!(!ignorePlanner && from != 'calcVariant')) {
|
|
33343
|
-
_context27.next =
|
|
32757
|
+
_context27.next = 48;
|
|
33344
32758
|
break;
|
|
33345
32759
|
}
|
|
33346
32760
|
targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
|
|
33347
|
-
_context27.next =
|
|
32761
|
+
_context27.next = 24;
|
|
33348
32762
|
return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
|
|
33349
|
-
case
|
|
32763
|
+
case 24:
|
|
33350
32764
|
resultPlannerUpdate = _context27.sent;
|
|
33351
32765
|
i = 0;
|
|
33352
|
-
case
|
|
32766
|
+
case 26:
|
|
33353
32767
|
if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
|
|
33354
|
-
_context27.next =
|
|
32768
|
+
_context27.next = 35;
|
|
33355
32769
|
break;
|
|
33356
32770
|
}
|
|
33357
32771
|
articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
|
|
@@ -33359,43 +32773,43 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33359
32773
|
if (index > -1) {
|
|
33360
32774
|
targetArticlesWithNewValues.splice(index, 1);
|
|
33361
32775
|
}
|
|
33362
|
-
_context27.next =
|
|
32776
|
+
_context27.next = 32;
|
|
33363
32777
|
return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
|
|
33364
|
-
case
|
|
32778
|
+
case 32:
|
|
33365
32779
|
i++;
|
|
33366
|
-
_context27.next =
|
|
32780
|
+
_context27.next = 26;
|
|
33367
32781
|
break;
|
|
33368
|
-
case
|
|
32782
|
+
case 35:
|
|
33369
32783
|
if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
|
|
33370
|
-
_context27.next =
|
|
32784
|
+
_context27.next = 48;
|
|
33371
32785
|
break;
|
|
33372
32786
|
}
|
|
33373
32787
|
//Todo copy these elements
|
|
33374
32788
|
articleCopyRelation = new Map();
|
|
33375
32789
|
i = 0;
|
|
33376
|
-
case
|
|
32790
|
+
case 38:
|
|
33377
32791
|
if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
|
|
33378
|
-
_context27.next =
|
|
32792
|
+
_context27.next = 46;
|
|
33379
32793
|
break;
|
|
33380
32794
|
}
|
|
33381
|
-
_context27.next =
|
|
32795
|
+
_context27.next = 41;
|
|
33382
32796
|
return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
|
|
33383
|
-
case
|
|
32797
|
+
case 41:
|
|
33384
32798
|
newArticle = _context27.sent;
|
|
33385
32799
|
articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
|
|
33386
|
-
case
|
|
32800
|
+
case 43:
|
|
33387
32801
|
i++;
|
|
33388
|
-
_context27.next =
|
|
32802
|
+
_context27.next = 38;
|
|
33389
32803
|
break;
|
|
33390
|
-
case
|
|
33391
|
-
_context27.next =
|
|
32804
|
+
case 46:
|
|
32805
|
+
_context27.next = 48;
|
|
33392
32806
|
return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
|
|
33393
32807
|
dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
|
|
33394
32808
|
copyType: resultPlannerUpdate.copyType,
|
|
33395
32809
|
changedOPT: resultPlannerUpdate.changedOPT,
|
|
33396
32810
|
targetElements: resultPlannerUpdate.targetElements
|
|
33397
32811
|
});
|
|
33398
|
-
case
|
|
32812
|
+
case 48:
|
|
33399
32813
|
this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
|
|
33400
32814
|
if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
|
|
33401
32815
|
this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]], 'onSelectConfig');
|
|
@@ -33405,7 +32819,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33405
32819
|
elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
|
|
33406
32820
|
setId: set.getSetId()
|
|
33407
32821
|
});
|
|
33408
|
-
case
|
|
32822
|
+
case 51:
|
|
33409
32823
|
case "end":
|
|
33410
32824
|
return _context27.stop();
|
|
33411
32825
|
}
|
|
@@ -33551,7 +32965,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33551
32965
|
articleHandlerInstance.defineAllOptionsOfArticles(articles);
|
|
33552
32966
|
} else if (key === set.getSetId()) {
|
|
33553
32967
|
for (var _key in basketIdsOnOptions) {
|
|
33554
|
-
articlesAndOptions[_key] = {
|
|
32968
|
+
if (articles[_key]) articlesAndOptions[_key] = {
|
|
33555
32969
|
article: articles[_key],
|
|
33556
32970
|
options: basketIdsOnOptions[_key]
|
|
33557
32971
|
};
|
|
@@ -33702,7 +33116,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33702
33116
|
value: function getTotalPrice(sets) {
|
|
33703
33117
|
var _this$actSet;
|
|
33704
33118
|
var price = 0;
|
|
33705
|
-
if ((_this$actSet = this.actSet(sets)) !== null && _this$actSet !== void 0 && (_this$actSet = _this$actSet.WebConfig) !== null && _this$actSet !== void 0 && _this$actSet.
|
|
33119
|
+
if ((_this$actSet = this.actSet(sets)) !== null && _this$actSet !== void 0 && (_this$actSet = _this$actSet.WebConfig) !== null && _this$actSet !== void 0 && _this$actSet.checkForProductsPrice && productHandlerInstance.getPrice()) {
|
|
33706
33120
|
return productHandlerInstance.getPrice();
|
|
33707
33121
|
}
|
|
33708
33122
|
for (var key in sets) {
|
|
@@ -33716,7 +33130,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33716
33130
|
var _this$actSet2;
|
|
33717
33131
|
var price = 0;
|
|
33718
33132
|
var bruttoActive = false;
|
|
33719
|
-
if ((_this$actSet2 = this.actSet(sets)) !== null && _this$actSet2 !== void 0 && (_this$actSet2 = _this$actSet2.WebConfig) !== null && _this$actSet2 !== void 0 && _this$actSet2.
|
|
33133
|
+
if ((_this$actSet2 = this.actSet(sets)) !== null && _this$actSet2 !== void 0 && (_this$actSet2 = _this$actSet2.WebConfig) !== null && _this$actSet2 !== void 0 && _this$actSet2.checkForProductsPrice && productHandlerInstance.getPrice()) {
|
|
33720
33134
|
return productHandlerInstance.getPrice();
|
|
33721
33135
|
}
|
|
33722
33136
|
for (var key in sets) {
|
|
@@ -33743,7 +33157,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33743
33157
|
key: "fillOrderLinesAndOrderSets",
|
|
33744
33158
|
value: function () {
|
|
33745
33159
|
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
|
|
33746
|
-
var _set$
|
|
33160
|
+
var _set$WebConfig;
|
|
33747
33161
|
var orderSets, basketData, set, setPosNr, price, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, orderLineInitInfos, newOrderSet, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
|
|
33748
33162
|
return _regeneratorRuntime.wrap(function _callee28$(_context30) {
|
|
33749
33163
|
while (1) switch (_context30.prev = _context30.next) {
|
|
@@ -33753,7 +33167,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33753
33167
|
set = this.actSet(sets); //ACHTUNG: Wenn man das nicht zuerst löscht, gibt es beim wiederholten basket Speichern doppelte Einträge
|
|
33754
33168
|
basketData.setSAPOrderLines([]);
|
|
33755
33169
|
setPosNr = 0;
|
|
33756
|
-
if (set !== null && set !== void 0 && (_set$
|
|
33170
|
+
if (set !== null && set !== void 0 && (_set$WebConfig = set.WebConfig) !== null && _set$WebConfig !== void 0 && _set$WebConfig.checkForProductsPrice) {
|
|
33757
33171
|
price = set.priceForActHash();
|
|
33758
33172
|
if (!price) {
|
|
33759
33173
|
basketData.OrigProductId = undefined;
|
|
@@ -33790,7 +33204,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33790
33204
|
if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
|
|
33791
33205
|
newOrderSet.SetImage = OrderLinesOfActSet[0].Image.replace('_low', '');
|
|
33792
33206
|
}
|
|
33793
|
-
ret = divaBasketHandler.divaWWSHandler.getWWSData(basketData, _set, newOrderSet, OrderLinesOfActSet
|
|
33207
|
+
ret = divaBasketHandler.divaWWSHandler.getWWSData(basketData, _set, newOrderSet, OrderLinesOfActSet);
|
|
33794
33208
|
for (_key2 in ret) {
|
|
33795
33209
|
if (_key2 == 'orderlines') {
|
|
33796
33210
|
OrderLinesOfActSet = ret[_key2];
|
|
@@ -33894,8 +33308,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33894
33308
|
});
|
|
33895
33309
|
if (origOrderSet) {
|
|
33896
33310
|
origOrderSet.CatalogName = actOrderSet.CatalogName;
|
|
33311
|
+
origOrderSet.AccountName = actOrderSet.AccountName;
|
|
33312
|
+
origOrderSet.AccountLogo = actOrderSet.AccountLogo;
|
|
33897
33313
|
origOrderSet.CatalogOfflineVersion = actOrderSet.CatalogOfflineVersion;
|
|
33898
33314
|
origOrderSet.CatalogGUID = actOrderSet.CatalogGUID;
|
|
33315
|
+
origOrderSet.CollectionGUID = actOrderSet.CollectionGUID;
|
|
33899
33316
|
origOrderSet.OrderLines = actOrderSet.OrderLines;
|
|
33900
33317
|
origOrderSet.OrderSetDesc = actOrderSet.OrderSetDesc;
|
|
33901
33318
|
origOrderSet.OrigZKATNr = actOrderSet.OrigZKATNr;
|
|
@@ -33908,11 +33325,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33908
33325
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
33909
33326
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
33910
33327
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
33328
|
+
var _origOrderSet$ConfigV;
|
|
33329
|
+
var configVariant = (_origOrderSet$ConfigV = origOrderSet.ConfigVariants) === null || _origOrderSet$ConfigV === void 0 ? void 0 : _origOrderSet$ConfigV[index];
|
|
33330
|
+
if (!configVariant) return variant;
|
|
33911
33331
|
return _objectSpread$8(_objectSpread$8({}, variant), {}, {
|
|
33912
|
-
SetImage:
|
|
33913
|
-
HQRenderScript:
|
|
33914
|
-
Set2DImage:
|
|
33915
|
-
Diva3DProject:
|
|
33332
|
+
SetImage: configVariant.SetImage,
|
|
33333
|
+
HQRenderScript: configVariant.HQRenderScript,
|
|
33334
|
+
Set2DImage: configVariant.Set2DImage,
|
|
33335
|
+
Diva3DProject: configVariant.Diva3DProject
|
|
33916
33336
|
});
|
|
33917
33337
|
});
|
|
33918
33338
|
}
|
|
@@ -33921,7 +33341,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33921
33341
|
_loop7();
|
|
33922
33342
|
}
|
|
33923
33343
|
}
|
|
33924
|
-
|
|
33925
33344
|
/**************************SpeicherRoutinen*************************************/
|
|
33926
33345
|
}, {
|
|
33927
33346
|
key: "isNoArticleToSave",
|
|
@@ -34005,7 +33424,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34005
33424
|
CatalogOfflineFilesLastUpdate: catalogData.offlineFilesLastUpdate,
|
|
34006
33425
|
Description: catalogData.description,
|
|
34007
33426
|
GroupType: GroupType,
|
|
34008
|
-
MainPosNr: posNr,
|
|
34009
33427
|
OfflineData: catalogData.offlineData,
|
|
34010
33428
|
SetArticleNr: set.SetArticleNr ? set.SetArticleNr : catalogData.retailArticleNr,
|
|
34011
33429
|
SetArticleNrPrefix: set.SetArticleNrPrefix,
|
|
@@ -34254,31 +33672,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34254
33672
|
Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.X + ' cm' : '')
|
|
34255
33673
|
});
|
|
34256
33674
|
}
|
|
34257
|
-
}, {
|
|
34258
|
-
key: "loadProductsOfSets",
|
|
34259
|
-
value: function () {
|
|
34260
|
-
var _loadProductsOfSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(orderSets, involvedSetIds) {
|
|
34261
|
-
return _regeneratorRuntime.wrap(function _callee34$(_context36) {
|
|
34262
|
-
while (1) switch (_context36.prev = _context36.next) {
|
|
34263
|
-
case 0:
|
|
34264
|
-
_context36.next = 2;
|
|
34265
|
-
return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
|
|
34266
|
-
case 2:
|
|
34267
|
-
case "end":
|
|
34268
|
-
return _context36.stop();
|
|
34269
|
-
}
|
|
34270
|
-
}, _callee34);
|
|
34271
|
-
}));
|
|
34272
|
-
function loadProductsOfSets(_x113, _x114) {
|
|
34273
|
-
return _loadProductsOfSets.apply(this, arguments);
|
|
34274
|
-
}
|
|
34275
|
-
return loadProductsOfSets;
|
|
34276
|
-
}()
|
|
34277
|
-
}, {
|
|
34278
|
-
key: "addProducts",
|
|
34279
|
-
value: function addProducts(variants, families) {
|
|
34280
|
-
productHandlerInstance.addProducts(variants, families);
|
|
34281
|
-
}
|
|
34282
33675
|
}, {
|
|
34283
33676
|
key: "getAllProducts",
|
|
34284
33677
|
value: function getAllProducts(sets) {
|
|
@@ -34306,28 +33699,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34306
33699
|
}, {
|
|
34307
33700
|
key: "addOrderSetArticlesToExistingSet",
|
|
34308
33701
|
value: function () {
|
|
34309
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34310
|
-
return _regeneratorRuntime.wrap(function
|
|
34311
|
-
while (1) switch (
|
|
33702
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set, orderSet, lastSetToInitialize) {
|
|
33703
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context36) {
|
|
33704
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
34312
33705
|
case 0:
|
|
34313
33706
|
//TODO: GLOBAL STUFF
|
|
34314
33707
|
//this.updateActSet(set);
|
|
34315
33708
|
orderSet.changeBasketIds();
|
|
34316
|
-
|
|
33709
|
+
_context36.next = 3;
|
|
34317
33710
|
return this.initOrderLineArticles(set, orderSet);
|
|
34318
33711
|
case 3:
|
|
34319
|
-
|
|
33712
|
+
_context36.next = 5;
|
|
34320
33713
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
34321
33714
|
case 5:
|
|
34322
|
-
_context37.next = 7;
|
|
34323
|
-
return productHandlerInstance.updateProducts(set, 'onAdd');
|
|
34324
|
-
case 7:
|
|
34325
33715
|
case "end":
|
|
34326
|
-
return
|
|
33716
|
+
return _context36.stop();
|
|
34327
33717
|
}
|
|
34328
|
-
},
|
|
33718
|
+
}, _callee34, this);
|
|
34329
33719
|
}));
|
|
34330
|
-
function addOrderSetArticlesToExistingSet(
|
|
33720
|
+
function addOrderSetArticlesToExistingSet(_x113, _x114, _x115) {
|
|
34331
33721
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
34332
33722
|
}
|
|
34333
33723
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -34652,21 +34042,29 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34652
34042
|
}, {
|
|
34653
34043
|
key: "initProductId",
|
|
34654
34044
|
value: function () {
|
|
34655
|
-
var _initProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(api, productId
|
|
34045
|
+
var _initProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(api, productId) {
|
|
34046
|
+
var result;
|
|
34656
34047
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
34657
34048
|
while (1) switch (_context2.prev = _context2.next) {
|
|
34658
34049
|
case 0:
|
|
34659
34050
|
_context2.next = 2;
|
|
34660
|
-
return this.
|
|
34051
|
+
return this.getProduct(api, productId);
|
|
34661
34052
|
case 2:
|
|
34053
|
+
result = _context2.sent;
|
|
34054
|
+
this.assignNewDivaNr = true;
|
|
34055
|
+
_context2.next = 6;
|
|
34056
|
+
return this.initBasket(api, result.divaNr, {
|
|
34057
|
+
basket: result.configuration
|
|
34058
|
+
}, false);
|
|
34059
|
+
case 6:
|
|
34662
34060
|
return _context2.abrupt("return", _context2.sent);
|
|
34663
|
-
case
|
|
34061
|
+
case 7:
|
|
34664
34062
|
case "end":
|
|
34665
34063
|
return _context2.stop();
|
|
34666
34064
|
}
|
|
34667
34065
|
}, _callee2, this);
|
|
34668
34066
|
}));
|
|
34669
|
-
function initProductId(_x2, _x3
|
|
34067
|
+
function initProductId(_x2, _x3) {
|
|
34670
34068
|
return _initProductId.apply(this, arguments);
|
|
34671
34069
|
}
|
|
34672
34070
|
return initProductId;
|
|
@@ -34712,7 +34110,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34712
34110
|
}
|
|
34713
34111
|
}, _callee3, this);
|
|
34714
34112
|
}));
|
|
34715
|
-
function tryInitFirstCatalog(
|
|
34113
|
+
function tryInitFirstCatalog(_x4) {
|
|
34716
34114
|
return _tryInitFirstCatalog.apply(this, arguments);
|
|
34717
34115
|
}
|
|
34718
34116
|
return tryInitFirstCatalog;
|
|
@@ -34747,7 +34145,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34747
34145
|
}
|
|
34748
34146
|
}, _callee4, this);
|
|
34749
34147
|
}));
|
|
34750
|
-
function createNewDivaNr(
|
|
34148
|
+
function createNewDivaNr(_x5) {
|
|
34751
34149
|
return _createNewDivaNr.apply(this, arguments);
|
|
34752
34150
|
}
|
|
34753
34151
|
return createNewDivaNr;
|
|
@@ -34777,7 +34175,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34777
34175
|
} else {
|
|
34778
34176
|
this.origConfiguration.originDivaNr = divaNr;
|
|
34779
34177
|
}
|
|
34780
|
-
if (this.plannerConfig.returnTo != 'REPAIR_BASKET' && basket.StatusKey == 'BASE_CONFIGURATION') {
|
|
34178
|
+
if (this.plannerConfig.returnTo != 'REPAIR_BASKET' && (basket.StatusKey == 'BASE_CONFIGURATION' || keepOldDivaNr === false)) {
|
|
34781
34179
|
this.assignNewDivaNr = true;
|
|
34782
34180
|
basket.CustomerJourneyId = nanoid();
|
|
34783
34181
|
basket.StatusKey = 'USER_CONFIGURATION';
|
|
@@ -34795,7 +34193,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34795
34193
|
basket.OrderSets[i].SetID = newSetId;
|
|
34796
34194
|
}
|
|
34797
34195
|
}
|
|
34798
|
-
if (!
|
|
34196
|
+
if (!this.assignNewDivaNr) {
|
|
34799
34197
|
_context5.next = 29;
|
|
34800
34198
|
break;
|
|
34801
34199
|
}
|
|
@@ -34875,7 +34273,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34875
34273
|
}
|
|
34876
34274
|
}, _callee5, this);
|
|
34877
34275
|
}));
|
|
34878
|
-
function initBasket(_x7, _x8, _x9, _x10
|
|
34276
|
+
function initBasket(_x6, _x7, _x8, _x9, _x10) {
|
|
34879
34277
|
return _initBasket.apply(this, arguments);
|
|
34880
34278
|
}
|
|
34881
34279
|
return initBasket;
|
|
@@ -34954,7 +34352,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34954
34352
|
}
|
|
34955
34353
|
}, _callee6, this);
|
|
34956
34354
|
}));
|
|
34957
|
-
function loadBasketByCatalogCodex(
|
|
34355
|
+
function loadBasketByCatalogCodex(_x11) {
|
|
34958
34356
|
return _loadBasketByCatalogCodex.apply(this, arguments);
|
|
34959
34357
|
}
|
|
34960
34358
|
return loadBasketByCatalogCodex;
|
|
@@ -34962,7 +34360,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34962
34360
|
}, {
|
|
34963
34361
|
key: "loadBasketByDivaNr",
|
|
34964
34362
|
value: function () {
|
|
34965
|
-
var _loadBasketByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(api, divaNr
|
|
34363
|
+
var _loadBasketByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(api, divaNr) {
|
|
34966
34364
|
var variantData;
|
|
34967
34365
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
34968
34366
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -34973,7 +34371,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34973
34371
|
case 3:
|
|
34974
34372
|
variantData = _context7.sent;
|
|
34975
34373
|
_context7.next = 6;
|
|
34976
|
-
return this.initBasket(api, divaNr, variantData
|
|
34374
|
+
return this.initBasket(api, divaNr, variantData);
|
|
34977
34375
|
case 6:
|
|
34978
34376
|
return _context7.abrupt("return", _context7.sent);
|
|
34979
34377
|
case 9:
|
|
@@ -34992,7 +34390,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34992
34390
|
}
|
|
34993
34391
|
}, _callee7, this, [[0, 9]]);
|
|
34994
34392
|
}));
|
|
34995
|
-
function loadBasketByDivaNr(
|
|
34393
|
+
function loadBasketByDivaNr(_x12, _x13) {
|
|
34996
34394
|
return _loadBasketByDivaNr.apply(this, arguments);
|
|
34997
34395
|
}
|
|
34998
34396
|
return loadBasketByDivaNr;
|
|
@@ -35044,73 +34442,25 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35044
34442
|
}
|
|
35045
34443
|
}, _callee8, this, [[0, 12]]);
|
|
35046
34444
|
}));
|
|
35047
|
-
function loadBasketByCustomProductId(
|
|
34445
|
+
function loadBasketByCustomProductId(_x14, _x15, _x16, _x17) {
|
|
35048
34446
|
return _loadBasketByCustomProductId.apply(this, arguments);
|
|
35049
34447
|
}
|
|
35050
34448
|
return loadBasketByCustomProductId;
|
|
35051
34449
|
}()
|
|
35052
34450
|
}, {
|
|
35053
|
-
key: "
|
|
34451
|
+
key: "getProduct",
|
|
35054
34452
|
value: function () {
|
|
35055
|
-
var
|
|
35056
|
-
var result
|
|
34453
|
+
var _getProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(api, productId) {
|
|
34454
|
+
var result;
|
|
35057
34455
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
35058
34456
|
while (1) switch (_context9.prev = _context9.next) {
|
|
35059
34457
|
case 0:
|
|
35060
34458
|
_context9.next = 2;
|
|
35061
|
-
return this.getProduct(api, productId);
|
|
35062
|
-
case 2:
|
|
35063
|
-
result = _context9.sent;
|
|
35064
|
-
if (!(result === false)) {
|
|
35065
|
-
_context9.next = 5;
|
|
35066
|
-
break;
|
|
35067
|
-
}
|
|
35068
|
-
return _context9.abrupt("return", false);
|
|
35069
|
-
case 5:
|
|
35070
|
-
divaNr = result.divaNr;
|
|
35071
|
-
if (result.originDivaNr) {
|
|
35072
|
-
divaNr = result.originDivaNr;
|
|
35073
|
-
} else if (result.variantId !== undefined) {
|
|
35074
|
-
id = result.variantId;
|
|
35075
|
-
divaNr = result.divaNr + '_' + id.toString().padStart(4, '0');
|
|
35076
|
-
}
|
|
35077
|
-
_context9.next = 9;
|
|
35078
|
-
return this.loadBasketByDivaNr(api, divaNr, keepOldDivaNr, productId);
|
|
35079
|
-
case 9:
|
|
35080
|
-
successfully = _context9.sent;
|
|
35081
|
-
result.type = 'ProductId';
|
|
35082
|
-
if (!successfully) {
|
|
35083
|
-
_context9.next = 15;
|
|
35084
|
-
break;
|
|
35085
|
-
}
|
|
35086
|
-
return _context9.abrupt("return", result);
|
|
35087
|
-
case 15:
|
|
35088
|
-
return _context9.abrupt("return", false);
|
|
35089
|
-
case 16:
|
|
35090
|
-
case "end":
|
|
35091
|
-
return _context9.stop();
|
|
35092
|
-
}
|
|
35093
|
-
}, _callee9, this);
|
|
35094
|
-
}));
|
|
35095
|
-
function loadProduct(_x21, _x22, _x23) {
|
|
35096
|
-
return _loadProduct.apply(this, arguments);
|
|
35097
|
-
}
|
|
35098
|
-
return loadProduct;
|
|
35099
|
-
}()
|
|
35100
|
-
}, {
|
|
35101
|
-
key: "getProduct",
|
|
35102
|
-
value: function () {
|
|
35103
|
-
var _getProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(api, productId) {
|
|
35104
|
-
var result;
|
|
35105
|
-
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
35106
|
-
while (1) switch (_context10.prev = _context10.next) {
|
|
35107
|
-
case 0:
|
|
35108
|
-
_context10.next = 2;
|
|
35109
34459
|
return api.getDataCache(api.getProductUrl(productId), undefined, undefined, 'catalog');
|
|
35110
34460
|
case 2:
|
|
35111
|
-
result =
|
|
34461
|
+
result = _context9.sent;
|
|
35112
34462
|
if (!(result.Error || !result)) {
|
|
35113
|
-
|
|
34463
|
+
_context9.next = 6;
|
|
35114
34464
|
break;
|
|
35115
34465
|
}
|
|
35116
34466
|
LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
@@ -35119,16 +34469,16 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35119
34469
|
productId: productId
|
|
35120
34470
|
}
|
|
35121
34471
|
}));
|
|
35122
|
-
return
|
|
34472
|
+
return _context9.abrupt("return", false);
|
|
35123
34473
|
case 6:
|
|
35124
|
-
return
|
|
34474
|
+
return _context9.abrupt("return", result[0]);
|
|
35125
34475
|
case 7:
|
|
35126
34476
|
case "end":
|
|
35127
|
-
return
|
|
34477
|
+
return _context9.stop();
|
|
35128
34478
|
}
|
|
35129
|
-
},
|
|
34479
|
+
}, _callee9);
|
|
35130
34480
|
}));
|
|
35131
|
-
function getProduct(
|
|
34481
|
+
function getProduct(_x18, _x19) {
|
|
35132
34482
|
return _getProduct.apply(this, arguments);
|
|
35133
34483
|
}
|
|
35134
34484
|
return getProduct;
|
|
@@ -35136,15 +34486,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35136
34486
|
}, {
|
|
35137
34487
|
key: "createNewBasket",
|
|
35138
34488
|
value: function () {
|
|
35139
|
-
var _createNewBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34489
|
+
var _createNewBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(api, initObject, divaNr, lang) {
|
|
35140
34490
|
var setId, orderSet, basketInitObejct, basket;
|
|
35141
|
-
return _regeneratorRuntime.wrap(function
|
|
35142
|
-
while (1) switch (
|
|
34491
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
34492
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
35143
34493
|
case 0:
|
|
35144
34494
|
setId = 'PLANNING_' + Math.random().toString(36).substring(6);
|
|
35145
34495
|
orderSet = new OrderSetData({
|
|
35146
34496
|
SetID: setId,
|
|
35147
|
-
MainPosNr: 1,
|
|
35148
34497
|
AccountSessionGUID: initObject.accountSessionGuid,
|
|
35149
34498
|
CatalogCodex: initObject.catalogCodex,
|
|
35150
34499
|
CatalogGUID: initObject.catalogGuid,
|
|
@@ -35152,10 +34501,10 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35152
34501
|
Favorites: new Favorites()
|
|
35153
34502
|
});
|
|
35154
34503
|
if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
|
|
35155
|
-
|
|
34504
|
+
_context10.next = 5;
|
|
35156
34505
|
break;
|
|
35157
34506
|
}
|
|
35158
|
-
|
|
34507
|
+
_context10.next = 5;
|
|
35159
34508
|
return api.setAccountSessionGuid({
|
|
35160
34509
|
os: orderSet,
|
|
35161
34510
|
accountGuid: initObject.accountGuid,
|
|
@@ -35173,14 +34522,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35173
34522
|
CustomerJourneyId: nanoid()
|
|
35174
34523
|
};
|
|
35175
34524
|
basket = new BasketData(basketInitObejct);
|
|
35176
|
-
return
|
|
34525
|
+
return _context10.abrupt("return", basket);
|
|
35177
34526
|
case 8:
|
|
35178
34527
|
case "end":
|
|
35179
|
-
return
|
|
34528
|
+
return _context10.stop();
|
|
35180
34529
|
}
|
|
35181
|
-
},
|
|
34530
|
+
}, _callee10);
|
|
35182
34531
|
}));
|
|
35183
|
-
function createNewBasket(
|
|
34532
|
+
function createNewBasket(_x20, _x21, _x22, _x23) {
|
|
35184
34533
|
return _createNewBasket.apply(this, arguments);
|
|
35185
34534
|
}
|
|
35186
34535
|
return createNewBasket;
|
|
@@ -35199,11 +34548,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35199
34548
|
}, {
|
|
35200
34549
|
key: "saveToBasket",
|
|
35201
34550
|
value: function () {
|
|
35202
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
34551
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(api, actBasket, returnTo) {
|
|
35203
34552
|
var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
|
|
35204
34553
|
var response;
|
|
35205
|
-
return _regeneratorRuntime.wrap(function
|
|
35206
|
-
while (1) switch (
|
|
34554
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
34555
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
35207
34556
|
case 0:
|
|
35208
34557
|
LOG$7.startTransaction({
|
|
35209
34558
|
event: 'SaveBasketOnAPI',
|
|
@@ -35215,12 +34564,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35215
34564
|
actBasket.ReportConfigIdentifier = api.getReportConfigIdentifier();
|
|
35216
34565
|
actBasket.PrintOptions = api.getPrintOptions(this.reportConfig);
|
|
35217
34566
|
actBasket.ClientLanguage = api.getLanguage();
|
|
35218
|
-
|
|
34567
|
+
_context11.next = 8;
|
|
35219
34568
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
|
|
35220
34569
|
case 8:
|
|
35221
34570
|
actBasket.UserLanguage = api.getLanguage();
|
|
35222
34571
|
actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
|
|
35223
|
-
|
|
34572
|
+
_context11.next = 12;
|
|
35224
34573
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
35225
34574
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
35226
34575
|
basket: actBasket,
|
|
@@ -35229,30 +34578,30 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35229
34578
|
apiKey: api.getApiKey()
|
|
35230
34579
|
});
|
|
35231
34580
|
case 12:
|
|
35232
|
-
response =
|
|
34581
|
+
response = _context11.sent;
|
|
35233
34582
|
if (!(response != 'ERROR_NO_BASKET_SAVED')) {
|
|
35234
|
-
|
|
34583
|
+
_context11.next = 17;
|
|
35235
34584
|
break;
|
|
35236
34585
|
}
|
|
35237
34586
|
this.baskets[this.actDivaNr] = new BasketData(response);
|
|
35238
|
-
|
|
34587
|
+
_context11.next = 19;
|
|
35239
34588
|
break;
|
|
35240
34589
|
case 17:
|
|
35241
34590
|
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
35242
|
-
|
|
34591
|
+
_context11.next = 19;
|
|
35243
34592
|
break;
|
|
35244
34593
|
}
|
|
35245
|
-
return
|
|
34594
|
+
return _context11.abrupt("return", response);
|
|
35246
34595
|
case 19:
|
|
35247
34596
|
LOG$7.successTransaction('saveBasketOnAPI');
|
|
35248
|
-
return
|
|
34597
|
+
return _context11.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
|
|
35249
34598
|
case 21:
|
|
35250
34599
|
case "end":
|
|
35251
|
-
return
|
|
34600
|
+
return _context11.stop();
|
|
35252
34601
|
}
|
|
35253
|
-
},
|
|
34602
|
+
}, _callee11, this);
|
|
35254
34603
|
}));
|
|
35255
|
-
function saveToBasket(
|
|
34604
|
+
function saveToBasket(_x24, _x25, _x26) {
|
|
35256
34605
|
return _saveToBasket.apply(this, arguments);
|
|
35257
34606
|
}
|
|
35258
34607
|
return saveToBasket;
|
|
@@ -35365,61 +34714,53 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35365
34714
|
}, {
|
|
35366
34715
|
key: "initWWSClient",
|
|
35367
34716
|
value: function () {
|
|
35368
|
-
var _initWWSClient = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
35369
|
-
var _yield$import, PfisterWWSHandler, _yield$import2, LiviqueWWSHandler, _yield$import3, SeriousWWSHandler, _yield$import4,
|
|
35370
|
-
return _regeneratorRuntime.wrap(function
|
|
35371
|
-
while (1) switch (
|
|
34717
|
+
var _initWWSClient = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(wwsClient) {
|
|
34718
|
+
var _yield$import, PfisterWWSHandler, _yield$import2, LiviqueWWSHandler, _yield$import3, SeriousWWSHandler, _yield$import4, StandardWWSHandler;
|
|
34719
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
34720
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
35372
34721
|
case 0:
|
|
35373
|
-
|
|
35374
|
-
|
|
34722
|
+
_context12.t0 = wwsClient;
|
|
34723
|
+
_context12.next = _context12.t0 === 'Pfister' ? 3 : _context12.t0 === 'Livique' ? 9 : _context12.t0 === 'Serious' ? 15 : 21;
|
|
35375
34724
|
break;
|
|
35376
34725
|
case 3:
|
|
35377
|
-
|
|
35378
|
-
return import('./PfisterWWSHandler-
|
|
34726
|
+
_context12.next = 5;
|
|
34727
|
+
return import('./PfisterWWSHandler-45fc8115.js');
|
|
35379
34728
|
case 5:
|
|
35380
|
-
_yield$import =
|
|
34729
|
+
_yield$import = _context12.sent;
|
|
35381
34730
|
PfisterWWSHandler = _yield$import["default"];
|
|
35382
34731
|
this._divaWWSHandler = new PfisterWWSHandler();
|
|
35383
|
-
return
|
|
34732
|
+
return _context12.abrupt("break", 27);
|
|
35384
34733
|
case 9:
|
|
35385
|
-
|
|
35386
|
-
return import('./LiviqueWWSHandler-
|
|
34734
|
+
_context12.next = 11;
|
|
34735
|
+
return import('./LiviqueWWSHandler-838c27e1.js');
|
|
35387
34736
|
case 11:
|
|
35388
|
-
_yield$import2 =
|
|
34737
|
+
_yield$import2 = _context12.sent;
|
|
35389
34738
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
35390
34739
|
this._divaWWSHandler = new LiviqueWWSHandler();
|
|
35391
|
-
return
|
|
34740
|
+
return _context12.abrupt("break", 27);
|
|
35392
34741
|
case 15:
|
|
35393
|
-
|
|
35394
|
-
return import('./SeriousBasketHandler-
|
|
34742
|
+
_context12.next = 17;
|
|
34743
|
+
return import('./SeriousBasketHandler-d5a2b64f.js');
|
|
35395
34744
|
case 17:
|
|
35396
|
-
_yield$import3 =
|
|
34745
|
+
_yield$import3 = _context12.sent;
|
|
35397
34746
|
SeriousWWSHandler = _yield$import3["default"];
|
|
35398
34747
|
this._divaWWSHandler = new SeriousWWSHandler();
|
|
35399
|
-
return
|
|
34748
|
+
return _context12.abrupt("break", 27);
|
|
35400
34749
|
case 21:
|
|
35401
|
-
|
|
35402
|
-
return import('./
|
|
34750
|
+
_context12.next = 23;
|
|
34751
|
+
return import('./StandardWWSHandler-5d42af7c.js');
|
|
35403
34752
|
case 23:
|
|
35404
|
-
_yield$import4 =
|
|
35405
|
-
|
|
35406
|
-
this._divaWWSHandler = new ProductWWSHandler();
|
|
35407
|
-
return _context13.abrupt("break", 33);
|
|
35408
|
-
case 27:
|
|
35409
|
-
_context13.next = 29;
|
|
35410
|
-
return import('./StandardWWSHandler-572f394d.js');
|
|
35411
|
-
case 29:
|
|
35412
|
-
_yield$import5 = _context13.sent;
|
|
35413
|
-
StandardWWSHandler = _yield$import5["default"];
|
|
34753
|
+
_yield$import4 = _context12.sent;
|
|
34754
|
+
StandardWWSHandler = _yield$import4["default"];
|
|
35414
34755
|
this._divaWWSHandler = new StandardWWSHandler();
|
|
35415
|
-
return
|
|
35416
|
-
case
|
|
34756
|
+
return _context12.abrupt("break", 27);
|
|
34757
|
+
case 27:
|
|
35417
34758
|
case "end":
|
|
35418
|
-
return
|
|
34759
|
+
return _context12.stop();
|
|
35419
34760
|
}
|
|
35420
|
-
},
|
|
34761
|
+
}, _callee12, this);
|
|
35421
34762
|
}));
|
|
35422
|
-
function initWWSClient(
|
|
34763
|
+
function initWWSClient(_x27) {
|
|
35423
34764
|
return _initWWSClient.apply(this, arguments);
|
|
35424
34765
|
}
|
|
35425
34766
|
return initWWSClient;
|
|
@@ -36022,7 +35363,7 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
36022
35363
|
this.creationTime = new Date();
|
|
36023
35364
|
this.layerMaskThreeTexture = undefined;
|
|
36024
35365
|
this.hasStaticBackground = hasStaticBG;
|
|
36025
|
-
this.mediaServiceSaveMode = mediaServiceSaveMode;
|
|
35366
|
+
this.mediaServiceSaveMode = mediaServiceSaveMode !== null && mediaServiceSaveMode !== void 0 ? mediaServiceSaveMode : 'STREAM';
|
|
36026
35367
|
this.urlToSavedRendering = '';
|
|
36027
35368
|
this.catalogData = {
|
|
36028
35369
|
catalogCodex: '',
|
|
@@ -36067,12 +35408,12 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
36067
35408
|
}, {
|
|
36068
35409
|
key: "getHasStaticBackground",
|
|
36069
35410
|
value: function getHasStaticBackground() {
|
|
36070
|
-
return this.hasStaticBackground;
|
|
35411
|
+
return !!this.hasStaticBackground;
|
|
36071
35412
|
}
|
|
36072
35413
|
}, {
|
|
36073
35414
|
key: "getIsFullscreenRendering",
|
|
36074
35415
|
value: function getIsFullscreenRendering() {
|
|
36075
|
-
return this.isFullscreenRendering;
|
|
35416
|
+
return !!this.isFullscreenRendering;
|
|
36076
35417
|
}
|
|
36077
35418
|
}, {
|
|
36078
35419
|
key: "setIsFullscreenRendering",
|
|
@@ -36082,12 +35423,13 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
36082
35423
|
}, {
|
|
36083
35424
|
key: "getHasDimensionLines",
|
|
36084
35425
|
value: function getHasDimensionLines() {
|
|
36085
|
-
return this.hasDimensionLines;
|
|
35426
|
+
return !!this.hasDimensionLines;
|
|
36086
35427
|
}
|
|
36087
35428
|
}, {
|
|
36088
35429
|
key: "getPlannerMeasureDigits",
|
|
36089
35430
|
value: function getPlannerMeasureDigits() {
|
|
36090
|
-
|
|
35431
|
+
var _this$plannerMeasureD;
|
|
35432
|
+
return (_this$plannerMeasureD = this.plannerMeasureDigits) !== null && _this$plannerMeasureD !== void 0 ? _this$plannerMeasureD : 0;
|
|
36091
35433
|
}
|
|
36092
35434
|
}, {
|
|
36093
35435
|
key: "getIsAlternateRendering",
|
|
@@ -36338,7 +35680,7 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
36338
35680
|
}, {
|
|
36339
35681
|
key: "HasLayerMask",
|
|
36340
35682
|
get: function get() {
|
|
36341
|
-
return this.hasLayerMask;
|
|
35683
|
+
return !!this.hasLayerMask;
|
|
36342
35684
|
},
|
|
36343
35685
|
set: function set(hasLayerMask) {
|
|
36344
35686
|
this.hasLayerMask = hasLayerMask;
|
|
@@ -36346,17 +35688,19 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
36346
35688
|
}, {
|
|
36347
35689
|
key: "RenderWidth",
|
|
36348
35690
|
get: function get() {
|
|
36349
|
-
|
|
35691
|
+
var _this$renderWidth;
|
|
35692
|
+
return (_this$renderWidth = this.renderWidth) !== null && _this$renderWidth !== void 0 ? _this$renderWidth : 0;
|
|
36350
35693
|
}
|
|
36351
35694
|
}, {
|
|
36352
35695
|
key: "RenderHeight",
|
|
36353
35696
|
get: function get() {
|
|
36354
|
-
|
|
35697
|
+
var _this$renderHeight;
|
|
35698
|
+
return (_this$renderHeight = this.renderHeight) !== null && _this$renderHeight !== void 0 ? _this$renderHeight : 0;
|
|
36355
35699
|
}
|
|
36356
35700
|
}, {
|
|
36357
35701
|
key: "getHasLayerMask",
|
|
36358
35702
|
value: function getHasLayerMask() {
|
|
36359
|
-
return this.hasLayerMask;
|
|
35703
|
+
return !!this.hasLayerMask;
|
|
36360
35704
|
}
|
|
36361
35705
|
}, {
|
|
36362
35706
|
key: "getLayerMaskForSrc",
|
|
@@ -36792,7 +36136,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36792
36136
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36793
36137
|
case 0:
|
|
36794
36138
|
_context3.next = 2;
|
|
36795
|
-
return import('./Host3DSignalR-
|
|
36139
|
+
return import('./Host3DSignalR-1f18aa3a.js');
|
|
36796
36140
|
case 2:
|
|
36797
36141
|
_yield$import = _context3.sent;
|
|
36798
36142
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38344,7 +37688,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38344
37688
|
break;
|
|
38345
37689
|
case 8:
|
|
38346
37690
|
_context4.next = 10;
|
|
38347
|
-
return import('./DivaStandardPlanner-
|
|
37691
|
+
return import('./DivaStandardPlanner-633a4688.js');
|
|
38348
37692
|
case 10:
|
|
38349
37693
|
_yield$import = _context4.sent;
|
|
38350
37694
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38355,7 +37699,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38355
37699
|
return _context4.abrupt("break", 21);
|
|
38356
37700
|
case 15:
|
|
38357
37701
|
_context4.next = 17;
|
|
38358
|
-
return import('./DivaBoxPlanner-
|
|
37702
|
+
return import('./DivaBoxPlanner-e34a256a.js');
|
|
38359
37703
|
case 17:
|
|
38360
37704
|
_yield$import2 = _context4.sent;
|
|
38361
37705
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -39501,7 +38845,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39501
38845
|
//Do also pass the correct price format
|
|
39502
38846
|
(_this$actions = _this.actions) === null || _this$actions === void 0 || (_this$actions$toggleL = _this$actions.toggleLoading) === null || _this$actions$toggleL === void 0 || _this$actions$toggleL.call(_this$actions, 'SUMMARY');
|
|
39503
38847
|
_context2.next = 6;
|
|
39504
|
-
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this)
|
|
38848
|
+
return summaryHandlerInstance.getSummaryItems(_this.sets, _this.doConfigure.bind(_this));
|
|
39505
38849
|
case 6:
|
|
39506
38850
|
summaryItems = _context2.sent;
|
|
39507
38851
|
(_this$updateSummaryIt = _this.updateSummaryItems) === null || _this$updateSummaryIt === void 0 || _this$updateSummaryIt.call(_this, summaryItems, setPriceFormat, summaryHandlerInstance.getSummaryStepWarning(_this.actSet(), summaryItems));
|
|
@@ -39586,11 +38930,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39586
38930
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39587
38931
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
39588
38932
|
if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
39589
|
-
|
|
38933
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAdd');
|
|
38934
|
+
_context3.next = 30;
|
|
39590
38935
|
return _this.checkVariantData();
|
|
39591
|
-
case 29:
|
|
39592
|
-
return _context3.abrupt("return", 'ElementAdded');
|
|
39593
38936
|
case 30:
|
|
38937
|
+
return _context3.abrupt("return", 'ElementAdded');
|
|
38938
|
+
case 31:
|
|
39594
38939
|
case "end":
|
|
39595
38940
|
return _context3.stop();
|
|
39596
38941
|
}
|
|
@@ -39670,8 +39015,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39670
39015
|
(_this$updateViewPlann3 = _this.updateViewPlannerElements) === null || _this$updateViewPlann3 === void 0 || _this$updateViewPlann3.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39671
39016
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
39672
39017
|
}
|
|
39018
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onShelfAdd');
|
|
39019
|
+
_this.checkVariantData();
|
|
39673
39020
|
return _context5.abrupt("return", retVal);
|
|
39674
|
-
case
|
|
39021
|
+
case 10:
|
|
39675
39022
|
case "end":
|
|
39676
39023
|
return _context5.stop();
|
|
39677
39024
|
}
|
|
@@ -39715,7 +39062,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39715
39062
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39716
39063
|
(_this$updateViewPlann5 = _this.updateViewPlannerElements) === null || _this$updateViewPlann5 === void 0 || _this$updateViewPlann5.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39717
39064
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
39718
|
-
|
|
39065
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onShelfDelete');
|
|
39066
|
+
_this.checkVariantData();
|
|
39067
|
+
case 11:
|
|
39719
39068
|
case "end":
|
|
39720
39069
|
return _context6.stop();
|
|
39721
39070
|
}
|
|
@@ -39773,22 +39122,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39773
39122
|
_defineProperty(this, "updateAccessoireQuantity", /*#__PURE__*/function () {
|
|
39774
39123
|
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle) {
|
|
39775
39124
|
var _this$actions11, _this$actions11$toggl, _this$actions12, _this$actions12$toggl;
|
|
39776
|
-
var ret;
|
|
39125
|
+
var set, ret;
|
|
39777
39126
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
39778
39127
|
while (1) switch (_context8.prev = _context8.next) {
|
|
39779
39128
|
case 0:
|
|
39129
|
+
set = _this.actSet();
|
|
39780
39130
|
(_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);
|
|
39781
|
-
_context8.next =
|
|
39782
|
-
return setHandlerInstance.updateAccessoireQuantity(
|
|
39783
|
-
case
|
|
39131
|
+
_context8.next = 4;
|
|
39132
|
+
return setHandlerInstance.updateAccessoireQuantity(set, accessoireItem, relatedToBasketId, newQuantity, forceConfigSingle);
|
|
39133
|
+
case 4:
|
|
39784
39134
|
ret = _context8.sent;
|
|
39785
39135
|
(_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);
|
|
39786
39136
|
if (ret.somethingChanged) _this.updateConfigStructure();
|
|
39787
39137
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
39788
39138
|
_this.updatePriceInView();
|
|
39789
39139
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39140
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAccessoireUpdate');
|
|
39790
39141
|
_this.checkVariantData();
|
|
39791
|
-
case
|
|
39142
|
+
case 12:
|
|
39792
39143
|
case "end":
|
|
39793
39144
|
return _context8.stop();
|
|
39794
39145
|
}
|
|
@@ -39816,9 +39167,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39816
39167
|
_this.updatePriceInView();
|
|
39817
39168
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39818
39169
|
}
|
|
39170
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAccessoireDelete');
|
|
39819
39171
|
_this.checkVariantData();
|
|
39820
39172
|
return _context9.abrupt("return", wasDeleted);
|
|
39821
|
-
case
|
|
39173
|
+
case 8:
|
|
39822
39174
|
case "end":
|
|
39823
39175
|
return _context9.stop();
|
|
39824
39176
|
}
|
|
@@ -39900,9 +39252,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39900
39252
|
returnValues = _context11.sent;
|
|
39901
39253
|
(_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);
|
|
39902
39254
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
39255
|
+
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onConfig');
|
|
39903
39256
|
_this.checkVariantData();
|
|
39904
39257
|
if (dontUpdatePlannerView) {
|
|
39905
|
-
_context11.next =
|
|
39258
|
+
_context11.next = 19;
|
|
39906
39259
|
break;
|
|
39907
39260
|
}
|
|
39908
39261
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -39916,16 +39269,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39916
39269
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39917
39270
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
39918
39271
|
_this.updateWebConfiguratorTitle();
|
|
39919
|
-
_context11.next =
|
|
39272
|
+
_context11.next = 19;
|
|
39920
39273
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
39921
|
-
case
|
|
39274
|
+
case 19:
|
|
39922
39275
|
if (dontCallEvents) {
|
|
39923
|
-
_context11.next =
|
|
39276
|
+
_context11.next = 22;
|
|
39924
39277
|
break;
|
|
39925
39278
|
}
|
|
39926
|
-
_context11.next =
|
|
39279
|
+
_context11.next = 22;
|
|
39927
39280
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39928
|
-
case
|
|
39281
|
+
case 22:
|
|
39929
39282
|
case "end":
|
|
39930
39283
|
return _context11.stop();
|
|
39931
39284
|
}
|
|
@@ -40051,11 +39404,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40051
39404
|
case 12:
|
|
40052
39405
|
loadSuccessful = _context13.sent;
|
|
40053
39406
|
if (!loadSuccessful) {
|
|
40054
|
-
_context13.next =
|
|
39407
|
+
_context13.next = 58;
|
|
40055
39408
|
break;
|
|
40056
39409
|
}
|
|
40057
39410
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40058
|
-
_context13.next =
|
|
39411
|
+
_context13.next = 25;
|
|
40059
39412
|
break;
|
|
40060
39413
|
}
|
|
40061
39414
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
@@ -40072,53 +39425,49 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40072
39425
|
(_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);
|
|
40073
39426
|
return _context13.abrupt("return", true);
|
|
40074
39427
|
case 23:
|
|
40075
|
-
|
|
40076
|
-
|
|
40077
|
-
|
|
40078
|
-
|
|
40079
|
-
|
|
40080
|
-
// this.divaBasketHandler.actBasket.SetPlannerInfos?.InvolvedSetIds,
|
|
40081
|
-
// );
|
|
40082
|
-
//}
|
|
40083
|
-
|
|
39428
|
+
_context13.next = 26;
|
|
39429
|
+
break;
|
|
39430
|
+
case 25:
|
|
39431
|
+
if (this.api.doCheckForProductsPrice()) ;
|
|
39432
|
+
case 26:
|
|
40084
39433
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
40085
39434
|
initSetState = this.getInitStateForSet();
|
|
40086
39435
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
40087
|
-
_context13.next =
|
|
39436
|
+
_context13.next = 31;
|
|
40088
39437
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
40089
|
-
case
|
|
39438
|
+
case 31:
|
|
40090
39439
|
set = this.actSet();
|
|
40091
39440
|
if (!((_initSetState$api$web = initSetState.api.webConfig) !== null && _initSetState$api$web !== void 0 && _initSetState$api$web.checkForProductsPrice)) {
|
|
40092
|
-
_context13.next =
|
|
39441
|
+
_context13.next = 43;
|
|
40093
39442
|
break;
|
|
40094
39443
|
}
|
|
40095
39444
|
if (!(typeof loadSuccessful != 'boolean' && loadSuccessful.type == 'ProductId')) {
|
|
40096
|
-
_context13.next =
|
|
39445
|
+
_context13.next = 38;
|
|
40097
39446
|
break;
|
|
40098
39447
|
}
|
|
40099
39448
|
products = loadSuccessful;
|
|
40100
39449
|
set === null || set === void 0 || set.remindPriceForHash(products);
|
|
40101
|
-
_context13.next =
|
|
39450
|
+
_context13.next = 43;
|
|
40102
39451
|
break;
|
|
40103
|
-
case
|
|
39452
|
+
case 38:
|
|
40104
39453
|
if (!this.divaBasketHandler.actBasket.OrigProductId) {
|
|
40105
|
-
_context13.next =
|
|
39454
|
+
_context13.next = 43;
|
|
40106
39455
|
break;
|
|
40107
39456
|
}
|
|
40108
|
-
_context13.next =
|
|
39457
|
+
_context13.next = 41;
|
|
40109
39458
|
return this.divaBasketHandler.getProduct(this.api, this.divaBasketHandler.actBasket.OrigProductId);
|
|
40110
|
-
case
|
|
39459
|
+
case 41:
|
|
40111
39460
|
result = _context13.sent;
|
|
40112
39461
|
if (result) {
|
|
40113
39462
|
set === null || set === void 0 || set.remindPriceForHash(result);
|
|
40114
39463
|
}
|
|
40115
|
-
case
|
|
40116
|
-
_context13.next =
|
|
39464
|
+
case 43:
|
|
39465
|
+
_context13.next = 45;
|
|
40117
39466
|
return viewReadyPromise;
|
|
40118
|
-
case
|
|
40119
|
-
_context13.next =
|
|
39467
|
+
case 45:
|
|
39468
|
+
_context13.next = 47;
|
|
40120
39469
|
return this.initView();
|
|
40121
|
-
case
|
|
39470
|
+
case 47:
|
|
40122
39471
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40123
39472
|
type: 'onConfiguratorReady'
|
|
40124
39473
|
});
|
|
@@ -40142,11 +39491,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40142
39491
|
divaNr: basket.DivaNr,
|
|
40143
39492
|
documentVersion: basket.DocumentVersion.toString()
|
|
40144
39493
|
});
|
|
40145
|
-
_context13.next =
|
|
39494
|
+
_context13.next = 55;
|
|
40146
39495
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
40147
|
-
case 52:
|
|
40148
|
-
return _context13.abrupt("return", true);
|
|
40149
39496
|
case 55:
|
|
39497
|
+
return _context13.abrupt("return", true);
|
|
39498
|
+
case 58:
|
|
40150
39499
|
this.onInitializationError();
|
|
40151
39500
|
//fehler beim laden vom basket..
|
|
40152
39501
|
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
@@ -40164,7 +39513,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40164
39513
|
plannerMode: this.getCurImageMode(),*/
|
|
40165
39514
|
});
|
|
40166
39515
|
return _context13.abrupt("return", false);
|
|
40167
|
-
case
|
|
39516
|
+
case 61:
|
|
40168
39517
|
case "end":
|
|
40169
39518
|
return _context13.stop();
|
|
40170
39519
|
}
|
|
@@ -40326,7 +39675,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40326
39675
|
break;
|
|
40327
39676
|
}
|
|
40328
39677
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40329
|
-
_context15.next =
|
|
39678
|
+
_context15.next = 18;
|
|
40330
39679
|
break;
|
|
40331
39680
|
case 7:
|
|
40332
39681
|
_context15.next = 9;
|
|
@@ -40341,11 +39690,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40341
39690
|
(_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
|
|
40342
39691
|
this.updatePlannerView('INIT_VIEW');
|
|
40343
39692
|
this.onBasketInitialized();
|
|
39693
|
+
productHandlerInstance.updateProducts(this.setsAsArray, this.api, 'onInit');
|
|
40344
39694
|
this.checkVariantData();
|
|
40345
|
-
case
|
|
40346
|
-
_context15.next =
|
|
39695
|
+
case 18:
|
|
39696
|
+
_context15.next = 20;
|
|
40347
39697
|
return this.runInitMode(plannerMode);
|
|
40348
|
-
case
|
|
39698
|
+
case 20:
|
|
40349
39699
|
case "end":
|
|
40350
39700
|
return _context15.stop();
|
|
40351
39701
|
}
|
|
@@ -40444,31 +39794,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40444
39794
|
i = 0;
|
|
40445
39795
|
case 8:
|
|
40446
39796
|
if (!(i < orderSets.length)) {
|
|
40447
|
-
_context17.next =
|
|
39797
|
+
_context17.next = 24;
|
|
40448
39798
|
break;
|
|
40449
39799
|
}
|
|
40450
39800
|
orderset = orderSets[i];
|
|
40451
39801
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40452
39802
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40453
39803
|
if (!loadedSet) {
|
|
40454
|
-
_context17.next =
|
|
39804
|
+
_context17.next = 18;
|
|
40455
39805
|
break;
|
|
40456
39806
|
}
|
|
40457
39807
|
_context17.next = 15;
|
|
40458
39808
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40459
39809
|
case 15:
|
|
40460
|
-
|
|
39810
|
+
productHandlerInstance.updateProducts(this.setsAsArray, this.api, 'onAdd');
|
|
39811
|
+
_context17.next = 20;
|
|
40461
39812
|
break;
|
|
40462
|
-
case
|
|
40463
|
-
_context17.next =
|
|
39813
|
+
case 18:
|
|
39814
|
+
_context17.next = 20;
|
|
40464
39815
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40465
|
-
case 19:
|
|
40466
|
-
this.cleanUpEmptySets(true);
|
|
40467
39816
|
case 20:
|
|
39817
|
+
this.cleanUpEmptySets(true);
|
|
39818
|
+
case 21:
|
|
40468
39819
|
i++;
|
|
40469
39820
|
_context17.next = 8;
|
|
40470
39821
|
break;
|
|
40471
|
-
case
|
|
39822
|
+
case 24:
|
|
40472
39823
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
40473
39824
|
this.updatePriceInView();
|
|
40474
39825
|
this.updateWebConfiguratorTitle();
|
|
@@ -40476,7 +39827,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40476
39827
|
(_this$updateViewPlann10 = this.updateViewPlannerElements) === null || _this$updateViewPlann10 === void 0 || _this$updateViewPlann10.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40477
39828
|
articlesKeys = Object.keys(this.actSet().getDivaArticles());
|
|
40478
39829
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40479
|
-
case
|
|
39830
|
+
case 31:
|
|
40480
39831
|
case "end":
|
|
40481
39832
|
return _context17.stop();
|
|
40482
39833
|
}
|
|
@@ -40487,37 +39838,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40487
39838
|
}
|
|
40488
39839
|
return addSetToActPlanningByDivaNr;
|
|
40489
39840
|
}()
|
|
40490
|
-
}, {
|
|
40491
|
-
key: "initProductId",
|
|
40492
|
-
value: function () {
|
|
40493
|
-
var _initProductId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(productId) {
|
|
40494
|
-
var loadSuccessful;
|
|
40495
|
-
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40496
|
-
while (1) switch (_context18.prev = _context18.next) {
|
|
40497
|
-
case 0:
|
|
40498
|
-
_context18.next = 2;
|
|
40499
|
-
return this.divaBasketHandler.initProductId(this.api, productId, true);
|
|
40500
|
-
case 2:
|
|
40501
|
-
loadSuccessful = _context18.sent;
|
|
40502
|
-
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40503
|
-
_context18.next = 6;
|
|
40504
|
-
break;
|
|
40505
|
-
}
|
|
40506
|
-
setHandlerInstance.addProducts([loadSuccessful], []);
|
|
40507
|
-
return _context18.abrupt("return", loadSuccessful.divaNr);
|
|
40508
|
-
case 6:
|
|
40509
|
-
return _context18.abrupt("return", false);
|
|
40510
|
-
case 7:
|
|
40511
|
-
case "end":
|
|
40512
|
-
return _context18.stop();
|
|
40513
|
-
}
|
|
40514
|
-
}, _callee18, this);
|
|
40515
|
-
}));
|
|
40516
|
-
function initProductId(_x49) {
|
|
40517
|
-
return _initProductId.apply(this, arguments);
|
|
40518
|
-
}
|
|
40519
|
-
return initProductId;
|
|
40520
|
-
}()
|
|
40521
39841
|
}, {
|
|
40522
39842
|
key: "cleanUpEmptySets",
|
|
40523
39843
|
value: function cleanUpEmptySets(ignoreActSet) {
|
|
@@ -40546,28 +39866,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40546
39866
|
}, {
|
|
40547
39867
|
key: "setActSetCurConfigStepKey",
|
|
40548
39868
|
value: function () {
|
|
40549
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
39869
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(curConfigStepKey) {
|
|
40550
39870
|
var set;
|
|
40551
|
-
return _regeneratorRuntime.wrap(function
|
|
40552
|
-
while (1) switch (
|
|
39871
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
39872
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40553
39873
|
case 0:
|
|
40554
39874
|
set = this.actSet();
|
|
40555
39875
|
if (set) {
|
|
40556
|
-
|
|
39876
|
+
_context18.next = 3;
|
|
40557
39877
|
break;
|
|
40558
39878
|
}
|
|
40559
|
-
return
|
|
39879
|
+
return _context18.abrupt("return");
|
|
40560
39880
|
case 3:
|
|
40561
39881
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40562
|
-
|
|
39882
|
+
_context18.next = 6;
|
|
40563
39883
|
return setHandlerInstance.updateNavigation(set);
|
|
40564
39884
|
case 6:
|
|
40565
39885
|
case "end":
|
|
40566
|
-
return
|
|
39886
|
+
return _context18.stop();
|
|
40567
39887
|
}
|
|
40568
|
-
},
|
|
39888
|
+
}, _callee18, this);
|
|
40569
39889
|
}));
|
|
40570
|
-
function setActSetCurConfigStepKey(
|
|
39890
|
+
function setActSetCurConfigStepKey(_x49) {
|
|
40571
39891
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
40572
39892
|
}
|
|
40573
39893
|
return setActSetCurConfigStepKey;
|
|
@@ -40706,17 +40026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40706
40026
|
}, {
|
|
40707
40027
|
key: "deletePlannerElement",
|
|
40708
40028
|
value: function () {
|
|
40709
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40029
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, denyElementSelectionClear) {
|
|
40710
40030
|
var _this$updateViewPlann11;
|
|
40711
40031
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40712
|
-
return _regeneratorRuntime.wrap(function
|
|
40713
|
-
while (1) switch (
|
|
40032
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40033
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40714
40034
|
case 0:
|
|
40715
40035
|
set = this.sets[setId];
|
|
40716
|
-
|
|
40036
|
+
_context19.next = 3;
|
|
40717
40037
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40718
40038
|
case 3:
|
|
40719
|
-
result =
|
|
40039
|
+
result = _context19.sent;
|
|
40720
40040
|
this.updateConfigStructure();
|
|
40721
40041
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40722
40042
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40726,16 +40046,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40726
40046
|
if (result.selectElementId) (_this$updateElementSe5 = this.updateElementSelectionPlanner) === null || _this$updateElementSe5 === void 0 || _this$updateElementSe5.call(this, [result.setId], [result.selectElementId], true);else (_this$updateElementSe6 = this.updateElementSelectionPlanner) === null || _this$updateElementSe6 === void 0 || _this$updateElementSe6.call(this, [], [], true);
|
|
40727
40047
|
}
|
|
40728
40048
|
this.updatePriceInView();
|
|
40049
|
+
productHandlerInstance.updateProducts(this.setsAsArray, this.api, 'onDelete');
|
|
40729
40050
|
this.checkVariantData();
|
|
40730
|
-
|
|
40051
|
+
_context19.next = 15;
|
|
40731
40052
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40732
|
-
case
|
|
40053
|
+
case 15:
|
|
40733
40054
|
case "end":
|
|
40734
|
-
return
|
|
40055
|
+
return _context19.stop();
|
|
40735
40056
|
}
|
|
40736
|
-
},
|
|
40057
|
+
}, _callee19, this);
|
|
40737
40058
|
}));
|
|
40738
|
-
function deletePlannerElement(_x51, _x52
|
|
40059
|
+
function deletePlannerElement(_x50, _x51, _x52) {
|
|
40739
40060
|
return _deletePlannerElement.apply(this, arguments);
|
|
40740
40061
|
}
|
|
40741
40062
|
return deletePlannerElement;
|
|
@@ -40749,17 +40070,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40749
40070
|
}, {
|
|
40750
40071
|
key: "copyPlannerElement",
|
|
40751
40072
|
value: (function () {
|
|
40752
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40073
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, curConfigKey, copyInfo) {
|
|
40753
40074
|
var _this$updateViewPlann12;
|
|
40754
40075
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
40755
|
-
return _regeneratorRuntime.wrap(function
|
|
40756
|
-
while (1) switch (
|
|
40076
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
40077
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40757
40078
|
case 0:
|
|
40758
40079
|
set = this.sets[setId];
|
|
40759
|
-
|
|
40080
|
+
_context20.next = 3;
|
|
40760
40081
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
40761
40082
|
case 3:
|
|
40762
|
-
newSelectedArticle =
|
|
40083
|
+
newSelectedArticle = _context20.sent;
|
|
40763
40084
|
this.updateConfigStructure();
|
|
40764
40085
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40765
40086
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -40772,17 +40093,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40772
40093
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
|
|
40773
40094
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40774
40095
|
}
|
|
40775
|
-
|
|
40096
|
+
productHandlerInstance.updateProducts(this.setsAsArray, this.api, 'onCopy');
|
|
40097
|
+
_context20.next = 14;
|
|
40776
40098
|
return this.checkVariantData();
|
|
40777
|
-
case 13:
|
|
40778
|
-
return _context21.abrupt("return", newConfigStepKey);
|
|
40779
40099
|
case 14:
|
|
40100
|
+
return _context20.abrupt("return", newConfigStepKey);
|
|
40101
|
+
case 15:
|
|
40780
40102
|
case "end":
|
|
40781
|
-
return
|
|
40103
|
+
return _context20.stop();
|
|
40782
40104
|
}
|
|
40783
|
-
},
|
|
40105
|
+
}, _callee20, this);
|
|
40784
40106
|
}));
|
|
40785
|
-
function copyPlannerElement(_x54, _x55, _x56
|
|
40107
|
+
function copyPlannerElement(_x53, _x54, _x55, _x56) {
|
|
40786
40108
|
return _copyPlannerElement.apply(this, arguments);
|
|
40787
40109
|
}
|
|
40788
40110
|
return copyPlannerElement;
|
|
@@ -40811,33 +40133,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40811
40133
|
}, {
|
|
40812
40134
|
key: "getFreePlacesOnGrids",
|
|
40813
40135
|
value: function () {
|
|
40814
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40136
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(gridGroup, from) {
|
|
40815
40137
|
var _this$updateFreePlace;
|
|
40816
40138
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
40817
|
-
return _regeneratorRuntime.wrap(function
|
|
40818
|
-
while (1) switch (
|
|
40139
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
40140
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
40819
40141
|
case 0:
|
|
40820
40142
|
set = this.actSet();
|
|
40821
40143
|
if (set) {
|
|
40822
|
-
|
|
40144
|
+
_context21.next = 3;
|
|
40823
40145
|
break;
|
|
40824
40146
|
}
|
|
40825
40147
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
40826
40148
|
case 3:
|
|
40827
40149
|
if (!gridGroup) {
|
|
40828
|
-
|
|
40150
|
+
_context21.next = 9;
|
|
40829
40151
|
break;
|
|
40830
40152
|
}
|
|
40831
|
-
|
|
40153
|
+
_context21.next = 6;
|
|
40832
40154
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
40833
40155
|
case 6:
|
|
40834
|
-
|
|
40835
|
-
|
|
40156
|
+
_context21.t0 = _context21.sent;
|
|
40157
|
+
_context21.next = 10;
|
|
40836
40158
|
break;
|
|
40837
40159
|
case 9:
|
|
40838
|
-
|
|
40160
|
+
_context21.t0 = undefined;
|
|
40839
40161
|
case 10:
|
|
40840
|
-
freeShelfGrids =
|
|
40162
|
+
freeShelfGrids = _context21.t0;
|
|
40841
40163
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
40842
40164
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
40843
40165
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -40845,17 +40167,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40845
40167
|
freeShelfGrids: freeShelfGrids,
|
|
40846
40168
|
plannedShelfGrids: plannedShelfGrids
|
|
40847
40169
|
});
|
|
40848
|
-
return
|
|
40170
|
+
return _context21.abrupt("return", {
|
|
40849
40171
|
freeShelfGrids: freeShelfGrids,
|
|
40850
40172
|
plannedShelfGrids: plannedShelfGrids
|
|
40851
40173
|
});
|
|
40852
40174
|
case 16:
|
|
40853
40175
|
case "end":
|
|
40854
|
-
return
|
|
40176
|
+
return _context21.stop();
|
|
40855
40177
|
}
|
|
40856
|
-
},
|
|
40178
|
+
}, _callee21, this);
|
|
40857
40179
|
}));
|
|
40858
|
-
function getFreePlacesOnGrids(
|
|
40180
|
+
function getFreePlacesOnGrids(_x57, _x58) {
|
|
40859
40181
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
40860
40182
|
}
|
|
40861
40183
|
return getFreePlacesOnGrids;
|
|
@@ -40872,36 +40194,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40872
40194
|
}, {
|
|
40873
40195
|
key: "moveShelfItemToGrid",
|
|
40874
40196
|
value: function () {
|
|
40875
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40197
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
40876
40198
|
var set, newGridId;
|
|
40877
|
-
return _regeneratorRuntime.wrap(function
|
|
40878
|
-
while (1) switch (
|
|
40199
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
40200
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
40879
40201
|
case 0:
|
|
40880
40202
|
set = this.actSet();
|
|
40881
40203
|
if (set) {
|
|
40882
|
-
|
|
40204
|
+
_context22.next = 3;
|
|
40883
40205
|
break;
|
|
40884
40206
|
}
|
|
40885
|
-
return
|
|
40207
|
+
return _context22.abrupt("return");
|
|
40886
40208
|
case 3:
|
|
40887
|
-
|
|
40209
|
+
_context22.next = 5;
|
|
40888
40210
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
40889
40211
|
case 5:
|
|
40890
|
-
newGridId =
|
|
40212
|
+
newGridId = _context22.sent;
|
|
40891
40213
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
40892
40214
|
if (!newGridId) {
|
|
40893
|
-
|
|
40215
|
+
_context22.next = 10;
|
|
40894
40216
|
break;
|
|
40895
40217
|
}
|
|
40896
|
-
|
|
40218
|
+
_context22.next = 10;
|
|
40897
40219
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
40898
40220
|
case 10:
|
|
40899
40221
|
case "end":
|
|
40900
|
-
return
|
|
40222
|
+
return _context22.stop();
|
|
40901
40223
|
}
|
|
40902
|
-
},
|
|
40224
|
+
}, _callee22, this);
|
|
40903
40225
|
}));
|
|
40904
|
-
function moveShelfItemToGrid(_x60, _x61, _x62
|
|
40226
|
+
function moveShelfItemToGrid(_x59, _x60, _x61, _x62) {
|
|
40905
40227
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
40906
40228
|
}
|
|
40907
40229
|
return moveShelfItemToGrid;
|
|
@@ -40909,27 +40231,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40909
40231
|
}, {
|
|
40910
40232
|
key: "resetArticle",
|
|
40911
40233
|
value: function () {
|
|
40912
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40234
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(basketId) {
|
|
40913
40235
|
var set;
|
|
40914
|
-
return _regeneratorRuntime.wrap(function
|
|
40915
|
-
while (1) switch (
|
|
40236
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
40237
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
40916
40238
|
case 0:
|
|
40917
40239
|
set = this.actSet();
|
|
40918
40240
|
if (set) {
|
|
40919
|
-
|
|
40241
|
+
_context23.next = 3;
|
|
40920
40242
|
break;
|
|
40921
40243
|
}
|
|
40922
|
-
return
|
|
40244
|
+
return _context23.abrupt("return");
|
|
40923
40245
|
case 3:
|
|
40924
|
-
|
|
40246
|
+
_context23.next = 5;
|
|
40925
40247
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
40926
40248
|
case 5:
|
|
40927
40249
|
case "end":
|
|
40928
|
-
return
|
|
40250
|
+
return _context23.stop();
|
|
40929
40251
|
}
|
|
40930
|
-
},
|
|
40252
|
+
}, _callee23, this);
|
|
40931
40253
|
}));
|
|
40932
|
-
function resetArticle(
|
|
40254
|
+
function resetArticle(_x63) {
|
|
40933
40255
|
return _resetArticle.apply(this, arguments);
|
|
40934
40256
|
}
|
|
40935
40257
|
return resetArticle;
|
|
@@ -40937,27 +40259,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40937
40259
|
}, {
|
|
40938
40260
|
key: "checkVariantData",
|
|
40939
40261
|
value: function () {
|
|
40940
|
-
var _checkVariantData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40262
|
+
var _checkVariantData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
|
|
40941
40263
|
var somethingChanged;
|
|
40942
|
-
return _regeneratorRuntime.wrap(function
|
|
40943
|
-
while (1) switch (
|
|
40264
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
40265
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
40944
40266
|
case 0:
|
|
40945
40267
|
if (!this.api.getDoCheckVariantData()) {
|
|
40946
|
-
|
|
40268
|
+
_context24.next = 5;
|
|
40947
40269
|
break;
|
|
40948
40270
|
}
|
|
40949
|
-
|
|
40271
|
+
_context24.next = 3;
|
|
40950
40272
|
return setHandlerInstance.checkVariantData(this.actSet());
|
|
40951
40273
|
case 3:
|
|
40952
|
-
somethingChanged =
|
|
40274
|
+
somethingChanged = _context24.sent;
|
|
40953
40275
|
if (somethingChanged) {
|
|
40954
40276
|
this.updatePriceInView();
|
|
40955
40277
|
}
|
|
40956
40278
|
case 5:
|
|
40957
40279
|
case "end":
|
|
40958
|
-
return
|
|
40280
|
+
return _context24.stop();
|
|
40959
40281
|
}
|
|
40960
|
-
},
|
|
40282
|
+
}, _callee24, this);
|
|
40961
40283
|
}));
|
|
40962
40284
|
function checkVariantData() {
|
|
40963
40285
|
return _checkVariantData.apply(this, arguments);
|
|
@@ -41053,7 +40375,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41053
40375
|
}, {
|
|
41054
40376
|
key: "saveToBasketWrapper",
|
|
41055
40377
|
value: function () {
|
|
41056
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40378
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
|
|
41057
40379
|
var _this$actions25,
|
|
41058
40380
|
_this$actions25$toggl,
|
|
41059
40381
|
_this$actions26,
|
|
@@ -41061,48 +40383,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41061
40383
|
_this2 = this,
|
|
41062
40384
|
_this$actions30,
|
|
41063
40385
|
_this$i18n14;
|
|
41064
|
-
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product,
|
|
41065
|
-
return _regeneratorRuntime.wrap(function
|
|
41066
|
-
while (1) switch (
|
|
40386
|
+
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, result, _this$actions27, _this$i18n8, _this$i18n9, _this$actions28, _this$i18n10, _this$i18n11, _this$actions29, _this$i18n12, _this$i18n13, _this$updatePlannerMs2, _this$actions31, _this$i18n15;
|
|
40387
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
40388
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
41067
40389
|
case 0:
|
|
41068
40390
|
returnTo = this.getReturnTo(event);
|
|
41069
40391
|
finalEvent = event;
|
|
41070
40392
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
41071
|
-
|
|
40393
|
+
_context25.next = 14;
|
|
41072
40394
|
break;
|
|
41073
40395
|
}
|
|
41074
40396
|
product = undefined;
|
|
41075
40397
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
41076
|
-
|
|
40398
|
+
_context25.next = 8;
|
|
41077
40399
|
break;
|
|
41078
40400
|
}
|
|
41079
|
-
|
|
40401
|
+
_context25.next = 7;
|
|
41080
40402
|
return this.api.getDataCache(this.api.getCatalogProductUrl(this.actSet().getCatalogCodex()), undefined, undefined, 'catalog');
|
|
41081
40403
|
case 7:
|
|
41082
|
-
|
|
41083
|
-
|
|
41084
|
-
|
|
41085
|
-
case 10:
|
|
41086
|
-
_context26.next = 12;
|
|
40404
|
+
_context25.sent;
|
|
40405
|
+
case 8:
|
|
40406
|
+
_context25.next = 10;
|
|
41087
40407
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
41088
|
-
case
|
|
41089
|
-
finalEvent =
|
|
40408
|
+
case 10:
|
|
40409
|
+
finalEvent = _context25.sent;
|
|
41090
40410
|
if (finalEvent) {
|
|
41091
|
-
|
|
40411
|
+
_context25.next = 13;
|
|
41092
40412
|
break;
|
|
41093
40413
|
}
|
|
41094
|
-
return
|
|
41095
|
-
case
|
|
40414
|
+
return _context25.abrupt("return", 'canceled');
|
|
40415
|
+
case 13:
|
|
41096
40416
|
returnTo = finalEvent == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
41097
|
-
case
|
|
40417
|
+
case 14:
|
|
41098
40418
|
(_this$actions25 = this.actions) === null || _this$actions25 === void 0 || (_this$actions25$toggl = _this$actions25.toggleLoading) === null || _this$actions25$toggl === void 0 || _this$actions25$toggl.call(_this$actions25, 'Planner_Saving', false, true);
|
|
41099
|
-
|
|
40419
|
+
_context25.next = 17;
|
|
41100
40420
|
return this.saveToBasket(finalEvent, repairOnly, force);
|
|
41101
|
-
case
|
|
41102
|
-
result =
|
|
40421
|
+
case 17:
|
|
40422
|
+
result = _context25.sent;
|
|
41103
40423
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || (_this$actions26$toggl = _this$actions26.toggleLoading) === null || _this$actions26$toggl === void 0 || _this$actions26$toggl.call(_this$actions26, 'Planner_Saving', false, false);
|
|
41104
40424
|
if (!(result === 'canceled')) {
|
|
41105
|
-
|
|
40425
|
+
_context25.next = 23;
|
|
41106
40426
|
break;
|
|
41107
40427
|
}
|
|
41108
40428
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -41110,12 +40430,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41110
40430
|
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() : '',
|
|
41111
40431
|
accept: true
|
|
41112
40432
|
});
|
|
41113
|
-
return
|
|
41114
|
-
case
|
|
41115
|
-
|
|
41116
|
-
|
|
40433
|
+
return _context25.abrupt("return", result);
|
|
40434
|
+
case 23:
|
|
40435
|
+
_context25.t0 = returnTo;
|
|
40436
|
+
_context25.next = _context25.t0 === 'OPEN_PDF' ? 26 : _context25.t0 === 'SAVE_BASKET_WITH_MODAL' ? 28 : 29;
|
|
41117
40437
|
break;
|
|
41118
|
-
case
|
|
40438
|
+
case 26:
|
|
41119
40439
|
if (!this.getBasket().PDFDocumentURL) {
|
|
41120
40440
|
LOG$1.error(new DivaError('PDF url is missing in basket', {
|
|
41121
40441
|
code: 'WC_0010'
|
|
@@ -41133,22 +40453,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41133
40453
|
}
|
|
41134
40454
|
});
|
|
41135
40455
|
}
|
|
41136
|
-
return
|
|
41137
|
-
case
|
|
40456
|
+
return _context25.abrupt("break", 29);
|
|
40457
|
+
case 28:
|
|
41138
40458
|
(_this$actions30 = this.actions) === null || _this$actions30 === void 0 || _this$actions30.openModal({
|
|
41139
40459
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
41140
40460
|
accept: true
|
|
41141
40461
|
});
|
|
41142
|
-
case
|
|
40462
|
+
case 29:
|
|
41143
40463
|
if (!(result == 'noArticleToSave')) {
|
|
41144
|
-
|
|
40464
|
+
_context25.next = 32;
|
|
41145
40465
|
break;
|
|
41146
40466
|
}
|
|
41147
40467
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
41148
|
-
return
|
|
41149
|
-
case
|
|
40468
|
+
return _context25.abrupt("return", 'canceled');
|
|
40469
|
+
case 32:
|
|
41150
40470
|
if (!(result == 'payloadToBig')) {
|
|
41151
|
-
|
|
40471
|
+
_context25.next = 35;
|
|
41152
40472
|
break;
|
|
41153
40473
|
}
|
|
41154
40474
|
(_this$actions31 = this.actions) === null || _this$actions31 === void 0 || _this$actions31.openModal({
|
|
@@ -41156,16 +40476,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41156
40476
|
text: (_this$i18n15 = this.i18n()) === null || _this$i18n15 === void 0 ? void 0 : _this$i18n15.t('configurator.PAYLOAD_TO_BIG'),
|
|
41157
40477
|
title: 'modals.error_saving'
|
|
41158
40478
|
});
|
|
41159
|
-
return
|
|
41160
|
-
case
|
|
41161
|
-
return
|
|
41162
|
-
case
|
|
40479
|
+
return _context25.abrupt("return", 'canceled');
|
|
40480
|
+
case 35:
|
|
40481
|
+
return _context25.abrupt("return", result);
|
|
40482
|
+
case 36:
|
|
41163
40483
|
case "end":
|
|
41164
|
-
return
|
|
40484
|
+
return _context25.stop();
|
|
41165
40485
|
}
|
|
41166
|
-
},
|
|
40486
|
+
}, _callee25, this);
|
|
41167
40487
|
}));
|
|
41168
|
-
function saveToBasketWrapper(_x65, _x66
|
|
40488
|
+
function saveToBasketWrapper(_x64, _x65, _x66) {
|
|
41169
40489
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
41170
40490
|
}
|
|
41171
40491
|
return saveToBasketWrapper;
|
|
@@ -41173,51 +40493,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41173
40493
|
}, {
|
|
41174
40494
|
key: "saveToBasket",
|
|
41175
40495
|
value: function () {
|
|
41176
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41177
|
-
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33;
|
|
41178
|
-
var set, actBasket, returnTo, oldReturnTo,
|
|
41179
|
-
return _regeneratorRuntime.wrap(function
|
|
41180
|
-
while (1) switch (
|
|
40496
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
40497
|
+
var _returnTo, _event, _event2, _event3, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
|
|
40498
|
+
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, _event4, product;
|
|
40499
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
40500
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41181
40501
|
case 0:
|
|
41182
40502
|
set = this.actSet();
|
|
41183
40503
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
41184
|
-
|
|
40504
|
+
_context26.next = 3;
|
|
41185
40505
|
break;
|
|
41186
40506
|
}
|
|
41187
|
-
return
|
|
40507
|
+
return _context26.abrupt("return", 'noArticleToSave');
|
|
41188
40508
|
case 3:
|
|
41189
40509
|
actBasket = this.divaBasketHandler.actBasket;
|
|
41190
40510
|
returnTo = this.getReturnTo(event);
|
|
41191
40511
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
41192
|
-
|
|
40512
|
+
_context26.next = 13;
|
|
41193
40513
|
break;
|
|
41194
40514
|
}
|
|
41195
40515
|
oldReturnTo = returnTo;
|
|
41196
40516
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
41197
|
-
|
|
41198
|
-
return this.getValidVariantsLength();
|
|
41199
|
-
case 10:
|
|
41200
|
-
count = _context27.sent;
|
|
41201
|
-
_context27.next = 13;
|
|
41202
|
-
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41203
|
-
case 13:
|
|
41204
|
-
basketData = _context27.sent;
|
|
41205
|
-
bytes = new TextEncoder().encode(JSON.stringify(basketData.getAsJson())).length;
|
|
41206
|
-
if (!(bytes * count > 15000000)) {
|
|
41207
|
-
_context27.next = 17;
|
|
41208
|
-
break;
|
|
41209
|
-
}
|
|
41210
|
-
return _context27.abrupt("return", 'payloadToBig');
|
|
41211
|
-
case 17:
|
|
41212
|
-
_context27.next = 19;
|
|
40517
|
+
_context26.next = 10;
|
|
41213
40518
|
return this.handleFavorites('SAVE');
|
|
41214
|
-
case
|
|
41215
|
-
result =
|
|
40519
|
+
case 10:
|
|
40520
|
+
result = _context26.sent;
|
|
41216
40521
|
if (result === 'canceled') {
|
|
41217
40522
|
this.ReturnTo = oldReturnTo;
|
|
41218
40523
|
}
|
|
41219
|
-
return
|
|
41220
|
-
case
|
|
40524
|
+
return _context26.abrupt("return", result);
|
|
40525
|
+
case 13:
|
|
41221
40526
|
LOG$1.startTransaction({
|
|
41222
40527
|
event: (_event = event) !== null && _event !== void 0 ? _event : 'onAddToBasket',
|
|
41223
40528
|
message: 'Perform case: ' + ((_event2 = event) !== null && _event2 !== void 0 ? _event2 : 'onAddToBasket'),
|
|
@@ -41232,13 +40537,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41232
40537
|
warningTime: 2000,
|
|
41233
40538
|
errorTime: 4000
|
|
41234
40539
|
});
|
|
41235
|
-
|
|
41236
|
-
|
|
41237
|
-
|
|
40540
|
+
_context26.t0 = this.divaBasketHandler;
|
|
40541
|
+
_context26.t1 = this.divaBasketHandler.actDivaNr;
|
|
40542
|
+
_context26.next = 18;
|
|
41238
40543
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41239
|
-
case
|
|
41240
|
-
|
|
41241
|
-
|
|
40544
|
+
case 18:
|
|
40545
|
+
_context26.t2 = _context26.sent;
|
|
40546
|
+
_context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
|
|
41242
40547
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
41243
40548
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
41244
40549
|
returnTo = this.ReturnTo;
|
|
@@ -41254,27 +40559,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41254
40559
|
actBasket.Updated = Date.now();
|
|
41255
40560
|
LOG$1.successTransaction('FILL_BASKET');
|
|
41256
40561
|
if (!returnTo) {
|
|
41257
|
-
|
|
40562
|
+
_context26.next = 55;
|
|
41258
40563
|
break;
|
|
41259
40564
|
}
|
|
41260
|
-
|
|
41261
|
-
|
|
40565
|
+
_context26.t3 = returnTo;
|
|
40566
|
+
_context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 30 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 33 : _context26.t3 === 'OPEN_PDF' ? 35 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t3 === 'SAVE_BASKET' ? 35 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 35 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 35 : 55;
|
|
41262
40567
|
break;
|
|
41263
|
-
case
|
|
41264
|
-
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.
|
|
40568
|
+
case 30:
|
|
40569
|
+
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
|
|
40570
|
+
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
41265
40571
|
type: 'SELLER',
|
|
41266
40572
|
parameters: {
|
|
41267
40573
|
module: 'PCreator',
|
|
41268
40574
|
divaNr: actBasket.DivaNr
|
|
41269
40575
|
},
|
|
41270
40576
|
internal: {
|
|
41271
|
-
basketData: actBasket
|
|
41272
|
-
edited: true
|
|
40577
|
+
basketData: actBasket
|
|
41273
40578
|
}
|
|
41274
40579
|
});
|
|
41275
|
-
return
|
|
41276
|
-
case
|
|
41277
|
-
(_this$
|
|
40580
|
+
return _context26.abrupt("break", 55);
|
|
40581
|
+
case 33:
|
|
40582
|
+
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
41278
40583
|
type: 'SELLER',
|
|
41279
40584
|
parameters: {
|
|
41280
40585
|
module: 'Basket',
|
|
@@ -41284,37 +40589,37 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41284
40589
|
basketData: actBasket
|
|
41285
40590
|
}
|
|
41286
40591
|
});
|
|
41287
|
-
return
|
|
41288
|
-
case
|
|
40592
|
+
return _context26.abrupt("break", 55);
|
|
40593
|
+
case 35:
|
|
41289
40594
|
if (!(event == 'onSaveProduct')) {
|
|
41290
|
-
|
|
40595
|
+
_context26.next = 45;
|
|
41291
40596
|
break;
|
|
41292
40597
|
}
|
|
41293
40598
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
41294
40599
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
41295
|
-
|
|
40600
|
+
_context26.next = 39;
|
|
41296
40601
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41297
|
-
case
|
|
41298
|
-
|
|
40602
|
+
case 39:
|
|
40603
|
+
_context26.next = 41;
|
|
41299
40604
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41300
|
-
case
|
|
41301
|
-
newDivaNr =
|
|
40605
|
+
case 41:
|
|
40606
|
+
newDivaNr = _context26.sent;
|
|
41302
40607
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41303
|
-
|
|
40608
|
+
_context26.next = 54;
|
|
41304
40609
|
break;
|
|
41305
|
-
case
|
|
40610
|
+
case 45:
|
|
41306
40611
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
41307
40612
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = undefined;
|
|
41308
40613
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
41309
40614
|
}
|
|
41310
40615
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41311
40616
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41312
|
-
|
|
40617
|
+
_context26.next = 50;
|
|
41313
40618
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41314
|
-
case
|
|
41315
|
-
_result2 =
|
|
40619
|
+
case 50:
|
|
40620
|
+
_result2 = _context26.sent;
|
|
41316
40621
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41317
|
-
|
|
40622
|
+
_context26.next = 54;
|
|
41318
40623
|
break;
|
|
41319
40624
|
}
|
|
41320
40625
|
LOG$1.errorTransaction((_event4 = event) !== null && _event4 !== void 0 ? _event4 : 'onAddToBasket', 'WC_0019', 'Error saving basket', {
|
|
@@ -41323,23 +40628,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41323
40628
|
status: this.getBasketData().Status,
|
|
41324
40629
|
bv: set.getSetPrice() / 1000
|
|
41325
40630
|
});
|
|
41326
|
-
return
|
|
41327
|
-
case
|
|
41328
|
-
return
|
|
41329
|
-
case
|
|
40631
|
+
return _context26.abrupt("return", 'canceled');
|
|
40632
|
+
case 54:
|
|
40633
|
+
return _context26.abrupt("break", 55);
|
|
40634
|
+
case 55:
|
|
41330
40635
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41331
|
-
|
|
40636
|
+
_context26.next = 58;
|
|
41332
40637
|
return this.addToBasket(actBasket, event);
|
|
41333
|
-
case
|
|
41334
|
-
product =
|
|
41335
|
-
return
|
|
41336
|
-
case
|
|
40638
|
+
case 58:
|
|
40639
|
+
product = _context26.sent;
|
|
40640
|
+
return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
40641
|
+
case 60:
|
|
41337
40642
|
case "end":
|
|
41338
|
-
return
|
|
40643
|
+
return _context26.stop();
|
|
41339
40644
|
}
|
|
41340
|
-
},
|
|
40645
|
+
}, _callee26, this);
|
|
41341
40646
|
}));
|
|
41342
|
-
function saveToBasket(_x68, _x69
|
|
40647
|
+
function saveToBasket(_x67, _x68, _x69) {
|
|
41343
40648
|
return _saveToBasket.apply(this, arguments);
|
|
41344
40649
|
}
|
|
41345
40650
|
return saveToBasket;
|
|
@@ -41564,23 +40869,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41564
40869
|
}, {
|
|
41565
40870
|
key: "getBasketDataWithEkText",
|
|
41566
40871
|
value: function () {
|
|
41567
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41568
|
-
return _regeneratorRuntime.wrap(function
|
|
41569
|
-
while (1) switch (
|
|
40872
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
40873
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
40874
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41570
40875
|
case 0:
|
|
41571
|
-
|
|
41572
|
-
|
|
41573
|
-
|
|
40876
|
+
_context27.t0 = this.divaBasketHandler;
|
|
40877
|
+
_context27.t1 = this.divaBasketHandler.actDivaNr;
|
|
40878
|
+
_context27.next = 4;
|
|
41574
40879
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41575
40880
|
case 4:
|
|
41576
|
-
|
|
41577
|
-
|
|
41578
|
-
return
|
|
40881
|
+
_context27.t2 = _context27.sent;
|
|
40882
|
+
_context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
|
|
40883
|
+
return _context27.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41579
40884
|
case 7:
|
|
41580
40885
|
case "end":
|
|
41581
|
-
return
|
|
40886
|
+
return _context27.stop();
|
|
41582
40887
|
}
|
|
41583
|
-
},
|
|
40888
|
+
}, _callee27, this);
|
|
41584
40889
|
}));
|
|
41585
40890
|
function getBasketDataWithEkText() {
|
|
41586
40891
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41606,17 +40911,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41606
40911
|
}, {
|
|
41607
40912
|
key: "addToBasket",
|
|
41608
40913
|
value: function () {
|
|
41609
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41610
|
-
var _this$
|
|
41611
|
-
_this$actions35,
|
|
40914
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(actBasket) {
|
|
40915
|
+
var _this$actions35,
|
|
41612
40916
|
_this$actions36,
|
|
41613
40917
|
_this$actions37,
|
|
41614
40918
|
_this$actions38,
|
|
40919
|
+
_this$actions39,
|
|
41615
40920
|
_this$divaBasketHandl3,
|
|
41616
40921
|
_this3 = this,
|
|
41617
|
-
_this$actions39,
|
|
41618
40922
|
_this$actions40,
|
|
41619
|
-
_this$actions41
|
|
40923
|
+
_this$actions41,
|
|
40924
|
+
_this$actions42;
|
|
41620
40925
|
var event,
|
|
41621
40926
|
addToBasketLog,
|
|
41622
40927
|
emailConfig,
|
|
@@ -41625,50 +40930,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41625
40930
|
to,
|
|
41626
40931
|
variants,
|
|
41627
40932
|
products,
|
|
41628
|
-
|
|
41629
|
-
return _regeneratorRuntime.wrap(function
|
|
41630
|
-
while (1) switch (
|
|
40933
|
+
_args28 = arguments;
|
|
40934
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
40935
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41631
40936
|
case 0:
|
|
41632
|
-
event =
|
|
40937
|
+
event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
|
|
41633
40938
|
addToBasketLog = true;
|
|
41634
|
-
|
|
41635
|
-
|
|
40939
|
+
_context28.t0 = event;
|
|
40940
|
+
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 8 : _context28.t0 === 'onWebPlanerShare' ? 11 : _context28.t0 === 'onRequestConsulation' ? 14 : _context28.t0 === 'onSave' ? 17 : _context28.t0 === 'onSendEmail' ? 20 : _context28.t0 === 'onSaveProduct' ? 25 : _context28.t0 === 'dontSaveBasket' ? 33 : _context28.t0 === 'onAddToBasket' ? 35 : 35;
|
|
41636
40941
|
break;
|
|
41637
40942
|
case 5:
|
|
41638
40943
|
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
41639
|
-
(_this$
|
|
40944
|
+
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
41640
40945
|
type: 'onWebPlanerPrint',
|
|
41641
40946
|
data: actBasket.getAsJson()
|
|
41642
40947
|
});
|
|
41643
|
-
return
|
|
40948
|
+
return _context28.abrupt("break", 38);
|
|
41644
40949
|
case 8:
|
|
41645
40950
|
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
41646
|
-
(_this$
|
|
40951
|
+
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41647
40952
|
type: 'onWebPlanerSave',
|
|
41648
40953
|
data: actBasket.getAsJson()
|
|
41649
40954
|
});
|
|
41650
|
-
return
|
|
40955
|
+
return _context28.abrupt("break", 38);
|
|
41651
40956
|
case 11:
|
|
41652
40957
|
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
41653
|
-
(_this$
|
|
40958
|
+
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41654
40959
|
type: 'onWebPlanerShare',
|
|
41655
40960
|
data: actBasket.getAsJson()
|
|
41656
40961
|
});
|
|
41657
|
-
return
|
|
40962
|
+
return _context28.abrupt("break", 38);
|
|
41658
40963
|
case 14:
|
|
41659
40964
|
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
41660
|
-
(_this$
|
|
40965
|
+
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41661
40966
|
type: 'onRequestConsulation',
|
|
41662
40967
|
data: actBasket.getAsJson()
|
|
41663
40968
|
});
|
|
41664
|
-
return
|
|
40969
|
+
return _context28.abrupt("break", 38);
|
|
41665
40970
|
case 17:
|
|
41666
40971
|
this.handleSuccessTransaction('onSave', actBasket);
|
|
41667
|
-
(_this$
|
|
40972
|
+
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41668
40973
|
type: 'onSave',
|
|
41669
40974
|
data: actBasket.getAsJson()
|
|
41670
40975
|
});
|
|
41671
|
-
return
|
|
40976
|
+
return _context28.abrupt("break", 38);
|
|
41672
40977
|
case 20:
|
|
41673
40978
|
emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
|
|
41674
40979
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41700,46 +41005,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41700
41005
|
});
|
|
41701
41006
|
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41702
41007
|
}
|
|
41703
|
-
(_this$
|
|
41008
|
+
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41704
41009
|
type: 'onAddToBasket',
|
|
41705
41010
|
data: actBasket.getAsJson()
|
|
41706
41011
|
});
|
|
41707
|
-
return
|
|
41012
|
+
return _context28.abrupt("break", 38);
|
|
41708
41013
|
case 25:
|
|
41709
41014
|
this.actSet().CatalogData;
|
|
41710
|
-
|
|
41015
|
+
_context28.next = 28;
|
|
41711
41016
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41712
41017
|
case 28:
|
|
41713
|
-
products =
|
|
41018
|
+
products = _context28.sent;
|
|
41714
41019
|
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41715
|
-
(_this$
|
|
41020
|
+
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41716
41021
|
type: 'onAddToBasket',
|
|
41717
41022
|
data: actBasket.getAsJson()
|
|
41718
41023
|
});
|
|
41719
41024
|
if (!products) {
|
|
41720
|
-
|
|
41025
|
+
_context28.next = 33;
|
|
41721
41026
|
break;
|
|
41722
41027
|
}
|
|
41723
|
-
return
|
|
41028
|
+
return _context28.abrupt("return", products[0]);
|
|
41724
41029
|
case 33:
|
|
41725
41030
|
this.handleSuccessTransaction('onAddToBasketCallback', actBasket);
|
|
41726
41031
|
addToBasketLog = false;
|
|
41727
41032
|
case 35:
|
|
41728
41033
|
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41729
|
-
(_this$
|
|
41034
|
+
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41730
41035
|
type: 'onAddToBasket',
|
|
41731
41036
|
data: actBasket.getAsJson()
|
|
41732
41037
|
});
|
|
41733
|
-
return
|
|
41038
|
+
return _context28.abrupt("break", 38);
|
|
41734
41039
|
case 38:
|
|
41735
|
-
return
|
|
41040
|
+
return _context28.abrupt("return");
|
|
41736
41041
|
case 39:
|
|
41737
41042
|
case "end":
|
|
41738
|
-
return
|
|
41043
|
+
return _context28.stop();
|
|
41739
41044
|
}
|
|
41740
|
-
},
|
|
41045
|
+
}, _callee28, this);
|
|
41741
41046
|
}));
|
|
41742
|
-
function addToBasket(
|
|
41047
|
+
function addToBasket(_x70) {
|
|
41743
41048
|
return _addToBasket.apply(this, arguments);
|
|
41744
41049
|
}
|
|
41745
41050
|
return addToBasket;
|
|
@@ -41758,8 +41063,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41758
41063
|
}, {
|
|
41759
41064
|
key: "openPDFpostAsEvent",
|
|
41760
41065
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
41761
|
-
var _this$
|
|
41762
|
-
(_this$
|
|
41066
|
+
var _this$actions43, _this$actions44, _this$actions45;
|
|
41067
|
+
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.updateBreadcrumbs({
|
|
41763
41068
|
type: 'update',
|
|
41764
41069
|
param: {
|
|
41765
41070
|
groupId: 'SHOWROOM',
|
|
@@ -41773,7 +41078,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41773
41078
|
}
|
|
41774
41079
|
}
|
|
41775
41080
|
});
|
|
41776
|
-
(_this$
|
|
41081
|
+
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.updateBreadcrumbs({
|
|
41777
41082
|
type: 'update',
|
|
41778
41083
|
param: {
|
|
41779
41084
|
groupId: 'SHOWROOM',
|
|
@@ -41787,7 +41092,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41787
41092
|
}
|
|
41788
41093
|
}
|
|
41789
41094
|
});
|
|
41790
|
-
(_this$
|
|
41095
|
+
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.openComponent({
|
|
41791
41096
|
type: 'REPORT',
|
|
41792
41097
|
parameters: {
|
|
41793
41098
|
id: mongoDBId
|
|
@@ -42007,22 +41312,22 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42007
41312
|
}, {
|
|
42008
41313
|
key: "subscribeToWebPlannerEvents",
|
|
42009
41314
|
value: function subscribeToWebPlannerEvents() {
|
|
42010
|
-
var _this$
|
|
42011
|
-
(_this$
|
|
41315
|
+
var _this$actions46;
|
|
41316
|
+
(_this$actions46 = this.actions) === null || _this$actions46 === void 0 || _this$actions46.subscribeEvents(this.addToBasketEventFunction);
|
|
42012
41317
|
}
|
|
42013
41318
|
}, {
|
|
42014
41319
|
key: "unsubscribeFromWebPlannerEvents",
|
|
42015
41320
|
value: function unsubscribeFromWebPlannerEvents() {
|
|
42016
|
-
var _this$
|
|
42017
|
-
(_this$
|
|
41321
|
+
var _this$actions47;
|
|
41322
|
+
(_this$actions47 = this.actions) === null || _this$actions47 === void 0 || _this$actions47.unSubscribeEvents(this.addToBasketEventFunction);
|
|
42018
41323
|
}
|
|
42019
41324
|
}, {
|
|
42020
41325
|
key: "initApiForLogicOnly",
|
|
42021
41326
|
value: //just for testing purposes
|
|
42022
41327
|
function () {
|
|
42023
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42024
|
-
return _regeneratorRuntime.wrap(function
|
|
42025
|
-
while (1) switch (
|
|
41328
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
41329
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
41330
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
42026
41331
|
case 0:
|
|
42027
41332
|
//empty services
|
|
42028
41333
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -42035,17 +41340,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42035
41340
|
jwt: jwt,
|
|
42036
41341
|
apiKey: apiKey
|
|
42037
41342
|
}), handler);
|
|
42038
|
-
|
|
41343
|
+
_context29.next = 3;
|
|
42039
41344
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
42040
41345
|
case 3:
|
|
42041
41346
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
42042
41347
|
case 4:
|
|
42043
41348
|
case "end":
|
|
42044
|
-
return
|
|
41349
|
+
return _context29.stop();
|
|
42045
41350
|
}
|
|
42046
|
-
},
|
|
41351
|
+
}, _callee29, this);
|
|
42047
41352
|
}));
|
|
42048
|
-
function initApiForLogicOnly(_x72, _x73, _x74, _x75, _x76, _x77
|
|
41353
|
+
function initApiForLogicOnly(_x71, _x72, _x73, _x74, _x75, _x76, _x77) {
|
|
42049
41354
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
42050
41355
|
}
|
|
42051
41356
|
return initApiForLogicOnly;
|
|
@@ -42058,16 +41363,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42058
41363
|
}, {
|
|
42059
41364
|
key: "loadBasket",
|
|
42060
41365
|
value: function () {
|
|
42061
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42062
|
-
return _regeneratorRuntime.wrap(function
|
|
42063
|
-
while (1) switch (
|
|
41366
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
|
|
41367
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
41368
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
42064
41369
|
case 0:
|
|
42065
|
-
return
|
|
41370
|
+
return _context30.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
42066
41371
|
case 1:
|
|
42067
41372
|
case "end":
|
|
42068
|
-
return
|
|
41373
|
+
return _context30.stop();
|
|
42069
41374
|
}
|
|
42070
|
-
},
|
|
41375
|
+
}, _callee30, this);
|
|
42071
41376
|
}));
|
|
42072
41377
|
function loadBasket() {
|
|
42073
41378
|
return _loadBasket.apply(this, arguments);
|
|
@@ -42082,31 +41387,31 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42082
41387
|
}, {
|
|
42083
41388
|
key: "initBasket",
|
|
42084
41389
|
value: function () {
|
|
42085
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41390
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(init3D, ignoreFavorites) {
|
|
42086
41391
|
var _initSetState$api$web2;
|
|
42087
41392
|
var initSetState, sets, result, _sets$, set, basket;
|
|
42088
|
-
return _regeneratorRuntime.wrap(function
|
|
42089
|
-
while (1) switch (
|
|
41393
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
41394
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
42090
41395
|
case 0:
|
|
42091
41396
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
42092
41397
|
initSetState = this.getInitStateForSet(!init3D);
|
|
42093
41398
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
42094
|
-
|
|
41399
|
+
_context31.next = 5;
|
|
42095
41400
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
42096
41401
|
case 5:
|
|
42097
|
-
sets =
|
|
41402
|
+
sets = _context31.sent;
|
|
42098
41403
|
if (!((_initSetState$api$web2 = initSetState.api.webConfig) !== null && _initSetState$api$web2 !== void 0 && _initSetState$api$web2.checkForProductsPrice)) {
|
|
42099
|
-
|
|
41404
|
+
_context31.next = 12;
|
|
42100
41405
|
break;
|
|
42101
41406
|
}
|
|
42102
41407
|
if (!this.divaBasketHandler.actBasket.OrigProductId) {
|
|
42103
|
-
|
|
41408
|
+
_context31.next = 12;
|
|
42104
41409
|
break;
|
|
42105
41410
|
}
|
|
42106
|
-
|
|
41411
|
+
_context31.next = 10;
|
|
42107
41412
|
return this.divaBasketHandler.getProduct(this.api, this.divaBasketHandler.actBasket.OrigProductId);
|
|
42108
41413
|
case 10:
|
|
42109
|
-
result =
|
|
41414
|
+
result = _context31.sent;
|
|
42110
41415
|
if (result) {
|
|
42111
41416
|
(_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
|
|
42112
41417
|
}
|
|
@@ -42115,24 +41420,24 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42115
41420
|
set = this.actSet();
|
|
42116
41421
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
42117
41422
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
42118
|
-
|
|
41423
|
+
_context31.next = 17;
|
|
42119
41424
|
break;
|
|
42120
41425
|
}
|
|
42121
|
-
|
|
41426
|
+
_context31.next = 17;
|
|
42122
41427
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
42123
41428
|
case 17:
|
|
42124
|
-
|
|
41429
|
+
_context31.next = 19;
|
|
42125
41430
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
42126
41431
|
case 19:
|
|
42127
|
-
basket =
|
|
42128
|
-
return
|
|
41432
|
+
basket = _context31.sent;
|
|
41433
|
+
return _context31.abrupt("return", basket);
|
|
42129
41434
|
case 21:
|
|
42130
41435
|
case "end":
|
|
42131
|
-
return
|
|
41436
|
+
return _context31.stop();
|
|
42132
41437
|
}
|
|
42133
|
-
},
|
|
41438
|
+
}, _callee31, this);
|
|
42134
41439
|
}));
|
|
42135
|
-
function initBasket(
|
|
41440
|
+
function initBasket(_x78, _x79) {
|
|
42136
41441
|
return _initBasket.apply(this, arguments);
|
|
42137
41442
|
}
|
|
42138
41443
|
return initBasket;
|
|
@@ -42146,21 +41451,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42146
41451
|
}, {
|
|
42147
41452
|
key: "getValidVariantsLength",
|
|
42148
41453
|
value: function () {
|
|
42149
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41454
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
|
|
42150
41455
|
var set;
|
|
42151
|
-
return _regeneratorRuntime.wrap(function
|
|
42152
|
-
while (1) switch (
|
|
41456
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
41457
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
42153
41458
|
case 0:
|
|
42154
41459
|
set = this.actSet();
|
|
42155
|
-
|
|
41460
|
+
_context32.next = 3;
|
|
42156
41461
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
42157
41462
|
case 3:
|
|
42158
|
-
return
|
|
41463
|
+
return _context32.abrupt("return", _context32.sent.length);
|
|
42159
41464
|
case 4:
|
|
42160
41465
|
case "end":
|
|
42161
|
-
return
|
|
41466
|
+
return _context32.stop();
|
|
42162
41467
|
}
|
|
42163
|
-
},
|
|
41468
|
+
}, _callee32, this);
|
|
42164
41469
|
}));
|
|
42165
41470
|
function getValidVariantsLength() {
|
|
42166
41471
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -42170,46 +41475,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42170
41475
|
}, {
|
|
42171
41476
|
key: "handleFavorites",
|
|
42172
41477
|
value: function () {
|
|
42173
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41478
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(mode) {
|
|
42174
41479
|
var _this4 = this;
|
|
42175
41480
|
var set, i;
|
|
42176
|
-
return _regeneratorRuntime.wrap(function
|
|
42177
|
-
while (1) switch (
|
|
41481
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
41482
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
42178
41483
|
case 0:
|
|
42179
41484
|
set = this.actSet();
|
|
42180
41485
|
i = 0;
|
|
42181
41486
|
case 2:
|
|
42182
41487
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
42183
|
-
|
|
41488
|
+
_context33.next = 11;
|
|
42184
41489
|
break;
|
|
42185
41490
|
}
|
|
42186
|
-
|
|
41491
|
+
_context33.next = 5;
|
|
42187
41492
|
return DivaUtils.Sleep(200);
|
|
42188
41493
|
case 5:
|
|
42189
41494
|
i++;
|
|
42190
41495
|
if (!(i > 1000)) {
|
|
42191
|
-
|
|
41496
|
+
_context33.next = 9;
|
|
42192
41497
|
break;
|
|
42193
41498
|
}
|
|
42194
41499
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
42195
|
-
return
|
|
41500
|
+
return _context33.abrupt("break", 11);
|
|
42196
41501
|
case 9:
|
|
42197
|
-
|
|
41502
|
+
_context33.next = 2;
|
|
42198
41503
|
break;
|
|
42199
41504
|
case 11:
|
|
42200
|
-
|
|
41505
|
+
_context33.next = 13;
|
|
42201
41506
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
42202
41507
|
return _this4.update2DGrid(set);
|
|
42203
41508
|
}, this.actions);
|
|
42204
41509
|
case 13:
|
|
42205
|
-
return
|
|
41510
|
+
return _context33.abrupt("return", _context33.sent);
|
|
42206
41511
|
case 14:
|
|
42207
41512
|
case "end":
|
|
42208
|
-
return
|
|
41513
|
+
return _context33.stop();
|
|
42209
41514
|
}
|
|
42210
|
-
},
|
|
41515
|
+
}, _callee33, this);
|
|
42211
41516
|
}));
|
|
42212
|
-
function handleFavorites(
|
|
41517
|
+
function handleFavorites(_x80) {
|
|
42213
41518
|
return _handleFavorites.apply(this, arguments);
|
|
42214
41519
|
}
|
|
42215
41520
|
return handleFavorites;
|
|
@@ -42222,48 +41527,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42222
41527
|
}, {
|
|
42223
41528
|
key: "initSapOrderLinesFromBasket",
|
|
42224
41529
|
value: function () {
|
|
42225
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41530
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(divaNr, init3D, onlyLoadOldBakset) {
|
|
42226
41531
|
var result, oldBasket, basket;
|
|
42227
|
-
return _regeneratorRuntime.wrap(function
|
|
42228
|
-
while (1) switch (
|
|
41532
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
41533
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
42229
41534
|
case 0:
|
|
42230
41535
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
42231
|
-
|
|
41536
|
+
_context34.next = 3;
|
|
42232
41537
|
return this.loadBasket();
|
|
42233
41538
|
case 3:
|
|
42234
|
-
result =
|
|
41539
|
+
result = _context34.sent;
|
|
42235
41540
|
if (!onlyLoadOldBakset) {
|
|
42236
|
-
|
|
41541
|
+
_context34.next = 6;
|
|
42237
41542
|
break;
|
|
42238
41543
|
}
|
|
42239
|
-
return
|
|
41544
|
+
return _context34.abrupt("return", {
|
|
42240
41545
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
42241
41546
|
cache: {}
|
|
42242
41547
|
});
|
|
42243
41548
|
case 6:
|
|
42244
41549
|
if (!(result === false)) {
|
|
42245
|
-
|
|
41550
|
+
_context34.next = 8;
|
|
42246
41551
|
break;
|
|
42247
41552
|
}
|
|
42248
41553
|
throw new Error('Could not load basket! ' + divaNr);
|
|
42249
41554
|
case 8:
|
|
42250
41555
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
42251
|
-
|
|
41556
|
+
_context34.next = 11;
|
|
42252
41557
|
return this.initBasket(init3D);
|
|
42253
41558
|
case 11:
|
|
42254
|
-
basket =
|
|
42255
|
-
return
|
|
41559
|
+
basket = _context34.sent;
|
|
41560
|
+
return _context34.abrupt("return", {
|
|
42256
41561
|
basket: basket,
|
|
42257
41562
|
oldBasket: oldBasket,
|
|
42258
41563
|
cache: this.api.getJsonDataCache()
|
|
42259
41564
|
});
|
|
42260
41565
|
case 13:
|
|
42261
41566
|
case "end":
|
|
42262
|
-
return
|
|
41567
|
+
return _context34.stop();
|
|
42263
41568
|
}
|
|
42264
|
-
},
|
|
41569
|
+
}, _callee34, this);
|
|
42265
41570
|
}));
|
|
42266
|
-
function initSapOrderLinesFromBasket(_x82, _x83
|
|
41571
|
+
function initSapOrderLinesFromBasket(_x81, _x82, _x83) {
|
|
42267
41572
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
42268
41573
|
}
|
|
42269
41574
|
return initSapOrderLinesFromBasket;
|
|
@@ -42288,6 +41593,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42288
41593
|
}
|
|
42289
41594
|
return undefined;
|
|
42290
41595
|
}
|
|
41596
|
+
}, {
|
|
41597
|
+
key: "setsAsArray",
|
|
41598
|
+
get: function get() {
|
|
41599
|
+
return Object.values(this.sets);
|
|
41600
|
+
}
|
|
42291
41601
|
|
|
42292
41602
|
/**
|
|
42293
41603
|
* This function returns the planner mode.
|
|
@@ -60221,7 +59531,7 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
60221
59531
|
}, {
|
|
60222
59532
|
key: "isSameProduct",
|
|
60223
59533
|
value: function isSameProduct(product, setHash, diva3dProject, orderLines, varinatData, catalogCodex) {
|
|
60224
|
-
var _product$articles;
|
|
59534
|
+
var _product$articles, _product$configuratio, _product$configuratio2;
|
|
60225
59535
|
//For new products we store the setHash and hqRenderScript in order to determine if the product changed.
|
|
60226
59536
|
if (product.uniqueHash !== undefined) {
|
|
60227
59537
|
return product.uniqueHash === 'v1' + setHash + md5(diva3dProject);
|
|
@@ -60232,22 +59542,22 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
60232
59542
|
return false;
|
|
60233
59543
|
}
|
|
60234
59544
|
//For older products without setHash we use the old comparison logic
|
|
59545
|
+
var orderlines = (_product$configuratio = (_product$configuratio2 = product.configuration) === null || _product$configuratio2 === void 0 || (_product$configuratio2 = _product$configuratio2.OrderSets) === null || _product$configuratio2 === void 0 ? void 0 : _product$configuratio2[0].OrderLines) !== null && _product$configuratio !== void 0 ? _product$configuratio : [];
|
|
60235
59546
|
var _loop = function _loop() {
|
|
60236
|
-
var
|
|
60237
|
-
var article = product.articles[i];
|
|
59547
|
+
var article = orderlines[i];
|
|
60238
59548
|
var orderLine = orderLines.find(function (ol) {
|
|
60239
|
-
return ol.ArticleCodex == article.
|
|
59549
|
+
return ol.ArticleCodex == article.ArticleCodex && catalogCodex == article.CatalogCodex;
|
|
60240
59550
|
});
|
|
60241
|
-
if (!orderLine
|
|
59551
|
+
if (!orderLine) {
|
|
60242
59552
|
return {
|
|
60243
59553
|
v: false
|
|
60244
59554
|
};
|
|
60245
59555
|
}
|
|
60246
59556
|
var _loop2 = function _loop2() {
|
|
60247
|
-
var varinatValue = article.
|
|
60248
|
-
if (!
|
|
59557
|
+
var varinatValue = article.VariantBasketDatas[j];
|
|
59558
|
+
if (!varinatData.find(function (vb) {
|
|
60249
59559
|
return vb.OPT == varinatValue['OPT'] && vb.OPV == varinatValue['OPV'];
|
|
60250
|
-
}))
|
|
59560
|
+
})) {
|
|
60251
59561
|
return {
|
|
60252
59562
|
v: {
|
|
60253
59563
|
v: false
|
|
@@ -60256,14 +59566,14 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
60256
59566
|
}
|
|
60257
59567
|
},
|
|
60258
59568
|
_ret2;
|
|
60259
|
-
for (var j = 0; j < (((_article$
|
|
60260
|
-
var _article$
|
|
59569
|
+
for (var j = 0; j < (((_article$VariantBaske = article.VariantBasketDatas) === null || _article$VariantBaske === void 0 ? void 0 : _article$VariantBaske.length) || 0); j++) {
|
|
59570
|
+
var _article$VariantBaske;
|
|
60261
59571
|
_ret2 = _loop2();
|
|
60262
59572
|
if (_ret2) return _ret2.v;
|
|
60263
59573
|
}
|
|
60264
59574
|
},
|
|
60265
59575
|
_ret;
|
|
60266
|
-
for (var i = 0; i <
|
|
59576
|
+
for (var i = 0; i < orderlines.length; i++) {
|
|
60267
59577
|
_ret = _loop();
|
|
60268
59578
|
if (_ret) return _ret.v;
|
|
60269
59579
|
}
|
|
@@ -60792,4 +60102,4 @@ var getOrigProductId = /*#__PURE__*/function () {
|
|
|
60792
60102
|
};
|
|
60793
60103
|
}();
|
|
60794
60104
|
|
|
60795
|
-
export { BoundingBox as B, Cell as C, DockingPoint as D, Grid as G, HQRenderScript as H, OptionCatalogData as O,
|
|
60105
|
+
export { BoundingBox as B, Cell as C, DockingPoint as D, Grid as G, HQRenderScript as H, OptionCatalogData as O, Rendering as R, Vector3 as V, setHandlerInstance as a, articleHandlerInstance as b, Vector2 as c, DivaWebPlanner as d, DivaArticle as e, DivaCatalogData as f, DivaBasketHandler as g, CatalogPlannerArticleData as h, Vector4 as i, creatRenderOrders as j, getOrigProductId as k, loadAndRepairBasket as l, summaryHandlerInstance as s };
|