@crystaldesign/web-planner-logic 24.14.0-beta.1 → 24.14.0-beta.2
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-bcc31277.js → DivaBoxPlanner-2c3ad573.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-8ad93926.js → DivaStandardPlanner-2712c847.js} +111 -150
- package/build/cjs/{DoorPlanner-aa051061.js → DoorPlanner-660c92f8.js} +1 -1
- package/build/cjs/{Host3DSignalR-6a177ecc.js → Host3DSignalR-67d1bbd5.js} +1 -9
- package/build/cjs/{LiviqueWWSHandler-18ed722f.js → LiviqueWWSHandler-59d934f3.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-3295548a.js → PfisterWWSHandler-4792814e.js} +1 -13
- package/build/cjs/{PlannerHandler2D-2cd90ff1.js → PlannerHandler2D-a209c839.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-ac2bf9ba.js → SeriousBasketHandler-79c2b600.js} +1 -1
- package/build/cjs/{ShelfPlanner-52374110.js → ShelfPlanner-92294342.js} +1 -1
- package/build/cjs/{StandardWWSHandler-ab2a56e5.js → StandardWWSHandler-d6dfcbbe.js} +1 -1
- package/build/cjs/{index-44a63783.js → index-2bfc75a1.js} +308 -374
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-8bf401d7.js → DivaBoxPlanner-d8275f1e.js} +2 -2
- package/build/esm/{DivaStandardPlanner-3735c08d.js → DivaStandardPlanner-20b8fe29.js} +111 -150
- package/build/esm/{DoorPlanner-058cc697.js → DoorPlanner-c06b15c0.js} +1 -1
- package/build/esm/{Host3DSignalR-0c6f2cb2.js → Host3DSignalR-829f756b.js} +1 -9
- package/build/esm/{LiviqueWWSHandler-c2931ea0.js → LiviqueWWSHandler-d9eb5296.js} +1 -1
- package/build/esm/{PfisterWWSHandler-c00ff2d2.js → PfisterWWSHandler-cc0d15f9.js} +1 -13
- package/build/esm/{PlannerHandler2D-c617facc.js → PlannerHandler2D-91372ea4.js} +1 -1
- package/build/esm/{SeriousBasketHandler-5dafd20f.js → SeriousBasketHandler-da2d5909.js} +1 -1
- package/build/esm/{ShelfPlanner-655779a3.js → ShelfPlanner-601413ca.js} +1 -1
- package/build/esm/{StandardWWSHandler-1a0c3568.js → StandardWWSHandler-c72e0f32.js} +1 -1
- package/build/esm/{index-c35146d9.js → index-f240c58e.js} +308 -374
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -23629,7 +23629,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23629
23629
|
break;
|
|
23630
23630
|
}
|
|
23631
23631
|
_context.next = 4;
|
|
23632
|
-
return import('./ShelfPlanner-
|
|
23632
|
+
return import('./ShelfPlanner-601413ca.js');
|
|
23633
23633
|
case 4:
|
|
23634
23634
|
_yield$import = _context.sent;
|
|
23635
23635
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -28163,7 +28163,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28163
28163
|
break;
|
|
28164
28164
|
}
|
|
28165
28165
|
_context4.next = 3;
|
|
28166
|
-
return import('./DoorPlanner-
|
|
28166
|
+
return import('./DoorPlanner-c06b15c0.js');
|
|
28167
28167
|
case 3:
|
|
28168
28168
|
_yield$import = _context4.sent;
|
|
28169
28169
|
DoorPlanner = _yield$import["default"];
|
|
@@ -31637,25 +31637,16 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31637
31637
|
while (1) switch (_context13.prev = _context13.next) {
|
|
31638
31638
|
case 0:
|
|
31639
31639
|
from = _args13.length > 4 && _args13[4] !== undefined ? _args13[4] : 'initializing';
|
|
31640
|
-
|
|
31641
|
-
event: 'onPlanArticle',
|
|
31642
|
-
message: 'Add Article to set',
|
|
31643
|
-
eventId: 'ON_PLAN_ARTICLE',
|
|
31644
|
-
labels: {
|
|
31645
|
-
art: articleCodex
|
|
31646
|
-
}
|
|
31647
|
-
});
|
|
31648
|
-
_context13.next = 4;
|
|
31640
|
+
_context13.next = 3;
|
|
31649
31641
|
return articleHandlerInstance.loadArticle(set, articleCodex, initParams);
|
|
31650
|
-
case
|
|
31642
|
+
case 3:
|
|
31651
31643
|
newArticle = _context13.sent;
|
|
31652
31644
|
if (newArticle) {
|
|
31653
|
-
_context13.next =
|
|
31645
|
+
_context13.next = 6;
|
|
31654
31646
|
break;
|
|
31655
31647
|
}
|
|
31656
|
-
LOG$8.errorTransaction('ON_PLAN_ARTICLE', 'WC_0018', "articleCodex '" + articleCodex + "' not found in article list. Could be due to exclusivity or a bug in the application!");
|
|
31657
31648
|
throw new Error("articleCodex '" + articleCodex + "' not found in article list. Could be due to exclusivity or a bug in the application!");
|
|
31658
|
-
case
|
|
31649
|
+
case 6:
|
|
31659
31650
|
//falls ein Accessoire verplant wurde wird das Accessoire beim Parent auch hinterlegt
|
|
31660
31651
|
if (newArticle.relatedToBasketId) {
|
|
31661
31652
|
if (!newArticle.isDockable) (_set$getArticleByBask2 = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask2 === void 0 || _set$getArticleByBask2.addAccessoire(newArticle);
|
|
@@ -31670,19 +31661,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31670
31661
|
defaultHeaderValues = Object.assign(defaultHeaderValues, initParams.variantValues);
|
|
31671
31662
|
}
|
|
31672
31663
|
if (!(from !== 'toDeleteShelf')) {
|
|
31673
|
-
_context13.next =
|
|
31664
|
+
_context13.next = 14;
|
|
31674
31665
|
break;
|
|
31675
31666
|
}
|
|
31676
31667
|
set.addArticle(newArticle);
|
|
31677
|
-
_context13.next =
|
|
31668
|
+
_context13.next = 14;
|
|
31678
31669
|
return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
|
|
31679
|
-
case
|
|
31680
|
-
LOG$8.successTransaction('ON_PLAN_ARTICLE', {
|
|
31681
|
-
art: articleCodex,
|
|
31682
|
-
artName: newArticle.name
|
|
31683
|
-
});
|
|
31670
|
+
case 14:
|
|
31684
31671
|
return _context13.abrupt("return", newArticle);
|
|
31685
|
-
case
|
|
31672
|
+
case 15:
|
|
31686
31673
|
case "end":
|
|
31687
31674
|
return _context13.stop();
|
|
31688
31675
|
}
|
|
@@ -32964,7 +32951,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32964
32951
|
case 48:
|
|
32965
32952
|
this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
|
|
32966
32953
|
if (from == 'FromViewClick' && (_Object$keys = Object.keys(myValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
|
|
32967
|
-
this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]
|
|
32954
|
+
this.confirmOptionsInMetric(set, [Object.keys(myValues)[0]]);
|
|
32968
32955
|
}
|
|
32969
32956
|
return _context27.abrupt("return", {
|
|
32970
32957
|
articleCountChanged: elementsToDeleteById.length > 0,
|
|
@@ -32984,7 +32971,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32984
32971
|
}())
|
|
32985
32972
|
}, {
|
|
32986
32973
|
key: "confirmOptionsInMetric",
|
|
32987
|
-
value: function confirmOptionsInMetric(set, options
|
|
32974
|
+
value: function confirmOptionsInMetric(set, options) {
|
|
32988
32975
|
var variantItems = set.getVariantBasketData();
|
|
32989
32976
|
var _loop4 = function _loop4() {
|
|
32990
32977
|
var opt = options[i].substring(3);
|
|
@@ -32992,16 +32979,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32992
32979
|
return item.OPT == opt;
|
|
32993
32980
|
});
|
|
32994
32981
|
if (variantItem) {
|
|
32995
|
-
|
|
32996
|
-
var catalogOpv = set.CatalogData.getOptionValue('OPV' + variantItem.OPV);
|
|
32997
|
-
LOG$8.businessEvent(actionEvent, 'Planner', actionEvent + " optionvalue '" + opt + ':' + variantItem.OPV + "'", {
|
|
32998
|
-
tabGroup: variantItem.TabGroup,
|
|
32999
|
-
opt: (_variantItem$OptionOC = variantItem.OptionOCD) !== null && _variantItem$OptionOC !== void 0 ? _variantItem$OptionOC : opt,
|
|
33000
|
-
optName: variantItem.OPTName,
|
|
33001
|
-
opv: (_variantItem$OCD = variantItem.OCD) !== null && _variantItem$OCD !== void 0 ? _variantItem$OCD : variantItem.OPV,
|
|
33002
|
-
opvName: variantItem === null || variantItem === void 0 ? void 0 : variantItem.OPVName,
|
|
33003
|
-
ral: catalogOpv === null || catalogOpv === void 0 || (_catalogOpv$rals = catalogOpv.rals) === null || _catalogOpv$rals === void 0 ? void 0 : _catalogOpv$rals[0]
|
|
33004
|
-
});
|
|
32982
|
+
set.CatalogData.getOptionValue('OPV' + variantItem.OPV);
|
|
33005
32983
|
}
|
|
33006
32984
|
};
|
|
33007
32985
|
for (var i = 0; i < options.length; i++) {
|
|
@@ -33550,11 +33528,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33550
33528
|
_yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
|
|
33551
33529
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33552
33530
|
case 28:
|
|
33553
|
-
LOG$8.startTransaction({
|
|
33554
|
-
event: 'FillBakset',
|
|
33555
|
-
eventId: 'FILL_BASKET',
|
|
33556
|
-
message: 'Start Filling Basket'
|
|
33557
|
-
});
|
|
33558
33531
|
plannerWarnings = [];
|
|
33559
33532
|
if (!this.getPlanningIsComplete(set)) plannerWarnings.push('INCOMPLETE');
|
|
33560
33533
|
DivaUtils.endSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -33614,7 +33587,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33614
33587
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33615
33588
|
});
|
|
33616
33589
|
return _context31.abrupt("return", orderSet);
|
|
33617
|
-
case
|
|
33590
|
+
case 34:
|
|
33618
33591
|
case "end":
|
|
33619
33592
|
return _context31.stop();
|
|
33620
33593
|
}
|
|
@@ -33640,29 +33613,23 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33640
33613
|
case 0:
|
|
33641
33614
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33642
33615
|
if (!is3D) {
|
|
33643
|
-
_context32.next =
|
|
33616
|
+
_context32.next = 10;
|
|
33644
33617
|
break;
|
|
33645
33618
|
}
|
|
33646
|
-
|
|
33647
|
-
event: 'render3DImage',
|
|
33648
|
-
message: 'render 3D Image',
|
|
33649
|
-
eventId: 'RENDER_3D_IMAGE'
|
|
33650
|
-
});
|
|
33651
|
-
_context32.next = 5;
|
|
33619
|
+
_context32.next = 4;
|
|
33652
33620
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
33653
|
-
case
|
|
33654
|
-
_context32.next =
|
|
33621
|
+
case 4:
|
|
33622
|
+
_context32.next = 6;
|
|
33655
33623
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33656
|
-
case
|
|
33624
|
+
case 6:
|
|
33657
33625
|
_yield$set$plannerHan = _context32.sent;
|
|
33658
33626
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
33659
33627
|
url = _yield$set$plannerHan.url;
|
|
33660
|
-
LOG$8.successTransaction('RENDER_3D_IMAGE');
|
|
33661
33628
|
return _context32.abrupt("return", {
|
|
33662
33629
|
dimensions: dimensions,
|
|
33663
33630
|
url: url
|
|
33664
33631
|
});
|
|
33665
|
-
case
|
|
33632
|
+
case 10:
|
|
33666
33633
|
return _context32.abrupt("return", {
|
|
33667
33634
|
dimensions: {
|
|
33668
33635
|
w: undefined,
|
|
@@ -33670,7 +33637,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33670
33637
|
d: undefined
|
|
33671
33638
|
}
|
|
33672
33639
|
});
|
|
33673
|
-
case
|
|
33640
|
+
case 11:
|
|
33674
33641
|
case "end":
|
|
33675
33642
|
return _context32.stop();
|
|
33676
33643
|
}
|
|
@@ -33741,29 +33708,23 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33741
33708
|
return _regeneratorRuntime.wrap(function _callee32$(_context34) {
|
|
33742
33709
|
while (1) switch (_context34.prev = _context34.next) {
|
|
33743
33710
|
case 0:
|
|
33744
|
-
LOG$8.startTransaction({
|
|
33745
|
-
event: 'render3DAlternativeImage',
|
|
33746
|
-
message: 'render 3D alternative Image',
|
|
33747
|
-
eventId: 'RENDER_3D_ALTERNATIVE_IMAGE'
|
|
33748
|
-
});
|
|
33749
33711
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
33750
33712
|
if (!(is2D || set.onlyRunLogic)) {
|
|
33751
|
-
_context34.next =
|
|
33713
|
+
_context34.next = 3;
|
|
33752
33714
|
break;
|
|
33753
33715
|
}
|
|
33754
33716
|
return _context34.abrupt("return", []);
|
|
33755
|
-
case
|
|
33717
|
+
case 3:
|
|
33756
33718
|
catalogData = set.CatalogData;
|
|
33757
|
-
_context34.next =
|
|
33719
|
+
_context34.next = 6;
|
|
33758
33720
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
33759
|
-
case
|
|
33760
|
-
_context34.next =
|
|
33721
|
+
case 6:
|
|
33722
|
+
_context34.next = 8;
|
|
33761
33723
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
33762
|
-
case
|
|
33724
|
+
case 8:
|
|
33763
33725
|
setImages = _context34.sent;
|
|
33764
|
-
LOG$8.successTransaction('RENDER_3D_ALTERNATIVE_IMAGE');
|
|
33765
33726
|
return _context34.abrupt("return", setImages);
|
|
33766
|
-
case
|
|
33727
|
+
case 10:
|
|
33767
33728
|
case "end":
|
|
33768
33729
|
return _context34.stop();
|
|
33769
33730
|
}
|
|
@@ -33782,25 +33743,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33782
33743
|
return _regeneratorRuntime.wrap(function _callee33$(_context35) {
|
|
33783
33744
|
while (1) switch (_context35.prev = _context35.next) {
|
|
33784
33745
|
case 0:
|
|
33785
|
-
LOG$8.startTransaction({
|
|
33786
|
-
event: 'render2DImage',
|
|
33787
|
-
message: 'render 2D Image',
|
|
33788
|
-
eventId: 'RENDER_2D_IMAGE'
|
|
33789
|
-
});
|
|
33790
33746
|
urlToPlanning2D = undefined, catalogData = set.CatalogData;
|
|
33791
33747
|
planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
|
|
33792
33748
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
33793
|
-
_context35.next =
|
|
33749
|
+
_context35.next = 6;
|
|
33794
33750
|
break;
|
|
33795
33751
|
}
|
|
33796
|
-
_context35.next =
|
|
33752
|
+
_context35.next = 5;
|
|
33797
33753
|
return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
|
|
33798
|
-
case
|
|
33754
|
+
case 5:
|
|
33799
33755
|
urlToPlanning2D = _context35.sent;
|
|
33800
|
-
case
|
|
33801
|
-
LOG$8.successTransaction('RENDER_2D_IMAGE');
|
|
33756
|
+
case 6:
|
|
33802
33757
|
return _context35.abrupt("return", urlToPlanning2D);
|
|
33803
|
-
case
|
|
33758
|
+
case 7:
|
|
33804
33759
|
case "end":
|
|
33805
33760
|
return _context35.stop();
|
|
33806
33761
|
}
|
|
@@ -33911,6 +33866,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33911
33866
|
_defineProperty(this, "_handler", void 0);
|
|
33912
33867
|
_defineProperty(this, "_basketHandler", void 0);
|
|
33913
33868
|
_defineProperty(this, "startProductId", void 0);
|
|
33869
|
+
_defineProperty(this, "initializationType", void 0);
|
|
33914
33870
|
//Only helper variable
|
|
33915
33871
|
_defineProperty(this, "origConfiguration", {});
|
|
33916
33872
|
/**
|
|
@@ -33937,6 +33893,11 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33937
33893
|
}
|
|
33938
33894
|
}
|
|
33939
33895
|
return _createClass(DivaBasketHandler, [{
|
|
33896
|
+
key: "initializationTypeGetter",
|
|
33897
|
+
get: function get() {
|
|
33898
|
+
return this.initializationType;
|
|
33899
|
+
}
|
|
33900
|
+
}, {
|
|
33940
33901
|
key: "actDivaNr",
|
|
33941
33902
|
get: function get() {
|
|
33942
33903
|
return this.divaNr;
|
|
@@ -33986,7 +33947,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33986
33947
|
value: function () {
|
|
33987
33948
|
var _initializeBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(api) {
|
|
33988
33949
|
var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
|
|
33989
|
-
var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$
|
|
33950
|
+
var _this$plannerConfig$a4, returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a5, _api$getI18n, _api$getI18n2, successfully;
|
|
33990
33951
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
33991
33952
|
while (1) switch (_context.prev = _context.next) {
|
|
33992
33953
|
case 0:
|
|
@@ -33994,13 +33955,13 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33994
33955
|
this.startProductId = undefined;
|
|
33995
33956
|
LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
|
|
33996
33957
|
if (this.ignoreInitObjectWhenInitializing) {
|
|
33997
|
-
_context.next =
|
|
33958
|
+
_context.next = 36;
|
|
33998
33959
|
break;
|
|
33999
33960
|
}
|
|
34000
33961
|
returnSuccessfully = false; //UseCase 1
|
|
34001
33962
|
//Basket wird mit basket aus auftrage neu eröffnet zum bearbeiten
|
|
34002
33963
|
if (!this.plannerConfig.basketData) {
|
|
34003
|
-
_context.next =
|
|
33964
|
+
_context.next = 28;
|
|
34004
33965
|
break;
|
|
34005
33966
|
}
|
|
34006
33967
|
if (!this.plannerConfig.assignNewDivaNr) {
|
|
@@ -34046,70 +34007,79 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34046
34007
|
this.origConfiguration.originDivaNr = this.actBasket.OrigDivaNr;
|
|
34047
34008
|
}
|
|
34048
34009
|
this.specificSetIdToLoad = this.plannerConfig.setId;
|
|
34010
|
+
this.initializationType = 'BASKET';
|
|
34049
34011
|
returnSuccessfully = true;
|
|
34050
|
-
case
|
|
34012
|
+
case 28:
|
|
34051
34013
|
if (!this.plannerConfig.catalogCodex) {
|
|
34052
|
-
_context.next =
|
|
34014
|
+
_context.next = 32;
|
|
34053
34015
|
break;
|
|
34054
34016
|
}
|
|
34055
|
-
_context.next =
|
|
34017
|
+
_context.next = 31;
|
|
34056
34018
|
return this.loadBasketByCatalogCodex(api);
|
|
34057
|
-
case 30:
|
|
34058
|
-
returnSuccessfully = _context.sent;
|
|
34059
34019
|
case 31:
|
|
34020
|
+
returnSuccessfully = _context.sent;
|
|
34021
|
+
case 32:
|
|
34060
34022
|
if (DivaUtils.bridge) {
|
|
34061
34023
|
DivaUtils.bridge.sendMessage({
|
|
34062
34024
|
type: 'ABN',
|
|
34063
34025
|
divaNr: this.divaNr
|
|
34064
34026
|
});
|
|
34065
34027
|
}
|
|
34028
|
+
if ((_this$plannerConfig$a4 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a4 !== void 0 && _this$plannerConfig$a4.length) {
|
|
34029
|
+
this.initializationType = 'ARTICLELIST';
|
|
34030
|
+
} else {
|
|
34031
|
+
this.initializationType = 'MODELINFO';
|
|
34032
|
+
}
|
|
34066
34033
|
if (!returnSuccessfully) {
|
|
34067
|
-
_context.next =
|
|
34034
|
+
_context.next = 36;
|
|
34068
34035
|
break;
|
|
34069
34036
|
}
|
|
34070
34037
|
return _context.abrupt("return", returnSuccessfully);
|
|
34071
|
-
case
|
|
34038
|
+
case 36:
|
|
34072
34039
|
if (!this.loadDivaNr) {
|
|
34073
|
-
_context.next =
|
|
34040
|
+
_context.next = 43;
|
|
34074
34041
|
break;
|
|
34075
34042
|
}
|
|
34076
|
-
|
|
34043
|
+
this.initializationType = 'SERVER_DIVANR';
|
|
34044
|
+
_context.next = 40;
|
|
34077
34045
|
return this.loadBasketByDivaNr(api, this.loadDivaNr);
|
|
34078
|
-
case 37:
|
|
34079
|
-
return _context.abrupt("return", _context.sent);
|
|
34080
34046
|
case 40:
|
|
34047
|
+
return _context.abrupt("return", _context.sent);
|
|
34048
|
+
case 43:
|
|
34081
34049
|
if (!this.plannerConfig.customProductId) {
|
|
34082
|
-
_context.next =
|
|
34050
|
+
_context.next = 54;
|
|
34083
34051
|
break;
|
|
34084
34052
|
}
|
|
34085
34053
|
this.assignNewDivaNr = true;
|
|
34086
34054
|
params = api.getLoadProductBasketParams();
|
|
34087
34055
|
if (!params) {
|
|
34088
|
-
_context.next =
|
|
34056
|
+
_context.next = 50;
|
|
34089
34057
|
break;
|
|
34090
34058
|
}
|
|
34091
|
-
_context.next =
|
|
34059
|
+
_context.next = 49;
|
|
34092
34060
|
return this.loadBasketByCustomProductId(api, params.customProductField, this.plannerConfig.customProductId, (_params$customFieldsT = params.customFieldsToLoad) !== null && _params$customFieldsT !== void 0 && _params$customFieldsT.length ? params.customFieldsToLoad : []);
|
|
34093
|
-
case
|
|
34061
|
+
case 49:
|
|
34094
34062
|
return _context.abrupt("return", _context.sent);
|
|
34095
|
-
case 47:
|
|
34096
|
-
return _context.abrupt("return", false);
|
|
34097
34063
|
case 50:
|
|
34064
|
+
this.initializationType = 'CUSTOM_PRODUCT_ID';
|
|
34065
|
+
return _context.abrupt("return", false);
|
|
34066
|
+
case 54:
|
|
34098
34067
|
if (!this.plannerConfig.productId) {
|
|
34099
|
-
_context.next =
|
|
34068
|
+
_context.next = 62;
|
|
34100
34069
|
break;
|
|
34101
34070
|
}
|
|
34102
34071
|
this.assignNewDivaNr = true;
|
|
34103
|
-
|
|
34072
|
+
this.initializationType = 'PRODUCT_ID';
|
|
34073
|
+
_context.next = 59;
|
|
34104
34074
|
return this.initProductId(api, this.plannerConfig.productId);
|
|
34105
|
-
case
|
|
34075
|
+
case 59:
|
|
34106
34076
|
return _context.abrupt("return", _context.sent);
|
|
34107
|
-
case
|
|
34077
|
+
case 62:
|
|
34108
34078
|
if (!((_this$plannerConfig$s3 = this.plannerConfig.settings) !== null && _this$plannerConfig$s3 !== void 0 && (_this$plannerConfig$s3 = _this$plannerConfig$s3.ViewConfig) !== null && _this$plannerConfig$s3 !== void 0 && _this$plannerConfig$s3.loadStartProduct)) {
|
|
34109
|
-
_context.next =
|
|
34079
|
+
_context.next = 85;
|
|
34110
34080
|
break;
|
|
34111
34081
|
}
|
|
34112
|
-
_context.next =
|
|
34082
|
+
_context.next = 65;
|
|
34113
34083
|
return (_this$plannerConfig$h = this.plannerConfig.handler) === null || _this$plannerConfig$h === void 0 ? void 0 : _this$plannerConfig$h.productHandler.apiGetProductByFilter([{
|
|
34114
34084
|
id: 'startProductForOrganizations',
|
|
34115
34085
|
op: 'eq',
|
|
@@ -34123,35 +34093,36 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34123
34093
|
op: 'eq',
|
|
34124
34094
|
value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
|
|
34125
34095
|
}]);
|
|
34126
|
-
case
|
|
34096
|
+
case 65:
|
|
34127
34097
|
result = _context.sent;
|
|
34128
34098
|
if (!(result !== null && result !== void 0 && (_result$data$ = result.data[0]) !== null && _result$data$ !== void 0 && _result$data$._id)) {
|
|
34129
|
-
_context.next =
|
|
34099
|
+
_context.next = 74;
|
|
34130
34100
|
break;
|
|
34131
34101
|
}
|
|
34132
34102
|
this.startProductId = result === null || result === void 0 || (_result$data$2 = result.data[0]) === null || _result$data$2 === void 0 ? void 0 : _result$data$2._id;
|
|
34133
|
-
|
|
34103
|
+
this.initializationType = 'START_PRODUCT';
|
|
34104
|
+
_context.next = 71;
|
|
34134
34105
|
return this.initProductId(api, result.data[0]._id);
|
|
34135
|
-
case
|
|
34106
|
+
case 71:
|
|
34136
34107
|
return _context.abrupt("return", _context.sent);
|
|
34137
|
-
case
|
|
34108
|
+
case 74:
|
|
34138
34109
|
successfully = false;
|
|
34139
34110
|
if (!((_this$plannerConfig$s4 = this.plannerConfig.settings) !== null && _this$plannerConfig$s4 !== void 0 && (_this$plannerConfig$s4 = _this$plannerConfig$s4.ViewConfig) !== null && _this$plannerConfig$s4 !== void 0 && _this$plannerConfig$s4.initFirstCatalog)) {
|
|
34140
|
-
_context.next =
|
|
34111
|
+
_context.next = 79;
|
|
34141
34112
|
break;
|
|
34142
34113
|
}
|
|
34143
|
-
_context.next =
|
|
34114
|
+
_context.next = 78;
|
|
34144
34115
|
return this.tryInitFirstCatalog(api);
|
|
34145
|
-
case
|
|
34116
|
+
case 78:
|
|
34146
34117
|
successfully = _context.sent;
|
|
34147
|
-
case
|
|
34118
|
+
case 79:
|
|
34148
34119
|
if (!successfully) {
|
|
34149
|
-
_context.next =
|
|
34120
|
+
_context.next = 81;
|
|
34150
34121
|
break;
|
|
34151
34122
|
}
|
|
34152
34123
|
return _context.abrupt("return", true);
|
|
34153
|
-
case
|
|
34154
|
-
(_this$plannerConfig$
|
|
34124
|
+
case 81:
|
|
34125
|
+
(_this$plannerConfig$a5 = this.plannerConfig.actions) === null || _this$plannerConfig$a5 === void 0 || _this$plannerConfig$a5.openModal({
|
|
34155
34126
|
accept: false,
|
|
34156
34127
|
reject: false,
|
|
34157
34128
|
rejectByIcon: true,
|
|
@@ -34159,29 +34130,34 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34159
34130
|
text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
|
|
34160
34131
|
});
|
|
34161
34132
|
LOG$7.error(new DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
|
|
34162
|
-
case
|
|
34163
|
-
_context.next =
|
|
34133
|
+
case 83:
|
|
34134
|
+
_context.next = 90;
|
|
34164
34135
|
break;
|
|
34165
|
-
case
|
|
34136
|
+
case 85:
|
|
34166
34137
|
if (!((_this$plannerConfig$s5 = this.plannerConfig.settings) !== null && _this$plannerConfig$s5 !== void 0 && (_this$plannerConfig$s5 = _this$plannerConfig$s5.ViewConfig) !== null && _this$plannerConfig$s5 !== void 0 && _this$plannerConfig$s5.initFirstCatalog)) {
|
|
34167
|
-
_context.next =
|
|
34138
|
+
_context.next = 90;
|
|
34168
34139
|
break;
|
|
34169
34140
|
}
|
|
34170
|
-
|
|
34141
|
+
//USECASE 7 Default Catalog gets initialized
|
|
34142
|
+
this.initializationType = 'DEFAULT_CATALOG';
|
|
34143
|
+
_context.next = 89;
|
|
34171
34144
|
return this.tryInitFirstCatalog(api);
|
|
34172
|
-
case
|
|
34145
|
+
case 89:
|
|
34173
34146
|
return _context.abrupt("return", _context.sent);
|
|
34174
|
-
case
|
|
34147
|
+
case 90:
|
|
34175
34148
|
if (!((_api$getPlannerType = api.getPlannerType()) !== null && _api$getPlannerType !== void 0 && _api$getPlannerType.includes('PRODUCTS') || (_this$plannerConfig$r = this.plannerConfig.returnTo) !== null && _this$plannerConfig$r !== void 0 && _this$plannerConfig$r.startsWith('SETPLANNER_OPEN_SELLER_BASKET'))) {
|
|
34176
|
-
_context.next =
|
|
34149
|
+
_context.next = 93;
|
|
34177
34150
|
break;
|
|
34178
34151
|
}
|
|
34152
|
+
//UseCase 8
|
|
34153
|
+
//No Catalog or Basket gets Initialized. Only the Productlist
|
|
34154
|
+
this.initializationType = 'PRODUCTLIST'; //TODO GIBT ES NICHT MEHR
|
|
34179
34155
|
return _context.abrupt("return", {
|
|
34180
34156
|
type: 'ProductList'
|
|
34181
34157
|
});
|
|
34182
|
-
case
|
|
34158
|
+
case 93:
|
|
34183
34159
|
return _context.abrupt("return", false);
|
|
34184
|
-
case
|
|
34160
|
+
case 94:
|
|
34185
34161
|
case "end":
|
|
34186
34162
|
return _context.stop();
|
|
34187
34163
|
}
|
|
@@ -34715,22 +34691,17 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34715
34691
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
34716
34692
|
while (1) switch (_context11.prev = _context11.next) {
|
|
34717
34693
|
case 0:
|
|
34718
|
-
LOG$7.startTransaction({
|
|
34719
|
-
event: 'SaveBasketOnAPI',
|
|
34720
|
-
eventId: 'SAVE_BASKET_ON_API',
|
|
34721
|
-
message: 'Save Basket on API'
|
|
34722
|
-
});
|
|
34723
34694
|
actBasket.saveNow();
|
|
34724
34695
|
actBasket.PDFDocumentURL = '';
|
|
34725
34696
|
actBasket.ReportConfigIdentifier = api.getReportConfigIdentifier();
|
|
34726
34697
|
actBasket.PrintOptions = api.getPrintOptions(this.reportConfig);
|
|
34727
34698
|
actBasket.ClientLanguage = api.getLanguage();
|
|
34728
|
-
_context11.next =
|
|
34699
|
+
_context11.next = 7;
|
|
34729
34700
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
|
|
34730
|
-
case
|
|
34701
|
+
case 7:
|
|
34731
34702
|
actBasket.UserLanguage = api.getLanguage();
|
|
34732
34703
|
actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
|
|
34733
|
-
_context11.next =
|
|
34704
|
+
_context11.next = 11;
|
|
34734
34705
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
34735
34706
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
34736
34707
|
basket: actBasket,
|
|
@@ -34738,25 +34709,24 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34738
34709
|
saveToApi2: false,
|
|
34739
34710
|
apiKey: api.getApiKey()
|
|
34740
34711
|
});
|
|
34741
|
-
case
|
|
34712
|
+
case 11:
|
|
34742
34713
|
response = _context11.sent;
|
|
34743
34714
|
if (!(response != 'ERROR_NO_BASKET_SAVED')) {
|
|
34744
|
-
_context11.next =
|
|
34715
|
+
_context11.next = 16;
|
|
34745
34716
|
break;
|
|
34746
34717
|
}
|
|
34747
34718
|
this.baskets[this.actDivaNr] = new BasketData(response);
|
|
34748
|
-
_context11.next =
|
|
34719
|
+
_context11.next = 18;
|
|
34749
34720
|
break;
|
|
34750
|
-
case
|
|
34721
|
+
case 16:
|
|
34751
34722
|
if (!(response === 'ERROR_NO_BASKET_SAVED' || response === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
34752
|
-
_context11.next =
|
|
34723
|
+
_context11.next = 18;
|
|
34753
34724
|
break;
|
|
34754
34725
|
}
|
|
34755
34726
|
return _context11.abrupt("return", response);
|
|
34756
|
-
case
|
|
34757
|
-
LOG$7.successTransaction('saveBasketOnAPI');
|
|
34727
|
+
case 18:
|
|
34758
34728
|
return _context11.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
|
|
34759
|
-
case
|
|
34729
|
+
case 19:
|
|
34760
34730
|
case "end":
|
|
34761
34731
|
return _context11.stop();
|
|
34762
34732
|
}
|
|
@@ -34775,7 +34745,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34775
34745
|
}, {
|
|
34776
34746
|
key: "fillBaksetforOnWebPlanerConfigChange",
|
|
34777
34747
|
value: function fillBaksetforOnWebPlanerConfigChange(set, newBasket, options, isInit) {
|
|
34778
|
-
var _this$plannerConfig$
|
|
34748
|
+
var _this$plannerConfig$a6;
|
|
34779
34749
|
this.setBasketData(this.actDivaNr, newBasket);
|
|
34780
34750
|
var changedValues = {};
|
|
34781
34751
|
var sendToSap = [];
|
|
@@ -34879,7 +34849,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34879
34849
|
isInit: isInit,
|
|
34880
34850
|
sendToSap: sendToSap
|
|
34881
34851
|
});
|
|
34882
|
-
(_this$plannerConfig$
|
|
34852
|
+
(_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.onEvent({
|
|
34883
34853
|
type: 'onWebPlanerConfigChange',
|
|
34884
34854
|
data: data
|
|
34885
34855
|
});
|
|
@@ -34898,7 +34868,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34898
34868
|
break;
|
|
34899
34869
|
case 3:
|
|
34900
34870
|
_context12.next = 5;
|
|
34901
|
-
return import('./PfisterWWSHandler-
|
|
34871
|
+
return import('./PfisterWWSHandler-cc0d15f9.js');
|
|
34902
34872
|
case 5:
|
|
34903
34873
|
_yield$import = _context12.sent;
|
|
34904
34874
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -34906,7 +34876,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34906
34876
|
return _context12.abrupt("break", 27);
|
|
34907
34877
|
case 9:
|
|
34908
34878
|
_context12.next = 11;
|
|
34909
|
-
return import('./LiviqueWWSHandler-
|
|
34879
|
+
return import('./LiviqueWWSHandler-d9eb5296.js');
|
|
34910
34880
|
case 11:
|
|
34911
34881
|
_yield$import2 = _context12.sent;
|
|
34912
34882
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -34914,7 +34884,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34914
34884
|
return _context12.abrupt("break", 27);
|
|
34915
34885
|
case 15:
|
|
34916
34886
|
_context12.next = 17;
|
|
34917
|
-
return import('./SeriousBasketHandler-
|
|
34887
|
+
return import('./SeriousBasketHandler-da2d5909.js');
|
|
34918
34888
|
case 17:
|
|
34919
34889
|
_yield$import3 = _context12.sent;
|
|
34920
34890
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -34922,7 +34892,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34922
34892
|
return _context12.abrupt("break", 27);
|
|
34923
34893
|
case 21:
|
|
34924
34894
|
_context12.next = 23;
|
|
34925
|
-
return import('./StandardWWSHandler-
|
|
34895
|
+
return import('./StandardWWSHandler-c72e0f32.js');
|
|
34926
34896
|
case 23:
|
|
34927
34897
|
_yield$import4 = _context12.sent;
|
|
34928
34898
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -34939,61 +34909,6 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34939
34909
|
}
|
|
34940
34910
|
return initWWSClient;
|
|
34941
34911
|
}()
|
|
34942
|
-
}, {
|
|
34943
|
-
key: "evaluateRopoEffect",
|
|
34944
|
-
value: function evaluateRopoEffect(sourceBasket, sourceOrganizationId) {
|
|
34945
|
-
try {
|
|
34946
|
-
var organization = this.plannerConfig.currentOrganization;
|
|
34947
|
-
//if same Organization, no ROPO Effect
|
|
34948
|
-
if (!organization || !sourceOrganizationId || sourceOrganizationId.id == organization._id) return;
|
|
34949
|
-
|
|
34950
|
-
//If no shopType is set, get parent organization
|
|
34951
|
-
if (!sourceOrganizationId.shopType) return;
|
|
34952
|
-
|
|
34953
|
-
//if no shopType is set in parent organization, no ropo effekt
|
|
34954
|
-
if (!organization.shopType) return;
|
|
34955
|
-
if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
|
|
34956
|
-
var _this$plannerConfig$c5;
|
|
34957
|
-
LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
34958
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
34959
|
-
sourceOrgId: sourceOrganizationId.id,
|
|
34960
|
-
targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
34961
|
-
});
|
|
34962
|
-
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
34963
|
-
var _this$plannerConfig$c6;
|
|
34964
|
-
LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
|
|
34965
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
34966
|
-
sourceOrgId: sourceOrganizationId.id,
|
|
34967
|
-
targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
|
|
34968
|
-
});
|
|
34969
|
-
} else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
|
|
34970
|
-
var _this$plannerConfig$c7;
|
|
34971
|
-
LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
|
|
34972
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
34973
|
-
sourceOrgId: sourceOrganizationId.id,
|
|
34974
|
-
targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
|
|
34975
|
-
});
|
|
34976
|
-
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
|
|
34977
|
-
var _this$plannerConfig$c8;
|
|
34978
|
-
LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
|
|
34979
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
34980
|
-
sourceOrgId: sourceOrganizationId.id,
|
|
34981
|
-
targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
|
|
34982
|
-
});
|
|
34983
|
-
}
|
|
34984
|
-
} catch (e) {
|
|
34985
|
-
var _this$plannerConfig$c9;
|
|
34986
|
-
LOG$7.error(new DivaError('Error on Evaluating ROPO Effect', {
|
|
34987
|
-
code: 'SELLER_0006',
|
|
34988
|
-
cause: e,
|
|
34989
|
-
custom: {
|
|
34990
|
-
sourceDivaNr: sourceBasket.DivaNr,
|
|
34991
|
-
sourceOrgId: sourceOrganizationId,
|
|
34992
|
-
targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
|
|
34993
|
-
}
|
|
34994
|
-
}));
|
|
34995
|
-
}
|
|
34996
|
-
}
|
|
34997
34912
|
}]);
|
|
34998
34913
|
}();
|
|
34999
34914
|
|
|
@@ -36312,7 +36227,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36312
36227
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36313
36228
|
case 0:
|
|
36314
36229
|
_context3.next = 2;
|
|
36315
|
-
return import('./Host3DSignalR-
|
|
36230
|
+
return import('./Host3DSignalR-829f756b.js');
|
|
36316
36231
|
case 2:
|
|
36317
36232
|
_yield$import = _context3.sent;
|
|
36318
36233
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37855,7 +37770,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37855
37770
|
break;
|
|
37856
37771
|
case 8:
|
|
37857
37772
|
_context4.next = 10;
|
|
37858
|
-
return import('./DivaStandardPlanner-
|
|
37773
|
+
return import('./DivaStandardPlanner-20b8fe29.js');
|
|
37859
37774
|
case 10:
|
|
37860
37775
|
_yield$import = _context4.sent;
|
|
37861
37776
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -37866,7 +37781,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37866
37781
|
return _context4.abrupt("break", 21);
|
|
37867
37782
|
case 15:
|
|
37868
37783
|
_context4.next = 17;
|
|
37869
|
-
return import('./DivaBoxPlanner-
|
|
37784
|
+
return import('./DivaBoxPlanner-d8275f1e.js');
|
|
37870
37785
|
case 17:
|
|
37871
37786
|
_yield$import2 = _context4.sent;
|
|
37872
37787
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38878,6 +38793,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
38878
38793
|
});
|
|
38879
38794
|
_defineProperty(this, "api", void 0);
|
|
38880
38795
|
_defineProperty(this, "setHQRenderScript", void 0);
|
|
38796
|
+
_defineProperty(this, "initializationType", void 0);
|
|
38881
38797
|
_defineProperty(this, "getPlannerHandlerFunctions", function () {
|
|
38882
38798
|
return {
|
|
38883
38799
|
updatePlannerRendering: _this.updatePlannerRendering,
|
|
@@ -39073,18 +38989,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39073
38989
|
while (1) switch (_context3.prev = _context3.next) {
|
|
39074
38990
|
case 0:
|
|
39075
38991
|
set = _this.actSet();
|
|
39076
|
-
LOG$1.debug('DivaWebPlanner.addPlannerElement: elementCodex:' + elementCodex);
|
|
39077
38992
|
(_this$actions3 = _this.actions) === null || _this$actions3 === void 0 || (_this$actions3$toggle = _this$actions3.toggleLoading) === null || _this$actions3$toggle === void 0 || _this$actions3$toggle.call(_this$actions3, 'plannElement' + elementCodex, false, true);
|
|
39078
|
-
_context3.prev =
|
|
39079
|
-
_context3.next =
|
|
38993
|
+
_context3.prev = 2;
|
|
38994
|
+
_context3.next = 5;
|
|
39080
38995
|
return setHandlerInstance.addPlannerElement(set, elementCodex, initParams);
|
|
39081
|
-
case
|
|
38996
|
+
case 5:
|
|
39082
38997
|
newArticle = _context3.sent;
|
|
39083
|
-
_context3.next =
|
|
38998
|
+
_context3.next = 13;
|
|
39084
38999
|
break;
|
|
39085
|
-
case
|
|
39086
|
-
_context3.prev =
|
|
39087
|
-
_context3.t0 = _context3["catch"](
|
|
39000
|
+
case 8:
|
|
39001
|
+
_context3.prev = 8;
|
|
39002
|
+
_context3.t0 = _context3["catch"](2);
|
|
39088
39003
|
(_this$actions4 = _this.actions) === null || _this$actions4 === void 0 || (_this$actions4$openMo = _this$actions4.openModal) === null || _this$actions4$openMo === void 0 || _this$actions4$openMo.call(_this$actions4, {
|
|
39089
39004
|
accept: true,
|
|
39090
39005
|
title: (_this$i18n = _this.i18n()) === null || _this$i18n === void 0 ? void 0 : _this$i18n.t('Error'),
|
|
@@ -39092,17 +39007,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39092
39007
|
});
|
|
39093
39008
|
(_this$actions5 = _this.actions) === null || _this$actions5 === void 0 || (_this$actions5$toggle = _this$actions5.toggleLoading) === null || _this$actions5$toggle === void 0 || _this$actions5$toggle.call(_this$actions5, 'plannElement' + elementCodex, false, false);
|
|
39094
39009
|
throw new Error(_context3.t0);
|
|
39095
|
-
case
|
|
39010
|
+
case 13:
|
|
39096
39011
|
(_this$actions6 = _this.actions) === null || _this$actions6 === void 0 || (_this$actions6$toggle = _this$actions6.toggleLoading) === null || _this$actions6$toggle === void 0 || _this$actions6$toggle.call(_this$actions6, 'plannElement' + elementCodex, false, false);
|
|
39097
39012
|
if (!newArticle.toDeleteAfterInit) {
|
|
39098
|
-
_context3.next =
|
|
39013
|
+
_context3.next = 18;
|
|
39099
39014
|
break;
|
|
39100
39015
|
}
|
|
39101
|
-
_context3.next =
|
|
39016
|
+
_context3.next = 17;
|
|
39102
39017
|
return _this.deletePlannerElement(newArticle.setId, newArticle.elementId, true);
|
|
39103
|
-
case
|
|
39018
|
+
case 17:
|
|
39104
39019
|
return _context3.abrupt("return", newArticle.doNotDeleteAccWhenNotDocked ? 'AccessoireNotVisualized' : 'AccessorieNoFreeSpace');
|
|
39105
|
-
case
|
|
39020
|
+
case 18:
|
|
39106
39021
|
_this.updateConfigStructure();
|
|
39107
39022
|
(_this$updateViewPlann = _this.updateViewPlannerElements) === null || _this$updateViewPlann === void 0 || _this$updateViewPlann.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39108
39023
|
_this.updatePlannerView('ADD_PLANNER_ELEMENT');
|
|
@@ -39112,15 +39027,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39112
39027
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
39113
39028
|
if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
39114
39029
|
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAdd');
|
|
39115
|
-
_context3.next =
|
|
39030
|
+
_context3.next = 29;
|
|
39116
39031
|
return _this.checkVariantData();
|
|
39117
|
-
case
|
|
39032
|
+
case 29:
|
|
39033
|
+
_this.plannerChangeLog('onAddPlanner');
|
|
39118
39034
|
return _context3.abrupt("return", 'ElementAdded');
|
|
39119
39035
|
case 31:
|
|
39120
39036
|
case "end":
|
|
39121
39037
|
return _context3.stop();
|
|
39122
39038
|
}
|
|
39123
|
-
}, _callee3, null, [[
|
|
39039
|
+
}, _callee3, null, [[2, 8]]);
|
|
39124
39040
|
}));
|
|
39125
39041
|
return function (_x5, _x6, _x7) {
|
|
39126
39042
|
return _ref3.apply(this, arguments);
|
|
@@ -39164,7 +39080,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39164
39080
|
(_this$updateElementSe2 = _this.updateElementSelectionPlanner) === null || _this$updateElementSe2 === void 0 || _this$updateElementSe2.call(_this, [article.setId], [article.elementId], true);
|
|
39165
39081
|
_this.updatePriceInView();
|
|
39166
39082
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39167
|
-
|
|
39083
|
+
_this.plannerChangeLog('onSwitchPlanner');
|
|
39084
|
+
case 23:
|
|
39168
39085
|
case "end":
|
|
39169
39086
|
return _context4.stop();
|
|
39170
39087
|
}
|
|
@@ -39196,10 +39113,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39196
39113
|
(_this$updateViewPlann3 = _this.updateViewPlannerElements) === null || _this$updateViewPlann3 === void 0 || _this$updateViewPlann3.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39197
39114
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
39198
39115
|
}
|
|
39116
|
+
_this.plannerChangeLog('onAddPlanner');
|
|
39199
39117
|
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onShelfAdd');
|
|
39200
39118
|
_this.checkVariantData();
|
|
39201
39119
|
return _context5.abrupt("return", retVal);
|
|
39202
|
-
case
|
|
39120
|
+
case 11:
|
|
39203
39121
|
case "end":
|
|
39204
39122
|
return _context5.stop();
|
|
39205
39123
|
}
|
|
@@ -39243,9 +39161,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39243
39161
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39244
39162
|
(_this$updateViewPlann5 = _this.updateViewPlannerElements) === null || _this$updateViewPlann5 === void 0 || _this$updateViewPlann5.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39245
39163
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
39164
|
+
_this.plannerChangeLog('onDeletePlanner');
|
|
39246
39165
|
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onShelfDelete');
|
|
39247
39166
|
_this.checkVariantData();
|
|
39248
|
-
case
|
|
39167
|
+
case 12:
|
|
39249
39168
|
case "end":
|
|
39250
39169
|
return _context6.stop();
|
|
39251
39170
|
}
|
|
@@ -39320,7 +39239,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39320
39239
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39321
39240
|
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAccessoireUpdate');
|
|
39322
39241
|
_this.checkVariantData();
|
|
39323
|
-
|
|
39242
|
+
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
39243
|
+
case 13:
|
|
39324
39244
|
case "end":
|
|
39325
39245
|
return _context8.stop();
|
|
39326
39246
|
}
|
|
@@ -39350,8 +39270,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39350
39270
|
}
|
|
39351
39271
|
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onAccessoireDelete');
|
|
39352
39272
|
_this.checkVariantData();
|
|
39273
|
+
_this.plannerChangeLog('onDeletePlanner');
|
|
39353
39274
|
return _context9.abrupt("return", wasDeleted);
|
|
39354
|
-
case
|
|
39275
|
+
case 9:
|
|
39355
39276
|
case "end":
|
|
39356
39277
|
return _context9.stop();
|
|
39357
39278
|
}
|
|
@@ -39460,6 +39381,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39460
39381
|
_context11.next = 22;
|
|
39461
39382
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39462
39383
|
case 22:
|
|
39384
|
+
_this.configuratorChangeLog('onConfiguratorStep');
|
|
39385
|
+
case 23:
|
|
39463
39386
|
case "end":
|
|
39464
39387
|
return _context11.stop();
|
|
39465
39388
|
}
|
|
@@ -39559,7 +39482,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39559
39482
|
key: "initialize",
|
|
39560
39483
|
value: function () {
|
|
39561
39484
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
39562
|
-
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions16, _set$getDivaArticles,
|
|
39485
|
+
var viewReadyPromise, loadSuccessful, _initSetState$api$web, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, products, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
39563
39486
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
39564
39487
|
while (1) switch (_context13.prev = _context13.next) {
|
|
39565
39488
|
case 0:
|
|
@@ -39569,7 +39492,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39569
39492
|
this.api.setState(this.state);
|
|
39570
39493
|
this.ReturnTo = this.plannerConfig.returnTo;
|
|
39571
39494
|
LOG$1.startTransaction({
|
|
39572
|
-
event: '
|
|
39495
|
+
event: 'onInitializeConfigurator',
|
|
39573
39496
|
message: 'Loading Basket',
|
|
39574
39497
|
eventId: 'LOADING_BASKET',
|
|
39575
39498
|
warningTime: 2000,
|
|
@@ -39585,7 +39508,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39585
39508
|
case 12:
|
|
39586
39509
|
loadSuccessful = _context13.sent;
|
|
39587
39510
|
if (!loadSuccessful) {
|
|
39588
|
-
_context13.next =
|
|
39511
|
+
_context13.next = 60;
|
|
39589
39512
|
break;
|
|
39590
39513
|
}
|
|
39591
39514
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
@@ -39658,43 +39581,41 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39658
39581
|
});
|
|
39659
39582
|
}
|
|
39660
39583
|
this.subscribeToWebPlannerEvents();
|
|
39661
|
-
|
|
39584
|
+
this.divaBasketHandler.actBasket;
|
|
39662
39585
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
39586
|
+
initializationId = undefined;
|
|
39587
|
+
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
39588
|
+
//KONFIGURATOR LOADED BY PRODUCT. LOG THIS HERE! WITH PRODUCT NAME AND PRODUCT ID
|
|
39589
|
+
//this._customProductId = undefined; // bsp SAP wenn CUSTOM_PRODUCT_ID
|
|
39590
|
+
initializationId = this.plannerConfig.productId;
|
|
39591
|
+
} else if (this.divaBasketHandler.initializationTypeGetter == 'ARTICLELIST') {
|
|
39592
|
+
initializationId = (_this$plannerConfig$a = this.plannerConfig.articleCodexes) === null || _this$plannerConfig$a === void 0 ? void 0 : _this$plannerConfig$a.slice();
|
|
39593
|
+
} else if (this.divaBasketHandler.initializationTypeGetter == 'CUSTOM_PRODUCT_ID') {
|
|
39594
|
+
initializationId = this.plannerConfig.customProductId;
|
|
39595
|
+
}
|
|
39663
39596
|
LOG$1.successTransaction('LOADING_BASKET', {
|
|
39664
|
-
|
|
39665
|
-
|
|
39666
|
-
|
|
39667
|
-
|
|
39668
|
-
catName: catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogName,
|
|
39597
|
+
has3D: set === null || set === void 0 ? void 0 : set.getPlannerMode(),
|
|
39598
|
+
hasPlanner: this.getCurPlannerType() == 'PLANNER' ? true : false,
|
|
39599
|
+
catalogCodex: catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogCodex,
|
|
39600
|
+
catalogName: catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogName,
|
|
39669
39601
|
accountName: catalogData === null || catalogData === void 0 ? void 0 : catalogData.accountName,
|
|
39670
|
-
|
|
39671
|
-
|
|
39672
|
-
|
|
39673
|
-
|
|
39674
|
-
|
|
39675
|
-
|
|
39602
|
+
supplierId: catalogData === null || catalogData === void 0 ? void 0 : catalogData.supplierGuid,
|
|
39603
|
+
plannerInitialization: this.divaBasketHandler.initializationTypeGetter,
|
|
39604
|
+
productGroup: catalogData === null || catalogData === void 0 ? void 0 : catalogData.mainCategory,
|
|
39605
|
+
hasPlannerInitialization: this.initMode ? false : true,
|
|
39606
|
+
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
39607
|
+
initializationId: initializationId
|
|
39608
|
+
}, false);
|
|
39609
|
+
_context13.next = 57;
|
|
39676
39610
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
39677
|
-
case
|
|
39611
|
+
case 57:
|
|
39678
39612
|
return _context13.abrupt("return", true);
|
|
39679
|
-
case
|
|
39613
|
+
case 60:
|
|
39680
39614
|
this.onInitializationError();
|
|
39681
39615
|
//fehler beim laden vom basket..
|
|
39682
|
-
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {
|
|
39683
|
-
/*
|
|
39684
|
-
origProductId: basket.OrigProductId,
|
|
39685
|
-
origDivaNr: this.divaBasketHandler.origConfiguration.originDivaNr,
|
|
39686
|
-
bv: (set?.getSetPrice() ?? 0) / 1000,
|
|
39687
|
-
cat: catalogData?.catalogCodex,
|
|
39688
|
-
catName: catalogData?.catalogName,
|
|
39689
|
-
accountName: catalogData?.accountName,
|
|
39690
|
-
sup: catalogData?.supplierGuid,
|
|
39691
|
-
journeyId: basket.CustomerJourneyId,
|
|
39692
|
-
divaNr: basket.DivaNr,
|
|
39693
|
-
documentVersion: basket.DocumentVersion,
|
|
39694
|
-
plannerMode: this.getCurImageMode(),*/
|
|
39695
|
-
});
|
|
39616
|
+
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
39696
39617
|
return _context13.abrupt("return", false);
|
|
39697
|
-
case
|
|
39618
|
+
case 63:
|
|
39698
39619
|
case "end":
|
|
39699
39620
|
return _context13.stop();
|
|
39700
39621
|
}
|
|
@@ -39756,36 +39677,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39756
39677
|
return;
|
|
39757
39678
|
}
|
|
39758
39679
|
if (onErrorHandling) {
|
|
39759
|
-
var _this$plannerConfig$
|
|
39680
|
+
var _this$plannerConfig$a3;
|
|
39760
39681
|
if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
|
|
39761
|
-
var _this$plannerConfig$
|
|
39762
|
-
(_this$plannerConfig$
|
|
39682
|
+
var _this$plannerConfig$a2, _this$i18n4, _onErrorHandling$erro;
|
|
39683
|
+
(_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
|
|
39763
39684
|
title: (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured'),
|
|
39764
39685
|
accept: true
|
|
39765
39686
|
});
|
|
39766
39687
|
}
|
|
39767
|
-
if (onErrorHandling.openComponent) (_this$plannerConfig$
|
|
39688
|
+
if (onErrorHandling.openComponent) (_this$plannerConfig$a3 = this.plannerConfig.actions) === null || _this$plannerConfig$a3 === void 0 || _this$plannerConfig$a3.openComponent(onErrorHandling.openComponent);
|
|
39768
39689
|
} else if (this.api.getApplicationEnvironment() == 'SELLER') {
|
|
39769
39690
|
var divaNr = this.plannerConfig.divaNr;
|
|
39770
39691
|
if (divaNr) {
|
|
39771
|
-
var _this$plannerConfig$
|
|
39772
|
-
(_this$plannerConfig$
|
|
39692
|
+
var _this$plannerConfig$a4, _this$i18n5, _this$i18n6, _this$plannerConfig$a5;
|
|
39693
|
+
(_this$plannerConfig$a4 = this.plannerConfig.actions) === null || _this$plannerConfig$a4 === void 0 || _this$plannerConfig$a4.openModal({
|
|
39773
39694
|
title: (_this$i18n5 = this.i18n()) === null || _this$i18n5 === void 0 ? void 0 : _this$i18n5.t('modals.divanr_not_found_title', {
|
|
39774
39695
|
divaNr: divaNr
|
|
39775
39696
|
}),
|
|
39776
39697
|
text: (_this$i18n6 = this.i18n()) === null || _this$i18n6 === void 0 ? void 0 : _this$i18n6.t('modals.divanr_not_found_text'),
|
|
39777
39698
|
accept: true
|
|
39778
39699
|
});
|
|
39779
|
-
(_this$plannerConfig$
|
|
39700
|
+
(_this$plannerConfig$a5 = this.plannerConfig.actions) === null || _this$plannerConfig$a5 === void 0 || _this$plannerConfig$a5.openComponent({
|
|
39780
39701
|
type: 'ARCHIVE'
|
|
39781
39702
|
});
|
|
39782
39703
|
} else {
|
|
39783
|
-
var _this$plannerConfig$
|
|
39784
|
-
(_this$plannerConfig$
|
|
39704
|
+
var _this$plannerConfig$a6, _this$i18n7, _this$plannerConfig$a7, _this$plannerConfig$c;
|
|
39705
|
+
(_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openModal({
|
|
39785
39706
|
accept: true,
|
|
39786
39707
|
title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured')
|
|
39787
39708
|
});
|
|
39788
|
-
(_this$plannerConfig$
|
|
39709
|
+
(_this$plannerConfig$a7 = this.plannerConfig.actions) === null || _this$plannerConfig$a7 === void 0 || _this$plannerConfig$a7.openComponent({
|
|
39789
39710
|
type: 'SELLER',
|
|
39790
39711
|
parameters: {
|
|
39791
39712
|
module: ((_this$plannerConfig$c = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c === void 0 ? void 0 : _this$plannerConfig$c.parentType) == 'SUPPLIER' ? 'Catalogs' : 'Collections'
|
|
@@ -40232,6 +40153,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40232
40153
|
_context19.next = 15;
|
|
40233
40154
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40234
40155
|
case 15:
|
|
40156
|
+
this.plannerChangeLog('onDeletePlanner');
|
|
40157
|
+
case 16:
|
|
40235
40158
|
case "end":
|
|
40236
40159
|
return _context19.stop();
|
|
40237
40160
|
}
|
|
@@ -40678,8 +40601,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40678
40601
|
key: "saveToBasket",
|
|
40679
40602
|
value: function () {
|
|
40680
40603
|
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
40681
|
-
var _returnTo,
|
|
40682
|
-
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2,
|
|
40604
|
+
var _returnTo, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
|
|
40605
|
+
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
40683
40606
|
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
40684
40607
|
while (1) switch (_context26.prev = _context26.next) {
|
|
40685
40608
|
case 0:
|
|
@@ -40707,25 +40630,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40707
40630
|
}
|
|
40708
40631
|
return _context26.abrupt("return", result);
|
|
40709
40632
|
case 13:
|
|
40710
|
-
LOG$1.startTransaction({
|
|
40711
|
-
event: (_event = event) !== null && _event !== void 0 ? _event : 'onAddToBasket',
|
|
40712
|
-
message: 'Perform case: ' + ((_event2 = event) !== null && _event2 !== void 0 ? _event2 : 'onAddToBasket'),
|
|
40713
|
-
labels: {
|
|
40714
|
-
divaNr: this.divaNr,
|
|
40715
|
-
documentVersion: this.getBasketData().DocumentVersion.toString(),
|
|
40716
|
-
status: this.getBasketData().Status,
|
|
40717
|
-
bv: set.getSetPrice() / 1000,
|
|
40718
|
-
accountId: this.getBasketData().OrderSets[0].AccountGUID
|
|
40719
|
-
},
|
|
40720
|
-
eventId: (_event3 = event) !== null && _event3 !== void 0 ? _event3 : 'onAddToBasket',
|
|
40721
|
-
warningTime: 2000,
|
|
40722
|
-
errorTime: 4000
|
|
40723
|
-
});
|
|
40724
40633
|
_context26.t0 = this.divaBasketHandler;
|
|
40725
40634
|
_context26.t1 = this.divaBasketHandler.actDivaNr;
|
|
40726
|
-
_context26.next =
|
|
40635
|
+
_context26.next = 17;
|
|
40727
40636
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
40728
|
-
case
|
|
40637
|
+
case 17:
|
|
40729
40638
|
_context26.t2 = _context26.sent;
|
|
40730
40639
|
_context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
|
|
40731
40640
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
@@ -40741,15 +40650,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40741
40650
|
}
|
|
40742
40651
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
40743
40652
|
actBasket.Updated = Date.now();
|
|
40744
|
-
LOG$1.successTransaction('FILL_BASKET');
|
|
40745
40653
|
if (!returnTo) {
|
|
40746
|
-
_context26.next =
|
|
40654
|
+
_context26.next = 52;
|
|
40747
40655
|
break;
|
|
40748
40656
|
}
|
|
40749
40657
|
_context26.t3 = returnTo;
|
|
40750
|
-
_context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ?
|
|
40658
|
+
_context26.next = _context26.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context26.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context26.t3 === 'OPEN_PDF' ? 33 : _context26.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context26.t3 === 'SAVE_BASKET' ? 33 : _context26.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context26.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
40751
40659
|
break;
|
|
40752
|
-
case
|
|
40660
|
+
case 28:
|
|
40753
40661
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.toggleLoading('buildScene', false, false);
|
|
40754
40662
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.openComponent({
|
|
40755
40663
|
type: 'SELLER',
|
|
@@ -40761,8 +40669,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40761
40669
|
basketData: actBasket
|
|
40762
40670
|
}
|
|
40763
40671
|
});
|
|
40764
|
-
return _context26.abrupt("break",
|
|
40765
|
-
case
|
|
40672
|
+
return _context26.abrupt("break", 52);
|
|
40673
|
+
case 31:
|
|
40766
40674
|
(_this$actions34 = this.actions) === null || _this$actions34 === void 0 || _this$actions34.openComponent({
|
|
40767
40675
|
type: 'SELLER',
|
|
40768
40676
|
parameters: {
|
|
@@ -40773,57 +40681,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40773
40681
|
basketData: actBasket
|
|
40774
40682
|
}
|
|
40775
40683
|
});
|
|
40776
|
-
return _context26.abrupt("break",
|
|
40777
|
-
case
|
|
40684
|
+
return _context26.abrupt("break", 52);
|
|
40685
|
+
case 33:
|
|
40778
40686
|
if (!(event == 'onSaveProduct')) {
|
|
40779
|
-
_context26.next =
|
|
40687
|
+
_context26.next = 43;
|
|
40780
40688
|
break;
|
|
40781
40689
|
}
|
|
40782
40690
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
40783
40691
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
40784
|
-
_context26.next =
|
|
40692
|
+
_context26.next = 37;
|
|
40785
40693
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
40786
|
-
case
|
|
40787
|
-
_context26.next =
|
|
40694
|
+
case 37:
|
|
40695
|
+
_context26.next = 39;
|
|
40788
40696
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
40789
|
-
case
|
|
40697
|
+
case 39:
|
|
40790
40698
|
newDivaNr = _context26.sent;
|
|
40791
40699
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
40792
|
-
_context26.next =
|
|
40700
|
+
_context26.next = 51;
|
|
40793
40701
|
break;
|
|
40794
|
-
case
|
|
40702
|
+
case 43:
|
|
40795
40703
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
40796
40704
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = undefined;
|
|
40797
40705
|
actBasket.setDocumentVersion(actBasket.getDocumentVersion() + 1);
|
|
40798
40706
|
}
|
|
40799
40707
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
40800
40708
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
40801
|
-
_context26.next =
|
|
40709
|
+
_context26.next = 48;
|
|
40802
40710
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
40803
|
-
case
|
|
40711
|
+
case 48:
|
|
40804
40712
|
_result2 = _context26.sent;
|
|
40805
40713
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
40806
|
-
_context26.next =
|
|
40714
|
+
_context26.next = 51;
|
|
40807
40715
|
break;
|
|
40808
40716
|
}
|
|
40809
|
-
LOG$1.errorTransaction((_event4 = event) !== null && _event4 !== void 0 ? _event4 : 'onAddToBasket', 'WC_0019', 'Error saving basket', {
|
|
40810
|
-
divaNr: this.divaNr,
|
|
40811
|
-
documentVersion: this.getBasketData().DocumentVersion.toString(),
|
|
40812
|
-
status: this.getBasketData().Status,
|
|
40813
|
-
bv: set.getSetPrice() / 1000
|
|
40814
|
-
});
|
|
40815
40717
|
return _context26.abrupt("return", 'canceled');
|
|
40816
|
-
case
|
|
40817
|
-
return _context26.abrupt("break",
|
|
40818
|
-
case
|
|
40718
|
+
case 51:
|
|
40719
|
+
return _context26.abrupt("break", 52);
|
|
40720
|
+
case 52:
|
|
40819
40721
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
40820
40722
|
actBasket = this.divaBasketHandler.getBasketData(actBasket.DivaNr); //get pdf documenturl from saved basket
|
|
40821
|
-
_context26.next =
|
|
40723
|
+
_context26.next = 56;
|
|
40822
40724
|
return this.addToBasket(actBasket, event);
|
|
40823
|
-
case
|
|
40725
|
+
case 56:
|
|
40824
40726
|
product = _context26.sent;
|
|
40825
40727
|
return _context26.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
40826
|
-
case
|
|
40728
|
+
case 58:
|
|
40827
40729
|
case "end":
|
|
40828
40730
|
return _context26.stop();
|
|
40829
40731
|
}
|
|
@@ -40837,7 +40739,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40837
40739
|
}, {
|
|
40838
40740
|
key: "confirmOptionsInMetric",
|
|
40839
40741
|
value: function confirmOptionsInMetric(options) {
|
|
40840
|
-
setHandlerInstance.confirmOptionsInMetric(this.actSet(), options
|
|
40742
|
+
setHandlerInstance.confirmOptionsInMetric(this.actSet(), options);
|
|
40841
40743
|
}
|
|
40842
40744
|
}, {
|
|
40843
40745
|
key: "checkNotificationRules",
|
|
@@ -40864,7 +40766,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40864
40766
|
key: "getCurPlannerType",
|
|
40865
40767
|
value: function getCurPlannerType() {
|
|
40866
40768
|
var _this$getReturnTo, _this$getReturnTo$sta;
|
|
40867
|
-
var initializing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
40868
40769
|
var set = this.actSet();
|
|
40869
40770
|
var ret = 'NONE';
|
|
40870
40771
|
var viewerOption = this.getPlannerMode();
|
|
@@ -40878,8 +40779,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40878
40779
|
|
|
40879
40780
|
//if planner is hidden by config but nothing is planned initially
|
|
40880
40781
|
if (plannerType === 'NONE') {
|
|
40881
|
-
var _this$plannerConfig$
|
|
40882
|
-
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$
|
|
40782
|
+
var _this$plannerConfig$a8, _this$actSet10;
|
|
40783
|
+
if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a8 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a8 !== void 0 && _this$plannerConfig$a8.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet10 = this.actSet()) !== null && _this$actSet10 !== void 0 && (_this$actSet10 = _this$actSet10.CatalogData.startPlannerArticle) !== null && _this$actSet10 !== void 0 && _this$actSet10.length)) {
|
|
40883
40784
|
plannerType = 'PLANNER';
|
|
40884
40785
|
}
|
|
40885
40786
|
}
|
|
@@ -40898,13 +40799,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40898
40799
|
this.abTest = Math.random() < 0.5 ? 'on' : 'off';
|
|
40899
40800
|
}
|
|
40900
40801
|
if (optimizationReason) {
|
|
40901
|
-
if (initializing) {
|
|
40902
|
-
LOG$1.businessEvent('onUxOptimization', 'Planner', 'UxOptimierung hide Plannerstep', {
|
|
40903
|
-
optimizationType: 'hidePlanerStep',
|
|
40904
|
-
optimizationReason: optimizationReason,
|
|
40905
|
-
abTest: this.abTest
|
|
40906
|
-
});
|
|
40907
|
-
}
|
|
40908
40802
|
if (this.abTest === undefined || this.abTest === 'on') return 'NONE';
|
|
40909
40803
|
}
|
|
40910
40804
|
plannerType = undefined;
|
|
@@ -41109,7 +41003,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41109
41003
|
_this$actions42,
|
|
41110
41004
|
_this$actions43;
|
|
41111
41005
|
var event,
|
|
41112
|
-
addToBasketLog,
|
|
41113
41006
|
emailConfig,
|
|
41114
41007
|
_emailConfig$to$split,
|
|
41115
41008
|
_emailConfig$to,
|
|
@@ -41121,46 +41014,40 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41121
41014
|
while (1) switch (_context28.prev = _context28.next) {
|
|
41122
41015
|
case 0:
|
|
41123
41016
|
event = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : 'onAddToBasket';
|
|
41124
|
-
addToBasketLog = true;
|
|
41125
41017
|
_context28.t0 = event;
|
|
41126
|
-
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ?
|
|
41018
|
+
_context28.next = _context28.t0 === 'onWebPlanerPrint' ? 5 : _context28.t0 === 'onWebPlanerSave' ? 7 : _context28.t0 === 'onWebPlanerShare' ? 9 : _context28.t0 === 'onRequestConsulation' ? 11 : _context28.t0 === 'onSave' ? 13 : _context28.t0 === 'onSendEmail' ? 15 : _context28.t0 === 'onSaveProduct' ? 20 : _context28.t0 === 'dontSaveBasket' ? 27 : _context28.t0 === 'onAddToBasket' ? 28 : 30;
|
|
41127
41019
|
break;
|
|
41128
41020
|
case 5:
|
|
41129
|
-
this.handleSuccessTransaction('onPrintBasket', actBasket);
|
|
41130
41021
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.onEvent({
|
|
41131
41022
|
type: 'onWebPlanerPrint',
|
|
41132
41023
|
data: actBasket.getAsJson()
|
|
41133
41024
|
});
|
|
41134
|
-
return _context28.abrupt("break",
|
|
41135
|
-
case
|
|
41136
|
-
this.handleSuccessTransaction('onSaveBasket', actBasket);
|
|
41025
|
+
return _context28.abrupt("break", 32);
|
|
41026
|
+
case 7:
|
|
41137
41027
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41138
41028
|
type: 'onWebPlanerSave',
|
|
41139
41029
|
data: actBasket.getAsJson()
|
|
41140
41030
|
});
|
|
41141
|
-
return _context28.abrupt("break",
|
|
41142
|
-
case
|
|
41143
|
-
this.handleSuccessTransaction('onShareBasket', actBasket);
|
|
41031
|
+
return _context28.abrupt("break", 32);
|
|
41032
|
+
case 9:
|
|
41144
41033
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41145
41034
|
type: 'onWebPlanerShare',
|
|
41146
41035
|
data: actBasket.getAsJson()
|
|
41147
41036
|
});
|
|
41148
|
-
return _context28.abrupt("break",
|
|
41149
|
-
case
|
|
41150
|
-
this.handleSuccessTransaction('onRequestConsulation', actBasket);
|
|
41037
|
+
return _context28.abrupt("break", 32);
|
|
41038
|
+
case 11:
|
|
41151
41039
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41152
41040
|
type: 'onRequestConsulation',
|
|
41153
41041
|
data: actBasket.getAsJson()
|
|
41154
41042
|
});
|
|
41155
|
-
return _context28.abrupt("break",
|
|
41156
|
-
case
|
|
41157
|
-
this.handleSuccessTransaction('onSave', actBasket);
|
|
41043
|
+
return _context28.abrupt("break", 32);
|
|
41044
|
+
case 13:
|
|
41158
41045
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41159
41046
|
type: 'onSave',
|
|
41160
41047
|
data: actBasket.getAsJson()
|
|
41161
41048
|
});
|
|
41162
|
-
return _context28.abrupt("break",
|
|
41163
|
-
case
|
|
41049
|
+
return _context28.abrupt("break", 32);
|
|
41050
|
+
case 15:
|
|
41164
41051
|
emailConfig = (_this$divaBasketHandl3 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl3 !== void 0 ? _this$divaBasketHandl3 : this.getEmailConfig(); //reset the emailConfig
|
|
41165
41052
|
this.divaBasketHandler.emailConfig = undefined;
|
|
41166
41053
|
if (emailConfig) {
|
|
@@ -41189,48 +41076,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41189
41076
|
}
|
|
41190
41077
|
});
|
|
41191
41078
|
});
|
|
41192
|
-
this.handleSuccessTransaction('onSendEmail', actBasket);
|
|
41193
41079
|
}
|
|
41194
41080
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41195
41081
|
type: 'onAddToBasket',
|
|
41196
41082
|
data: actBasket.getAsJson()
|
|
41197
41083
|
});
|
|
41198
|
-
return _context28.abrupt("break",
|
|
41199
|
-
case
|
|
41084
|
+
return _context28.abrupt("break", 32);
|
|
41085
|
+
case 20:
|
|
41200
41086
|
this.actSet().CatalogData;
|
|
41201
|
-
_context28.next =
|
|
41087
|
+
_context28.next = 23;
|
|
41202
41088
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41203
|
-
case
|
|
41089
|
+
case 23:
|
|
41204
41090
|
products = _context28.sent;
|
|
41205
|
-
this.handleSuccessTransaction('onSaveProduct', actBasket);
|
|
41206
41091
|
(_this$actions41 = this.actions) === null || _this$actions41 === void 0 || _this$actions41.onEvent({
|
|
41207
41092
|
type: 'onAddToBasket',
|
|
41208
41093
|
data: actBasket.getAsJson()
|
|
41209
41094
|
});
|
|
41210
41095
|
if (!products) {
|
|
41211
|
-
_context28.next =
|
|
41096
|
+
_context28.next = 27;
|
|
41212
41097
|
break;
|
|
41213
41098
|
}
|
|
41214
41099
|
return _context28.abrupt("return", products[0]);
|
|
41215
|
-
case
|
|
41216
|
-
|
|
41217
|
-
addToBasketLog = false;
|
|
41218
|
-
case 35:
|
|
41219
|
-
if (addToBasketLog) this.handleSuccessTransaction('onAddToBasket', actBasket);
|
|
41100
|
+
case 27:
|
|
41101
|
+
case 28:
|
|
41220
41102
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41221
41103
|
type: 'onAddToBasket',
|
|
41222
41104
|
data: actBasket.getAsJson()
|
|
41223
41105
|
});
|
|
41224
|
-
return _context28.abrupt("break",
|
|
41225
|
-
case
|
|
41106
|
+
return _context28.abrupt("break", 32);
|
|
41107
|
+
case 30:
|
|
41226
41108
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41227
41109
|
type: event,
|
|
41228
41110
|
data: actBasket.getAsJson()
|
|
41229
41111
|
});
|
|
41230
|
-
return _context28.abrupt("break",
|
|
41231
|
-
case
|
|
41112
|
+
return _context28.abrupt("break", 32);
|
|
41113
|
+
case 32:
|
|
41232
41114
|
return _context28.abrupt("return");
|
|
41233
|
-
case
|
|
41115
|
+
case 33:
|
|
41234
41116
|
case "end":
|
|
41235
41117
|
return _context28.stop();
|
|
41236
41118
|
}
|
|
@@ -41241,17 +41123,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41241
41123
|
}
|
|
41242
41124
|
return addToBasket;
|
|
41243
41125
|
}()
|
|
41244
|
-
}, {
|
|
41245
|
-
key: "handleSuccessTransaction",
|
|
41246
|
-
value: function handleSuccessTransaction(eventAction, actBasket) {
|
|
41247
|
-
LOG$1.successTransaction(eventAction, {
|
|
41248
|
-
divaNr: actBasket.DivaNr,
|
|
41249
|
-
documentVersion: actBasket.getDocumentVersion().toString(),
|
|
41250
|
-
status: actBasket.Status,
|
|
41251
|
-
bv: actBasket.SetPrice / 1000,
|
|
41252
|
-
accountId: actBasket.OrderSets[0].AccountGUID
|
|
41253
|
-
});
|
|
41254
|
-
}
|
|
41255
41126
|
}, {
|
|
41256
41127
|
key: "openPDFpostAsEvent",
|
|
41257
41128
|
value: function openPDFpostAsEvent(mongoDBId) {
|
|
@@ -41815,6 +41686,69 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41815
41686
|
set: function set(loadhqr) {
|
|
41816
41687
|
this._doLoadHQR = loadhqr;
|
|
41817
41688
|
}
|
|
41689
|
+
}, {
|
|
41690
|
+
key: "plannerChangeLog",
|
|
41691
|
+
value: function plannerChangeLog(action) {
|
|
41692
|
+
var set = this.actSet();
|
|
41693
|
+
var articles = [];
|
|
41694
|
+
if (set) {
|
|
41695
|
+
for (var _i = 0, _Object$values = Object.values(set.getDivaArticles()); _i < _Object$values.length; _i++) {
|
|
41696
|
+
var article = _Object$values[_i];
|
|
41697
|
+
if (article.relatedToBasketId) {
|
|
41698
|
+
var toAdd = {
|
|
41699
|
+
articleCodex: article.configArticleCodex,
|
|
41700
|
+
basketId: article.basketId,
|
|
41701
|
+
relatedBasektId: article.relatedToBasketId,
|
|
41702
|
+
type: 'ACCESSORIE'
|
|
41703
|
+
};
|
|
41704
|
+
if (!articles) {
|
|
41705
|
+
articles = [toAdd];
|
|
41706
|
+
} else {
|
|
41707
|
+
articles.push(toAdd);
|
|
41708
|
+
}
|
|
41709
|
+
} else {
|
|
41710
|
+
var _toAdd = {
|
|
41711
|
+
articleCodex: article.configArticleCodex,
|
|
41712
|
+
basketId: article.basketId,
|
|
41713
|
+
type: 'ARTICLE'
|
|
41714
|
+
};
|
|
41715
|
+
if (!articles) {
|
|
41716
|
+
articles = [_toAdd];
|
|
41717
|
+
} else {
|
|
41718
|
+
articles.push(_toAdd);
|
|
41719
|
+
}
|
|
41720
|
+
}
|
|
41721
|
+
}
|
|
41722
|
+
}
|
|
41723
|
+
LOG$1.businessEvent(action, 'Planner', 'Planner wurde verändert', {
|
|
41724
|
+
articles: articles
|
|
41725
|
+
});
|
|
41726
|
+
}
|
|
41727
|
+
}, {
|
|
41728
|
+
key: "configuratorChangeLog",
|
|
41729
|
+
value: function configuratorChangeLog(action) {
|
|
41730
|
+
var set = this.actSet();
|
|
41731
|
+
var configuration = [];
|
|
41732
|
+
if (set) {
|
|
41733
|
+
for (var _i2 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i2 < _Object$values2.length; _i2++) {
|
|
41734
|
+
var article = _Object$values2[_i2];
|
|
41735
|
+
if (!configuration) {
|
|
41736
|
+
configuration = [{
|
|
41737
|
+
varientValues: article.VariantValues,
|
|
41738
|
+
basketId: article.basketId
|
|
41739
|
+
}];
|
|
41740
|
+
} else {
|
|
41741
|
+
configuration.push({
|
|
41742
|
+
varientValues: article.VariantValues,
|
|
41743
|
+
basketId: article.basketId
|
|
41744
|
+
});
|
|
41745
|
+
}
|
|
41746
|
+
}
|
|
41747
|
+
}
|
|
41748
|
+
LOG$1.businessEvent(action, 'Planner', 'Configurator wurde verändert', {
|
|
41749
|
+
configuration: configuration
|
|
41750
|
+
});
|
|
41751
|
+
}
|
|
41818
41752
|
}, {
|
|
41819
41753
|
key: "clearRegisteredFunctions",
|
|
41820
41754
|
value: function clearRegisteredFunctions() {
|