@crystaldesign/web-planner-logic 24.15.0-beta.42 → 24.15.0-beta.44
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-7d118ea8.js → DivaBoxPlanner-758aab9f.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-0c0c4ec2.js → DivaStandardPlanner-f6cf771e.js} +2 -2
- package/build/cjs/{DoorPlanner-1aa05c31.js → DoorPlanner-50f2efb7.js} +1 -1
- package/build/cjs/{Host3DSignalR-221b69c6.js → Host3DSignalR-45d107a5.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-86798156.js → LiviqueWWSHandler-8c596c7e.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-bfdb3804.js → PfisterWWSHandler-ed159392.js} +2 -2
- package/build/cjs/{PlannerHandler2D-770ff849.js → PlannerHandler2D-f0f4353b.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-0e67ae4c.js → SeriousBasketHandler-5191296d.js} +1 -1
- package/build/cjs/{ShelfPlanner-d5065225.js → ShelfPlanner-6b09155c.js} +1 -1
- package/build/cjs/{StandardWWSHandler-d130e01f.js → StandardWWSHandler-9bb497c3.js} +1 -1
- package/build/cjs/{index-aa9f4f89.js → index-b04d39b2.js} +503 -380
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-4f1c4002.js → DivaBoxPlanner-72c6a6ad.js} +2 -2
- package/build/esm/{DivaStandardPlanner-88d4b775.js → DivaStandardPlanner-4e111a6c.js} +2 -2
- package/build/esm/{DoorPlanner-3a4d0858.js → DoorPlanner-118ad615.js} +1 -1
- package/build/esm/{Host3DSignalR-209c49bd.js → Host3DSignalR-ca201810.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-e4500926.js → LiviqueWWSHandler-bba23de8.js} +1 -1
- package/build/esm/{PfisterWWSHandler-6286d17a.js → PfisterWWSHandler-e145a282.js} +2 -2
- package/build/esm/{PlannerHandler2D-b1f56c8e.js → PlannerHandler2D-befa0a21.js} +1 -1
- package/build/esm/{SeriousBasketHandler-257333bf.js → SeriousBasketHandler-caf2fa7b.js} +1 -1
- package/build/esm/{ShelfPlanner-f2f13e35.js → ShelfPlanner-466cc7e0.js} +1 -1
- package/build/esm/{StandardWWSHandler-86bf7585.js → StandardWWSHandler-c5bba7ad.js} +1 -1
- package/build/esm/{index-16a32b29.js → index-4df06f97.js} +503 -380
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaSetDataType.d.ts +8 -0
- package/build/types/web-planner-logic/src/interface/DivaSetDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +2 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +1 -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/DivaArticleHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +2 -6
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +4 -5
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +2 -7
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +1 -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/CatalogOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1576,6 +1576,11 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
1576
1576
|
get: function get() {
|
|
1577
1577
|
return this.opt.catalogOPT.contentItemId;
|
|
1578
1578
|
}
|
|
1579
|
+
}, {
|
|
1580
|
+
key: "customDimension",
|
|
1581
|
+
get: function get() {
|
|
1582
|
+
return this.opt.catalogOPT.customDimension;
|
|
1583
|
+
}
|
|
1579
1584
|
}, {
|
|
1580
1585
|
key: "showSearchbar",
|
|
1581
1586
|
get: function get() {
|
|
@@ -2096,6 +2101,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
2096
2101
|
get: function get() {
|
|
2097
2102
|
return this.opv.catalogOPV.onRule;
|
|
2098
2103
|
}
|
|
2104
|
+
}, {
|
|
2105
|
+
key: "customDimension",
|
|
2106
|
+
get: function get() {
|
|
2107
|
+
return this.opv.catalogOPV.customDimension;
|
|
2108
|
+
}
|
|
2099
2109
|
}]);
|
|
2100
2110
|
}();
|
|
2101
2111
|
|
|
@@ -16052,6 +16062,9 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16052
16062
|
case 'SET_CONFIG':
|
|
16053
16063
|
this.opv.setConfig = prop.Value;
|
|
16054
16064
|
break;
|
|
16065
|
+
case 'CUSTOM_DIMENSION':
|
|
16066
|
+
this.opv.customDimension = !!prop.Value;
|
|
16067
|
+
break;
|
|
16055
16068
|
case 'ON_RULE':
|
|
16056
16069
|
this.opv.onRule = prop.Value;
|
|
16057
16070
|
break;
|
|
@@ -16357,6 +16370,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16357
16370
|
get: function get() {
|
|
16358
16371
|
return this.opv.onRule;
|
|
16359
16372
|
}
|
|
16373
|
+
}, {
|
|
16374
|
+
key: "customDimension",
|
|
16375
|
+
get: function get() {
|
|
16376
|
+
return this.opv.customDimension;
|
|
16377
|
+
}
|
|
16360
16378
|
}]);
|
|
16361
16379
|
}();
|
|
16362
16380
|
|
|
@@ -17937,6 +17955,9 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17937
17955
|
case 'IS_STATE':
|
|
17938
17956
|
this.opt.isDescribingState = !!prop.Value;
|
|
17939
17957
|
break;
|
|
17958
|
+
case 'CUSTOM_DIMENSION':
|
|
17959
|
+
this.opt.customDimension = !!prop.Value;
|
|
17960
|
+
break;
|
|
17940
17961
|
case 'HIDE_OPTION_IN_CONFIGURATOR':
|
|
17941
17962
|
this.opt.hideOptionInConfigurator = !!prop.Value;
|
|
17942
17963
|
break;
|
|
@@ -18182,6 +18203,11 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
18182
18203
|
get: function get() {
|
|
18183
18204
|
return this.opt.contentItemId;
|
|
18184
18205
|
}
|
|
18206
|
+
}, {
|
|
18207
|
+
key: "customDimension",
|
|
18208
|
+
get: function get() {
|
|
18209
|
+
return this.opt.customDimension;
|
|
18210
|
+
}
|
|
18185
18211
|
}]);
|
|
18186
18212
|
}();
|
|
18187
18213
|
|
|
@@ -20533,6 +20559,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20533
20559
|
get: function get() {
|
|
20534
20560
|
return this.option.isDescribingState;
|
|
20535
20561
|
}
|
|
20562
|
+
}, {
|
|
20563
|
+
key: "customDimension",
|
|
20564
|
+
get: function get() {
|
|
20565
|
+
var _this$val$customDimen, _this$val24;
|
|
20566
|
+
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);
|
|
20567
|
+
}
|
|
20536
20568
|
}, {
|
|
20537
20569
|
key: "showWarningForRequiresUserInput",
|
|
20538
20570
|
get: function get() {
|
|
@@ -23823,7 +23855,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23823
23855
|
break;
|
|
23824
23856
|
}
|
|
23825
23857
|
_context.next = 4;
|
|
23826
|
-
return import('./ShelfPlanner-
|
|
23858
|
+
return import('./ShelfPlanner-466cc7e0.js');
|
|
23827
23859
|
case 4:
|
|
23828
23860
|
_yield$import = _context.sent;
|
|
23829
23861
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -26000,10 +26032,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26000
26032
|
/***************************************Abspeichern orderLines******************************************************/
|
|
26001
26033
|
}, {
|
|
26002
26034
|
key: "getOrderLinesOfArticles",
|
|
26003
|
-
value: function getOrderLinesOfArticles(articles
|
|
26035
|
+
value: function getOrderLinesOfArticles(articles) {
|
|
26036
|
+
var _this = this;
|
|
26037
|
+
var customDimensions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
26038
|
+
var repairOnly = arguments.length > 2 ? arguments[2] : undefined;
|
|
26039
|
+
var hasFavorites = arguments.length > 3 ? arguments[3] : undefined;
|
|
26004
26040
|
var ret = [];
|
|
26005
26041
|
if (Object.values(articles).length == 0) return ret;
|
|
26006
|
-
|
|
26042
|
+
var _loop2 = function _loop2() {
|
|
26007
26043
|
var _article$shelfPlanner3, _article$shelfPlanner4, _article$doorPlanner;
|
|
26008
26044
|
var article = articles[key];
|
|
26009
26045
|
var catalogData = article.CatalogData;
|
|
@@ -26063,16 +26099,30 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26063
26099
|
MetaData: !hasFavorites ? article.MetaData : undefined,
|
|
26064
26100
|
MetaData_locales: !hasFavorites ? article.MetaData_locales : undefined,
|
|
26065
26101
|
RuleDesc: article.ruleDesc,
|
|
26066
|
-
RuleDesc_locales: article.ruleDesc_locales
|
|
26102
|
+
RuleDesc_locales: article.ruleDesc_locales,
|
|
26103
|
+
CustomDimensions: customDimensions.filter(function (c) {
|
|
26104
|
+
return c.basketIds.includes(article.basketId);
|
|
26105
|
+
}).map(function (a) {
|
|
26106
|
+
var _article$set$api$getI;
|
|
26107
|
+
return {
|
|
26108
|
+
key: a.dimensionId,
|
|
26109
|
+
text: a.text || ((_article$set$api$getI = article.set.api.getI18n()) === null || _article$set$api$getI === void 0 ? void 0 : _article$set$api$getI.t('configurator.headerdimension.' + a.dimensionId)),
|
|
26110
|
+
dim: a.dimension,
|
|
26111
|
+
unit: a.unit
|
|
26112
|
+
};
|
|
26113
|
+
})
|
|
26067
26114
|
});
|
|
26068
26115
|
orderline.ElementID = article.elementId;
|
|
26069
26116
|
ret.push(orderline);
|
|
26070
26117
|
|
|
26071
26118
|
//die Partlistarticle eines Articles auch in die Orderline pushen
|
|
26072
26119
|
if (article.hasPartlistArticle) {
|
|
26073
|
-
ret = ret.concat(
|
|
26120
|
+
ret = ret.concat(_this.getOrderLinesOfArticles(article.partlistArticles, customDimensions, repairOnly, hasFavorites));
|
|
26074
26121
|
}
|
|
26075
|
-
ret = ret.concat(
|
|
26122
|
+
ret = ret.concat(_this.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
|
|
26123
|
+
};
|
|
26124
|
+
for (var key in articles) {
|
|
26125
|
+
_loop2();
|
|
26076
26126
|
}
|
|
26077
26127
|
return ret;
|
|
26078
26128
|
}
|
|
@@ -26229,7 +26279,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26229
26279
|
key: "correctPartlistArticlesByGlobalRules",
|
|
26230
26280
|
value: (function () {
|
|
26231
26281
|
var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
|
|
26232
|
-
var
|
|
26282
|
+
var _loop3, i, article;
|
|
26233
26283
|
return _regeneratorRuntime.wrap(function _callee17$(_context18) {
|
|
26234
26284
|
while (1) switch (_context18.prev = _context18.next) {
|
|
26235
26285
|
case 0:
|
|
@@ -26239,9 +26289,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26239
26289
|
_context18.next = 9;
|
|
26240
26290
|
break;
|
|
26241
26291
|
}
|
|
26242
|
-
|
|
26292
|
+
_loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3(i) {
|
|
26243
26293
|
var rule;
|
|
26244
|
-
return _regeneratorRuntime.wrap(function
|
|
26294
|
+
return _regeneratorRuntime.wrap(function _loop3$(_context17) {
|
|
26245
26295
|
while (1) switch (_context17.prev = _context17.next) {
|
|
26246
26296
|
case 0:
|
|
26247
26297
|
//Run through articleCodexes to repair:
|
|
@@ -26256,7 +26306,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26256
26306
|
case "end":
|
|
26257
26307
|
return _context17.stop();
|
|
26258
26308
|
}
|
|
26259
|
-
},
|
|
26309
|
+
}, _loop3);
|
|
26260
26310
|
});
|
|
26261
26311
|
i = 0;
|
|
26262
26312
|
case 4:
|
|
@@ -26264,7 +26314,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26264
26314
|
_context18.next = 9;
|
|
26265
26315
|
break;
|
|
26266
26316
|
}
|
|
26267
|
-
return _context18.delegateYield(
|
|
26317
|
+
return _context18.delegateYield(_loop3(i), "t0", 6);
|
|
26268
26318
|
case 6:
|
|
26269
26319
|
i++;
|
|
26270
26320
|
_context18.next = 4;
|
|
@@ -26290,7 +26340,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26290
26340
|
key: "bundlePartlistArticles",
|
|
26291
26341
|
value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
|
|
26292
26342
|
var partlistArticlesToLoadGrouped = [];
|
|
26293
|
-
var
|
|
26343
|
+
var _loop4 = function _loop4(i) {
|
|
26294
26344
|
var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
|
|
26295
26345
|
if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
|
|
26296
26346
|
return true;
|
|
@@ -26304,7 +26354,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26304
26354
|
}
|
|
26305
26355
|
};
|
|
26306
26356
|
for (var i = 0; i < partlistArticlesToLoad.length; i++) {
|
|
26307
|
-
|
|
26357
|
+
_loop4(i);
|
|
26308
26358
|
}
|
|
26309
26359
|
//bundle Partlistarticles
|
|
26310
26360
|
for (var _i5 = 0; _i5 < bundleRules.length; _i5++) {
|
|
@@ -27857,82 +27907,175 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27857
27907
|
});
|
|
27858
27908
|
}
|
|
27859
27909
|
}, {
|
|
27860
|
-
key: "
|
|
27910
|
+
key: "getCustomDimensionsOfActSet",
|
|
27861
27911
|
value: function () {
|
|
27862
|
-
var
|
|
27863
|
-
var dimensions, _iterator, _step, article, _iterator2, _step2, dimensionId, dimension;
|
|
27912
|
+
var _getCustomDimensionsOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
27864
27913
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
27865
27914
|
while (1) switch (_context3.prev = _context3.next) {
|
|
27866
27915
|
case 0:
|
|
27916
|
+
_context3.t0 = [];
|
|
27917
|
+
_context3.t1 = _toConsumableArray(this.getCustomDimsFromConfig());
|
|
27918
|
+
_context3.t2 = _toConsumableArray;
|
|
27919
|
+
_context3.next = 5;
|
|
27920
|
+
return this.getCustomDimsFromCostructionService();
|
|
27921
|
+
case 5:
|
|
27922
|
+
_context3.t3 = _context3.sent;
|
|
27923
|
+
_context3.t4 = (0, _context3.t2)(_context3.t3);
|
|
27924
|
+
return _context3.abrupt("return", _context3.t0.concat.call(_context3.t0, _context3.t1, _context3.t4));
|
|
27925
|
+
case 8:
|
|
27926
|
+
case "end":
|
|
27927
|
+
return _context3.stop();
|
|
27928
|
+
}
|
|
27929
|
+
}, _callee2, this);
|
|
27930
|
+
}));
|
|
27931
|
+
function getCustomDimensionsOfActSet() {
|
|
27932
|
+
return _getCustomDimensionsOfActSet.apply(this, arguments);
|
|
27933
|
+
}
|
|
27934
|
+
return getCustomDimensionsOfActSet;
|
|
27935
|
+
}()
|
|
27936
|
+
}, {
|
|
27937
|
+
key: "getCustomDimsFromCostructionService",
|
|
27938
|
+
value: function () {
|
|
27939
|
+
var _getCustomDimsFromCostructionService = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
27940
|
+
var _this2 = this;
|
|
27941
|
+
var dims, dimensions, _iterator, _step, article, _iterator2, _step2, dimensionId, dimension, cleanedDimensions;
|
|
27942
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
27943
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
27944
|
+
case 0:
|
|
27945
|
+
dims = [];
|
|
27867
27946
|
dimensions = [];
|
|
27868
27947
|
_iterator = _createForOfIteratorHelper$1(this.getArticleVariantValues());
|
|
27869
|
-
|
|
27948
|
+
_context4.prev = 3;
|
|
27870
27949
|
_iterator.s();
|
|
27871
|
-
case
|
|
27950
|
+
case 5:
|
|
27872
27951
|
if ((_step = _iterator.n()).done) {
|
|
27873
|
-
|
|
27952
|
+
_context4.next = 28;
|
|
27874
27953
|
break;
|
|
27875
27954
|
}
|
|
27876
27955
|
article = _step.value;
|
|
27877
27956
|
_iterator2 = _createForOfIteratorHelper$1(article.headerDimensions);
|
|
27878
|
-
|
|
27957
|
+
_context4.prev = 8;
|
|
27879
27958
|
_iterator2.s();
|
|
27880
|
-
case
|
|
27959
|
+
case 10:
|
|
27881
27960
|
if ((_step2 = _iterator2.n()).done) {
|
|
27882
|
-
|
|
27961
|
+
_context4.next = 18;
|
|
27883
27962
|
break;
|
|
27884
27963
|
}
|
|
27885
27964
|
dimensionId = _step2.value;
|
|
27886
|
-
|
|
27965
|
+
_context4.next = 14;
|
|
27887
27966
|
return this.api.getDimensionbyId(dimensionId, article.iln, this.getCatalogCodex(), article.variantValues);
|
|
27888
|
-
case
|
|
27889
|
-
dimension =
|
|
27890
|
-
|
|
27967
|
+
case 14:
|
|
27968
|
+
dimension = _context4.sent;
|
|
27969
|
+
dims.push({
|
|
27891
27970
|
dimensionId: dimensionId,
|
|
27892
27971
|
elementId: article.elementId,
|
|
27893
27972
|
dimension: dimension
|
|
27894
27973
|
});
|
|
27895
|
-
case
|
|
27896
|
-
|
|
27974
|
+
case 16:
|
|
27975
|
+
_context4.next = 10;
|
|
27897
27976
|
break;
|
|
27898
|
-
case
|
|
27899
|
-
|
|
27977
|
+
case 18:
|
|
27978
|
+
_context4.next = 23;
|
|
27900
27979
|
break;
|
|
27901
|
-
case
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
_iterator2.e(
|
|
27905
|
-
case
|
|
27906
|
-
|
|
27980
|
+
case 20:
|
|
27981
|
+
_context4.prev = 20;
|
|
27982
|
+
_context4.t0 = _context4["catch"](8);
|
|
27983
|
+
_iterator2.e(_context4.t0);
|
|
27984
|
+
case 23:
|
|
27985
|
+
_context4.prev = 23;
|
|
27907
27986
|
_iterator2.f();
|
|
27908
|
-
return
|
|
27909
|
-
case
|
|
27910
|
-
|
|
27987
|
+
return _context4.finish(23);
|
|
27988
|
+
case 26:
|
|
27989
|
+
_context4.next = 5;
|
|
27911
27990
|
break;
|
|
27912
|
-
case
|
|
27913
|
-
|
|
27991
|
+
case 28:
|
|
27992
|
+
_context4.next = 33;
|
|
27914
27993
|
break;
|
|
27915
|
-
case
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
_iterator.e(
|
|
27919
|
-
case
|
|
27920
|
-
|
|
27994
|
+
case 30:
|
|
27995
|
+
_context4.prev = 30;
|
|
27996
|
+
_context4.t1 = _context4["catch"](3);
|
|
27997
|
+
_iterator.e(_context4.t1);
|
|
27998
|
+
case 33:
|
|
27999
|
+
_context4.prev = 33;
|
|
27921
28000
|
_iterator.f();
|
|
27922
|
-
return
|
|
27923
|
-
case 35:
|
|
27924
|
-
return _context3.abrupt("return", dimensions);
|
|
28001
|
+
return _context4.finish(33);
|
|
27925
28002
|
case 36:
|
|
28003
|
+
if (!(!dims || dims.every(function (r, idx) {
|
|
28004
|
+
var _dimensions$idx, _dimensions$idx2;
|
|
28005
|
+
return (dimensions === null || dimensions === void 0 || (_dimensions$idx = dimensions[idx]) === null || _dimensions$idx === void 0 ? void 0 : _dimensions$idx.elementIds.includes(r === null || r === void 0 ? void 0 : r.elementId)) && (r === null || r === void 0 ? void 0 : r.dimension) == (dimensions === null || dimensions === void 0 || (_dimensions$idx2 = dimensions[idx]) === null || _dimensions$idx2 === void 0 ? void 0 : _dimensions$idx2.dimension);
|
|
28006
|
+
}))) {
|
|
28007
|
+
_context4.next = 38;
|
|
28008
|
+
break;
|
|
28009
|
+
}
|
|
28010
|
+
return _context4.abrupt("return", []);
|
|
28011
|
+
case 38:
|
|
28012
|
+
cleanedDimensions = [];
|
|
28013
|
+
dims.forEach(function (r) {
|
|
28014
|
+
var article = _this2.getArticleByElementId(r.elementId);
|
|
28015
|
+
if (r.dimension == 0 || !article) return;
|
|
28016
|
+
var foundDimensionIdx = cleanedDimensions.findIndex(function (cd) {
|
|
28017
|
+
return cd.dimension == r.dimension && cd.dimensionId == r.dimensionId;
|
|
28018
|
+
});
|
|
28019
|
+
if (foundDimensionIdx != -1) cleanedDimensions[foundDimensionIdx].basketIds.push(article.basketId);else cleanedDimensions.push({
|
|
28020
|
+
dimensionId: r.dimensionId,
|
|
28021
|
+
basketIds: [article.basketId],
|
|
28022
|
+
dimension: r.dimension,
|
|
28023
|
+
unit: 'cm',
|
|
28024
|
+
posNrs: [article.posNr]
|
|
28025
|
+
});
|
|
28026
|
+
});
|
|
28027
|
+
return _context4.abrupt("return", cleanedDimensions);
|
|
28028
|
+
case 41:
|
|
27926
28029
|
case "end":
|
|
27927
|
-
return
|
|
28030
|
+
return _context4.stop();
|
|
27928
28031
|
}
|
|
27929
|
-
},
|
|
28032
|
+
}, _callee3, this, [[3, 30, 33, 36], [8, 20, 23, 26]]);
|
|
27930
28033
|
}));
|
|
27931
|
-
function
|
|
27932
|
-
return
|
|
28034
|
+
function getCustomDimsFromCostructionService() {
|
|
28035
|
+
return _getCustomDimsFromCostructionService.apply(this, arguments);
|
|
27933
28036
|
}
|
|
27934
|
-
return
|
|
28037
|
+
return getCustomDimsFromCostructionService;
|
|
27935
28038
|
}()
|
|
28039
|
+
}, {
|
|
28040
|
+
key: "getCustomDimsFromConfig",
|
|
28041
|
+
value: function getCustomDimsFromConfig() {
|
|
28042
|
+
var articles = this.getDivaArticles(true, true);
|
|
28043
|
+
var cleanedDimensions = [];
|
|
28044
|
+
for (var basketId in articles) {
|
|
28045
|
+
var artice = articles[basketId];
|
|
28046
|
+
var _loop2 = function _loop2() {
|
|
28047
|
+
var ops = artice.articleOptionStates[opt];
|
|
28048
|
+
if (ops.customDimension) {
|
|
28049
|
+
var _DivaUtils$getValueFr = DivaUtils.getValueFromName(ops.val.name),
|
|
28050
|
+
_DivaUtils$getValueFr2 = _DivaUtils$getValueFr.unit,
|
|
28051
|
+
unit = _DivaUtils$getValueFr2 === void 0 ? 'cm' : _DivaUtils$getValueFr2,
|
|
28052
|
+
value = _DivaUtils$getValueFr.value;
|
|
28053
|
+
if (value !== undefined) {
|
|
28054
|
+
var dim = cleanedDimensions.find(function (d) {
|
|
28055
|
+
return d.dimension == value && d.dimensionId == ops.optionCodex;
|
|
28056
|
+
});
|
|
28057
|
+
if (dim) {
|
|
28058
|
+
dim.basketIds.push(artice.basketId);
|
|
28059
|
+
dim.posNrs.push(artice.posNr);
|
|
28060
|
+
} else {
|
|
28061
|
+
cleanedDimensions.push({
|
|
28062
|
+
unit: unit,
|
|
28063
|
+
dimension: value,
|
|
28064
|
+
text: ops.option.name,
|
|
28065
|
+
dimensionId: ops.optionCodex,
|
|
28066
|
+
basketIds: [artice.basketId],
|
|
28067
|
+
posNrs: [artice.posNr]
|
|
28068
|
+
});
|
|
28069
|
+
}
|
|
28070
|
+
}
|
|
28071
|
+
}
|
|
28072
|
+
};
|
|
28073
|
+
for (var opt in artice.articleOptionStates) {
|
|
28074
|
+
_loop2();
|
|
28075
|
+
}
|
|
28076
|
+
}
|
|
28077
|
+
return cleanedDimensions;
|
|
28078
|
+
}
|
|
27936
28079
|
}, {
|
|
27937
28080
|
key: "getArticleVariantValues",
|
|
27938
28081
|
value: function getArticleVariantValues() {
|
|
@@ -28348,28 +28491,28 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28348
28491
|
}, {
|
|
28349
28492
|
key: "initializeDoorPlanner",
|
|
28350
28493
|
value: function () {
|
|
28351
|
-
var _initializeDoorPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
28494
|
+
var _initializeDoorPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(j3D, article) {
|
|
28352
28495
|
var _yield$import, DoorPlanner;
|
|
28353
|
-
return _regeneratorRuntime.wrap(function
|
|
28354
|
-
while (1) switch (
|
|
28496
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
28497
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
28355
28498
|
case 0:
|
|
28356
28499
|
if (this.doorPlannerHandler) {
|
|
28357
|
-
|
|
28500
|
+
_context5.next = 6;
|
|
28358
28501
|
break;
|
|
28359
28502
|
}
|
|
28360
|
-
|
|
28361
|
-
return import('./DoorPlanner-
|
|
28503
|
+
_context5.next = 3;
|
|
28504
|
+
return import('./DoorPlanner-118ad615.js');
|
|
28362
28505
|
case 3:
|
|
28363
|
-
_yield$import =
|
|
28506
|
+
_yield$import = _context5.sent;
|
|
28364
28507
|
DoorPlanner = _yield$import["default"];
|
|
28365
28508
|
this.doorPlannerHandler = new DoorPlanner();
|
|
28366
28509
|
case 6:
|
|
28367
28510
|
this.doorPlannerHandler.initializeArticles(j3D, article);
|
|
28368
28511
|
case 7:
|
|
28369
28512
|
case "end":
|
|
28370
|
-
return
|
|
28513
|
+
return _context5.stop();
|
|
28371
28514
|
}
|
|
28372
|
-
},
|
|
28515
|
+
}, _callee4, this);
|
|
28373
28516
|
}));
|
|
28374
28517
|
function initializeDoorPlanner(_x5, _x6) {
|
|
28375
28518
|
return _initializeDoorPlanner.apply(this, arguments);
|
|
@@ -33447,7 +33590,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33447
33590
|
value: function () {
|
|
33448
33591
|
var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
|
|
33449
33592
|
var _set$getMatchingProdu2, _set$getMatchingProdu3;
|
|
33450
|
-
var orderSets, basketData, set,
|
|
33593
|
+
var orderSets, basketData, set, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, customDimensions, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
|
|
33451
33594
|
return _regeneratorRuntime.wrap(function _callee28$(_context30) {
|
|
33452
33595
|
while (1) switch (_context30.prev = _context30.next) {
|
|
33453
33596
|
case 0:
|
|
@@ -33455,7 +33598,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33455
33598
|
basketData = divaBasketHandler.actBasket;
|
|
33456
33599
|
set = this.actSet(sets); //ACHTUNG: Wenn man das nicht zuerst löscht, gibt es beim wiederholten basket Speichern doppelte Einträge
|
|
33457
33600
|
basketData.setSAPOrderLines([]);
|
|
33458
|
-
setPosNr = 0;
|
|
33459
33601
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
33460
33602
|
// TODO: this need a better solution, to be decided with mathias
|
|
33461
33603
|
if (!((_set$getMatchingProdu = set.getMatchingProduct()) !== null && _set$getMatchingProdu !== void 0 && _set$getMatchingProdu._id)) basketData.OrigProductId = undefined;
|
|
@@ -33463,29 +33605,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33463
33605
|
basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
|
|
33464
33606
|
basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
|
|
33465
33607
|
_context30.t0 = _regeneratorRuntime.keys(sets);
|
|
33466
|
-
case
|
|
33608
|
+
case 8:
|
|
33467
33609
|
if ((_context30.t1 = _context30.t0()).done) {
|
|
33468
|
-
_context30.next =
|
|
33610
|
+
_context30.next = 32;
|
|
33469
33611
|
break;
|
|
33470
33612
|
}
|
|
33471
33613
|
key = _context30.t1.value;
|
|
33472
|
-
setPosNr++;
|
|
33473
33614
|
_set = sets[key];
|
|
33474
33615
|
catalogData = _set.CatalogData;
|
|
33475
33616
|
articles = _set.getDivaArticles();
|
|
33476
|
-
_context30.next =
|
|
33477
|
-
return this.getOrderSet(_set, catalogData,
|
|
33478
|
-
case
|
|
33617
|
+
_context30.next = 15;
|
|
33618
|
+
return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
|
|
33619
|
+
case 15:
|
|
33479
33620
|
newOrderSet = _context30.sent;
|
|
33480
33621
|
basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
|
|
33481
|
-
|
|
33622
|
+
_context30.next = 19;
|
|
33623
|
+
return _set.getCustomDimensionsOfActSet();
|
|
33624
|
+
case 19:
|
|
33625
|
+
customDimensions = _context30.sent;
|
|
33626
|
+
OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
|
|
33482
33627
|
articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
|
|
33483
33628
|
if (OrderLinesOfActSet.length) {
|
|
33484
|
-
_context30.next =
|
|
33629
|
+
_context30.next = 24;
|
|
33485
33630
|
break;
|
|
33486
33631
|
}
|
|
33487
|
-
return _context30.abrupt("continue",
|
|
33488
|
-
case
|
|
33632
|
+
return _context30.abrupt("continue", 8);
|
|
33633
|
+
case 24:
|
|
33489
33634
|
OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
|
|
33490
33635
|
if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
|
|
33491
33636
|
newOrderSet.SetImage = OrderLinesOfActSet[0].Image.replace('_low', '');
|
|
@@ -33506,44 +33651,44 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33506
33651
|
}
|
|
33507
33652
|
newOrderSet.setOrderLines(OrderLinesOfActSet);
|
|
33508
33653
|
orderSets.push(newOrderSet);
|
|
33509
|
-
_context30.next =
|
|
33654
|
+
_context30.next = 8;
|
|
33510
33655
|
break;
|
|
33511
|
-
case
|
|
33656
|
+
case 32:
|
|
33512
33657
|
//fill diva3DProject for renderings & AR Converter
|
|
33513
33658
|
basketData.Diva3DProject = DivaUtils.encodeBase64(set === null || set === void 0 ? void 0 : set.plannerHandler.getProject3D());
|
|
33514
33659
|
i = 0;
|
|
33515
|
-
case
|
|
33660
|
+
case 34:
|
|
33516
33661
|
if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
|
|
33517
|
-
_context30.next =
|
|
33662
|
+
_context30.next = 49;
|
|
33518
33663
|
break;
|
|
33519
33664
|
}
|
|
33520
33665
|
oderSetsIsInActPlanning = false;
|
|
33521
33666
|
setId = basketData.OrderSets[i].SetID;
|
|
33522
33667
|
j = 0;
|
|
33523
|
-
case
|
|
33668
|
+
case 38:
|
|
33524
33669
|
if (!(j < orderSets.length)) {
|
|
33525
|
-
_context30.next =
|
|
33670
|
+
_context30.next = 45;
|
|
33526
33671
|
break;
|
|
33527
33672
|
}
|
|
33528
33673
|
if (!(orderSets[j].SetID == setId)) {
|
|
33529
|
-
_context30.next =
|
|
33674
|
+
_context30.next = 42;
|
|
33530
33675
|
break;
|
|
33531
33676
|
}
|
|
33532
33677
|
oderSetsIsInActPlanning = true;
|
|
33533
|
-
return _context30.abrupt("break",
|
|
33534
|
-
case
|
|
33678
|
+
return _context30.abrupt("break", 45);
|
|
33679
|
+
case 42:
|
|
33535
33680
|
j++;
|
|
33536
|
-
_context30.next =
|
|
33681
|
+
_context30.next = 38;
|
|
33537
33682
|
break;
|
|
33538
|
-
case
|
|
33683
|
+
case 45:
|
|
33539
33684
|
if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
|
|
33540
33685
|
orderSets.push(basketData.OrderSets[i]);
|
|
33541
33686
|
}
|
|
33542
|
-
case
|
|
33687
|
+
case 46:
|
|
33543
33688
|
i++;
|
|
33544
|
-
_context30.next =
|
|
33689
|
+
_context30.next = 34;
|
|
33545
33690
|
break;
|
|
33546
|
-
case
|
|
33691
|
+
case 49:
|
|
33547
33692
|
basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
|
|
33548
33693
|
if (repairOnly) {
|
|
33549
33694
|
this.repairOrderSets(basketData, orderSets);
|
|
@@ -33551,7 +33696,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33551
33696
|
basketData.setOrderSets(orderSets);
|
|
33552
33697
|
}
|
|
33553
33698
|
return _context30.abrupt("return", basketData);
|
|
33554
|
-
case
|
|
33699
|
+
case 52:
|
|
33555
33700
|
case "end":
|
|
33556
33701
|
return _context30.stop();
|
|
33557
33702
|
}
|
|
@@ -33641,7 +33786,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33641
33786
|
}, {
|
|
33642
33787
|
key: "getOrderSet",
|
|
33643
33788
|
value: function () {
|
|
33644
|
-
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, catalogData,
|
|
33789
|
+
var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, catalogData, divaNr, repairOnly, returnTo) {
|
|
33645
33790
|
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
33646
33791
|
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33647
33792
|
return _regeneratorRuntime.wrap(function _callee29$(_context31) {
|
|
@@ -33748,7 +33893,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33748
33893
|
}
|
|
33749
33894
|
}, _callee29, this);
|
|
33750
33895
|
}));
|
|
33751
|
-
function getOrderSet(_x111, _x112, _x113, _x114, _x115
|
|
33896
|
+
function getOrderSet(_x111, _x112, _x113, _x114, _x115) {
|
|
33752
33897
|
return _getOrderSet.apply(this, arguments);
|
|
33753
33898
|
}
|
|
33754
33899
|
return getOrderSet;
|
|
@@ -33798,7 +33943,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33798
33943
|
}
|
|
33799
33944
|
}, _callee30);
|
|
33800
33945
|
}));
|
|
33801
|
-
function getSetImage(
|
|
33946
|
+
function getSetImage(_x116, _x117) {
|
|
33802
33947
|
return _getSetImage.apply(this, arguments);
|
|
33803
33948
|
}
|
|
33804
33949
|
return getSetImage;
|
|
@@ -33844,7 +33989,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33844
33989
|
}
|
|
33845
33990
|
}, _callee31);
|
|
33846
33991
|
}));
|
|
33847
|
-
function getHQRenderScript(
|
|
33992
|
+
function getHQRenderScript(_x118, _x119) {
|
|
33848
33993
|
return _getHQRenderScript.apply(this, arguments);
|
|
33849
33994
|
}
|
|
33850
33995
|
return getHQRenderScript;
|
|
@@ -33885,7 +34030,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33885
34030
|
}
|
|
33886
34031
|
}, _callee32);
|
|
33887
34032
|
}));
|
|
33888
|
-
function getAlternateSetImages(
|
|
34033
|
+
function getAlternateSetImages(_x120) {
|
|
33889
34034
|
return _getAlternateSetImages.apply(this, arguments);
|
|
33890
34035
|
}
|
|
33891
34036
|
return getAlternateSetImages;
|
|
@@ -33916,7 +34061,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33916
34061
|
}
|
|
33917
34062
|
}, _callee33);
|
|
33918
34063
|
}));
|
|
33919
|
-
function get2DSetImage(
|
|
34064
|
+
function get2DSetImage(_x121) {
|
|
33920
34065
|
return _get2DSetImage.apply(this, arguments);
|
|
33921
34066
|
}
|
|
33922
34067
|
return get2DSetImage;
|
|
@@ -33924,7 +34069,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33924
34069
|
}, {
|
|
33925
34070
|
key: "getBBoxObject",
|
|
33926
34071
|
value: function getBBoxObject(set, dimensions) {
|
|
33927
|
-
var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n
|
|
34072
|
+
var _dimensions$w, _dimensions$d, _dimensions$h, _set$api$getI18n, _t, _t2, _t3;
|
|
33928
34073
|
var bbox = set.plannerHandler.getSetBoundingBox(set.getSetId());
|
|
33929
34074
|
var dim = {
|
|
33930
34075
|
X: (_dimensions$w = dimensions === null || dimensions === void 0 ? void 0 : dimensions.w) !== null && _dimensions$w !== void 0 ? _dimensions$w : bbox.width,
|
|
@@ -33937,8 +34082,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33937
34082
|
dim.Y = article === null || article === void 0 ? void 0 : article.depth;
|
|
33938
34083
|
dim.Z = article === null || article === void 0 ? void 0 : article.height;
|
|
33939
34084
|
}
|
|
34085
|
+
var t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 ? void 0 : _set$api$getI18n.t;
|
|
33940
34086
|
return _objectSpread$9(_objectSpread$9({}, dim), {}, {
|
|
33941
|
-
Info: ((
|
|
34087
|
+
Info: ((_t = t === null || t === void 0 ? void 0 : t('utils.width_first_letter', 'B')) !== null && _t !== void 0 ? _t : 'B') + ': ' + dim.X + ' cm x ' + ((_t2 = t === null || t === void 0 ? void 0 : t('utils.depth_first_letter', 'T')) !== null && _t2 !== void 0 ? _t2 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_t3 = t === null || t === void 0 ? void 0 : t('utils.height_first_letter', 'H')) !== null && _t3 !== void 0 ? _t3 : 'H') + ': ' + dim.Z + ' cm' : '')
|
|
33942
34088
|
});
|
|
33943
34089
|
}
|
|
33944
34090
|
}, {
|
|
@@ -33973,7 +34119,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33973
34119
|
}
|
|
33974
34120
|
}, _callee34, this);
|
|
33975
34121
|
}));
|
|
33976
|
-
function addOrderSetArticlesToExistingSet(_x123, _x124
|
|
34122
|
+
function addOrderSetArticlesToExistingSet(_x122, _x123, _x124) {
|
|
33977
34123
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
33978
34124
|
}
|
|
33979
34125
|
return addOrderSetArticlesToExistingSet;
|
|
@@ -35024,7 +35170,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35024
35170
|
break;
|
|
35025
35171
|
case 3:
|
|
35026
35172
|
_context12.next = 5;
|
|
35027
|
-
return import('./PfisterWWSHandler-
|
|
35173
|
+
return import('./PfisterWWSHandler-e145a282.js');
|
|
35028
35174
|
case 5:
|
|
35029
35175
|
_yield$import = _context12.sent;
|
|
35030
35176
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35032,7 +35178,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35032
35178
|
return _context12.abrupt("break", 27);
|
|
35033
35179
|
case 9:
|
|
35034
35180
|
_context12.next = 11;
|
|
35035
|
-
return import('./LiviqueWWSHandler-
|
|
35181
|
+
return import('./LiviqueWWSHandler-bba23de8.js');
|
|
35036
35182
|
case 11:
|
|
35037
35183
|
_yield$import2 = _context12.sent;
|
|
35038
35184
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35040,7 +35186,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35040
35186
|
return _context12.abrupt("break", 27);
|
|
35041
35187
|
case 15:
|
|
35042
35188
|
_context12.next = 17;
|
|
35043
|
-
return import('./SeriousBasketHandler-
|
|
35189
|
+
return import('./SeriousBasketHandler-caf2fa7b.js');
|
|
35044
35190
|
case 17:
|
|
35045
35191
|
_yield$import3 = _context12.sent;
|
|
35046
35192
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35048,7 +35194,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35048
35194
|
return _context12.abrupt("break", 27);
|
|
35049
35195
|
case 21:
|
|
35050
35196
|
_context12.next = 23;
|
|
35051
|
-
return import('./StandardWWSHandler-
|
|
35197
|
+
return import('./StandardWWSHandler-c5bba7ad.js');
|
|
35052
35198
|
case 23:
|
|
35053
35199
|
_yield$import4 = _context12.sent;
|
|
35054
35200
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -36489,7 +36635,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36489
36635
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36490
36636
|
case 0:
|
|
36491
36637
|
_context3.next = 2;
|
|
36492
|
-
return import('./Host3DSignalR-
|
|
36638
|
+
return import('./Host3DSignalR-ca201810.js');
|
|
36493
36639
|
case 2:
|
|
36494
36640
|
_yield$import = _context3.sent;
|
|
36495
36641
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -37080,7 +37226,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37080
37226
|
} : undefined
|
|
37081
37227
|
});
|
|
37082
37228
|
if (hybridInfo !== null && hybridInfo !== void 0 && hybridInfo.currentCamera) this.currentCamera = hybridInfo === null || hybridInfo === void 0 ? void 0 : hybridInfo.currentCamera;
|
|
37083
|
-
|
|
37229
|
+
this.latestHybridInfo = hybridInfo;
|
|
37084
37230
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
37085
37231
|
_context7.next = 32;
|
|
37086
37232
|
break;
|
|
@@ -38045,7 +38191,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38045
38191
|
break;
|
|
38046
38192
|
case 8:
|
|
38047
38193
|
_context4.next = 10;
|
|
38048
|
-
return import('./DivaStandardPlanner-
|
|
38194
|
+
return import('./DivaStandardPlanner-4e111a6c.js');
|
|
38049
38195
|
case 10:
|
|
38050
38196
|
_yield$import = _context4.sent;
|
|
38051
38197
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38056,7 +38202,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38056
38202
|
return _context4.abrupt("break", 21);
|
|
38057
38203
|
case 15:
|
|
38058
38204
|
_context4.next = 17;
|
|
38059
|
-
return import('./DivaBoxPlanner-
|
|
38205
|
+
return import('./DivaBoxPlanner-72c6a6ad.js');
|
|
38060
38206
|
case 17:
|
|
38061
38207
|
_yield$import2 = _context4.sent;
|
|
38062
38208
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -40014,29 +40160,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40014
40160
|
var _this$actSet3;
|
|
40015
40161
|
return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
|
|
40016
40162
|
}
|
|
40017
|
-
}, {
|
|
40018
|
-
key: "getDimension",
|
|
40019
|
-
value: function () {
|
|
40020
|
-
var _getDimension = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40021
|
-
var _this$actSet4;
|
|
40022
|
-
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40023
|
-
while (1) switch (_context14.prev = _context14.next) {
|
|
40024
|
-
case 0:
|
|
40025
|
-
_context14.next = 2;
|
|
40026
|
-
return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
|
|
40027
|
-
case 2:
|
|
40028
|
-
return _context14.abrupt("return", _context14.sent);
|
|
40029
|
-
case 3:
|
|
40030
|
-
case "end":
|
|
40031
|
-
return _context14.stop();
|
|
40032
|
-
}
|
|
40033
|
-
}, _callee14, this);
|
|
40034
|
-
}));
|
|
40035
|
-
function getDimension() {
|
|
40036
|
-
return _getDimension.apply(this, arguments);
|
|
40037
|
-
}
|
|
40038
|
-
return getDimension;
|
|
40039
|
-
}()
|
|
40040
40163
|
}, {
|
|
40041
40164
|
key: "getHiddenOptions",
|
|
40042
40165
|
value: function getHiddenOptions() {
|
|
@@ -40056,23 +40179,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40056
40179
|
}, {
|
|
40057
40180
|
key: "initView",
|
|
40058
40181
|
value: (function () {
|
|
40059
|
-
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40182
|
+
var _initView = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
40060
40183
|
var set, plannerMode, _this$initConfigurato, _this$initPlannerView, _this$initConfigurato2, _this$updateViewPlann9;
|
|
40061
|
-
return _regeneratorRuntime.wrap(function
|
|
40062
|
-
while (1) switch (
|
|
40184
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
40185
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
40063
40186
|
case 0:
|
|
40064
40187
|
set = this.actSet();
|
|
40065
40188
|
plannerMode = this.getPlannerMode();
|
|
40066
40189
|
this.initConfiguratorMode(plannerMode);
|
|
40067
40190
|
if (!(plannerMode == 'ProductList')) {
|
|
40068
|
-
|
|
40191
|
+
_context14.next = 7;
|
|
40069
40192
|
break;
|
|
40070
40193
|
}
|
|
40071
40194
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
40072
|
-
|
|
40195
|
+
_context14.next = 17;
|
|
40073
40196
|
break;
|
|
40074
40197
|
case 7:
|
|
40075
|
-
|
|
40198
|
+
_context14.next = 9;
|
|
40076
40199
|
return (_this$initPlannerView = this.initPlannerView) === null || _this$initPlannerView === void 0 ? void 0 : _this$initPlannerView.call(this);
|
|
40077
40200
|
case 9:
|
|
40078
40201
|
//first load the Configuratorstructure STARTCONFIG
|
|
@@ -40086,13 +40209,13 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40086
40209
|
this.onBasketInitialized();
|
|
40087
40210
|
this.checkMatchingProducts('onInit');
|
|
40088
40211
|
case 17:
|
|
40089
|
-
|
|
40212
|
+
_context14.next = 19;
|
|
40090
40213
|
return this.runInitMode(plannerMode);
|
|
40091
40214
|
case 19:
|
|
40092
40215
|
case "end":
|
|
40093
|
-
return
|
|
40216
|
+
return _context14.stop();
|
|
40094
40217
|
}
|
|
40095
|
-
},
|
|
40218
|
+
}, _callee14, this);
|
|
40096
40219
|
}));
|
|
40097
40220
|
function initView() {
|
|
40098
40221
|
return _initView.apply(this, arguments);
|
|
@@ -40102,8 +40225,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40102
40225
|
}, {
|
|
40103
40226
|
key: "updateWebConfiguratorTitle",
|
|
40104
40227
|
value: function updateWebConfiguratorTitle() {
|
|
40105
|
-
var _this$setWebConifgura, _this$
|
|
40106
|
-
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$
|
|
40228
|
+
var _this$setWebConifgura, _this$actSet4;
|
|
40229
|
+
(_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getSetTitle());
|
|
40107
40230
|
}
|
|
40108
40231
|
}, {
|
|
40109
40232
|
key: "updateConfigStructure",
|
|
@@ -40113,25 +40236,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40113
40236
|
}, {
|
|
40114
40237
|
key: "runInitMode",
|
|
40115
40238
|
value: function () {
|
|
40116
|
-
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40117
|
-
var doDefault, _this$navigateToTabGr2, configStepKey, _this$
|
|
40118
|
-
return _regeneratorRuntime.wrap(function
|
|
40119
|
-
while (1) switch (
|
|
40239
|
+
var _runInitMode = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(plannerMode) {
|
|
40240
|
+
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
40241
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
40242
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
40120
40243
|
case 0:
|
|
40121
40244
|
doDefault = true;
|
|
40122
40245
|
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
40123
|
-
|
|
40246
|
+
_context15.next = 10;
|
|
40124
40247
|
break;
|
|
40125
40248
|
}
|
|
40126
40249
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
40127
40250
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
40128
40251
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
40129
40252
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
40130
|
-
|
|
40253
|
+
_context15.next = 7;
|
|
40131
40254
|
return this.saveToBasketWrapper();
|
|
40132
40255
|
case 7:
|
|
40133
40256
|
doDefault = false;
|
|
40134
|
-
|
|
40257
|
+
_context15.next = 11;
|
|
40135
40258
|
break;
|
|
40136
40259
|
case 10:
|
|
40137
40260
|
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER') {
|
|
@@ -40147,7 +40270,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40147
40270
|
if (doDefault) {
|
|
40148
40271
|
if (plannerMode == 'ProductList') {
|
|
40149
40272
|
(_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
|
|
40150
|
-
} else if ((_this$
|
|
40273
|
+
} else if ((_this$actSet5 = this.actSet()) !== null && _this$actSet5 !== void 0 && _this$actSet5.hasStaticRoomList) {
|
|
40151
40274
|
(_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
|
|
40152
40275
|
} else {
|
|
40153
40276
|
(_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
|
|
@@ -40155,9 +40278,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40155
40278
|
}
|
|
40156
40279
|
case 12:
|
|
40157
40280
|
case "end":
|
|
40158
|
-
return
|
|
40281
|
+
return _context15.stop();
|
|
40159
40282
|
}
|
|
40160
|
-
},
|
|
40283
|
+
}, _callee15, this);
|
|
40161
40284
|
}));
|
|
40162
40285
|
function runInitMode(_x47) {
|
|
40163
40286
|
return _runInitMode.apply(this, arguments);
|
|
@@ -40167,16 +40290,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40167
40290
|
}, {
|
|
40168
40291
|
key: "addSetToActPlanningByDivaNr",
|
|
40169
40292
|
value: function () {
|
|
40170
|
-
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40293
|
+
var _addSetToActPlanningByDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(divaNr) {
|
|
40171
40294
|
var _this$updateViewPlann10;
|
|
40172
40295
|
var set, orderSets, i, orderset, lastSetToInitialize, loadedSet, articlesKeys;
|
|
40173
|
-
return _regeneratorRuntime.wrap(function
|
|
40174
|
-
while (1) switch (
|
|
40296
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
40297
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
40175
40298
|
case 0:
|
|
40176
40299
|
set = this.actSet();
|
|
40177
40300
|
this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
40178
40301
|
this.divaBasketHandler.setIgnoreInitObjectWhenInitializing();
|
|
40179
|
-
|
|
40302
|
+
_context16.next = 5;
|
|
40180
40303
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
40181
40304
|
case 5:
|
|
40182
40305
|
orderSets = this.divaBasketHandler.actBasket.OrderSets;
|
|
@@ -40184,30 +40307,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40184
40307
|
i = 0;
|
|
40185
40308
|
case 8:
|
|
40186
40309
|
if (!(i < orderSets.length)) {
|
|
40187
|
-
|
|
40310
|
+
_context16.next = 24;
|
|
40188
40311
|
break;
|
|
40189
40312
|
}
|
|
40190
40313
|
orderset = orderSets[i];
|
|
40191
40314
|
lastSetToInitialize = setHandlerInstance.getOrderSetShouldInitPlanner(orderSets, i);
|
|
40192
40315
|
loadedSet = setHandlerInstance.findLoadedSet(this.sets, orderset.CatalogCodex, orderset.AccountGUID);
|
|
40193
40316
|
if (!loadedSet) {
|
|
40194
|
-
|
|
40317
|
+
_context16.next = 18;
|
|
40195
40318
|
break;
|
|
40196
40319
|
}
|
|
40197
|
-
|
|
40320
|
+
_context16.next = 15;
|
|
40198
40321
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
40199
40322
|
case 15:
|
|
40200
40323
|
this.checkMatchingProducts('onAdd');
|
|
40201
|
-
|
|
40324
|
+
_context16.next = 20;
|
|
40202
40325
|
break;
|
|
40203
40326
|
case 18:
|
|
40204
|
-
|
|
40327
|
+
_context16.next = 20;
|
|
40205
40328
|
return setHandlerInstance.initSet(orderset, this.getInitStateForSet(), lastSetToInitialize);
|
|
40206
40329
|
case 20:
|
|
40207
40330
|
this.cleanUpEmptySets(true);
|
|
40208
40331
|
case 21:
|
|
40209
40332
|
i++;
|
|
40210
|
-
|
|
40333
|
+
_context16.next = 8;
|
|
40211
40334
|
break;
|
|
40212
40335
|
case 24:
|
|
40213
40336
|
this.divaBasketHandler.actBasket.OrderSets = [];
|
|
@@ -40219,9 +40342,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40219
40342
|
this.loadPaletteInfos(undefined, [articlesKeys[0]], articlesKeys);
|
|
40220
40343
|
case 31:
|
|
40221
40344
|
case "end":
|
|
40222
|
-
return
|
|
40345
|
+
return _context16.stop();
|
|
40223
40346
|
}
|
|
40224
|
-
},
|
|
40347
|
+
}, _callee16, this);
|
|
40225
40348
|
}));
|
|
40226
40349
|
function addSetToActPlanningByDivaNr(_x48) {
|
|
40227
40350
|
return _addSetToActPlanningByDivaNr.apply(this, arguments);
|
|
@@ -40256,26 +40379,26 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40256
40379
|
}, {
|
|
40257
40380
|
key: "setActSetCurConfigStepKey",
|
|
40258
40381
|
value: function () {
|
|
40259
|
-
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40382
|
+
var _setActSetCurConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(curConfigStepKey) {
|
|
40260
40383
|
var set;
|
|
40261
|
-
return _regeneratorRuntime.wrap(function
|
|
40262
|
-
while (1) switch (
|
|
40384
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
40385
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
40263
40386
|
case 0:
|
|
40264
40387
|
set = this.actSet();
|
|
40265
40388
|
if (set) {
|
|
40266
|
-
|
|
40389
|
+
_context17.next = 3;
|
|
40267
40390
|
break;
|
|
40268
40391
|
}
|
|
40269
|
-
return
|
|
40392
|
+
return _context17.abrupt("return");
|
|
40270
40393
|
case 3:
|
|
40271
40394
|
set.ActConfigStepKey = curConfigStepKey;
|
|
40272
|
-
|
|
40395
|
+
_context17.next = 6;
|
|
40273
40396
|
return setHandlerInstance.updateNavigation(set);
|
|
40274
40397
|
case 6:
|
|
40275
40398
|
case "end":
|
|
40276
|
-
return
|
|
40399
|
+
return _context17.stop();
|
|
40277
40400
|
}
|
|
40278
|
-
},
|
|
40401
|
+
}, _callee17, this);
|
|
40279
40402
|
}));
|
|
40280
40403
|
function setActSetCurConfigStepKey(_x49) {
|
|
40281
40404
|
return _setActSetCurConfigStepKey.apply(this, arguments);
|
|
@@ -40406,8 +40529,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40406
40529
|
}, {
|
|
40407
40530
|
key: "getAlternateRenderingsForSummary",
|
|
40408
40531
|
value: function getAlternateRenderingsForSummary() {
|
|
40409
|
-
var _this$
|
|
40410
|
-
return (_this$
|
|
40532
|
+
var _this$actSet6;
|
|
40533
|
+
return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 || (_this$actSet6 = _this$actSet6.CatalogData) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.alternateRenderingsForSummary;
|
|
40411
40534
|
}
|
|
40412
40535
|
}, {
|
|
40413
40536
|
key: "destroyWebPlanner",
|
|
@@ -40426,17 +40549,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40426
40549
|
}, {
|
|
40427
40550
|
key: "deletePlannerElement",
|
|
40428
40551
|
value: function () {
|
|
40429
|
-
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40552
|
+
var _deletePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(setId, elementId, denyElementSelectionClear) {
|
|
40430
40553
|
var _this$updateViewPlann11;
|
|
40431
40554
|
var set, result, _this$updateElementSe5, _this$updateElementSe6;
|
|
40432
|
-
return _regeneratorRuntime.wrap(function
|
|
40433
|
-
while (1) switch (
|
|
40555
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
40556
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
40434
40557
|
case 0:
|
|
40435
40558
|
set = this.sets[setId];
|
|
40436
|
-
|
|
40559
|
+
_context18.next = 3;
|
|
40437
40560
|
return setHandlerInstance.deleteElementFromSetByElemId(set, elementId, true);
|
|
40438
40561
|
case 3:
|
|
40439
|
-
result =
|
|
40562
|
+
result = _context18.sent;
|
|
40440
40563
|
this.updateConfigStructure();
|
|
40441
40564
|
(_this$updateViewPlann11 = this.updateViewPlannerElements) === null || _this$updateViewPlann11 === void 0 || _this$updateViewPlann11.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40442
40565
|
this.updatePlannerView('DELETE_PLANNER_ELEMENT');
|
|
@@ -40447,15 +40570,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40447
40570
|
}
|
|
40448
40571
|
this.updatePriceInView();
|
|
40449
40572
|
this.checkMatchingProducts('onDelete');
|
|
40450
|
-
|
|
40573
|
+
_context18.next = 14;
|
|
40451
40574
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40452
40575
|
case 14:
|
|
40453
40576
|
this.plannerChangeLog('onDeletePlanner');
|
|
40454
40577
|
case 15:
|
|
40455
40578
|
case "end":
|
|
40456
|
-
return
|
|
40579
|
+
return _context18.stop();
|
|
40457
40580
|
}
|
|
40458
|
-
},
|
|
40581
|
+
}, _callee18, this);
|
|
40459
40582
|
}));
|
|
40460
40583
|
function deletePlannerElement(_x50, _x51, _x52) {
|
|
40461
40584
|
return _deletePlannerElement.apply(this, arguments);
|
|
@@ -40471,17 +40594,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40471
40594
|
}, {
|
|
40472
40595
|
key: "copyPlannerElement",
|
|
40473
40596
|
value: (function () {
|
|
40474
|
-
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40597
|
+
var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(setId, elementId, curConfigKey, copyInfo) {
|
|
40475
40598
|
var _this$updateViewPlann12;
|
|
40476
40599
|
var set, newSelectedArticle, newConfigStepKey, _this$updateElementSe7, baseArticle;
|
|
40477
|
-
return _regeneratorRuntime.wrap(function
|
|
40478
|
-
while (1) switch (
|
|
40600
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
40601
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
40479
40602
|
case 0:
|
|
40480
40603
|
set = this.sets[setId];
|
|
40481
|
-
|
|
40604
|
+
_context19.next = 3;
|
|
40482
40605
|
return setHandlerInstance.copyPlannerElement(set, elementId, copyInfo);
|
|
40483
40606
|
case 3:
|
|
40484
|
-
newSelectedArticle =
|
|
40607
|
+
newSelectedArticle = _context19.sent;
|
|
40485
40608
|
this.updateConfigStructure();
|
|
40486
40609
|
(_this$updateViewPlann12 = this.updateViewPlannerElements) === null || _this$updateViewPlann12 === void 0 || _this$updateViewPlann12.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
40487
40610
|
this.updatePlannerView('COPY_PLANNER_ELEMENT');
|
|
@@ -40495,12 +40618,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40495
40618
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40496
40619
|
}
|
|
40497
40620
|
this.checkMatchingProducts('onCopy');
|
|
40498
|
-
return
|
|
40621
|
+
return _context19.abrupt("return", newConfigStepKey);
|
|
40499
40622
|
case 13:
|
|
40500
40623
|
case "end":
|
|
40501
|
-
return
|
|
40624
|
+
return _context19.stop();
|
|
40502
40625
|
}
|
|
40503
|
-
},
|
|
40626
|
+
}, _callee19, this);
|
|
40504
40627
|
}));
|
|
40505
40628
|
function copyPlannerElement(_x53, _x54, _x55, _x56) {
|
|
40506
40629
|
return _copyPlannerElement.apply(this, arguments);
|
|
@@ -40531,33 +40654,33 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40531
40654
|
}, {
|
|
40532
40655
|
key: "getFreePlacesOnGrids",
|
|
40533
40656
|
value: function () {
|
|
40534
|
-
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40657
|
+
var _getFreePlacesOnGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(gridGroup, from) {
|
|
40535
40658
|
var _this$updateFreePlace;
|
|
40536
40659
|
var set, freeShelfGrids, plannedShelfGrids;
|
|
40537
|
-
return _regeneratorRuntime.wrap(function
|
|
40538
|
-
while (1) switch (
|
|
40660
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
40661
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
40539
40662
|
case 0:
|
|
40540
40663
|
set = this.actSet();
|
|
40541
40664
|
if (set) {
|
|
40542
|
-
|
|
40665
|
+
_context20.next = 3;
|
|
40543
40666
|
break;
|
|
40544
40667
|
}
|
|
40545
40668
|
throw new Error('getFreePlacesOnGrids: act set is not defined!');
|
|
40546
40669
|
case 3:
|
|
40547
40670
|
if (!gridGroup) {
|
|
40548
|
-
|
|
40671
|
+
_context20.next = 9;
|
|
40549
40672
|
break;
|
|
40550
40673
|
}
|
|
40551
|
-
|
|
40674
|
+
_context20.next = 6;
|
|
40552
40675
|
return setHandlerInstance.getFreeShelfGrids(set, gridGroup);
|
|
40553
40676
|
case 6:
|
|
40554
|
-
|
|
40555
|
-
|
|
40677
|
+
_context20.t0 = _context20.sent;
|
|
40678
|
+
_context20.next = 10;
|
|
40556
40679
|
break;
|
|
40557
40680
|
case 9:
|
|
40558
|
-
|
|
40681
|
+
_context20.t0 = undefined;
|
|
40559
40682
|
case 10:
|
|
40560
|
-
freeShelfGrids =
|
|
40683
|
+
freeShelfGrids = _context20.t0;
|
|
40561
40684
|
plannedShelfGrids = setHandlerInstance.getPlannedShelfGrids(set);
|
|
40562
40685
|
LOG$1.debug('TOULA', 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
40563
40686
|
LOG$1.debug('update free from: ' + from, 'freeShelfGrids', freeShelfGrids, 'plannedShelfGrids', plannedShelfGrids);
|
|
@@ -40565,15 +40688,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40565
40688
|
freeShelfGrids: freeShelfGrids,
|
|
40566
40689
|
plannedShelfGrids: plannedShelfGrids
|
|
40567
40690
|
});
|
|
40568
|
-
return
|
|
40691
|
+
return _context20.abrupt("return", {
|
|
40569
40692
|
freeShelfGrids: freeShelfGrids,
|
|
40570
40693
|
plannedShelfGrids: plannedShelfGrids
|
|
40571
40694
|
});
|
|
40572
40695
|
case 16:
|
|
40573
40696
|
case "end":
|
|
40574
|
-
return
|
|
40697
|
+
return _context20.stop();
|
|
40575
40698
|
}
|
|
40576
|
-
},
|
|
40699
|
+
}, _callee20, this);
|
|
40577
40700
|
}));
|
|
40578
40701
|
function getFreePlacesOnGrids(_x57, _x58) {
|
|
40579
40702
|
return _getFreePlacesOnGrids.apply(this, arguments);
|
|
@@ -40592,34 +40715,34 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40592
40715
|
}, {
|
|
40593
40716
|
key: "moveShelfItemToGrid",
|
|
40594
40717
|
value: function () {
|
|
40595
|
-
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40718
|
+
var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(accessoireBasketId, parentBasketId, gridName, cellIndex) {
|
|
40596
40719
|
var set, newGridId;
|
|
40597
|
-
return _regeneratorRuntime.wrap(function
|
|
40598
|
-
while (1) switch (
|
|
40720
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
40721
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
40599
40722
|
case 0:
|
|
40600
40723
|
set = this.actSet();
|
|
40601
40724
|
if (set) {
|
|
40602
|
-
|
|
40725
|
+
_context21.next = 3;
|
|
40603
40726
|
break;
|
|
40604
40727
|
}
|
|
40605
|
-
return
|
|
40728
|
+
return _context21.abrupt("return");
|
|
40606
40729
|
case 3:
|
|
40607
|
-
|
|
40730
|
+
_context21.next = 5;
|
|
40608
40731
|
return setHandlerInstance.moveShelfItemToGrid(set, accessoireBasketId, parentBasketId, gridName, cellIndex);
|
|
40609
40732
|
case 5:
|
|
40610
|
-
newGridId =
|
|
40733
|
+
newGridId = _context21.sent;
|
|
40611
40734
|
this.updatePlannerView('MOVE_SHELF_ITEM');
|
|
40612
40735
|
if (!newGridId) {
|
|
40613
|
-
|
|
40736
|
+
_context21.next = 10;
|
|
40614
40737
|
break;
|
|
40615
40738
|
}
|
|
40616
|
-
|
|
40739
|
+
_context21.next = 10;
|
|
40617
40740
|
return this.getFreePlacesOnGrids(newGridId, 'move shelf');
|
|
40618
40741
|
case 10:
|
|
40619
40742
|
case "end":
|
|
40620
|
-
return
|
|
40743
|
+
return _context21.stop();
|
|
40621
40744
|
}
|
|
40622
|
-
},
|
|
40745
|
+
}, _callee21, this);
|
|
40623
40746
|
}));
|
|
40624
40747
|
function moveShelfItemToGrid(_x59, _x60, _x61, _x62) {
|
|
40625
40748
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
@@ -40629,25 +40752,25 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40629
40752
|
}, {
|
|
40630
40753
|
key: "resetArticle",
|
|
40631
40754
|
value: function () {
|
|
40632
|
-
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40755
|
+
var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(basketId) {
|
|
40633
40756
|
var set;
|
|
40634
|
-
return _regeneratorRuntime.wrap(function
|
|
40635
|
-
while (1) switch (
|
|
40757
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
40758
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
40636
40759
|
case 0:
|
|
40637
40760
|
set = this.actSet();
|
|
40638
40761
|
if (set) {
|
|
40639
|
-
|
|
40762
|
+
_context22.next = 3;
|
|
40640
40763
|
break;
|
|
40641
40764
|
}
|
|
40642
|
-
return
|
|
40765
|
+
return _context22.abrupt("return");
|
|
40643
40766
|
case 3:
|
|
40644
|
-
|
|
40767
|
+
_context22.next = 5;
|
|
40645
40768
|
return setHandlerInstance.resetArticle(set, basketId);
|
|
40646
40769
|
case 5:
|
|
40647
40770
|
case "end":
|
|
40648
|
-
return
|
|
40771
|
+
return _context22.stop();
|
|
40649
40772
|
}
|
|
40650
|
-
},
|
|
40773
|
+
}, _callee22, this);
|
|
40651
40774
|
}));
|
|
40652
40775
|
function resetArticle(_x63) {
|
|
40653
40776
|
return _resetArticle.apply(this, arguments);
|
|
@@ -40673,16 +40796,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40673
40796
|
}, {
|
|
40674
40797
|
key: "setDifferentOptions",
|
|
40675
40798
|
value: function setDifferentOptions(options) {
|
|
40676
|
-
var _this$
|
|
40677
|
-
(_this$
|
|
40799
|
+
var _this$actSet7;
|
|
40800
|
+
(_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || _this$actSet7.setDifferentOptions(options);
|
|
40678
40801
|
}
|
|
40679
40802
|
}, {
|
|
40680
40803
|
key: "checkMatchingProducts",
|
|
40681
40804
|
value: function () {
|
|
40682
|
-
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40805
|
+
var _checkMatchingProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(from) {
|
|
40683
40806
|
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
40684
|
-
return _regeneratorRuntime.wrap(function
|
|
40685
|
-
while (1) switch (
|
|
40807
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
40808
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
40686
40809
|
case 0:
|
|
40687
40810
|
set = this.actSet();
|
|
40688
40811
|
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
@@ -40696,18 +40819,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40696
40819
|
}
|
|
40697
40820
|
}
|
|
40698
40821
|
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
40699
|
-
|
|
40822
|
+
_context23.next = 6;
|
|
40700
40823
|
break;
|
|
40701
40824
|
}
|
|
40702
|
-
|
|
40825
|
+
_context23.next = 5;
|
|
40703
40826
|
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
40704
40827
|
case 5:
|
|
40705
40828
|
this.updatePriceInView();
|
|
40706
40829
|
case 6:
|
|
40707
40830
|
case "end":
|
|
40708
|
-
return
|
|
40831
|
+
return _context23.stop();
|
|
40709
40832
|
}
|
|
40710
|
-
},
|
|
40833
|
+
}, _callee23, this);
|
|
40711
40834
|
}));
|
|
40712
40835
|
function checkMatchingProducts(_x64) {
|
|
40713
40836
|
return _checkMatchingProducts.apply(this, arguments);
|
|
@@ -40721,9 +40844,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40721
40844
|
}, {
|
|
40722
40845
|
key: "updatePriceInView",
|
|
40723
40846
|
value: function updatePriceInView() {
|
|
40724
|
-
var _this$updatePrice;
|
|
40847
|
+
var _this$updatePrice, _this$actSet8;
|
|
40725
40848
|
setHandlerInstance.getActSetPriceFormat(this.actSet());
|
|
40726
|
-
(_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets));
|
|
40849
|
+
(_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 ? void 0 : _this$actSet8.getCustomDimensionsOfActSet());
|
|
40727
40850
|
}
|
|
40728
40851
|
|
|
40729
40852
|
/**
|
|
@@ -40786,7 +40909,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40786
40909
|
}, {
|
|
40787
40910
|
key: "saveToBasketWrapper",
|
|
40788
40911
|
value: function () {
|
|
40789
|
-
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
40912
|
+
var _saveToBasketWrapper = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(event, repairOnly, force) {
|
|
40790
40913
|
var _this$actions27,
|
|
40791
40914
|
_this$actions27$toggl,
|
|
40792
40915
|
_this$actions28,
|
|
@@ -40795,8 +40918,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40795
40918
|
_this$actions32,
|
|
40796
40919
|
_this$i18n14;
|
|
40797
40920
|
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;
|
|
40798
|
-
return _regeneratorRuntime.wrap(function
|
|
40799
|
-
while (1) switch (
|
|
40921
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
40922
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
40800
40923
|
case 0:
|
|
40801
40924
|
returnTo = this.getReturnTo(event);
|
|
40802
40925
|
finalEvent = {
|
|
@@ -40804,50 +40927,50 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40804
40927
|
saveBasket: true
|
|
40805
40928
|
};
|
|
40806
40929
|
if (!(returnTo == 'OPEN_LEAFLET_BARRIER')) {
|
|
40807
|
-
|
|
40930
|
+
_context24.next = 21;
|
|
40808
40931
|
break;
|
|
40809
40932
|
}
|
|
40810
40933
|
product = undefined;
|
|
40811
40934
|
if (!((_this$api$getBarrierC = this.api.getBarrierConfig()) !== null && _this$api$getBarrierC !== void 0 && _this$api$getBarrierC.affiliate)) {
|
|
40812
|
-
|
|
40935
|
+
_context24.next = 10;
|
|
40813
40936
|
break;
|
|
40814
40937
|
}
|
|
40815
40938
|
url = this.api.getCatalogProductUrl(this.actSet().getCatalogCodex());
|
|
40816
|
-
|
|
40939
|
+
_context24.next = 8;
|
|
40817
40940
|
return this.api.getDataCache(url, url, undefined, 'catalog');
|
|
40818
40941
|
case 8:
|
|
40819
|
-
_result =
|
|
40942
|
+
_result = _context24.sent;
|
|
40820
40943
|
product = productHandlerInstance.getBestMatch((_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getDivaArticles(), _result);
|
|
40821
40944
|
case 10:
|
|
40822
|
-
|
|
40945
|
+
_context24.next = 12;
|
|
40823
40946
|
return (_this$openLeafeltBarr = this.openLeafeltBarrier) === null || _this$openLeafeltBarr === void 0 ? void 0 : _this$openLeafeltBarr.call(this, this.divaBasketHandler, this.api.getBarrierConfig(), product);
|
|
40824
40947
|
case 12:
|
|
40825
|
-
finalEvent =
|
|
40948
|
+
finalEvent = _context24.sent;
|
|
40826
40949
|
if (finalEvent) {
|
|
40827
|
-
|
|
40950
|
+
_context24.next = 17;
|
|
40828
40951
|
break;
|
|
40829
40952
|
}
|
|
40830
|
-
return
|
|
40953
|
+
return _context24.abrupt("return", 'canceled');
|
|
40831
40954
|
case 17:
|
|
40832
40955
|
if (!(!finalEvent.saveBasket && finalEvent.event)) {
|
|
40833
|
-
|
|
40956
|
+
_context24.next = 20;
|
|
40834
40957
|
break;
|
|
40835
40958
|
}
|
|
40836
40959
|
(_this$actions26 = this.actions) === null || _this$actions26 === void 0 || _this$actions26.onEvent({
|
|
40837
40960
|
type: finalEvent.event
|
|
40838
40961
|
});
|
|
40839
|
-
return
|
|
40962
|
+
return _context24.abrupt("return", 'canceled');
|
|
40840
40963
|
case 20:
|
|
40841
40964
|
returnTo = finalEvent.event == 'onAddToBasket' ? 'OPEN_PDF' : returnTo;
|
|
40842
40965
|
case 21:
|
|
40843
40966
|
(_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);
|
|
40844
|
-
|
|
40967
|
+
_context24.next = 24;
|
|
40845
40968
|
return this.saveToBasket(finalEvent.event, repairOnly, force);
|
|
40846
40969
|
case 24:
|
|
40847
|
-
result =
|
|
40970
|
+
result = _context24.sent;
|
|
40848
40971
|
(_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);
|
|
40849
40972
|
if (!(result === 'canceled')) {
|
|
40850
|
-
|
|
40973
|
+
_context24.next = 30;
|
|
40851
40974
|
break;
|
|
40852
40975
|
}
|
|
40853
40976
|
LOG$1.error(new DivaError('failed to save Basket'));
|
|
@@ -40855,10 +40978,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40855
40978
|
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() : '',
|
|
40856
40979
|
accept: true
|
|
40857
40980
|
});
|
|
40858
|
-
return
|
|
40981
|
+
return _context24.abrupt("return", result);
|
|
40859
40982
|
case 30:
|
|
40860
|
-
|
|
40861
|
-
|
|
40983
|
+
_context24.t0 = returnTo;
|
|
40984
|
+
_context24.next = _context24.t0 === 'OPEN_PDF' ? 33 : _context24.t0 === 'SAVE_BASKET_WITH_MODAL' ? 35 : 36;
|
|
40862
40985
|
break;
|
|
40863
40986
|
case 33:
|
|
40864
40987
|
if (!this.getBasket().PDFDocumentURL) {
|
|
@@ -40878,7 +41001,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40878
41001
|
}
|
|
40879
41002
|
});
|
|
40880
41003
|
}
|
|
40881
|
-
return
|
|
41004
|
+
return _context24.abrupt("break", 36);
|
|
40882
41005
|
case 35:
|
|
40883
41006
|
(_this$actions32 = this.actions) === null || _this$actions32 === void 0 || _this$actions32.openModal({
|
|
40884
41007
|
text: (_this$i18n14 = this.i18n()) === null || _this$i18n14 === void 0 ? void 0 : _this$i18n14.t('modal.planning_saved'),
|
|
@@ -40886,18 +41009,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40886
41009
|
});
|
|
40887
41010
|
case 36:
|
|
40888
41011
|
if (!(result == 'noArticleToSave')) {
|
|
40889
|
-
|
|
41012
|
+
_context24.next = 39;
|
|
40890
41013
|
break;
|
|
40891
41014
|
}
|
|
40892
41015
|
(_this$updatePlannerMs2 = this.updatePlannerMsgContainer) === null || _this$updatePlannerMs2 === void 0 || _this$updatePlannerMs2.call(this, 'NOTHING_TO_SAVE', true, 'INFO', 'NOTHING_TO_SAVE', true);
|
|
40893
|
-
return
|
|
41016
|
+
return _context24.abrupt("return", 'canceled');
|
|
40894
41017
|
case 39:
|
|
40895
|
-
return
|
|
41018
|
+
return _context24.abrupt("return", result);
|
|
40896
41019
|
case 40:
|
|
40897
41020
|
case "end":
|
|
40898
|
-
return
|
|
41021
|
+
return _context24.stop();
|
|
40899
41022
|
}
|
|
40900
|
-
},
|
|
41023
|
+
}, _callee24, this);
|
|
40901
41024
|
}));
|
|
40902
41025
|
function saveToBasketWrapper(_x65, _x66, _x67) {
|
|
40903
41026
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
@@ -40907,43 +41030,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40907
41030
|
}, {
|
|
40908
41031
|
key: "saveToBasket",
|
|
40909
41032
|
value: function () {
|
|
40910
|
-
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41033
|
+
var _saveToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(event, repairOnly, force) {
|
|
40911
41034
|
var _returnTo, _returnTo2, _returnTo3, _this$actions33, _this$actions34, _this$actions35, _this$divaBasketHandl2;
|
|
40912
41035
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
40913
|
-
return _regeneratorRuntime.wrap(function
|
|
40914
|
-
while (1) switch (
|
|
41036
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
41037
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
40915
41038
|
case 0:
|
|
40916
41039
|
set = this.actSet();
|
|
40917
41040
|
if (!(setHandlerInstance.isNoArticleToSave(this.sets) && !force)) {
|
|
40918
|
-
|
|
41041
|
+
_context25.next = 3;
|
|
40919
41042
|
break;
|
|
40920
41043
|
}
|
|
40921
|
-
return
|
|
41044
|
+
return _context25.abrupt("return", 'noArticleToSave');
|
|
40922
41045
|
case 3:
|
|
40923
41046
|
actBasket = this.divaBasketHandler.actBasket;
|
|
40924
41047
|
returnTo = this.getReturnTo(event);
|
|
40925
41048
|
if (!((_returnTo = returnTo) !== null && _returnTo !== void 0 && _returnTo.startsWith('FAVORITS') && favoritesHandlerInstance.FavoritesDefined(set))) {
|
|
40926
|
-
|
|
41049
|
+
_context25.next = 13;
|
|
40927
41050
|
break;
|
|
40928
41051
|
}
|
|
40929
41052
|
oldReturnTo = returnTo;
|
|
40930
41053
|
this.ReturnTo = returnTo.replace('FAVORITS_', '');
|
|
40931
|
-
|
|
41054
|
+
_context25.next = 10;
|
|
40932
41055
|
return this.handleFavorites('SAVE');
|
|
40933
41056
|
case 10:
|
|
40934
|
-
result =
|
|
41057
|
+
result = _context25.sent;
|
|
40935
41058
|
if (result === 'canceled') {
|
|
40936
41059
|
this.ReturnTo = oldReturnTo;
|
|
40937
41060
|
}
|
|
40938
|
-
return
|
|
41061
|
+
return _context25.abrupt("return", result);
|
|
40939
41062
|
case 13:
|
|
40940
|
-
|
|
40941
|
-
|
|
40942
|
-
|
|
41063
|
+
_context25.t0 = this.divaBasketHandler;
|
|
41064
|
+
_context25.t1 = this.divaBasketHandler.actDivaNr;
|
|
41065
|
+
_context25.next = 17;
|
|
40943
41066
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !!repairOnly, this.doAllowSetPlanner(), this.ReturnTo);
|
|
40944
41067
|
case 17:
|
|
40945
|
-
|
|
40946
|
-
|
|
41068
|
+
_context25.t2 = _context25.sent;
|
|
41069
|
+
_context25.t0.setBasketData.call(_context25.t0, _context25.t1, _context25.t2);
|
|
40947
41070
|
if ((_returnTo2 = returnTo) !== null && _returnTo2 !== void 0 && _returnTo2.endsWith('OPEN_SELLER_BASKET')) {
|
|
40948
41071
|
this.ReturnTo = 'OPEN_SELLER_BASKET';
|
|
40949
41072
|
returnTo = this.ReturnTo;
|
|
@@ -40958,11 +41081,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40958
41081
|
this.divaBasketHandler.fillOrigConfigurations();
|
|
40959
41082
|
actBasket.Updated = Date.now();
|
|
40960
41083
|
if (!returnTo) {
|
|
40961
|
-
|
|
41084
|
+
_context25.next = 52;
|
|
40962
41085
|
break;
|
|
40963
41086
|
}
|
|
40964
|
-
|
|
40965
|
-
|
|
41087
|
+
_context25.t3 = returnTo;
|
|
41088
|
+
_context25.next = _context25.t3 === 'OPEN_SELLER_PRODUCTCREATOR' ? 28 : _context25.t3 === 'OPEN_SELLER_BASKET' ? 31 : _context25.t3 === 'OPEN_PDF' ? 33 : _context25.t3 === 'SAVE_BASKET_WITH_MODAL' ? 33 : _context25.t3 === 'SAVE_BASKET' ? 33 : _context25.t3 === 'SAVE_BASKET_SYNC' ? 33 : _context25.t3 === 'OPEN_LEAFLET_BARRIER' ? 33 : 52;
|
|
40966
41089
|
break;
|
|
40967
41090
|
case 28:
|
|
40968
41091
|
(_this$actions33 = this.actions) === null || _this$actions33 === void 0 || _this$actions33.toggleLoading('buildScene', false, false);
|
|
@@ -40976,7 +41099,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40976
41099
|
basketData: actBasket
|
|
40977
41100
|
}
|
|
40978
41101
|
});
|
|
40979
|
-
return
|
|
41102
|
+
return _context25.abrupt("break", 52);
|
|
40980
41103
|
case 31:
|
|
40981
41104
|
(_this$actions35 = this.actions) === null || _this$actions35 === void 0 || _this$actions35.openComponent({
|
|
40982
41105
|
type: 'SELLER',
|
|
@@ -40988,23 +41111,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40988
41111
|
basketData: actBasket
|
|
40989
41112
|
}
|
|
40990
41113
|
});
|
|
40991
|
-
return
|
|
41114
|
+
return _context25.abrupt("break", 52);
|
|
40992
41115
|
case 33:
|
|
40993
41116
|
if (!(event == 'onSaveProduct')) {
|
|
40994
|
-
|
|
41117
|
+
_context25.next = 43;
|
|
40995
41118
|
break;
|
|
40996
41119
|
}
|
|
40997
41120
|
//copy basket, so we only save a copy as baseconfiguration and can continue working with the original basket
|
|
40998
41121
|
actBasket = new BasketData(JSON.parse(JSON.stringify(actBasket)));
|
|
40999
|
-
|
|
41122
|
+
_context25.next = 37;
|
|
41000
41123
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser);
|
|
41001
41124
|
case 37:
|
|
41002
|
-
|
|
41125
|
+
_context25.next = 39;
|
|
41003
41126
|
return this.api.getDataWithoutCache(this.api.getUniqueNewDivaNr(), undefined, 'basket');
|
|
41004
41127
|
case 39:
|
|
41005
|
-
newDivaNr =
|
|
41128
|
+
newDivaNr = _context25.sent;
|
|
41006
41129
|
actBasket.convertToBaseConfiguration(newDivaNr.divaNr);
|
|
41007
|
-
|
|
41130
|
+
_context25.next = 51;
|
|
41008
41131
|
break;
|
|
41009
41132
|
case 43:
|
|
41010
41133
|
if (this.divaBasketHandler.basketWasSavedWithCurrentDocVersion) {
|
|
@@ -41013,30 +41136,30 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41013
41136
|
}
|
|
41014
41137
|
this.divaBasketHandler.basketWasSavedWithCurrentDocVersion = true;
|
|
41015
41138
|
actBasket.setDivaNr(this.divaBasketHandler.actDivaNr.split('-').length > 2 ? this.divaBasketHandler.actDivaNr.split('-')[0] + '-' + this.divaBasketHandler.actDivaNr.split('-')[1] : this.divaBasketHandler.actDivaNr);
|
|
41016
|
-
|
|
41139
|
+
_context25.next = 48;
|
|
41017
41140
|
return this.divaBasketHandler.saveToBasket(this.api, actBasket, returnTo);
|
|
41018
41141
|
case 48:
|
|
41019
|
-
_result2 =
|
|
41142
|
+
_result2 = _context25.sent;
|
|
41020
41143
|
if (!(_result2 === 'ERROR_NO_BASKET_SAVED' || _result2 === 'ERROR_BASKET_AFTER_SAVE')) {
|
|
41021
|
-
|
|
41144
|
+
_context25.next = 51;
|
|
41022
41145
|
break;
|
|
41023
41146
|
}
|
|
41024
|
-
return
|
|
41147
|
+
return _context25.abrupt("return", 'canceled');
|
|
41025
41148
|
case 51:
|
|
41026
|
-
return
|
|
41149
|
+
return _context25.abrupt("break", 52);
|
|
41027
41150
|
case 52:
|
|
41028
41151
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
41029
41152
|
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
41030
|
-
|
|
41153
|
+
_context25.next = 56;
|
|
41031
41154
|
return this.addToBasket(actBasket, event);
|
|
41032
41155
|
case 56:
|
|
41033
|
-
product =
|
|
41034
|
-
return
|
|
41156
|
+
product = _context25.sent;
|
|
41157
|
+
return _context25.abrupt("return", product !== null && product !== void 0 ? product : 'saved');
|
|
41035
41158
|
case 58:
|
|
41036
41159
|
case "end":
|
|
41037
|
-
return
|
|
41160
|
+
return _context25.stop();
|
|
41038
41161
|
}
|
|
41039
|
-
},
|
|
41162
|
+
}, _callee25, this);
|
|
41040
41163
|
}));
|
|
41041
41164
|
function saveToBasket(_x68, _x69, _x70) {
|
|
41042
41165
|
return _saveToBasket.apply(this, arguments);
|
|
@@ -41258,23 +41381,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41258
41381
|
}, {
|
|
41259
41382
|
key: "getBasketDataWithEkText",
|
|
41260
41383
|
value: function () {
|
|
41261
|
-
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41262
|
-
return _regeneratorRuntime.wrap(function
|
|
41263
|
-
while (1) switch (
|
|
41384
|
+
var _getBasketDataWithEkText = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
41385
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
41386
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
41264
41387
|
case 0:
|
|
41265
|
-
|
|
41266
|
-
|
|
41267
|
-
|
|
41388
|
+
_context26.t0 = this.divaBasketHandler;
|
|
41389
|
+
_context26.t1 = this.divaBasketHandler.actDivaNr;
|
|
41390
|
+
_context26.next = 4;
|
|
41268
41391
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41269
41392
|
case 4:
|
|
41270
|
-
|
|
41271
|
-
|
|
41272
|
-
return
|
|
41393
|
+
_context26.t2 = _context26.sent;
|
|
41394
|
+
_context26.t0.setBasketData.call(_context26.t0, _context26.t1, _context26.t2);
|
|
41395
|
+
return _context26.abrupt("return", this.divaBasketHandler.actBasket);
|
|
41273
41396
|
case 7:
|
|
41274
41397
|
case "end":
|
|
41275
|
-
return
|
|
41398
|
+
return _context26.stop();
|
|
41276
41399
|
}
|
|
41277
|
-
},
|
|
41400
|
+
}, _callee26, this);
|
|
41278
41401
|
}));
|
|
41279
41402
|
function getBasketDataWithEkText() {
|
|
41280
41403
|
return _getBasketDataWithEkText.apply(this, arguments);
|
|
@@ -41300,7 +41423,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41300
41423
|
}, {
|
|
41301
41424
|
key: "addToBasket",
|
|
41302
41425
|
value: function () {
|
|
41303
|
-
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41426
|
+
var _addToBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(actBasket) {
|
|
41304
41427
|
var _this$actions36,
|
|
41305
41428
|
_this$actions37,
|
|
41306
41429
|
_this$actions38,
|
|
@@ -41319,44 +41442,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41319
41442
|
to,
|
|
41320
41443
|
variants,
|
|
41321
41444
|
products,
|
|
41322
|
-
|
|
41323
|
-
return _regeneratorRuntime.wrap(function
|
|
41324
|
-
while (1) switch (
|
|
41445
|
+
_args27 = arguments;
|
|
41446
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
41447
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
41325
41448
|
case 0:
|
|
41326
|
-
event =
|
|
41327
|
-
|
|
41328
|
-
|
|
41449
|
+
event = _args27.length > 1 && _args27[1] !== undefined ? _args27[1] : 'onAddToBasket';
|
|
41450
|
+
_context27.t0 = event;
|
|
41451
|
+
_context27.next = _context27.t0 === 'onWebPlanerPrint' ? 5 : _context27.t0 === 'onWebPlanerSave' ? 7 : _context27.t0 === 'onWebPlanerShare' ? 9 : _context27.t0 === 'onRequestConsulation' ? 11 : _context27.t0 === 'onSave' ? 13 : _context27.t0 === 'onSendEmail' ? 15 : _context27.t0 === 'onSaveProduct' ? 20 : _context27.t0 === 'dontSaveBasket' ? 27 : _context27.t0 === 'onAddToBasket' ? 28 : 30;
|
|
41329
41452
|
break;
|
|
41330
41453
|
case 5:
|
|
41331
41454
|
(_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
|
|
41332
41455
|
type: 'onWebPlanerPrint',
|
|
41333
41456
|
data: actBasket.getAsJson()
|
|
41334
41457
|
});
|
|
41335
|
-
return
|
|
41458
|
+
return _context27.abrupt("break", 32);
|
|
41336
41459
|
case 7:
|
|
41337
41460
|
(_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
|
|
41338
41461
|
type: 'onWebPlanerSave',
|
|
41339
41462
|
data: actBasket.getAsJson()
|
|
41340
41463
|
});
|
|
41341
|
-
return
|
|
41464
|
+
return _context27.abrupt("break", 32);
|
|
41342
41465
|
case 9:
|
|
41343
41466
|
(_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
|
|
41344
41467
|
type: 'onWebPlanerShare',
|
|
41345
41468
|
data: actBasket.getAsJson()
|
|
41346
41469
|
});
|
|
41347
|
-
return
|
|
41470
|
+
return _context27.abrupt("break", 32);
|
|
41348
41471
|
case 11:
|
|
41349
41472
|
(_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
|
|
41350
41473
|
type: 'onRequestConsulation',
|
|
41351
41474
|
data: actBasket.getAsJson()
|
|
41352
41475
|
});
|
|
41353
|
-
return
|
|
41476
|
+
return _context27.abrupt("break", 32);
|
|
41354
41477
|
case 13:
|
|
41355
41478
|
(_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
|
|
41356
41479
|
type: 'onSave',
|
|
41357
41480
|
data: actBasket.getAsJson()
|
|
41358
41481
|
});
|
|
41359
|
-
return
|
|
41482
|
+
return _context27.abrupt("break", 32);
|
|
41360
41483
|
case 15:
|
|
41361
41484
|
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41362
41485
|
this.divaBasketHandler.emailConfig = undefined;
|
|
@@ -41391,42 +41514,42 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41391
41514
|
type: 'onAddToBasket',
|
|
41392
41515
|
data: actBasket.getAsJson()
|
|
41393
41516
|
});
|
|
41394
|
-
return
|
|
41517
|
+
return _context27.abrupt("break", 32);
|
|
41395
41518
|
case 20:
|
|
41396
41519
|
this.actSet().CatalogData;
|
|
41397
|
-
|
|
41520
|
+
_context27.next = 23;
|
|
41398
41521
|
return this.api.saveAsProduct(this.sets, actBasket);
|
|
41399
41522
|
case 23:
|
|
41400
|
-
products =
|
|
41523
|
+
products = _context27.sent;
|
|
41401
41524
|
(_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
|
|
41402
41525
|
type: 'onAddToBasket',
|
|
41403
41526
|
data: actBasket.getAsJson()
|
|
41404
41527
|
});
|
|
41405
41528
|
if (!products) {
|
|
41406
|
-
|
|
41529
|
+
_context27.next = 27;
|
|
41407
41530
|
break;
|
|
41408
41531
|
}
|
|
41409
|
-
return
|
|
41532
|
+
return _context27.abrupt("return", products[0]);
|
|
41410
41533
|
case 27:
|
|
41411
41534
|
case 28:
|
|
41412
41535
|
(_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
|
|
41413
41536
|
type: 'onAddToBasket',
|
|
41414
41537
|
data: actBasket.getAsJson()
|
|
41415
41538
|
});
|
|
41416
|
-
return
|
|
41539
|
+
return _context27.abrupt("break", 32);
|
|
41417
41540
|
case 30:
|
|
41418
41541
|
(_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
|
|
41419
41542
|
type: event,
|
|
41420
41543
|
data: actBasket.getAsJson()
|
|
41421
41544
|
});
|
|
41422
|
-
return
|
|
41545
|
+
return _context27.abrupt("break", 32);
|
|
41423
41546
|
case 32:
|
|
41424
|
-
return
|
|
41547
|
+
return _context27.abrupt("return");
|
|
41425
41548
|
case 33:
|
|
41426
41549
|
case "end":
|
|
41427
|
-
return
|
|
41550
|
+
return _context27.stop();
|
|
41428
41551
|
}
|
|
41429
|
-
},
|
|
41552
|
+
}, _callee27, this);
|
|
41430
41553
|
}));
|
|
41431
41554
|
function addToBasket(_x71) {
|
|
41432
41555
|
return _addToBasket.apply(this, arguments);
|
|
@@ -41698,9 +41821,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41698
41821
|
key: "initApiForLogicOnly",
|
|
41699
41822
|
value: //just for testing purposes
|
|
41700
41823
|
function () {
|
|
41701
|
-
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41702
|
-
return _regeneratorRuntime.wrap(function
|
|
41703
|
-
while (1) switch (
|
|
41824
|
+
var _initApiForLogicOnly = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
|
|
41825
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
41826
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
41704
41827
|
case 0:
|
|
41705
41828
|
//empty services
|
|
41706
41829
|
this.api = new DivaApiHandler(_objectSpread$5(_objectSpread$5({}, this.plannerConfig), {}, {
|
|
@@ -41713,15 +41836,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41713
41836
|
jwt: jwt,
|
|
41714
41837
|
apiKey: apiKey
|
|
41715
41838
|
}), handler);
|
|
41716
|
-
|
|
41839
|
+
_context28.next = 3;
|
|
41717
41840
|
return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
|
|
41718
41841
|
case 3:
|
|
41719
41842
|
this.plannerHandler = new DivaPlannerHandler(true);
|
|
41720
41843
|
case 4:
|
|
41721
41844
|
case "end":
|
|
41722
|
-
return
|
|
41845
|
+
return _context28.stop();
|
|
41723
41846
|
}
|
|
41724
|
-
},
|
|
41847
|
+
}, _callee28, this);
|
|
41725
41848
|
}));
|
|
41726
41849
|
function initApiForLogicOnly(_x72, _x73, _x74, _x75, _x76, _x77, _x78) {
|
|
41727
41850
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
@@ -41736,16 +41859,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41736
41859
|
}, {
|
|
41737
41860
|
key: "loadBasket",
|
|
41738
41861
|
value: function () {
|
|
41739
|
-
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41740
|
-
return _regeneratorRuntime.wrap(function
|
|
41741
|
-
while (1) switch (
|
|
41862
|
+
var _loadBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
|
|
41863
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
41864
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
41742
41865
|
case 0:
|
|
41743
|
-
return
|
|
41866
|
+
return _context29.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
|
|
41744
41867
|
case 1:
|
|
41745
41868
|
case "end":
|
|
41746
|
-
return
|
|
41869
|
+
return _context29.stop();
|
|
41747
41870
|
}
|
|
41748
|
-
},
|
|
41871
|
+
}, _callee29, this);
|
|
41749
41872
|
}));
|
|
41750
41873
|
function loadBasket() {
|
|
41751
41874
|
return _loadBasket.apply(this, arguments);
|
|
@@ -41760,37 +41883,37 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41760
41883
|
}, {
|
|
41761
41884
|
key: "initBasket",
|
|
41762
41885
|
value: function () {
|
|
41763
|
-
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41886
|
+
var _initBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(init3D, ignoreFavorites) {
|
|
41764
41887
|
var initSetState, set, basket;
|
|
41765
|
-
return _regeneratorRuntime.wrap(function
|
|
41766
|
-
while (1) switch (
|
|
41888
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
41889
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
41767
41890
|
case 0:
|
|
41768
41891
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
41769
41892
|
initSetState = this.getInitStateForSet(!init3D);
|
|
41770
41893
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
41771
|
-
|
|
41894
|
+
_context30.next = 5;
|
|
41772
41895
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
41773
41896
|
case 5:
|
|
41774
41897
|
//TODO check if when basket gets repaired the product match gets called
|
|
41775
41898
|
set = this.actSet();
|
|
41776
41899
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
41777
41900
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
41778
|
-
|
|
41901
|
+
_context30.next = 10;
|
|
41779
41902
|
break;
|
|
41780
41903
|
}
|
|
41781
|
-
|
|
41904
|
+
_context30.next = 10;
|
|
41782
41905
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
41783
41906
|
case 10:
|
|
41784
|
-
|
|
41907
|
+
_context30.next = 12;
|
|
41785
41908
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41786
41909
|
case 12:
|
|
41787
|
-
basket =
|
|
41788
|
-
return
|
|
41910
|
+
basket = _context30.sent;
|
|
41911
|
+
return _context30.abrupt("return", basket);
|
|
41789
41912
|
case 14:
|
|
41790
41913
|
case "end":
|
|
41791
|
-
return
|
|
41914
|
+
return _context30.stop();
|
|
41792
41915
|
}
|
|
41793
|
-
},
|
|
41916
|
+
}, _callee30, this);
|
|
41794
41917
|
}));
|
|
41795
41918
|
function initBasket(_x79, _x80) {
|
|
41796
41919
|
return _initBasket.apply(this, arguments);
|
|
@@ -41806,21 +41929,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41806
41929
|
}, {
|
|
41807
41930
|
key: "getValidVariantsLength",
|
|
41808
41931
|
value: function () {
|
|
41809
|
-
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41932
|
+
var _getValidVariantsLength = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
41810
41933
|
var set;
|
|
41811
|
-
return _regeneratorRuntime.wrap(function
|
|
41812
|
-
while (1) switch (
|
|
41934
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
41935
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
41813
41936
|
case 0:
|
|
41814
41937
|
set = this.actSet();
|
|
41815
|
-
|
|
41938
|
+
_context31.next = 3;
|
|
41816
41939
|
return favoritesHandlerInstance.getValidVariants(set, true);
|
|
41817
41940
|
case 3:
|
|
41818
|
-
return
|
|
41941
|
+
return _context31.abrupt("return", _context31.sent.length);
|
|
41819
41942
|
case 4:
|
|
41820
41943
|
case "end":
|
|
41821
|
-
return
|
|
41944
|
+
return _context31.stop();
|
|
41822
41945
|
}
|
|
41823
|
-
},
|
|
41946
|
+
}, _callee31, this);
|
|
41824
41947
|
}));
|
|
41825
41948
|
function getValidVariantsLength() {
|
|
41826
41949
|
return _getValidVariantsLength.apply(this, arguments);
|
|
@@ -41830,44 +41953,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41830
41953
|
}, {
|
|
41831
41954
|
key: "handleFavorites",
|
|
41832
41955
|
value: function () {
|
|
41833
|
-
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
41956
|
+
var _handleFavorites = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(mode) {
|
|
41834
41957
|
var _this4 = this;
|
|
41835
41958
|
var set, i;
|
|
41836
|
-
return _regeneratorRuntime.wrap(function
|
|
41837
|
-
while (1) switch (
|
|
41959
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
41960
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
41838
41961
|
case 0:
|
|
41839
41962
|
set = this.actSet();
|
|
41840
41963
|
i = 0;
|
|
41841
41964
|
case 2:
|
|
41842
41965
|
if (!favoritesHandlerInstance.IsCalcForSummary) {
|
|
41843
|
-
|
|
41966
|
+
_context32.next = 11;
|
|
41844
41967
|
break;
|
|
41845
41968
|
}
|
|
41846
|
-
|
|
41969
|
+
_context32.next = 5;
|
|
41847
41970
|
return DivaUtils.Sleep(200);
|
|
41848
41971
|
case 5:
|
|
41849
41972
|
i++;
|
|
41850
41973
|
if (!(i > 1000)) {
|
|
41851
|
-
|
|
41974
|
+
_context32.next = 9;
|
|
41852
41975
|
break;
|
|
41853
41976
|
}
|
|
41854
41977
|
LOG$1.error(new DivaError('error on generating Variants of Summary'));
|
|
41855
|
-
return
|
|
41978
|
+
return _context32.abrupt("break", 11);
|
|
41856
41979
|
case 9:
|
|
41857
|
-
|
|
41980
|
+
_context32.next = 2;
|
|
41858
41981
|
break;
|
|
41859
41982
|
case 11:
|
|
41860
|
-
|
|
41983
|
+
_context32.next = 13;
|
|
41861
41984
|
return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
|
|
41862
41985
|
return _this4.update2DGrid(set);
|
|
41863
41986
|
}, this.actions);
|
|
41864
41987
|
case 13:
|
|
41865
|
-
return
|
|
41988
|
+
return _context32.abrupt("return", _context32.sent);
|
|
41866
41989
|
case 14:
|
|
41867
41990
|
case "end":
|
|
41868
|
-
return
|
|
41991
|
+
return _context32.stop();
|
|
41869
41992
|
}
|
|
41870
|
-
},
|
|
41993
|
+
}, _callee32, this);
|
|
41871
41994
|
}));
|
|
41872
41995
|
function handleFavorites(_x81) {
|
|
41873
41996
|
return _handleFavorites.apply(this, arguments);
|
|
@@ -41882,46 +42005,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41882
42005
|
}, {
|
|
41883
42006
|
key: "initSapOrderLinesFromBasket",
|
|
41884
42007
|
value: function () {
|
|
41885
|
-
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
42008
|
+
var _initSapOrderLinesFromBasket = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(divaNr, init3D, onlyLoadOldBakset) {
|
|
41886
42009
|
var result, oldBasket, basket;
|
|
41887
|
-
return _regeneratorRuntime.wrap(function
|
|
41888
|
-
while (1) switch (
|
|
42010
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
42011
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
41889
42012
|
case 0:
|
|
41890
42013
|
if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
|
|
41891
|
-
|
|
42014
|
+
_context33.next = 3;
|
|
41892
42015
|
return this.loadBasket();
|
|
41893
42016
|
case 3:
|
|
41894
|
-
result =
|
|
42017
|
+
result = _context33.sent;
|
|
41895
42018
|
if (!onlyLoadOldBakset) {
|
|
41896
|
-
|
|
42019
|
+
_context33.next = 6;
|
|
41897
42020
|
break;
|
|
41898
42021
|
}
|
|
41899
|
-
return
|
|
42022
|
+
return _context33.abrupt("return", {
|
|
41900
42023
|
oldBasket: new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
|
|
41901
42024
|
cache: {}
|
|
41902
42025
|
});
|
|
41903
42026
|
case 6:
|
|
41904
42027
|
if (!(result === false)) {
|
|
41905
|
-
|
|
42028
|
+
_context33.next = 8;
|
|
41906
42029
|
break;
|
|
41907
42030
|
}
|
|
41908
42031
|
throw new Error('Could not load basket! ' + divaNr);
|
|
41909
42032
|
case 8:
|
|
41910
42033
|
oldBasket = new BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
|
|
41911
|
-
|
|
42034
|
+
_context33.next = 11;
|
|
41912
42035
|
return this.initBasket(init3D);
|
|
41913
42036
|
case 11:
|
|
41914
|
-
basket =
|
|
41915
|
-
return
|
|
42037
|
+
basket = _context33.sent;
|
|
42038
|
+
return _context33.abrupt("return", {
|
|
41916
42039
|
basket: basket,
|
|
41917
42040
|
oldBasket: oldBasket,
|
|
41918
42041
|
cache: this.api.getJsonDataCache()
|
|
41919
42042
|
});
|
|
41920
42043
|
case 13:
|
|
41921
42044
|
case "end":
|
|
41922
|
-
return
|
|
42045
|
+
return _context33.stop();
|
|
41923
42046
|
}
|
|
41924
|
-
},
|
|
42047
|
+
}, _callee33, this);
|
|
41925
42048
|
}));
|
|
41926
42049
|
function initSapOrderLinesFromBasket(_x82, _x83, _x84) {
|
|
41927
42050
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|