@crystaldesign/web-planner-logic 25.3.0-beta.2 → 25.3.0-beta.21
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-230a7343.js → DivaBoxPlanner-1a7853f2.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-3b70656f.js → DivaStandardPlanner-ceca3901.js} +2 -2
- package/build/cjs/{DoorPlanner-85f5df3d.js → DoorPlanner-a0385fd8.js} +1 -1
- package/build/cjs/{Host3DSignalR-06a86be8.js → Host3DSignalR-7fab26d7.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-8e9cc61c.js → LiviqueWWSHandler-62f9e3c6.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-786700cb.js → PfisterWWSHandler-7977e1d8.js} +1 -1
- package/build/cjs/{PlannerHandler2D-d4305a93.js → PlannerHandler2D-ff44402a.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-70977945.js → SeriousBasketHandler-503bc153.js} +1 -1
- package/build/cjs/{ShelfPlanner-89d47e5e.js → ShelfPlanner-3fec6ada.js} +39 -22
- package/build/cjs/{StandardWWSHandler-4e8f472a.js → StandardWWSHandler-3f920d18.js} +1 -1
- package/build/cjs/{index-1df7482f.js → index-bc62cd46.js} +473 -354
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-ef50f3c1.js → DivaBoxPlanner-48803ce3.js} +2 -2
- package/build/esm/{DivaStandardPlanner-50298918.js → DivaStandardPlanner-ce7927f6.js} +2 -2
- package/build/esm/{DoorPlanner-43de473a.js → DoorPlanner-f893f34e.js} +1 -1
- package/build/esm/{Host3DSignalR-b772e3b5.js → Host3DSignalR-b2645aac.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-e63f276f.js → LiviqueWWSHandler-7a582c3d.js} +1 -1
- package/build/esm/{PfisterWWSHandler-7f7996a7.js → PfisterWWSHandler-9f3a0b55.js} +1 -1
- package/build/esm/{PlannerHandler2D-4e72c491.js → PlannerHandler2D-d57ebcdc.js} +1 -1
- package/build/esm/{SeriousBasketHandler-1a4186bd.js → SeriousBasketHandler-19a9ff95.js} +1 -1
- package/build/esm/{ShelfPlanner-152084c3.js → ShelfPlanner-1e795caa.js} +39 -22
- package/build/esm/{StandardWWSHandler-a5d84eb8.js → StandardWWSHandler-454f0faa.js} +1 -1
- package/build/esm/{index-474fc67f.js → index-30e0f4dc.js} +473 -354
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -7
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +4 -0
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +4 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/ViewPointHandler.d.ts +0 -4
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/ViewPointHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +5 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +5 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1676,7 +1676,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1676
1676
|
parent: parent,
|
|
1677
1677
|
ocd: jsonOPV.OCD,
|
|
1678
1678
|
quantity: jsonOPV.Quantity ? Number(jsonOPV.Quantity) : 1,
|
|
1679
|
-
isDefault: jsonOPV.IsDefault,
|
|
1680
1679
|
isPIMFlatValue: jsonOPV.PIMFlatValues === 'True',
|
|
1681
1680
|
isVariantAttribute: jsonOPV.IsVariantAttribute
|
|
1682
1681
|
};
|
|
@@ -1933,6 +1932,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1933
1932
|
get: function get() {
|
|
1934
1933
|
return this.opv.subArticleTypeNr;
|
|
1935
1934
|
}
|
|
1935
|
+
}, {
|
|
1936
|
+
key: "addToMeasure",
|
|
1937
|
+
get: function get() {
|
|
1938
|
+
return this.opv.catalogOPV.addToMeasure;
|
|
1939
|
+
}
|
|
1936
1940
|
}, {
|
|
1937
1941
|
key: "hideSubarticleDescription",
|
|
1938
1942
|
get: function get() {
|
|
@@ -16094,6 +16098,15 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16094
16098
|
case 'SET_BY_RULE':
|
|
16095
16099
|
this.opv.setByRule = prop.Value;
|
|
16096
16100
|
break;
|
|
16101
|
+
case 'ADD_TO_MEASURE':
|
|
16102
|
+
this.opv.addToMeasure = prop.Value.split(';').map(function (v) {
|
|
16103
|
+
return {
|
|
16104
|
+
op: v.split(':')[0],
|
|
16105
|
+
value: Number(v.split(':')[1]),
|
|
16106
|
+
opt: 'OPT' + v.split(':')[2]
|
|
16107
|
+
};
|
|
16108
|
+
});
|
|
16109
|
+
break;
|
|
16097
16110
|
default:
|
|
16098
16111
|
if (key.includes('__')) break;
|
|
16099
16112
|
var values_locales = [];
|
|
@@ -16389,6 +16402,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16389
16402
|
get: function get() {
|
|
16390
16403
|
return this.opv.customDimension;
|
|
16391
16404
|
}
|
|
16405
|
+
}, {
|
|
16406
|
+
key: "addToMeasure",
|
|
16407
|
+
get: function get() {
|
|
16408
|
+
return this.opv.addToMeasure;
|
|
16409
|
+
}
|
|
16392
16410
|
}]);
|
|
16393
16411
|
}();
|
|
16394
16412
|
|
|
@@ -17986,10 +18004,10 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17986
18004
|
case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
|
|
17987
18005
|
this.opt.onlyVisibleIfNotDocked = prop.Value;
|
|
17988
18006
|
break;
|
|
17989
|
-
case '
|
|
18007
|
+
case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
|
|
17990
18008
|
this.opt.onlyVisibleIfConfigSingle = prop.Value;
|
|
17991
18009
|
break;
|
|
17992
|
-
case '
|
|
18010
|
+
case 'ONLY_VISIBLE_IF_CONFIG_ALL':
|
|
17993
18011
|
this.opt.onlyVisibleIfConfigAll = prop.Value;
|
|
17994
18012
|
break;
|
|
17995
18013
|
case 'ISDEFAULTVALUEFOROPTIONS':
|
|
@@ -20642,6 +20660,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20642
20660
|
var _this$val$customDimen, _this$val24;
|
|
20643
20661
|
return this.val && ((_this$val$customDimen = (_this$val24 = this.val) === null || _this$val24 === void 0 ? void 0 : _this$val24.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
|
|
20644
20662
|
}
|
|
20663
|
+
}, {
|
|
20664
|
+
key: "addToMeasure",
|
|
20665
|
+
get: function get() {
|
|
20666
|
+
var _this$val25;
|
|
20667
|
+
return (_this$val25 = this.val) === null || _this$val25 === void 0 ? void 0 : _this$val25.addToMeasure;
|
|
20668
|
+
}
|
|
20645
20669
|
}, {
|
|
20646
20670
|
key: "showWarningForRequiresUserInput",
|
|
20647
20671
|
get: function get() {
|
|
@@ -22219,6 +22243,16 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22219
22243
|
}
|
|
22220
22244
|
return true;
|
|
22221
22245
|
}
|
|
22246
|
+
}, {
|
|
22247
|
+
key: "optionStatesWithAddToMeasure",
|
|
22248
|
+
value: function optionStatesWithAddToMeasure(opt) {
|
|
22249
|
+
return Object.values(this.articleOptionStates).filter(function (ops) {
|
|
22250
|
+
var _ops$addToMeasure, _ops$addToMeasure2;
|
|
22251
|
+
return ((_ops$addToMeasure = ops.addToMeasure) === null || _ops$addToMeasure === void 0 ? void 0 : _ops$addToMeasure.find(function (o) {
|
|
22252
|
+
return o.opt == opt;
|
|
22253
|
+
})) || ops.optionCodex == opt && ((_ops$addToMeasure2 = ops.addToMeasure) === null || _ops$addToMeasure2 === void 0 ? void 0 : _ops$addToMeasure2.length);
|
|
22254
|
+
});
|
|
22255
|
+
}
|
|
22222
22256
|
}, {
|
|
22223
22257
|
key: "requiredUserInputOptions",
|
|
22224
22258
|
get: function get() {
|
|
@@ -22954,6 +22988,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22954
22988
|
}
|
|
22955
22989
|
this.updateIDMSpecificFeature(myArtOPS);
|
|
22956
22990
|
}
|
|
22991
|
+
this.updateOptionsWithAddToMeasure(OP);
|
|
22957
22992
|
}
|
|
22958
22993
|
}, {
|
|
22959
22994
|
key: "updateIDMSpecificFeature",
|
|
@@ -23109,6 +23144,61 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23109
23144
|
return myDesc;
|
|
23110
23145
|
}
|
|
23111
23146
|
}
|
|
23147
|
+
}, {
|
|
23148
|
+
key: "updateOptionsWithAddToMeasure",
|
|
23149
|
+
value: function updateOptionsWithAddToMeasure(optionCodex) {
|
|
23150
|
+
var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
|
|
23151
|
+
var result = undefined;
|
|
23152
|
+
var optionsUsedFreetext = {};
|
|
23153
|
+
for (var i = 0; i < opsWithAddToMeasure.length; i++) {
|
|
23154
|
+
var _result2;
|
|
23155
|
+
var addToMeasureOps = opsWithAddToMeasure[i];
|
|
23156
|
+
for (var j = 0; j < addToMeasureOps.addToMeasure.length; j++) {
|
|
23157
|
+
var _Number, _this$getArticleOptio4;
|
|
23158
|
+
var addToMeasure = addToMeasureOps.addToMeasure[j];
|
|
23159
|
+
var value = optionsUsedFreetext[addToMeasure.opt] ? 0 : (_Number = Number((_this$getArticleOptio4 = this.getArticleOptionState(addToMeasure.opt)) === null || _this$getArticleOptio4 === void 0 ? void 0 : _this$getArticleOptio4.freeText)) !== null && _Number !== void 0 ? _Number : 0;
|
|
23160
|
+
optionsUsedFreetext[addToMeasure.opt] = true;
|
|
23161
|
+
if (!addToMeasureOps.val) continue;
|
|
23162
|
+
if (isNaN(value)) {
|
|
23163
|
+
result = undefined;
|
|
23164
|
+
break;
|
|
23165
|
+
} else {
|
|
23166
|
+
var _result;
|
|
23167
|
+
result = this.calculateMeasure(addToMeasure, ((_result = result) !== null && _result !== void 0 ? _result : 0) + value);
|
|
23168
|
+
}
|
|
23169
|
+
}
|
|
23170
|
+
this.setOP(addToMeasureOps.optionCodex, addToMeasureOps.val, (_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.toString());
|
|
23171
|
+
}
|
|
23172
|
+
}
|
|
23173
|
+
}, {
|
|
23174
|
+
key: "calcAddToMeasure",
|
|
23175
|
+
value: function calcAddToMeasure(optionCodex, value) {
|
|
23176
|
+
var opsWithAddToMeasure = this.optionStatesWithAddToMeasure(optionCodex);
|
|
23177
|
+
for (var j = 0; j < opsWithAddToMeasure.length; j++) {
|
|
23178
|
+
for (var i = 0; i < opsWithAddToMeasure[j].addToMeasure.length; i++) {
|
|
23179
|
+
var measure = opsWithAddToMeasure[j].addToMeasure[i];
|
|
23180
|
+
if (measure.opt != optionCodex) continue;
|
|
23181
|
+
value = this.calculateMeasure(measure, value);
|
|
23182
|
+
}
|
|
23183
|
+
}
|
|
23184
|
+
return value;
|
|
23185
|
+
}
|
|
23186
|
+
}, {
|
|
23187
|
+
key: "calculateMeasure",
|
|
23188
|
+
value: function calculateMeasure(measure, value) {
|
|
23189
|
+
switch (measure.op) {
|
|
23190
|
+
case '+':
|
|
23191
|
+
return Math.round(value + measure.value);
|
|
23192
|
+
case '-':
|
|
23193
|
+
return Math.round(value - measure.value);
|
|
23194
|
+
case '*':
|
|
23195
|
+
return Math.round(value * measure.value);
|
|
23196
|
+
case '/':
|
|
23197
|
+
return Math.round(value / measure.value);
|
|
23198
|
+
}
|
|
23199
|
+
LOG$d.error(new Error('operator ' + measure.op + ' not implemented'));
|
|
23200
|
+
return value;
|
|
23201
|
+
}
|
|
23112
23202
|
}, {
|
|
23113
23203
|
key: "clearOP",
|
|
23114
23204
|
value: function clearOP(optionCodex) {
|
|
@@ -23999,7 +24089,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23999
24089
|
break;
|
|
24000
24090
|
}
|
|
24001
24091
|
_context.next = 4;
|
|
24002
|
-
return import('./ShelfPlanner-
|
|
24092
|
+
return import('./ShelfPlanner-1e795caa.js');
|
|
24003
24093
|
case 4:
|
|
24004
24094
|
_yield$import = _context.sent;
|
|
24005
24095
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24130,6 +24220,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24130
24220
|
}
|
|
24131
24221
|
if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
|
|
24132
24222
|
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
24223
|
+
var newFreeTextMeasure = this.calcAddToMeasure(OP, freeTextMeasure);
|
|
24224
|
+
LOG$d.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, myArtOPS.addToMeasure);
|
|
24225
|
+
freeTextMeasure = newFreeTextMeasure;
|
|
24133
24226
|
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
24134
24227
|
if (calcUnitPrice != 0) {
|
|
24135
24228
|
var quantity = 0;
|
|
@@ -24443,6 +24536,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24443
24536
|
}
|
|
24444
24537
|
}
|
|
24445
24538
|
}
|
|
24539
|
+
//for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
|
|
24540
|
+
if (_ops8) {
|
|
24541
|
+
var _ops8$valCodex;
|
|
24542
|
+
if ((_ops8$valCodex = _ops8.valCodex) !== null && _ops8$valCodex !== void 0 && _ops8$valCodex.startsWith('OPVSUB_') && !validValues[_key4 + '.' + _key4] && this.getArticleOptionState(_key4 + '.' + _key4)) {
|
|
24543
|
+
validValues[_key4 + '.' + _key4] = myValues[_key4];
|
|
24544
|
+
}
|
|
24545
|
+
}
|
|
24446
24546
|
}
|
|
24447
24547
|
return validValues;
|
|
24448
24548
|
}
|
|
@@ -24643,8 +24743,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24643
24743
|
}, {
|
|
24644
24744
|
key: "addOptionStateFromArticleToPlannerData",
|
|
24645
24745
|
value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
|
|
24646
|
-
|
|
24647
|
-
|
|
24746
|
+
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
24747
|
+
for (var key in articleOptions) {
|
|
24748
|
+
this.addOptionStateToPlannerData(ret, articleOptions[key], alternateRenderInfo);
|
|
24648
24749
|
}
|
|
24649
24750
|
for (var _key5 in this.article.partlistArticles) {
|
|
24650
24751
|
var partlistArticle = this.article.partlistArticles[_key5];
|
|
@@ -24956,7 +25057,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24956
25057
|
value: //Initialisiert eventuell Option Tree und Infos im CatalogArticle
|
|
24957
25058
|
function () {
|
|
24958
25059
|
var _loadArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(set, articleCodex, initParams) {
|
|
24959
|
-
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId
|
|
25060
|
+
var _yield$this$preLoadAr, catalog, catalogArticle, newBasketId;
|
|
24960
25061
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24961
25062
|
while (1) switch (_context.prev = _context.next) {
|
|
24962
25063
|
case 0:
|
|
@@ -24980,12 +25081,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24980
25081
|
articleCodex: articleCodex
|
|
24981
25082
|
}
|
|
24982
25083
|
}));
|
|
24983
|
-
(
|
|
24984
|
-
|
|
24985
|
-
title: set.i18n.t('modals.error_accured')
|
|
24986
|
-
});
|
|
24987
|
-
return _context.abrupt("return", false);
|
|
24988
|
-
case 13:
|
|
25084
|
+
throw new Error('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!');
|
|
25085
|
+
case 12:
|
|
24989
25086
|
case "end":
|
|
24990
25087
|
return _context.stop();
|
|
24991
25088
|
}
|
|
@@ -28684,7 +28781,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28684
28781
|
break;
|
|
28685
28782
|
}
|
|
28686
28783
|
_context5.next = 3;
|
|
28687
|
-
return import('./DoorPlanner-
|
|
28784
|
+
return import('./DoorPlanner-f893f34e.js');
|
|
28688
28785
|
case 3:
|
|
28689
28786
|
_yield$import = _context5.sent;
|
|
28690
28787
|
DoorPlanner = _yield$import["default"];
|
|
@@ -30595,10 +30692,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30595
30692
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
30596
30693
|
var optionsStates = optionStatesOfArticles[basketId];
|
|
30597
30694
|
for (var optionCodex in optionsStates) {
|
|
30695
|
+
var _ops$addToMeasure;
|
|
30598
30696
|
var ops = optionsStates[optionCodex];
|
|
30599
30697
|
var selectionmode = ops.selectionmode;
|
|
30600
30698
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
30601
|
-
if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && ops.visibleCount > 0) {
|
|
30699
|
+
if (!ops.isInvisible && (selectionmode != 0 || (ops.visibleCount > 1 || ops.isFreeText) && set.api.showSelectionModeZero()) && ops.isDoShow && !((_ops$addToMeasure = ops.addToMeasure) !== null && _ops$addToMeasure !== void 0 && _ops$addToMeasure.length) && ops.visibleCount > 0) {
|
|
30602
30700
|
this.addOptionsStateToConfigTree(set, set.configTree, articles, basketId, ops, optionCodex, selectionmode, addToTabGroup);
|
|
30603
30701
|
}
|
|
30604
30702
|
}
|
|
@@ -31282,10 +31380,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
31282
31380
|
//hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
|
|
31283
31381
|
var optionsStates = optionStatesOfArticles[iKey];
|
|
31284
31382
|
for (var jKey in optionsStates) {
|
|
31383
|
+
var _ops$addToMeasure2;
|
|
31285
31384
|
var ops = optionsStates[jKey];
|
|
31286
31385
|
var selectionmode = ops.selectionmode;
|
|
31287
31386
|
if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
|
|
31288
|
-
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0) {
|
|
31387
|
+
if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
|
|
31289
31388
|
this.addOptionsStateToConfigTree(set, configTree, articles, iKey, ops, jKey, selectionmode);
|
|
31290
31389
|
}
|
|
31291
31390
|
}
|
|
@@ -34059,6 +34158,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34059
34158
|
origOrderSet.SetVariantBasketDatas = actOrderSet.SetVariantBasketDatas;
|
|
34060
34159
|
origOrderSet.BBox = actOrderSet.BBox;
|
|
34061
34160
|
origOrderSet.VariantDescription = actOrderSet.VariantDescription;
|
|
34161
|
+
origOrderSet.OfflineData = actOrderSet.OfflineData;
|
|
34062
34162
|
if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
|
|
34063
34163
|
var _origOrderSet$ConfigV;
|
|
34064
34164
|
var configVariant = (_origOrderSet$ConfigV = origOrderSet.ConfigVariants) === null || _origOrderSet$ConfigV === void 0 ? void 0 : _origOrderSet$ConfigV[index];
|
|
@@ -34172,6 +34272,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
34172
34272
|
SetName: set.setName,
|
|
34173
34273
|
SetName_locales: set.setName_locales,
|
|
34174
34274
|
ProductSetName: set.ProductSetName,
|
|
34275
|
+
SupplierGUID: catalogData.supplierGuid,
|
|
34175
34276
|
SetPrice: set.getSetPrice(),
|
|
34176
34277
|
BruttoSetPrice: bruttoPrice,
|
|
34177
34278
|
SetQuantity: 1,
|
|
@@ -35474,7 +35575,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35474
35575
|
break;
|
|
35475
35576
|
case 3:
|
|
35476
35577
|
_context12.next = 5;
|
|
35477
|
-
return import('./PfisterWWSHandler-
|
|
35578
|
+
return import('./PfisterWWSHandler-9f3a0b55.js');
|
|
35478
35579
|
case 5:
|
|
35479
35580
|
_yield$import = _context12.sent;
|
|
35480
35581
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35482,7 +35583,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35482
35583
|
return _context12.abrupt("break", 27);
|
|
35483
35584
|
case 9:
|
|
35484
35585
|
_context12.next = 11;
|
|
35485
|
-
return import('./LiviqueWWSHandler-
|
|
35586
|
+
return import('./LiviqueWWSHandler-7a582c3d.js');
|
|
35486
35587
|
case 11:
|
|
35487
35588
|
_yield$import2 = _context12.sent;
|
|
35488
35589
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35490,7 +35591,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35490
35591
|
return _context12.abrupt("break", 27);
|
|
35491
35592
|
case 15:
|
|
35492
35593
|
_context12.next = 17;
|
|
35493
|
-
return import('./SeriousBasketHandler-
|
|
35594
|
+
return import('./SeriousBasketHandler-19a9ff95.js');
|
|
35494
35595
|
case 17:
|
|
35495
35596
|
_yield$import3 = _context12.sent;
|
|
35496
35597
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35498,7 +35599,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35498
35599
|
return _context12.abrupt("break", 27);
|
|
35499
35600
|
case 21:
|
|
35500
35601
|
_context12.next = 23;
|
|
35501
|
-
return import('./StandardWWSHandler-
|
|
35602
|
+
return import('./StandardWWSHandler-454f0faa.js');
|
|
35502
35603
|
case 23:
|
|
35503
35604
|
_yield$import4 = _context12.sent;
|
|
35504
35605
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -35783,28 +35884,6 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
35783
35884
|
value: function zoomToStep(zoomStep) {
|
|
35784
35885
|
this.navInfo3D.zoom = zoomStep;
|
|
35785
35886
|
}
|
|
35786
|
-
}, {
|
|
35787
|
-
key: "swipeLeft",
|
|
35788
|
-
value: function swipeLeft() {
|
|
35789
|
-
this.navInfo3D.rotHori -= 15;
|
|
35790
|
-
}
|
|
35791
|
-
}, {
|
|
35792
|
-
key: "swipRight",
|
|
35793
|
-
value: function swipRight() {
|
|
35794
|
-
this.navInfo3D.rotHori += 15;
|
|
35795
|
-
}
|
|
35796
|
-
}, {
|
|
35797
|
-
key: "swipeUp",
|
|
35798
|
-
value: function swipeUp() {
|
|
35799
|
-
if (this.navInfo3D.rotVert == -15) return;
|
|
35800
|
-
this.navInfo3D.rotVert -= 15;
|
|
35801
|
-
}
|
|
35802
|
-
}, {
|
|
35803
|
-
key: "swipeDown",
|
|
35804
|
-
value: function swipeDown() {
|
|
35805
|
-
if (this.navInfo3D.rotVert == 45) return;
|
|
35806
|
-
this.navInfo3D.rotVert += 15;
|
|
35807
|
-
}
|
|
35808
35887
|
}, {
|
|
35809
35888
|
key: "setVpName",
|
|
35810
35889
|
value: function setVpName(vpName) {
|
|
@@ -35859,6 +35938,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
|
|
|
35859
35938
|
key: "initRoomList",
|
|
35860
35939
|
value: function initRoomList(roomlist, defaultBackgroundWidth, defaultBackgroundHeight) {
|
|
35861
35940
|
this.roomListInfo = [];
|
|
35941
|
+
if (!roomlist) return;
|
|
35862
35942
|
var roomListObj = JSON.parse(roomlist);
|
|
35863
35943
|
var roomIsSel = true;
|
|
35864
35944
|
for (var roomCodex in roomListObj) {
|
|
@@ -36941,7 +37021,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36941
37021
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36942
37022
|
case 0:
|
|
36943
37023
|
_context3.next = 2;
|
|
36944
|
-
return import('./Host3DSignalR-
|
|
37024
|
+
return import('./Host3DSignalR-b2645aac.js');
|
|
36945
37025
|
case 2:
|
|
36946
37026
|
_yield$import = _context3.sent;
|
|
36947
37027
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37642,7 +37722,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37642
37722
|
}, {
|
|
37643
37723
|
key: "handle3DVisualizationChanged",
|
|
37644
37724
|
value: function handle3DVisualizationChanged(mode, params) {
|
|
37645
|
-
var _params$nav3DZoom, _params$nav3DZoom2, _params$nav3DZoom3
|
|
37725
|
+
var _params$nav3DZoom, _params$nav3DZoom2, _params$nav3DZoom3;
|
|
37646
37726
|
switch (mode) {
|
|
37647
37727
|
case 'Nav3DFullScreen':
|
|
37648
37728
|
break;
|
|
@@ -37655,17 +37735,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37655
37735
|
this.viewPointHandler.zoomToStep(params.nav3DZoom.zoomVal);
|
|
37656
37736
|
}
|
|
37657
37737
|
break;
|
|
37658
|
-
case 'Nav3DSwipe':
|
|
37659
|
-
if ((_params$nav3DSwipe = params.nav3DSwipe) !== null && _params$nav3DSwipe !== void 0 && _params$nav3DSwipe.doSwipeRight) {
|
|
37660
|
-
this.viewPointHandler.swipRight();
|
|
37661
|
-
} else if ((_params$nav3DSwipe2 = params.nav3DSwipe) !== null && _params$nav3DSwipe2 !== void 0 && _params$nav3DSwipe2.doSwipeLeft) {
|
|
37662
|
-
this.viewPointHandler.swipeLeft();
|
|
37663
|
-
} else if ((_params$nav3DSwipe3 = params.nav3DSwipe) !== null && _params$nav3DSwipe3 !== void 0 && _params$nav3DSwipe3.doSwipeDown) {
|
|
37664
|
-
this.viewPointHandler.swipeDown();
|
|
37665
|
-
} else if ((_params$nav3DSwipe4 = params.nav3DSwipe) !== null && _params$nav3DSwipe4 !== void 0 && _params$nav3DSwipe4.doSwipeUp) {
|
|
37666
|
-
this.viewPointHandler.swipeUp();
|
|
37667
|
-
}
|
|
37668
|
-
break;
|
|
37669
37738
|
case 'Nav3DFocus':
|
|
37670
37739
|
this.viewPointHandler.focusOnElementId(params.nav3DFocus.setId, params.nav3DFocus.focusElementId);
|
|
37671
37740
|
break;
|
|
@@ -38506,7 +38575,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38506
38575
|
break;
|
|
38507
38576
|
case 8:
|
|
38508
38577
|
_context4.next = 10;
|
|
38509
|
-
return import('./DivaStandardPlanner-
|
|
38578
|
+
return import('./DivaStandardPlanner-ce7927f6.js');
|
|
38510
38579
|
case 10:
|
|
38511
38580
|
_yield$import = _context4.sent;
|
|
38512
38581
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38517,7 +38586,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38517
38586
|
return _context4.abrupt("break", 21);
|
|
38518
38587
|
case 15:
|
|
38519
38588
|
_context4.next = 17;
|
|
38520
|
-
return import('./DivaBoxPlanner-
|
|
38589
|
+
return import('./DivaBoxPlanner-48803ce3.js');
|
|
38521
38590
|
case 17:
|
|
38522
38591
|
_yield$import2 = _context4.sent;
|
|
38523
38592
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -39275,7 +39344,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
39275
39344
|
planner3DGridEnabled: false,
|
|
39276
39345
|
mediaServiceSaveMode: 'STREAM',
|
|
39277
39346
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
39278
|
-
}, undefined);
|
|
39347
|
+
}, undefined, true);
|
|
39279
39348
|
} else {
|
|
39280
39349
|
this.handler3D.handle3DVisualizationChanged(mode, params);
|
|
39281
39350
|
}
|
|
@@ -40271,7 +40340,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40271
40340
|
key: "initialize",
|
|
40272
40341
|
value: function () {
|
|
40273
40342
|
var _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40274
|
-
var viewReadyPromise, loadSuccessful
|
|
40343
|
+
var viewReadyPromise, loadSuccessful;
|
|
40275
40344
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40276
40345
|
while (1) switch (_context14.prev = _context14.next) {
|
|
40277
40346
|
case 0:
|
|
@@ -40300,59 +40369,97 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40300
40369
|
DivaUtils.businessMetrics.setConfiguratorSessionId();
|
|
40301
40370
|
}
|
|
40302
40371
|
if (!loadSuccessful) {
|
|
40303
|
-
_context14.next =
|
|
40372
|
+
_context14.next = 27;
|
|
40304
40373
|
break;
|
|
40305
40374
|
}
|
|
40375
|
+
_context14.prev = 15;
|
|
40376
|
+
_context14.next = 18;
|
|
40377
|
+
return this.initializeSets(loadSuccessful, viewReadyPromise);
|
|
40378
|
+
case 18:
|
|
40379
|
+
return _context14.abrupt("return", _context14.sent);
|
|
40380
|
+
case 21:
|
|
40381
|
+
_context14.prev = 21;
|
|
40382
|
+
_context14.t0 = _context14["catch"](15);
|
|
40383
|
+
this.onInitializationError();
|
|
40384
|
+
return _context14.abrupt("return", false);
|
|
40385
|
+
case 25:
|
|
40386
|
+
_context14.next = 30;
|
|
40387
|
+
break;
|
|
40388
|
+
case 27:
|
|
40389
|
+
this.onInitializationError();
|
|
40390
|
+
//fehler beim laden vom basket..
|
|
40391
|
+
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40392
|
+
return _context14.abrupt("return", false);
|
|
40393
|
+
case 30:
|
|
40394
|
+
case "end":
|
|
40395
|
+
return _context14.stop();
|
|
40396
|
+
}
|
|
40397
|
+
}, _callee14, this, [[15, 21]]);
|
|
40398
|
+
}));
|
|
40399
|
+
function initialize() {
|
|
40400
|
+
return _initialize.apply(this, arguments);
|
|
40401
|
+
}
|
|
40402
|
+
return initialize;
|
|
40403
|
+
}()
|
|
40404
|
+
}, {
|
|
40405
|
+
key: "initializeSets",
|
|
40406
|
+
value: function () {
|
|
40407
|
+
var _initializeSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(loadSuccessful, viewReadyPromise) {
|
|
40408
|
+
var _this$actions16, _set$getDivaArticles;
|
|
40409
|
+
var _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
40410
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
40411
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
40412
|
+
case 0:
|
|
40306
40413
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
40307
|
-
|
|
40414
|
+
_context15.next = 9;
|
|
40308
40415
|
break;
|
|
40309
40416
|
}
|
|
40310
40417
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
40311
|
-
|
|
40418
|
+
_context15.next = 9;
|
|
40312
40419
|
break;
|
|
40313
40420
|
}
|
|
40314
|
-
|
|
40421
|
+
_context15.next = 4;
|
|
40315
40422
|
return viewReadyPromise;
|
|
40316
|
-
case
|
|
40317
|
-
|
|
40423
|
+
case 4:
|
|
40424
|
+
_context15.next = 6;
|
|
40318
40425
|
return this.initView();
|
|
40319
|
-
case
|
|
40426
|
+
case 6:
|
|
40320
40427
|
this.subscribeToWebPlannerEvents();
|
|
40321
40428
|
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
40322
|
-
return
|
|
40323
|
-
case
|
|
40429
|
+
return _context15.abrupt("return", true);
|
|
40430
|
+
case 9:
|
|
40324
40431
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
40325
40432
|
initSetState = this.getInitStateForSet();
|
|
40326
40433
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
40327
|
-
|
|
40434
|
+
_context15.next = 14;
|
|
40328
40435
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
40329
|
-
case
|
|
40436
|
+
case 14:
|
|
40330
40437
|
set = this.actSet();
|
|
40331
40438
|
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
40332
40439
|
if (!(oldProductId && set && set !== null && set !== void 0 && set.api.doCheckForProductsPrice())) {
|
|
40333
|
-
|
|
40440
|
+
_context15.next = 23;
|
|
40334
40441
|
break;
|
|
40335
40442
|
}
|
|
40336
|
-
|
|
40443
|
+
_context15.next = 19;
|
|
40337
40444
|
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
40338
|
-
case
|
|
40339
|
-
result =
|
|
40445
|
+
case 19:
|
|
40446
|
+
result = _context15.sent;
|
|
40340
40447
|
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
40341
|
-
|
|
40448
|
+
_context15.next = 24;
|
|
40342
40449
|
break;
|
|
40343
|
-
case
|
|
40450
|
+
case 23:
|
|
40344
40451
|
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
40345
40452
|
if (loadSuccessful.type != 'ProductList') {
|
|
40346
40453
|
productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
|
|
40347
40454
|
}
|
|
40348
40455
|
}
|
|
40349
|
-
case
|
|
40350
|
-
|
|
40456
|
+
case 24:
|
|
40457
|
+
_context15.next = 26;
|
|
40351
40458
|
return viewReadyPromise;
|
|
40352
|
-
case
|
|
40353
|
-
|
|
40459
|
+
case 26:
|
|
40460
|
+
_context15.next = 28;
|
|
40354
40461
|
return this.initView();
|
|
40355
|
-
case
|
|
40462
|
+
case 28:
|
|
40356
40463
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
40357
40464
|
type: 'onConfiguratorReady'
|
|
40358
40465
|
});
|
|
@@ -40362,7 +40469,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40362
40469
|
});
|
|
40363
40470
|
}
|
|
40364
40471
|
this.subscribeToWebPlannerEvents();
|
|
40365
|
-
this.divaBasketHandler.actBasket;
|
|
40366
40472
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
40367
40473
|
initializationId = undefined;
|
|
40368
40474
|
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
@@ -40387,25 +40493,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40387
40493
|
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
40388
40494
|
initializationId: initializationId
|
|
40389
40495
|
}, false);
|
|
40390
|
-
|
|
40496
|
+
_context15.next = 37;
|
|
40391
40497
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
40392
|
-
case
|
|
40393
|
-
return
|
|
40394
|
-
case
|
|
40395
|
-
this.onInitializationError();
|
|
40396
|
-
//fehler beim laden vom basket..
|
|
40397
|
-
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
40398
|
-
return _context14.abrupt("return", false);
|
|
40399
|
-
case 59:
|
|
40498
|
+
case 37:
|
|
40499
|
+
return _context15.abrupt("return", true);
|
|
40500
|
+
case 38:
|
|
40400
40501
|
case "end":
|
|
40401
|
-
return
|
|
40502
|
+
return _context15.stop();
|
|
40402
40503
|
}
|
|
40403
|
-
},
|
|
40504
|
+
}, _callee15, this);
|
|
40404
40505
|
}));
|
|
40405
|
-
function
|
|
40406
|
-
return
|
|
40506
|
+
function initializeSets(_x53, _x54) {
|
|
40507
|
+
return _initializeSets.apply(this, arguments);
|
|
40407
40508
|
}
|
|
40408
|
-
return
|
|
40509
|
+
return initializeSets;
|
|
40409
40510
|
}()
|
|
40410
40511
|
}, {
|
|
40411
40512
|
key: "updatePlannerConfig",
|
|
@@ -40464,11 +40565,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40464
40565
|
var _this$plannerConfig$a3;
|
|
40465
40566
|
if (!(onErrorHandling !== null && onErrorHandling !== void 0 && onErrorHandling.hideErrorMsg)) {
|
|
40466
40567
|
var _this$plannerConfig$a2, _this$i18n$t, _this$i18n4, _onErrorHandling$erro;
|
|
40568
|
+
var isWeb = this.api.getApplicationEnvironment() == 'WEB';
|
|
40467
40569
|
(_this$plannerConfig$a2 = this.plannerConfig.actions) === null || _this$plannerConfig$a2 === void 0 || _this$plannerConfig$a2.openModal({
|
|
40468
40570
|
title: (_this$i18n$t = (_this$i18n4 = this.i18n()) === null || _this$i18n4 === void 0 ? void 0 : _this$i18n4.t((_onErrorHandling$erro = onErrorHandling.errorMsg) !== null && _onErrorHandling$erro !== void 0 ? _onErrorHandling$erro : 'modals.error_accured')) !== null && _this$i18n$t !== void 0 ? _this$i18n$t : 'An error occured. Please try again later.',
|
|
40469
40571
|
accept: true,
|
|
40470
40572
|
callback: function callback(accepted) {
|
|
40471
|
-
if (accepted &&
|
|
40573
|
+
if (accepted && isWeb) {
|
|
40472
40574
|
var _this2$state;
|
|
40473
40575
|
_this2.callEvent('onWebPlanerClose');
|
|
40474
40576
|
((_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state.isFullscreenComponent) && _this2.callEvent('onFullscreenClose');
|
|
@@ -40495,7 +40597,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40495
40597
|
var _this$plannerConfig$a6, _this$i18n7, _this$plannerConfig$a7, _this$plannerConfig$c;
|
|
40496
40598
|
(_this$plannerConfig$a6 = this.plannerConfig.actions) === null || _this$plannerConfig$a6 === void 0 || _this$plannerConfig$a6.openModal({
|
|
40497
40599
|
accept: true,
|
|
40498
|
-
title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.
|
|
40600
|
+
title: (_this$i18n7 = this.i18n()) === null || _this$i18n7 === void 0 ? void 0 : _this$i18n7.t('modals.error_accured33')
|
|
40499
40601
|
});
|
|
40500
40602
|
(_this$plannerConfig$a7 = this.plannerConfig.actions) === null || _this$plannerConfig$a7 === void 0 || _this$plannerConfig$a7.openComponent({
|
|
40501
40603
|
type: 'SELLER',
|
|
@@ -40532,23 +40634,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40532
40634
|
}, {
|
|
40533
40635
|
key: "initView",
|
|
40534
40636
|
value: (function () {
|
|
40535
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40637
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
|
|
40536
40638
|
var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
|
|
40537
|
-
return _regeneratorRuntime.wrap(function
|
|
40538
|
-
while (1) switch (
|
|
40639
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40640
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
40539
40641
|
case 0:
|
|
40540
40642
|
set = this.actSet();
|
|
40541
40643
|
plannerMode = this.getPlannerMode();
|
|
40542
40644
|
this.initConfiguratorMode(plannerMode);
|
|
40543
40645
|
if (!(plannerMode == 'ProductList')) {
|
|
40544
|
-
|
|
40646
|
+
_context16.next = 7;
|
|
40545
40647
|
break;
|
|
40546
40648
|
}
|
|
40547
40649
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40548
|
-
|
|
40650
|
+
_context16.next = 17;
|
|
40549
40651
|
break;
|
|
40550
40652
|
case 7:
|
|
40551
|
-
|
|
40653
|
+
_context16.next = 9;
|
|
40552
40654
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
40553
40655
|
case 9:
|
|
40554
40656
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -40562,13 +40664,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40562
40664
|
this.onBasketInitialized();
|
|
40563
40665
|
this.checkMatchingProducts('onInit');
|
|
40564
40666
|
case 17:
|
|
40565
|
-
|
|
40667
|
+
_context16.next = 19;
|
|
40566
40668
|
return this.runInitMode(plannerMode);
|
|
40567
40669
|
case 19:
|
|
40568
40670
|
case "end":
|
|
40569
|
-
return
|
|
40671
|
+
return _context16.stop();
|
|
40570
40672
|
}
|
|
40571
|
-
},
|
|
40673
|
+
}, _callee16, this);
|
|
40572
40674
|
}));
|
|
40573
40675
|
function initView() {
|
|
40574
40676
|
return _initView.apply(this, arguments);
|
|
@@ -40589,26 +40691,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40589
40691
|
}, {
|
|
40590
40692
|
key: "runInitMode",
|
|
40591
40693
|
value: function () {
|
|
40592
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40694
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(plannerMode) {
|
|
40593
40695
|
var _this$state3;
|
|
40594
40696
|
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40595
|
-
return _regeneratorRuntime.wrap(function
|
|
40596
|
-
while (1) switch (
|
|
40697
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
40698
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
40597
40699
|
case 0:
|
|
40598
40700
|
doDefault = true;
|
|
40599
40701
|
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
40600
|
-
|
|
40702
|
+
_context17.next = 10;
|
|
40601
40703
|
break;
|
|
40602
40704
|
}
|
|
40603
40705
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
40604
40706
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
40605
40707
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
40606
40708
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
40607
|
-
|
|
40709
|
+
_context17.next = 7;
|
|
40608
40710
|
return this.saveToBasketWrapper();
|
|
40609
40711
|
case 7:
|
|
40610
40712
|
doDefault = false;
|
|
40611
|
-
|
|
40713
|
+
_context17.next = 11;
|
|
40612
40714
|
break;
|
|
40613
40715
|
case 10:
|
|
40614
40716
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.dimensions.isMobile) {
|
|
@@ -40632,11 +40734,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40632
40734
|
}
|
|
40633
40735
|
case 12:
|
|
40634
40736
|
case "end":
|
|
40635
|
-
return
|
|
40737
|
+
return _context17.stop();
|
|
40636
40738
|
}
|
|
40637
|
-
},
|
|
40739
|
+
}, _callee17, this);
|
|
40638
40740
|
}));
|
|
40639
|
-
function runInitMode(
|
|
40741
|
+
function runInitMode(_x55) {
|
|
40640
40742
|
return _runInitMode.apply(this, arguments);
|
|
40641
40743
|
}
|
|
40642
40744
|
return runInitMode;
|
|
@@ -40644,16 +40746,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40644
40746
|
}, {
|
|
40645
40747
|
key: "addSetToActPlanningByDivaNr",
|
|
40646
40748
|
value: function () {
|
|
40647
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40749
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(divaNr) {
|
|
40648
40750
|
var _this$updateViewPlann10;
|
|
40649
40751
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
40650
|
-
return _regeneratorRuntime.wrap(function
|
|
40651
|
-
while (1) switch (
|
|
40752
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40753
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40652
40754
|
case 0:
|
|
40653
40755
|
set = this.actSet();
|
|
40654
40756
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
40655
40757
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
40656
|
-
|
|
40758
|
+
_context18.next = 5;
|
|
40657
40759
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40658
40760
|
case 5:
|
|
40659
40761
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -40661,30 +40763,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40661
40763
|
i = 0;
|
|
40662
40764
|
case 8:
|
|
40663
40765
|
if (!(i < orderSets.length)) {
|
|
40664
|
-
|
|
40766
|
+
_context18.next = 24;
|
|
40665
40767
|
break;
|
|
40666
40768
|
}
|
|
40667
40769
|
orderset = orderSets[i];
|
|
40668
40770
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40669
40771
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40670
40772
|
if (!loadedSet) {
|
|
40671
|
-
|
|
40773
|
+
_context18.next = 18;
|
|
40672
40774
|
break;
|
|
40673
40775
|
}
|
|
40674
|
-
|
|
40776
|
+
_context18.next = 15;
|
|
40675
40777
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40676
40778
|
case 15:
|
|
40677
40779
|
this.checkMatchingProducts('onAdd');
|
|
40678
|
-
|
|
40780
|
+
_context18.next = 20;
|
|
40679
40781
|
break;
|
|
40680
40782
|
case 18:
|
|
40681
|
-
|
|
40783
|
+
_context18.next = 20;
|
|
40682
40784
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40683
40785
|
case 20:
|
|
40684
40786
|
this.cleanUpEmptySets(true);
|
|
40685
40787
|
case 21:
|
|
40686
40788
|
i++;
|
|
40687
|
-
|
|
40789
|
+
_context18.next = 8;
|
|
40688
40790
|
break;
|
|
40689
40791
|
case 24:
|
|
40690
40792
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -40696,11 +40798,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40696
40798
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40697
40799
|
case 31:
|
|
40698
40800
|
case "end":
|
|
40699
|
-
return
|
|
40801
|
+
return _context18.stop();
|
|
40700
40802
|
}
|
|
40701
|
-
},
|
|
40803
|
+
}, _callee18, this);
|
|
40702
40804
|
}));
|
|
40703
|
-
function addSetToActPlanningByDivaNr(
|
|
40805
|
+
function addSetToActPlanningByDivaNr(_x56) {
|
|
40704
40806
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
40705
40807
|
}
|
|
40706
40808
|
return addSetToActPlanningByDivaNr;
|
|
@@ -40733,28 +40835,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40733
40835
|
}, {
|
|
40734
40836
|
key: "setActSetCurConfigStepKey",
|
|
40735
40837
|
value: function () {
|
|
40736
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40838
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(curConfigStepKey) {
|
|
40737
40839
|
var set;
|
|
40738
|
-
return _regeneratorRuntime.wrap(function
|
|
40739
|
-
while (1) switch (
|
|
40840
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40841
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40740
40842
|
case 0:
|
|
40741
40843
|
set = this.actSet();
|
|
40742
40844
|
if (set) {
|
|
40743
|
-
|
|
40845
|
+
_context19.next = 3;
|
|
40744
40846
|
break;
|
|
40745
40847
|
}
|
|
40746
|
-
return
|
|
40848
|
+
return _context19.abrupt("return");
|
|
40747
40849
|
case 3:
|
|
40748
40850
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40749
|
-
|
|
40851
|
+
_context19.next = 6;
|
|
40750
40852
|
return setHandlerInstance.updateNavigation(set);
|
|
40751
40853
|
case 6:
|
|
40752
40854
|
case "end":
|
|
40753
|
-
return
|
|
40855
|
+
return _context19.stop();
|
|
40754
40856
|
}
|
|
40755
|
-
},
|
|
40857
|
+
}, _callee19, this);
|
|
40756
40858
|
}));
|
|
40757
|
-
function setActSetCurConfigStepKey(
|
|
40859
|
+
function setActSetCurConfigStepKey(_x57) {
|
|
40758
40860
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
40759
40861
|
}
|
|
40760
40862
|
return setActSetCurConfigStepKey;
|
|
@@ -40903,17 +41005,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40903
41005
|
}, {
|
|
40904
41006
|
key: "deletePlannerElement",
|
|
40905
41007
|
value: function () {
|
|
40906
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41008
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(setId, elementId, denyElementSelectionClear) {
|
|
40907
41009
|
var _this$updateViewPlann11;
|
|
40908
41010
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40909
|
-
return _regeneratorRuntime.wrap(function
|
|
40910
|
-
while (1) switch (
|
|
41011
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
41012
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40911
41013
|
case 0:
|
|
40912
41014
|
set = this.sets[setId];
|
|
40913
|
-
|
|
41015
|
+
_context20.next = 3;
|
|
40914
41016
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40915
41017
|
case 3:
|
|
40916
|
-
result =
|
|
41018
|
+
result = _context20.sent;
|
|
40917
41019
|
this.updateConfigStructure();
|
|
40918
41020
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40919
41021
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40924,17 +41026,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40924
41026
|
}
|
|
40925
41027
|
this.updatePriceInView();
|
|
40926
41028
|
this.checkMatchingProducts('onDelete');
|
|
40927
|
-
|
|
41029
|
+
_context20.next = 14;
|
|
40928
41030
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40929
41031
|
case 14:
|
|
40930
41032
|
this.plannerChangeLog('onDeletePlanner');
|
|
40931
41033
|
case 15:
|
|
40932
41034
|
case "end":
|
|
40933
|
-
return
|
|
41035
|
+
return _context20.stop();
|
|
40934
41036
|
}
|
|
40935
|
-
},
|
|
41037
|
+
}, _callee20, this);
|
|
40936
41038
|
}));
|
|
40937
|
-
function deletePlannerElement(
|
|
41039
|
+
function deletePlannerElement(_x58, _x59, _x60) {
|
|
40938
41040
|
return _deletePlannerElement.apply(this, arguments);
|
|
40939
41041
|
}
|
|
40940
41042
|
return deletePlannerElement;
|
|
@@ -40948,17 +41050,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40948
41050
|
}, {
|
|
40949
41051
|
key: "copyPlannerElement",
|
|
40950
41052
|
value: (function () {
|
|
40951
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41053
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(setId, elementId, curConfigKey, copyInfo) {
|
|
40952
41054
|
var _this$updateViewPlann12;
|
|
40953
41055
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
40954
|
-
return _regeneratorRuntime.wrap(function
|
|
40955
|
-
while (1) switch (
|
|
41056
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
41057
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
40956
41058
|
case 0:
|
|
40957
41059
|
set = this.sets[setId];
|
|
40958
|
-
|
|
41060
|
+
_context21.next = 3;
|
|
40959
41061
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
40960
41062
|
case 3:
|
|
40961
|
-
newSelectedArticle =
|
|
41063
|
+
newSelectedArticle = _context21.sent;
|
|
40962
41064
|
this.updateConfigStructure();
|
|
40963
41065
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40964
41066
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -40972,14 +41074,14 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40972
41074
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40973
41075
|
}
|
|
40974
41076
|
this.checkMatchingProducts('onCopy');
|
|
40975
|
-
return
|
|
41077
|
+
return _context21.abrupt("return", newConfigStepKey);
|
|
40976
41078
|
case 13:
|
|
40977
41079
|
case "end":
|
|
40978
|
-
return
|
|
41080
|
+
return _context21.stop();
|
|
40979
41081
|
}
|
|
40980
|
-
},
|
|
41082
|
+
}, _callee21, this);
|
|
40981
41083
|
}));
|
|
40982
|
-
function copyPlannerElement(
|
|
41084
|
+
function copyPlannerElement(_x61, _x62, _x63, _x64) {
|
|
40983
41085
|
return _copyPlannerElement.apply(this, arguments);
|
|
40984
41086
|
}
|
|
40985
41087
|
return copyPlannerElement;
|
|
@@ -41008,33 +41110,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41008
41110
|
}, {
|
|
41009
41111
|
key: "getFreePlacesOnGrids",
|
|
41010
41112
|
value: function () {
|
|
41011
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41113
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(gridGroup, from) {
|
|
41012
41114
|
var _this$updateFreePlace;
|
|
41013
41115
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
41014
|
-
return _regeneratorRuntime.wrap(function
|
|
41015
|
-
while (1) switch (
|
|
41116
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
41117
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
41016
41118
|
case 0:
|
|
41017
41119
|
set = this.actSet();
|
|
41018
41120
|
if (set) {
|
|
41019
|
-
|
|
41121
|
+
_context22.next = 3;
|
|
41020
41122
|
break;
|
|
41021
41123
|
}
|
|
41022
41124
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
41023
41125
|
case 3:
|
|
41024
41126
|
if (!gridGroup) {
|
|
41025
|
-
|
|
41127
|
+
_context22.next = 9;
|
|
41026
41128
|
break;
|
|
41027
41129
|
}
|
|
41028
|
-
|
|
41130
|
+
_context22.next = 6;
|
|
41029
41131
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
41030
41132
|
case 6:
|
|
41031
|
-
|
|
41032
|
-
|
|
41133
|
+
_context22.t0 = _context22.sent;
|
|
41134
|
+
_context22.next = 10;
|
|
41033
41135
|
break;
|
|
41034
41136
|
case 9:
|
|
41035
|
-
|
|
41137
|
+
_context22.t0 = undefined;
|
|
41036
41138
|
case 10:
|
|
41037
|
-
freeShelfGrids =
|
|
41139
|
+
freeShelfGrids = _context22.t0;
|
|
41038
41140
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
41039
41141
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
41040
41142
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -41042,17 +41144,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41042
41144
|
freeShelfGrids: freeShelfGrids,
|
|
41043
41145
|
plannedShelfGrids: plannedShelfGrids
|
|
41044
41146
|
});
|
|
41045
|
-
return
|
|
41147
|
+
return _context22.abrupt("return", {
|
|
41046
41148
|
freeShelfGrids: freeShelfGrids,
|
|
41047
41149
|
plannedShelfGrids: plannedShelfGrids
|
|
41048
41150
|
});
|
|
41049
41151
|
case 16:
|
|
41050
41152
|
case "end":
|
|
41051
|
-
return
|
|
41153
|
+
return _context22.stop();
|
|
41052
41154
|
}
|
|
41053
|
-
},
|
|
41155
|
+
}, _callee22, this);
|
|
41054
41156
|
}));
|
|
41055
|
-
function getFreePlacesOnGrids(
|
|
41157
|
+
function getFreePlacesOnGrids(_x65, _x66) {
|
|
41056
41158
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
41057
41159
|
}
|
|
41058
41160
|
return getFreePlacesOnGrids;
|
|
@@ -41069,36 +41171,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41069
41171
|
}, {
|
|
41070
41172
|
key: "moveShelfItemToGrid",
|
|
41071
41173
|
value: function () {
|
|
41072
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41174
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
41073
41175
|
var set, newGridId;
|
|
41074
|
-
return _regeneratorRuntime.wrap(function
|
|
41075
|
-
while (1) switch (
|
|
41176
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
41177
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
41076
41178
|
case 0:
|
|
41077
41179
|
set = this.actSet();
|
|
41078
41180
|
if (set) {
|
|
41079
|
-
|
|
41181
|
+
_context23.next = 3;
|
|
41080
41182
|
break;
|
|
41081
41183
|
}
|
|
41082
|
-
return
|
|
41184
|
+
return _context23.abrupt("return");
|
|
41083
41185
|
case 3:
|
|
41084
|
-
|
|
41186
|
+
_context23.next = 5;
|
|
41085
41187
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
41086
41188
|
case 5:
|
|
41087
|
-
newGridId =
|
|
41189
|
+
newGridId = _context23.sent;
|
|
41088
41190
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
41089
41191
|
if (!newGridId) {
|
|
41090
|
-
|
|
41192
|
+
_context23.next = 10;
|
|
41091
41193
|
break;
|
|
41092
41194
|
}
|
|
41093
|
-
|
|
41195
|
+
_context23.next = 10;
|
|
41094
41196
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
41095
41197
|
case 10:
|
|
41096
41198
|
case "end":
|
|
41097
|
-
return
|
|
41199
|
+
return _context23.stop();
|
|
41098
41200
|
}
|
|
41099
|
-
},
|
|
41201
|
+
}, _callee23, this);
|
|
41100
41202
|
}));
|
|
41101
|
-
function moveShelfItemToGrid(
|
|
41203
|
+
function moveShelfItemToGrid(_x67, _x68, _x69, _x70) {
|
|
41102
41204
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
41103
41205
|
}
|
|
41104
41206
|
return moveShelfItemToGrid;
|
|
@@ -41106,27 +41208,27 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41106
41208
|
}, {
|
|
41107
41209
|
key: "resetArticle",
|
|
41108
41210
|
value: function () {
|
|
41109
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41211
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(basketId) {
|
|
41110
41212
|
var set;
|
|
41111
|
-
return _regeneratorRuntime.wrap(function
|
|
41112
|
-
while (1) switch (
|
|
41213
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
41214
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
41113
41215
|
case 0:
|
|
41114
41216
|
set = this.actSet();
|
|
41115
41217
|
if (set) {
|
|
41116
|
-
|
|
41218
|
+
_context24.next = 3;
|
|
41117
41219
|
break;
|
|
41118
41220
|
}
|
|
41119
|
-
return
|
|
41221
|
+
return _context24.abrupt("return");
|
|
41120
41222
|
case 3:
|
|
41121
|
-
|
|
41223
|
+
_context24.next = 5;
|
|
41122
41224
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
41123
41225
|
case 5:
|
|
41124
41226
|
case "end":
|
|
41125
|
-
return
|
|
41227
|
+
return _context24.stop();
|
|
41126
41228
|
}
|
|
41127
|
-
},
|
|
41229
|
+
}, _callee24, this);
|
|
41128
41230
|
}));
|
|
41129
|
-
function resetArticle(
|
|
41231
|
+
function resetArticle(_x71) {
|
|
41130
41232
|
return _resetArticle.apply(this, arguments);
|
|
41131
41233
|
}
|
|
41132
41234
|
return resetArticle;
|
|
@@ -41156,10 +41258,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41156
41258
|
}, {
|
|
41157
41259
|
key: "checkMatchingProducts",
|
|
41158
41260
|
value: function () {
|
|
41159
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41261
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(from) {
|
|
41160
41262
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
41161
|
-
return _regeneratorRuntime.wrap(function
|
|
41162
|
-
while (1) switch (
|
|
41263
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
41264
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
41163
41265
|
case 0:
|
|
41164
41266
|
set = this.actSet();
|
|
41165
41267
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -41173,20 +41275,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41173
41275
|
}
|
|
41174
41276
|
}
|
|
41175
41277
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
41176
|
-
|
|
41278
|
+
_context25.next = 6;
|
|
41177
41279
|
break;
|
|
41178
41280
|
}
|
|
41179
|
-
|
|
41281
|
+
_context25.next = 5;
|
|
41180
41282
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
41181
41283
|
case 5:
|
|
41182
41284
|
this.updatePriceInView();
|
|
41183
41285
|
case 6:
|
|
41184
41286
|
case "end":
|
|
41185
|
-
return
|
|
41287
|
+
return _context25.stop();
|
|
41186
41288
|
}
|
|
41187
|
-
},
|
|
41289
|
+
}, _callee25, this);
|
|
41188
41290
|
}));
|
|
41189
|
-
function checkMatchingProducts(
|
|
41291
|
+
function checkMatchingProducts(_x72) {
|
|
41190
41292
|
return _checkMatchingProducts.apply(this, arguments);
|
|
41191
41293
|
}
|
|
41192
41294
|
return checkMatchingProducts;
|
|
@@ -41263,7 +41365,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41263
41365
|
}, {
|
|
41264
41366
|
key: "saveToBasketWrapper",
|
|
41265
41367
|
value: function () {
|
|
41266
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41368
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(event, repairOnly, force) {
|
|
41267
41369
|
var _this$actions27,
|
|
41268
41370
|
_this$actions27$toggl,
|
|
41269
41371
|
_this$actions28,
|
|
@@ -41272,8 +41374,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41272
41374
|
_this$actions32,
|
|
41273
41375
|
_this$i18n14;
|
|
41274
41376
|
var returnTo, finalEvent, _this$api$getBarrierC, _this$openLeafeltBarr, product, _this$actSet9, url, _result, _this$actions26, result, _this$actions29, _this$i18n8, _this$i18n9, _this$actions30, _this$i18n10, _this$i18n11, _this$actions31, _this$i18n12, _this$i18n13, _this$updatePlannerMs2;
|
|
41275
|
-
return _regeneratorRuntime.wrap(function
|
|
41276
|
-
while (1) switch (
|
|
41377
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
41378
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41277
41379
|
case 0:
|
|
41278
41380
|
returnTo = this.getReturnTo(event);
|
|
41279
41381
|
finalEvent = {
|
|
@@ -41281,50 +41383,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41281
41383
|
saveBasket: true
|
|
41282
41384
|
};
|
|
41283
41385
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
41284
|
-
|
|
41386
|
+
_context26.next = 21;
|
|
41285
41387
|
break;
|
|
41286
41388
|
}
|
|
41287
41389
|
product = undefined;
|
|
41288
41390
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
41289
|
-
|
|
41391
|
+
_context26.next = 10;
|
|
41290
41392
|
break;
|
|
41291
41393
|
}
|
|
41292
41394
|
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
41293
|
-
|
|
41395
|
+
_context26.next = 8;
|
|
41294
41396
|
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
41295
41397
|
case 8:
|
|
41296
|
-
_result =
|
|
41398
|
+
_result = _context26.sent;
|
|
41297
41399
|
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
41298
41400
|
case 10:
|
|
41299
|
-
|
|
41401
|
+
_context26.next = 12;
|
|
41300
41402
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
41301
41403
|
case 12:
|
|
41302
|
-
finalEvent =
|
|
41404
|
+
finalEvent = _context26.sent;
|
|
41303
41405
|
if (finalEvent) {
|
|
41304
|
-
|
|
41406
|
+
_context26.next = 17;
|
|
41305
41407
|
break;
|
|
41306
41408
|
}
|
|
41307
|
-
return
|
|
41409
|
+
return _context26.abrupt("return", 'canceled');
|
|
41308
41410
|
case 17:
|
|
41309
41411
|
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
41310
|
-
|
|
41412
|
+
_context26.next = 20;
|
|
41311
41413
|
break;
|
|
41312
41414
|
}
|
|
41313
41415
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
|
|
41314
41416
|
type: finalEvent.event
|
|
41315
41417
|
});
|
|
41316
|
-
return
|
|
41418
|
+
return _context26.abrupt("return", 'canceled');
|
|
41317
41419
|
case 20:
|
|
41318
41420
|
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
41319
41421
|
case 21:
|
|
41320
41422
|
(_this$actions27 = this.actions) === null || _this$actions27 === void 0 || (_this$actions27$toggl = _this$actions27.toggleLoading) === null || _this$actions27$toggl === void 0 || _this$actions27$toggl.call(_this$actions27, 'Planner_Saving', false, true);
|
|
41321
|
-
|
|
41423
|
+
_context26.next = 24;
|
|
41322
41424
|
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
41323
41425
|
case 24:
|
|
41324
|
-
result =
|
|
41426
|
+
result = _context26.sent;
|
|
41325
41427
|
(_this$actions28 = this.actions) === null || _this$actions28 === void 0 || (_this$actions28$toggl = _this$actions28.toggleLoading) === null || _this$actions28$toggl === void 0 || _this$actions28$toggl.call(_this$actions28, 'Planner_Saving', false, false);
|
|
41326
41428
|
if (!(result === 'canceled')) {
|
|
41327
|
-
|
|
41429
|
+
_context26.next = 30;
|
|
41328
41430
|
break;
|
|
41329
41431
|
}
|
|
41330
41432
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -41332,10 +41434,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41332
41434
|
text: ((_this$i18n8 = this.i18n()) === null || _this$i18n8 === void 0 ? void 0 : _this$i18n8.t('modal.general_error')) + ' --- ' + DivaUtils.formatDate(new Date(), true, undefined, true) + ' --- ' + DivaUtils.getCurrentTraceId() ? ((_this$i18n9 = this.i18n()) === null || _this$i18n9 === void 0 ? void 0 : _this$i18n9.t('modal.errorcode')) + ': ' + DivaUtils.getCurrentTraceId() : '',
|
|
41333
41435
|
accept: true
|
|
41334
41436
|
});
|
|
41335
|
-
return
|
|
41437
|
+
return _context26.abrupt("return", result);
|
|
41336
41438
|
case 30:
|
|
41337
|
-
|
|
41338
|
-
|
|
41439
|
+
_context26.t0 = returnTo;
|
|
41440
|
+
_context26.next = _context26.t0 === 'OPEN_PDF' ? 33 : _context26.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : _context26.t0 === 'OPEN_CONTACT_FORM' ? 36 : 36;
|
|
41339
41441
|
break;
|
|
41340
41442
|
case 33:
|
|
41341
41443
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -41355,7 +41457,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41355
41457
|
}
|
|
41356
41458
|
});
|
|
41357
41459
|
}
|
|
41358
|
-
return
|
|
41460
|
+
return _context26.abrupt("break", 36);
|
|
41359
41461
|
case 35:
|
|
41360
41462
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
|
|
41361
41463
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
@@ -41363,20 +41465,20 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41363
41465
|
});
|
|
41364
41466
|
case 36:
|
|
41365
41467
|
if (!(result == 'noArticleToSave')) {
|
|
41366
|
-
|
|
41468
|
+
_context26.next = 39;
|
|
41367
41469
|
break;
|
|
41368
41470
|
}
|
|
41369
41471
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
41370
|
-
return
|
|
41472
|
+
return _context26.abrupt("return", 'canceled');
|
|
41371
41473
|
case 39:
|
|
41372
|
-
return
|
|
41474
|
+
return _context26.abrupt("return", result);
|
|
41373
41475
|
case 40:
|
|
41374
41476
|
case "end":
|
|
41375
|
-
return
|
|
41477
|
+
return _context26.stop();
|
|
41376
41478
|
}
|
|
41377
|
-
},
|
|
41479
|
+
}, _callee26, this);
|
|
41378
41480
|
}));
|
|
41379
|
-
function saveToBasketWrapper(
|
|
41481
|
+
function saveToBasketWrapper(_x73, _x74, _x75) {
|
|
41380
41482
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
41381
41483
|
}
|
|
41382
41484
|
return saveToBasketWrapper;
|
|
@@ -41384,43 +41486,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41384
41486
|
}, {
|
|
41385
41487
|
key: "saveToBasket",
|
|
41386
41488
|
value: function () {
|
|
41387
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41489
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(event, repairOnly, force) {
|
|
41388
41490
|
var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
41389
41491
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
41390
|
-
return _regeneratorRuntime.wrap(function
|
|
41391
|
-
while (1) switch (
|
|
41492
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41493
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41392
41494
|
case 0:
|
|
41393
41495
|
set = this.actSet();
|
|
41394
41496
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
41395
|
-
|
|
41497
|
+
_context27.next = 3;
|
|
41396
41498
|
break;
|
|
41397
41499
|
}
|
|
41398
|
-
return
|
|
41500
|
+
return _context27.abrupt("return", 'noArticleToSave');
|
|
41399
41501
|
case 3:
|
|
41400
41502
|
actBasket = this.divaBasketHandler.actBasket;
|
|
41401
41503
|
returnTo = this.getReturnTo(event);
|
|
41402
41504
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
41403
|
-
|
|
41505
|
+
_context27.next = 13;
|
|
41404
41506
|
break;
|
|
41405
41507
|
}
|
|
41406
41508
|
oldReturnTo = returnTo;
|
|
41407
41509
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
41408
|
-
|
|
41510
|
+
_context27.next = 10;
|
|
41409
41511
|
return this.handleFavorites('SAVE');
|
|
41410
41512
|
case 10:
|
|
41411
|
-
result =
|
|
41513
|
+
result = _context27.sent;
|
|
41412
41514
|
if (result === 'canceled') {
|
|
41413
41515
|
this.ReturnTo = oldReturnTo;
|
|
41414
41516
|
}
|
|
41415
|
-
return
|
|
41517
|
+
return _context27.abrupt("return", result);
|
|
41416
41518
|
case 13:
|
|
41417
|
-
|
|
41418
|
-
|
|
41419
|
-
|
|
41519
|
+
_context27.t0 = this.divaBasketHandler;
|
|
41520
|
+
_context27.t1 = this.divaBasketHandler.actDivaNr;
|
|
41521
|
+
_context27.next = 17;
|
|
41420
41522
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41421
41523
|
case 17:
|
|
41422
|
-
|
|
41423
|
-
|
|
41524
|
+
_context27.t2 = _context27.sent;
|
|
41525
|
+
_context27.t0.setBasketData.call(_context27.t0, _context27.t1, _context27.t2);
|
|
41424
41526
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
41425
41527
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
41426
41528
|
returnTo = this.ReturnTo;
|
|
@@ -41435,11 +41537,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41435
41537
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
41436
41538
|
actBasket.Updated = Date.now();
|
|
41437
41539
|
if (!returnTo) {
|
|
41438
|
-
|
|
41540
|
+
_context27.next = 52;
|
|
41439
41541
|
break;
|
|
41440
41542
|
}
|
|
41441
|
-
|
|
41442
|
-
|
|
41543
|
+
_context27.t3 = returnTo;
|
|
41544
|
+
_context27.next = _context27.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context27.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context27.t3 === 'OPEN_PDF' ? 33 : _context27.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context27.t3 === 'SAVE_BASKET' ? 33 : _context27.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context27.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
41443
41545
|
break;
|
|
41444
41546
|
case 28:
|
|
41445
41547
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
|
|
@@ -41453,7 +41555,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41453
41555
|
basketData: actBasket
|
|
41454
41556
|
}
|
|
41455
41557
|
});
|
|
41456
|
-
return
|
|
41558
|
+
return _context27.abrupt("break", 52);
|
|
41457
41559
|
case 31:
|
|
41458
41560
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
|
|
41459
41561
|
type: 'SELLER',
|
|
@@ -41465,23 +41567,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41465
41567
|
basketData: actBasket
|
|
41466
41568
|
}
|
|
41467
41569
|
});
|
|
41468
|
-
return
|
|
41570
|
+
return _context27.abrupt("break", 52);
|
|
41469
41571
|
case 33:
|
|
41470
41572
|
if (!(event == 'onSaveProduct')) {
|
|
41471
|
-
|
|
41573
|
+
_context27.next = 43;
|
|
41472
41574
|
break;
|
|
41473
41575
|
}
|
|
41474
41576
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
41475
41577
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
41476
|
-
|
|
41578
|
+
_context27.next = 37;
|
|
41477
41579
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41478
41580
|
case 37:
|
|
41479
|
-
|
|
41581
|
+
_context27.next = 39;
|
|
41480
41582
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41481
41583
|
case 39:
|
|
41482
|
-
newDivaNr =
|
|
41584
|
+
newDivaNr = _context27.sent;
|
|
41483
41585
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41484
|
-
|
|
41586
|
+
_context27.next = 51;
|
|
41485
41587
|
break;
|
|
41486
41588
|
case 43:
|
|
41487
41589
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -41490,32 +41592,32 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41490
41592
|
}
|
|
41491
41593
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41492
41594
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41493
|
-
|
|
41595
|
+
_context27.next = 48;
|
|
41494
41596
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41495
41597
|
case 48:
|
|
41496
|
-
_result2 =
|
|
41598
|
+
_result2 = _context27.sent;
|
|
41497
41599
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41498
|
-
|
|
41600
|
+
_context27.next = 51;
|
|
41499
41601
|
break;
|
|
41500
41602
|
}
|
|
41501
|
-
return
|
|
41603
|
+
return _context27.abrupt("return", 'canceled');
|
|
41502
41604
|
case 51:
|
|
41503
|
-
return
|
|
41605
|
+
return _context27.abrupt("break", 52);
|
|
41504
41606
|
case 52:
|
|
41505
41607
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41506
41608
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
41507
|
-
|
|
41609
|
+
_context27.next = 56;
|
|
41508
41610
|
return this.addToBasket(actBasket, event);
|
|
41509
41611
|
case 56:
|
|
41510
|
-
product =
|
|
41511
|
-
return
|
|
41612
|
+
product = _context27.sent;
|
|
41613
|
+
return _context27.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
41512
41614
|
case 58:
|
|
41513
41615
|
case "end":
|
|
41514
|
-
return
|
|
41616
|
+
return _context27.stop();
|
|
41515
41617
|
}
|
|
41516
|
-
},
|
|
41618
|
+
}, _callee27, this);
|
|
41517
41619
|
}));
|
|
41518
|
-
function saveToBasket(
|
|
41620
|
+
function saveToBasket(_x76, _x77, _x78) {
|
|
41519
41621
|
return _saveToBasket.apply(this, arguments);
|
|
41520
41622
|
}
|
|
41521
41623
|
return saveToBasket;
|
|
@@ -41749,23 +41851,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41749
41851
|
}, {
|
|
41750
41852
|
key: "getBasketDataWithEkText",
|
|
41751
41853
|
value: function () {
|
|
41752
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41753
|
-
return _regeneratorRuntime.wrap(function
|
|
41754
|
-
while (1) switch (
|
|
41854
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
|
|
41855
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
41856
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41755
41857
|
case 0:
|
|
41756
|
-
|
|
41757
|
-
|
|
41758
|
-
|
|
41858
|
+
_context28.t0 = this.divaBasketHandler;
|
|
41859
|
+
_context28.t1 = this.divaBasketHandler.actDivaNr;
|
|
41860
|
+
_context28.next = 4;
|
|
41759
41861
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41760
41862
|
case 4:
|
|
41761
|
-
|
|
41762
|
-
|
|
41763
|
-
return
|
|
41863
|
+
_context28.t2 = _context28.sent;
|
|
41864
|
+
_context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
|
|
41865
|
+
return _context28.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41764
41866
|
case 7:
|
|
41765
41867
|
case "end":
|
|
41766
|
-
return
|
|
41868
|
+
return _context28.stop();
|
|
41767
41869
|
}
|
|
41768
|
-
},
|
|
41870
|
+
}, _callee28, this);
|
|
41769
41871
|
}));
|
|
41770
41872
|
function getBasketDataWithEkText() {
|
|
41771
41873
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41791,7 +41893,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41791
41893
|
}, {
|
|
41792
41894
|
key: "addToBasket",
|
|
41793
41895
|
value: function () {
|
|
41794
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41896
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(actBasket) {
|
|
41795
41897
|
var _this$actions36,
|
|
41796
41898
|
_this$actions37,
|
|
41797
41899
|
_this$actions38,
|
|
@@ -41811,44 +41913,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41811
41913
|
to,
|
|
41812
41914
|
variants,
|
|
41813
41915
|
products,
|
|
41814
|
-
|
|
41815
|
-
return _regeneratorRuntime.wrap(function
|
|
41816
|
-
while (1) switch (
|
|
41916
|
+
_args29 = arguments;
|
|
41917
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
41918
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
41817
41919
|
case 0:
|
|
41818
|
-
event =
|
|
41819
|
-
|
|
41820
|
-
|
|
41920
|
+
event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
|
|
41921
|
+
_context29.t0 = event;
|
|
41922
|
+
_context29.next = _context29.t0 === 'onWebPlanerPrint' ? 5 : _context29.t0 === 'onWebPlanerSave' ? 7 : _context29.t0 === 'onWebPlanerShare' ? 9 : _context29.t0 === 'onRequestConsulation' ? 11 : _context29.t0 === 'onSave' ? 13 : _context29.t0 === 'onSendEmail' ? 15 : _context29.t0 === 'onSaveProduct' ? 20 : _context29.t0 === 'dontSaveBasket' ? 27 : _context29.t0 === 'onAddToBasket' ? 28 : _context29.t0 === 'onSendContactForm' ? 30 : 33;
|
|
41821
41923
|
break;
|
|
41822
41924
|
case 5:
|
|
41823
41925
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41824
41926
|
type: 'onWebPlanerPrint',
|
|
41825
41927
|
data: actBasket.getAsJson()
|
|
41826
41928
|
});
|
|
41827
|
-
return
|
|
41929
|
+
return _context29.abrupt("break", 35);
|
|
41828
41930
|
case 7:
|
|
41829
41931
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41830
41932
|
type: 'onWebPlanerSave',
|
|
41831
41933
|
data: actBasket.getAsJson()
|
|
41832
41934
|
});
|
|
41833
|
-
return
|
|
41935
|
+
return _context29.abrupt("break", 35);
|
|
41834
41936
|
case 9:
|
|
41835
41937
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41836
41938
|
type: 'onWebPlanerShare',
|
|
41837
41939
|
data: actBasket.getAsJson()
|
|
41838
41940
|
});
|
|
41839
|
-
return
|
|
41941
|
+
return _context29.abrupt("break", 35);
|
|
41840
41942
|
case 11:
|
|
41841
41943
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41842
41944
|
type: 'onRequestConsulation',
|
|
41843
41945
|
data: actBasket.getAsJson()
|
|
41844
41946
|
});
|
|
41845
|
-
return
|
|
41947
|
+
return _context29.abrupt("break", 35);
|
|
41846
41948
|
case 13:
|
|
41847
41949
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41848
41950
|
type: 'onSave',
|
|
41849
41951
|
data: actBasket.getAsJson()
|
|
41850
41952
|
});
|
|
41851
|
-
return
|
|
41953
|
+
return _context29.abrupt("break", 35);
|
|
41852
41954
|
case 15:
|
|
41853
41955
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41854
41956
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41883,51 +41985,51 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41883
41985
|
type: 'onAddToBasket',
|
|
41884
41986
|
data: actBasket.getAsJson()
|
|
41885
41987
|
});
|
|
41886
|
-
return
|
|
41988
|
+
return _context29.abrupt("break", 35);
|
|
41887
41989
|
case 20:
|
|
41888
41990
|
this.actSet().CatalogData;
|
|
41889
|
-
|
|
41991
|
+
_context29.next = 23;
|
|
41890
41992
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41891
41993
|
case 23:
|
|
41892
|
-
products =
|
|
41994
|
+
products = _context29.sent;
|
|
41893
41995
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41894
41996
|
type: 'onAddToBasket',
|
|
41895
41997
|
data: actBasket.getAsJson()
|
|
41896
41998
|
});
|
|
41897
41999
|
if (!products) {
|
|
41898
|
-
|
|
42000
|
+
_context29.next = 27;
|
|
41899
42001
|
break;
|
|
41900
42002
|
}
|
|
41901
|
-
return
|
|
42003
|
+
return _context29.abrupt("return", products[0]);
|
|
41902
42004
|
case 27:
|
|
41903
42005
|
case 28:
|
|
41904
42006
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41905
42007
|
type: 'onAddToBasket',
|
|
41906
42008
|
data: actBasket.getAsJson()
|
|
41907
42009
|
});
|
|
41908
|
-
return
|
|
42010
|
+
return _context29.abrupt("break", 35);
|
|
41909
42011
|
case 30:
|
|
41910
42012
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
41911
42013
|
type: 'onAddToBasket',
|
|
41912
42014
|
data: actBasket.getAsJson()
|
|
41913
42015
|
});
|
|
41914
42016
|
this.openContactForm(this.divaBasketHandler);
|
|
41915
|
-
return
|
|
42017
|
+
return _context29.abrupt("break", 35);
|
|
41916
42018
|
case 33:
|
|
41917
42019
|
(_this$actions45 = this.actions) === null || _this$actions45 === void 0 || _this$actions45.onEvent({
|
|
41918
42020
|
type: event,
|
|
41919
42021
|
data: actBasket.getAsJson()
|
|
41920
42022
|
});
|
|
41921
|
-
return
|
|
42023
|
+
return _context29.abrupt("break", 35);
|
|
41922
42024
|
case 35:
|
|
41923
|
-
return
|
|
42025
|
+
return _context29.abrupt("return");
|
|
41924
42026
|
case 36:
|
|
41925
42027
|
case "end":
|
|
41926
|
-
return
|
|
42028
|
+
return _context29.stop();
|
|
41927
42029
|
}
|
|
41928
|
-
},
|
|
42030
|
+
}, _callee29, this);
|
|
41929
42031
|
}));
|
|
41930
|
-
function addToBasket(
|
|
42032
|
+
function addToBasket(_x79) {
|
|
41931
42033
|
return _addToBasket.apply(this, arguments);
|
|
41932
42034
|
}
|
|
41933
42035
|
return addToBasket;
|
|
@@ -42202,9 +42304,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42202
42304
|
key: "initApiForLogicOnly",
|
|
42203
42305
|
value: //just for testing purposes
|
|
42204
42306
|
function () {
|
|
42205
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42206
|
-
return _regeneratorRuntime.wrap(function
|
|
42207
|
-
while (1) switch (
|
|
42307
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
42308
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
42309
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
42208
42310
|
case 0:
|
|
42209
42311
|
//empty services
|
|
42210
42312
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -42217,17 +42319,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42217
42319
|
jwt: jwt,
|
|
42218
42320
|
apiKey: apiKey
|
|
42219
42321
|
}), handler);
|
|
42220
|
-
|
|
42322
|
+
_context30.next = 3;
|
|
42221
42323
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
42222
42324
|
case 3:
|
|
42223
42325
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
42224
42326
|
case 4:
|
|
42225
42327
|
case "end":
|
|
42226
|
-
return
|
|
42328
|
+
return _context30.stop();
|
|
42227
42329
|
}
|
|
42228
|
-
},
|
|
42330
|
+
}, _callee30, this);
|
|
42229
42331
|
}));
|
|
42230
|
-
function initApiForLogicOnly(
|
|
42332
|
+
function initApiForLogicOnly(_x80, _x81, _x82, _x83, _x84, _x85, _x86) {
|
|
42231
42333
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
42232
42334
|
}
|
|
42233
42335
|
return initApiForLogicOnly;
|
|
@@ -42240,16 +42342,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42240
42342
|
}, {
|
|
42241
42343
|
key: "loadBasket",
|
|
42242
42344
|
value: function () {
|
|
42243
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42244
|
-
return _regeneratorRuntime.wrap(function
|
|
42245
|
-
while (1) switch (
|
|
42345
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
42346
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
42347
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
42246
42348
|
case 0:
|
|
42247
|
-
return
|
|
42349
|
+
return _context31.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
42248
42350
|
case 1:
|
|
42249
42351
|
case "end":
|
|
42250
|
-
return
|
|
42352
|
+
return _context31.stop();
|
|
42251
42353
|
}
|
|
42252
|
-
},
|
|
42354
|
+
}, _callee31, this);
|
|
42253
42355
|
}));
|
|
42254
42356
|
function loadBasket() {
|
|
42255
42357
|
return _loadBasket.apply(this, arguments);
|
|
@@ -42264,39 +42366,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42264
42366
|
}, {
|
|
42265
42367
|
key: "initBasket",
|
|
42266
42368
|
value: function () {
|
|
42267
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42369
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(init3D, ignoreFavorites) {
|
|
42268
42370
|
var initSetState, set, basket;
|
|
42269
|
-
return _regeneratorRuntime.wrap(function
|
|
42270
|
-
while (1) switch (
|
|
42371
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
42372
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
42271
42373
|
case 0:
|
|
42272
42374
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
42273
42375
|
initSetState = this.getInitStateForSet(!init3D);
|
|
42274
42376
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
42275
|
-
|
|
42377
|
+
_context32.next = 5;
|
|
42276
42378
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
42277
42379
|
case 5:
|
|
42278
42380
|
//TODO check if when basket gets repaired the product match gets called
|
|
42279
42381
|
set = this.actSet();
|
|
42280
42382
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
42281
42383
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
42282
|
-
|
|
42384
|
+
_context32.next = 10;
|
|
42283
42385
|
break;
|
|
42284
42386
|
}
|
|
42285
|
-
|
|
42387
|
+
_context32.next = 10;
|
|
42286
42388
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
42287
42389
|
case 10:
|
|
42288
|
-
|
|
42390
|
+
_context32.next = 12;
|
|
42289
42391
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
42290
42392
|
case 12:
|
|
42291
|
-
basket =
|
|
42292
|
-
return
|
|
42393
|
+
basket = _context32.sent;
|
|
42394
|
+
return _context32.abrupt("return", basket);
|
|
42293
42395
|
case 14:
|
|
42294
42396
|
case "end":
|
|
42295
|
-
return
|
|
42397
|
+
return _context32.stop();
|
|
42296
42398
|
}
|
|
42297
|
-
},
|
|
42399
|
+
}, _callee32, this);
|
|
42298
42400
|
}));
|
|
42299
|
-
function initBasket(
|
|
42401
|
+
function initBasket(_x87, _x88) {
|
|
42300
42402
|
return _initBasket.apply(this, arguments);
|
|
42301
42403
|
}
|
|
42302
42404
|
return initBasket;
|
|
@@ -42310,21 +42412,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42310
42412
|
}, {
|
|
42311
42413
|
key: "getValidVariantsLength",
|
|
42312
42414
|
value: function () {
|
|
42313
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42415
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
|
|
42314
42416
|
var set;
|
|
42315
|
-
return _regeneratorRuntime.wrap(function
|
|
42316
|
-
while (1) switch (
|
|
42417
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
42418
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
42317
42419
|
case 0:
|
|
42318
42420
|
set = this.actSet();
|
|
42319
|
-
|
|
42421
|
+
_context33.next = 3;
|
|
42320
42422
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
42321
42423
|
case 3:
|
|
42322
|
-
return
|
|
42424
|
+
return _context33.abrupt("return", _context33.sent.length);
|
|
42323
42425
|
case 4:
|
|
42324
42426
|
case "end":
|
|
42325
|
-
return
|
|
42427
|
+
return _context33.stop();
|
|
42326
42428
|
}
|
|
42327
|
-
},
|
|
42429
|
+
}, _callee33, this);
|
|
42328
42430
|
}));
|
|
42329
42431
|
function getValidVariantsLength() {
|
|
42330
42432
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -42334,46 +42436,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42334
42436
|
}, {
|
|
42335
42437
|
key: "handleFavorites",
|
|
42336
42438
|
value: function () {
|
|
42337
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42439
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(mode) {
|
|
42338
42440
|
var _this5 = this;
|
|
42339
42441
|
var set, i;
|
|
42340
|
-
return _regeneratorRuntime.wrap(function
|
|
42341
|
-
while (1) switch (
|
|
42442
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
42443
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
42342
42444
|
case 0:
|
|
42343
42445
|
set = this.actSet();
|
|
42344
42446
|
i = 0;
|
|
42345
42447
|
case 2:
|
|
42346
42448
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
42347
|
-
|
|
42449
|
+
_context34.next = 11;
|
|
42348
42450
|
break;
|
|
42349
42451
|
}
|
|
42350
|
-
|
|
42452
|
+
_context34.next = 5;
|
|
42351
42453
|
return DivaUtils.Sleep(200);
|
|
42352
42454
|
case 5:
|
|
42353
42455
|
i++;
|
|
42354
42456
|
if (!(i > 1000)) {
|
|
42355
|
-
|
|
42457
|
+
_context34.next = 9;
|
|
42356
42458
|
break;
|
|
42357
42459
|
}
|
|
42358
42460
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
42359
|
-
return
|
|
42461
|
+
return _context34.abrupt("break", 11);
|
|
42360
42462
|
case 9:
|
|
42361
|
-
|
|
42463
|
+
_context34.next = 2;
|
|
42362
42464
|
break;
|
|
42363
42465
|
case 11:
|
|
42364
|
-
|
|
42466
|
+
_context34.next = 13;
|
|
42365
42467
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
42366
42468
|
return _this5.update2DGrid(set);
|
|
42367
42469
|
}, this.actions);
|
|
42368
42470
|
case 13:
|
|
42369
|
-
return
|
|
42471
|
+
return _context34.abrupt("return", _context34.sent);
|
|
42370
42472
|
case 14:
|
|
42371
42473
|
case "end":
|
|
42372
|
-
return
|
|
42474
|
+
return _context34.stop();
|
|
42373
42475
|
}
|
|
42374
|
-
},
|
|
42476
|
+
}, _callee34, this);
|
|
42375
42477
|
}));
|
|
42376
|
-
function handleFavorites(
|
|
42478
|
+
function handleFavorites(_x89) {
|
|
42377
42479
|
return _handleFavorites.apply(this, arguments);
|
|
42378
42480
|
}
|
|
42379
42481
|
return handleFavorites;
|
|
@@ -42386,48 +42488,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
42386
42488
|
}, {
|
|
42387
42489
|
key: "initSapOrderLinesFromBasket",
|
|
42388
42490
|
value: function () {
|
|
42389
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42491
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(divaNr, init3D, onlyLoadOldBakset) {
|
|
42390
42492
|
var result, oldBasket, basket;
|
|
42391
|
-
return _regeneratorRuntime.wrap(function
|
|
42392
|
-
while (1) switch (
|
|
42493
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
42494
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
42393
42495
|
case 0:
|
|
42394
42496
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
42395
|
-
|
|
42497
|
+
_context35.next = 3;
|
|
42396
42498
|
return this.loadBasket();
|
|
42397
42499
|
case 3:
|
|
42398
|
-
result =
|
|
42500
|
+
result = _context35.sent;
|
|
42399
42501
|
if (!onlyLoadOldBakset) {
|
|
42400
|
-
|
|
42502
|
+
_context35.next = 6;
|
|
42401
42503
|
break;
|
|
42402
42504
|
}
|
|
42403
|
-
return
|
|
42505
|
+
return _context35.abrupt("return", {
|
|
42404
42506
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
42405
42507
|
cache: {}
|
|
42406
42508
|
});
|
|
42407
42509
|
case 6:
|
|
42408
42510
|
if (!(result === false)) {
|
|
42409
|
-
|
|
42511
|
+
_context35.next = 8;
|
|
42410
42512
|
break;
|
|
42411
42513
|
}
|
|
42412
42514
|
throw new Error('Could not load basket! ' + divaNr);
|
|
42413
42515
|
case 8:
|
|
42414
42516
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
42415
|
-
|
|
42517
|
+
_context35.next = 11;
|
|
42416
42518
|
return this.initBasket(init3D);
|
|
42417
42519
|
case 11:
|
|
42418
|
-
basket =
|
|
42419
|
-
return
|
|
42520
|
+
basket = _context35.sent;
|
|
42521
|
+
return _context35.abrupt("return", {
|
|
42420
42522
|
basket: basket,
|
|
42421
42523
|
oldBasket: oldBasket,
|
|
42422
42524
|
cache: this.api.getJsonDataCache()
|
|
42423
42525
|
});
|
|
42424
42526
|
case 13:
|
|
42425
42527
|
case "end":
|
|
42426
|
-
return
|
|
42528
|
+
return _context35.stop();
|
|
42427
42529
|
}
|
|
42428
|
-
},
|
|
42530
|
+
}, _callee35, this);
|
|
42429
42531
|
}));
|
|
42430
|
-
function initSapOrderLinesFromBasket(
|
|
42532
|
+
function initSapOrderLinesFromBasket(_x90, _x91, _x92) {
|
|
42431
42533
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
42432
42534
|
}
|
|
42433
42535
|
return initSapOrderLinesFromBasket;
|
|
@@ -43084,6 +43186,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43084
43186
|
//all the different accessoires selectable to place in the grid. can be absolute defined in grid.ArticleRelations or can change due to the heightGridCellCountOnRule where we rule is depending on the current configuration of the article.
|
|
43085
43187
|
_defineProperty(this, "articleRelations", void 0);
|
|
43086
43188
|
_defineProperty(this, "articleRelationsForOtherGroups", void 0);
|
|
43189
|
+
_defineProperty(this, "disableCellsByRules", void 0);
|
|
43087
43190
|
//if in theis grid an shelfaccessoire is planned laod this article aswell
|
|
43088
43191
|
_defineProperty(this, "montageOptions", void 0);
|
|
43089
43192
|
//disableCellsByFreeText
|
|
@@ -43114,6 +43217,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43114
43217
|
this.showOnRule = grid.ShowOnRule;
|
|
43115
43218
|
this.montageOptions = grid.MontageOptions;
|
|
43116
43219
|
this.disableCellsByMeasures = grid.DisableCellsByMeasures;
|
|
43220
|
+
this.disableCellsByRules = grid.DisableCellsByRules;
|
|
43117
43221
|
this.visitOption = grid.VisitOption;
|
|
43118
43222
|
this.shelfId = 'SHELFARTICLE_' + article.basketId + '_' + index;
|
|
43119
43223
|
this.heightGridCellCountOnRule = data.ShelfPlanner[index].HeightGridCellCountOnRule;
|
|
@@ -44082,6 +44186,21 @@ var Grid = /*#__PURE__*/function () {
|
|
|
44082
44186
|
}
|
|
44083
44187
|
return count;
|
|
44084
44188
|
}
|
|
44189
|
+
}, {
|
|
44190
|
+
key: "getDisabledCellsByRule",
|
|
44191
|
+
value: function getDisabledCellsByRule() {
|
|
44192
|
+
var _this$disableCellsByR;
|
|
44193
|
+
var cellsToDisable = [];
|
|
44194
|
+
if (!((_this$disableCellsByR = this.disableCellsByRules) !== null && _this$disableCellsByR !== void 0 && _this$disableCellsByR.length)) return cellsToDisable;
|
|
44195
|
+
var article = this.article;
|
|
44196
|
+
for (var i = 0; i < this.disableCellsByRules.length; i++) {
|
|
44197
|
+
var rule = this.disableCellsByRules[i];
|
|
44198
|
+
if (!rule.rule || this.article.evalRule(DivaUtils.getRuleByFormula(rule.rule, this.article.catalogCodex, article.CatalogData.multiselectOptions))) {
|
|
44199
|
+
cellsToDisable = [].concat(_toConsumableArray(cellsToDisable), _toConsumableArray(rule.cells));
|
|
44200
|
+
}
|
|
44201
|
+
}
|
|
44202
|
+
return cellsToDisable;
|
|
44203
|
+
}
|
|
44085
44204
|
}, {
|
|
44086
44205
|
key: "ShelfId",
|
|
44087
44206
|
get: function get() {
|