@crystaldesign/web-planner-logic 25.4.0-beta.46 → 25.4.0-beta.47
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-c3c21e39.js → DivaBoxPlanner-02bf7f84.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-bf570694.js → DivaStandardPlanner-83054c27.js} +2 -2
- package/build/cjs/{DoorPlanner-2977ab3a.js → DoorPlanner-d91465d3.js} +1 -1
- package/build/cjs/{Host3DSignalR-18ae1779.js → Host3DSignalR-d0505d29.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-07f2698c.js → LiviqueWWSHandler-cfd55a37.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-0f3c613d.js → PfisterWWSHandler-c472cb21.js} +1 -1
- package/build/cjs/{PlannerHandler2D-dc3e0157.js → PlannerHandler2D-87df62a7.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-04d83f4f.js → SeriousBasketHandler-50df6529.js} +1 -1
- package/build/cjs/{ShelfPlanner-d43d612b.js → ShelfPlanner-ad514889.js} +1 -1
- package/build/cjs/{StandardWWSHandler-1932acc8.js → StandardWWSHandler-93dd1f08.js} +1 -1
- package/build/cjs/{index-6cf8bb85.js → index-c3426ca1.js} +293 -198
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-803220fa.js → DivaBoxPlanner-60e27a70.js} +2 -2
- package/build/esm/{DivaStandardPlanner-2c51d2be.js → DivaStandardPlanner-8464bf41.js} +2 -2
- package/build/esm/{DoorPlanner-56b79bb0.js → DoorPlanner-5762b7da.js} +1 -1
- package/build/esm/{Host3DSignalR-2a46ec29.js → Host3DSignalR-3fa73b93.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-901a944e.js → LiviqueWWSHandler-f124a938.js} +1 -1
- package/build/esm/{PfisterWWSHandler-5415d76e.js → PfisterWWSHandler-50bcdc0d.js} +1 -1
- package/build/esm/{PlannerHandler2D-882ca57f.js → PlannerHandler2D-48256f30.js} +1 -1
- package/build/esm/{SeriousBasketHandler-d13dde7f.js → SeriousBasketHandler-41629ab4.js} +1 -1
- package/build/esm/{ShelfPlanner-d8777a11.js → ShelfPlanner-f2164219.js} +1 -1
- package/build/esm/{StandardWWSHandler-a81684df.js → StandardWWSHandler-e0aaaf51.js} +1 -1
- package/build/esm/{index-168cc353.js → index-69218309.js} +293 -198
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +3 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +18 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/InitArticleType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +21 -15
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +0 -12
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +3 -13
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +4 -16
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +3 -0
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +3 -2
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +5 -4
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.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/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
|
@@ -16175,6 +16175,11 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16175
16175
|
set: function set(val) {
|
|
16176
16176
|
this.opv.groupName = val;
|
|
16177
16177
|
}
|
|
16178
|
+
}, {
|
|
16179
|
+
key: "origGroupName",
|
|
16180
|
+
get: function get() {
|
|
16181
|
+
return this.opv.origGroupName;
|
|
16182
|
+
}
|
|
16178
16183
|
}, {
|
|
16179
16184
|
key: "groupName_locales",
|
|
16180
16185
|
get: function get() {
|
|
@@ -16603,6 +16608,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16603
16608
|
get: function get() {
|
|
16604
16609
|
return this._catalogArticle.groupName;
|
|
16605
16610
|
}
|
|
16611
|
+
}, {
|
|
16612
|
+
key: "origGroupName",
|
|
16613
|
+
get: function get() {
|
|
16614
|
+
return this._catalogArticle.origGroupName;
|
|
16615
|
+
}
|
|
16606
16616
|
}, {
|
|
16607
16617
|
key: "groupName_locales",
|
|
16608
16618
|
get: function get() {
|
|
@@ -17261,6 +17271,7 @@ function getCatalogArticle$1(jsonArticle, catalogData) {
|
|
|
17261
17271
|
properties: [].concat(_toConsumableArray((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
|
|
17262
17272
|
image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
|
|
17263
17273
|
groupName: (_articleMask$groupnam = articleMask === null || articleMask === void 0 || (_articleMask$groupnam2 = articleMask.groupname) === null || _articleMask$groupnam2 === void 0 ? void 0 : _articleMask$groupnam2[catalogData.api.getLanguage()]) !== null && _articleMask$groupnam !== void 0 ? _articleMask$groupnam : jsonArticle.GroupName,
|
|
17274
|
+
origGroupName: jsonArticle.GroupName,
|
|
17264
17275
|
mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
|
|
17265
17276
|
width: jsonArticle.Width && jsonArticle.Width != '' ? Number(jsonArticle.Width.replace('cm', '').replace(',', '.')) : undefined,
|
|
17266
17277
|
height: jsonArticle.Height && jsonArticle.Height != '' ? Number(jsonArticle.Height.replace('cm', '').replace(',', '.')) : undefined,
|
|
@@ -17399,6 +17410,7 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
|
|
|
17399
17410
|
description: jsonOPV.Description,
|
|
17400
17411
|
description_locales: jsonOPV.Description_locales,
|
|
17401
17412
|
groupName: (_mask$groupname$catal = mask === null || mask === void 0 || (_mask$groupname = mask.groupname) === null || _mask$groupname === void 0 ? void 0 : _mask$groupname[catalogData.api.getLanguage()]) !== null && _mask$groupname$catal !== void 0 ? _mask$groupname$catal : jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
|
|
17413
|
+
origGroupName: jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
|
|
17402
17414
|
groupName_locales: (_mask$groupname2 = mask === null || mask === void 0 ? void 0 : mask.groupname) !== null && _mask$groupname2 !== void 0 ? _mask$groupname2 : jsonOPV.GroupName_locales,
|
|
17403
17415
|
hiddenByMask: mask === null || mask === void 0 ? void 0 : mask.hidden,
|
|
17404
17416
|
textureName: jsonOPV.TextureName && jsonOPV.TextureName != '' ? jsonOPV.TextureName : jsonOPV.PFTFile && jsonOPV.PFTFile != '' ? jsonOPV.PFTFile : undefined,
|
|
@@ -17780,6 +17792,11 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
17780
17792
|
get: function get() {
|
|
17781
17793
|
return this.opv.catalogOPV.groupName;
|
|
17782
17794
|
}
|
|
17795
|
+
}, {
|
|
17796
|
+
key: "origGroupName",
|
|
17797
|
+
get: function get() {
|
|
17798
|
+
return this.opv.catalogOPV.origGroupName;
|
|
17799
|
+
}
|
|
17783
17800
|
}, {
|
|
17784
17801
|
key: "description",
|
|
17785
17802
|
get: function get() {
|
|
@@ -18148,6 +18165,11 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
18148
18165
|
get: function get() {
|
|
18149
18166
|
var _this$opt$catalogOPT;
|
|
18150
18167
|
if ((_this$opt$catalogOPT = this.opt.catalogOPT) !== null && _this$opt$catalogOPT !== void 0 && _this$opt$catalogOPT.maskTabgroup) return this.opt.catalogOPT.maskTabgroup;
|
|
18168
|
+
return this.origTabGroup;
|
|
18169
|
+
}
|
|
18170
|
+
}, {
|
|
18171
|
+
key: "origTabGroup",
|
|
18172
|
+
get: function get() {
|
|
18151
18173
|
if (this.opt.subTabGroupOfSubTemplate) return this.opt.subTabGroupOfSubTemplate;
|
|
18152
18174
|
return this.opt.tabGroup;
|
|
18153
18175
|
}
|
|
@@ -19756,6 +19778,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19756
19778
|
// is a string that can define which DPs are hidden. semicolon splitted eg: "AVC;AVR"
|
|
19757
19779
|
|
|
19758
19780
|
//Konfiguration
|
|
19781
|
+
useDiomexConfigLogic: false,
|
|
19782
|
+
// configurationslogik von diomex wird angewannt. Diese erlaubt dass optionen auch keinen wert aktuell gewählt haben. hier wird nicht standardmäßig der erste wert selektiert, falls der alter wert nicht miehr gültig ist.
|
|
19759
19783
|
UsePrgAsOpvArticleNr: false,
|
|
19760
19784
|
// spezielle Lösung für Jutzler - bei Zubehösets ist die Artikelnummer nicht der SubArticleCodex sondern der Codex der Preisgruppe
|
|
19761
19785
|
articleConfigSingle: false,
|
|
@@ -20509,6 +20533,11 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20509
20533
|
get: function get() {
|
|
20510
20534
|
return this.catalogProps.warningRules;
|
|
20511
20535
|
}
|
|
20536
|
+
}, {
|
|
20537
|
+
key: "useDiomexConfigLogic",
|
|
20538
|
+
get: function get() {
|
|
20539
|
+
return this.catalogProps.useDiomexConfigLogic;
|
|
20540
|
+
}
|
|
20512
20541
|
}, {
|
|
20513
20542
|
key: "bannerRules",
|
|
20514
20543
|
get: function get() {
|
|
@@ -20852,6 +20881,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
20852
20881
|
_this5.catalogProps.reconfigAfterArticleDocked = item.Value == '1';
|
|
20853
20882
|
break;
|
|
20854
20883
|
// Configuration
|
|
20884
|
+
case 'USE_DIOMEX_CONFIG_LOGIC':
|
|
20885
|
+
_this5.catalogProps.useDiomexConfigLogic = item.Value == '1';
|
|
20886
|
+
break;
|
|
20855
20887
|
case 'USEPRGASOPVARTICLENR':
|
|
20856
20888
|
_this5.catalogProps.UsePrgAsOpvArticleNr = item.Value == '1';
|
|
20857
20889
|
break;
|
|
@@ -21377,6 +21409,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21377
21409
|
this.articleOptionState = {
|
|
21378
21410
|
option: option,
|
|
21379
21411
|
name: '',
|
|
21412
|
+
origName: '',
|
|
21380
21413
|
imageOPVs: {},
|
|
21381
21414
|
visibleOPVs: {},
|
|
21382
21415
|
visibleOPVsImages: {},
|
|
@@ -21425,6 +21458,11 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21425
21458
|
get: function get() {
|
|
21426
21459
|
return this.articleOptionState.option.tabGroup;
|
|
21427
21460
|
}
|
|
21461
|
+
}, {
|
|
21462
|
+
key: "optionOrigTabGroup",
|
|
21463
|
+
get: function get() {
|
|
21464
|
+
return this.articleOptionState.option.origTabGroup;
|
|
21465
|
+
}
|
|
21428
21466
|
}, {
|
|
21429
21467
|
key: "optionTabGroup_locales",
|
|
21430
21468
|
get: function get() {
|
|
@@ -21520,7 +21558,10 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
21520
21558
|
}, {
|
|
21521
21559
|
key: "origName",
|
|
21522
21560
|
get: function get() {
|
|
21523
|
-
return this.articleOptionState.
|
|
21561
|
+
return this.articleOptionState.origName;
|
|
21562
|
+
},
|
|
21563
|
+
set: function set(newName) {
|
|
21564
|
+
this.articleOptionState.origName = newName;
|
|
21524
21565
|
}
|
|
21525
21566
|
}, {
|
|
21526
21567
|
key: "valName",
|
|
@@ -22046,7 +22087,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22046
22087
|
function DivaEngine(article) {
|
|
22047
22088
|
_classCallCheck(this, DivaEngine);
|
|
22048
22089
|
_defineProperty(this, "article", void 0);
|
|
22049
|
-
_defineProperty(this, "
|
|
22090
|
+
_defineProperty(this, "decisionDebugStack", []);
|
|
22050
22091
|
this.article = article;
|
|
22051
22092
|
}
|
|
22052
22093
|
return _createClass(DivaEngine, [{
|
|
@@ -22340,8 +22381,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22340
22381
|
if (doDefine) {
|
|
22341
22382
|
ops.isDefined = true;
|
|
22342
22383
|
}
|
|
22343
|
-
var
|
|
22344
|
-
|
|
22384
|
+
var _this$itemInfo = this.itemInfo(myOPVItem, !ops.option.hideGroupNameInOrderText, ops.freeText),
|
|
22385
|
+
name = _this$itemInfo.name,
|
|
22386
|
+
origName = _this$itemInfo.origName;
|
|
22387
|
+
ops.name = name;
|
|
22388
|
+
ops.origName = origName;
|
|
22345
22389
|
ops.isDoShow = true;
|
|
22346
22390
|
ops.isDisabled = false;
|
|
22347
22391
|
if (ops.isFreeText) {
|
|
@@ -22381,28 +22425,44 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22381
22425
|
}, {
|
|
22382
22426
|
key: "itemInfo",
|
|
22383
22427
|
value: function itemInfo(myOPV, evalParentDesc, freeText) {
|
|
22384
|
-
var
|
|
22385
|
-
|
|
22428
|
+
var _myOPV$description, _myOPV$description2;
|
|
22429
|
+
var name = (_myOPV$description = myOPV.description) !== null && _myOPV$description !== void 0 ? _myOPV$description : myOPV.name;
|
|
22430
|
+
var origName = (_myOPV$description2 = myOPV.description) !== null && _myOPV$description2 !== void 0 ? _myOPV$description2 : myOPV.origName;
|
|
22386
22431
|
if (myOPV.isFreeText && freeText) {
|
|
22387
22432
|
if (myOPV.measureUnit) {
|
|
22388
|
-
|
|
22433
|
+
name += ': ' + freeText + ' ' + myOPV.measureUnit;
|
|
22434
|
+
origName += ': ' + freeText + ' ' + myOPV.measureUnit;
|
|
22389
22435
|
} else {
|
|
22390
|
-
|
|
22436
|
+
name += ': ' + freeText;
|
|
22437
|
+
origName += ': ' + freeText;
|
|
22391
22438
|
}
|
|
22392
22439
|
}
|
|
22393
22440
|
if (evalParentDesc) {
|
|
22394
22441
|
var opvGroupName = myOPV.groupName;
|
|
22395
|
-
if (opvGroupName &&
|
|
22442
|
+
if (opvGroupName && name.toLowerCase().search(opvGroupName.toLowerCase()) >= 0) return {
|
|
22443
|
+
name: (myOPV.parentName ? myOPV.parentName + ' - ' : '') + name,
|
|
22444
|
+
origName: (myOPV.parentName ? myOPV.parentName + ' - ' : '') + origName
|
|
22445
|
+
};else return {
|
|
22446
|
+
name: (myOPV.groupName ? myOPV.groupName + ' - ' : '') + name,
|
|
22447
|
+
origName: (myOPV.origGroupName ? myOPV.origGroupName + ' - ' : '') + origName
|
|
22448
|
+
};
|
|
22396
22449
|
} else {
|
|
22397
|
-
return
|
|
22450
|
+
return {
|
|
22451
|
+
name: name,
|
|
22452
|
+
origName: origName
|
|
22453
|
+
};
|
|
22398
22454
|
}
|
|
22399
22455
|
}
|
|
22400
22456
|
}, {
|
|
22401
22457
|
key: "clearOP",
|
|
22402
|
-
value: function clearOP(optionCodex) {
|
|
22458
|
+
value: function clearOP(optionCodex, keepEnalbed) {
|
|
22403
22459
|
var _this$article$set$Vie;
|
|
22404
22460
|
//die Klasse ArticleOptionState wird einfach neu initialisiert
|
|
22405
22461
|
var oldOPS = this.article.getArticleOptionState(optionCodex);
|
|
22462
|
+
if (keepEnalbed) {
|
|
22463
|
+
oldOPS.val = undefined;
|
|
22464
|
+
return;
|
|
22465
|
+
}
|
|
22406
22466
|
var option = oldOPS.option;
|
|
22407
22467
|
var optionState = new ArticleOptionStateData(option, this.article.getIsConfigSingle, oldOPS.defaultOPV, (_this$article$set$Vie = this.article.set.ViewConfig) === null || _this$article$set$Vie === void 0 ? void 0 : _this$article$set$Vie.useIsOptionDefinedWarning);
|
|
22408
22468
|
optionState.isDisabled = true;
|
|
@@ -22420,7 +22480,20 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22420
22480
|
if (this.article.hasType1Dependencies) {
|
|
22421
22481
|
//Überprüft, ob die alle Optionen gültige Optionswerte haben.
|
|
22422
22482
|
//wenn nicht, werden gültige Defaultwerte initialisiert
|
|
22423
|
-
|
|
22483
|
+
var beforeSnapshot = undefined;
|
|
22484
|
+
var afterSnapshot = undefined;
|
|
22485
|
+
var count = 0;
|
|
22486
|
+
var startTime = Date.now();
|
|
22487
|
+
this.article.decisionDebugStacks = [];
|
|
22488
|
+
do {
|
|
22489
|
+
var _afterSnapshot;
|
|
22490
|
+
beforeSnapshot = (_afterSnapshot = afterSnapshot) !== null && _afterSnapshot !== void 0 ? _afterSnapshot : this.article.snapshot;
|
|
22491
|
+
this.evalAllDecisions();
|
|
22492
|
+
afterSnapshot = this.article.snapshot;
|
|
22493
|
+
count++;
|
|
22494
|
+
} while (JSON.stringify(afterSnapshot) !== JSON.stringify(beforeSnapshot) && count < 50);
|
|
22495
|
+
var endTime = Date.now();
|
|
22496
|
+
LOG$f.debug('eval Decisions total time in ' + (endTime - startTime) + ' of ' + count);
|
|
22424
22497
|
} else {
|
|
22425
22498
|
//check in DB if there are still catalogs with hasType1Dependencies == false. After some time this souldnt be the usecase anymore and the hasType1Dependencies == false logic can be removed here
|
|
22426
22499
|
//deprected
|
|
@@ -22432,7 +22505,6 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22432
22505
|
}, {
|
|
22433
22506
|
key: "evalAllDecisions",
|
|
22434
22507
|
value: function evalAllDecisions() {
|
|
22435
|
-
var _myDecision$disableHi, _myDecision$disableHi2, _myDecision$disableHi3;
|
|
22436
22508
|
var myDecisions = this.article.catalogArticle.articleDecisions;
|
|
22437
22509
|
//add the partlist spesific decisions to the normal decisions
|
|
22438
22510
|
if (this.article.initDecisions) myDecisions = myDecisions.concat(this.article.initDecisions);
|
|
@@ -22455,8 +22527,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22455
22527
|
} finally {
|
|
22456
22528
|
_iterator2.f();
|
|
22457
22529
|
}
|
|
22458
|
-
|
|
22530
|
+
this.decisionDebugStack = [];
|
|
22531
|
+
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
22459
22532
|
for (var m = 0; m < myDecisions.length; m++) {
|
|
22533
|
+
var startTime = Date.now();
|
|
22460
22534
|
//Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltet
|
|
22461
22535
|
var myDecision = myDecisions[m];
|
|
22462
22536
|
if (myDecision.enabled && myDecision.DOC) {
|
|
@@ -22464,46 +22538,45 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22464
22538
|
case '2':
|
|
22465
22539
|
//Aktionsregel. Wenn das erste JsRule erfüllt ist muss man die restlichen DecisionOptionCombinations nicht mehr kontrollieren.
|
|
22466
22540
|
this.evalType2Decision(myDecision, myDecisions);
|
|
22467
|
-
decisionDebugStack.push({
|
|
22468
|
-
text: myDecision.Number + ' type: 2 ' + ((_myDecision$disableHi = myDecision.disableHistory) === null || _myDecision$disableHi === void 0 ? void 0 : _myDecision$disableHi.join(',')),
|
|
22469
|
-
nr: myDecision.Number,
|
|
22470
|
-
decision: JSON.parse(JSON.stringify(myDecision))
|
|
22471
|
-
});
|
|
22472
22541
|
break;
|
|
22473
22542
|
case '1':
|
|
22474
22543
|
this.evalType1Decision(myDecision);
|
|
22475
|
-
decisionDebugStack.push({
|
|
22476
|
-
text: myDecision.Number + ' type: 1 ' + ((_myDecision$disableHi2 = myDecision.disableHistory) === null || _myDecision$disableHi2 === void 0 ? void 0 : _myDecision$disableHi2.join(',')),
|
|
22477
|
-
nr: myDecision.Number,
|
|
22478
|
-
decision: JSON.parse(JSON.stringify(myDecision))
|
|
22479
|
-
});
|
|
22480
22544
|
break;
|
|
22481
22545
|
case '0':
|
|
22482
22546
|
this.evalType0Decision(myDecision);
|
|
22483
|
-
decisionDebugStack.push({
|
|
22484
|
-
text: myDecision.Number + ' type: 0 ' + ((_myDecision$disableHi3 = myDecision.disableHistory) === null || _myDecision$disableHi3 === void 0 ? void 0 : _myDecision$disableHi3.join(',')),
|
|
22485
|
-
nr: myDecision.Number,
|
|
22486
|
-
decision: JSON.parse(JSON.stringify(myDecision))
|
|
22487
|
-
});
|
|
22488
22547
|
break;
|
|
22548
|
+
case '3':
|
|
22549
|
+
continue;
|
|
22489
22550
|
}
|
|
22490
|
-
} else {
|
|
22491
|
-
var _myDecision$disableHi4;
|
|
22492
|
-
decisionDebugStack.push({
|
|
22493
|
-
text: myDecision.Number + ' ' + ((_myDecision$disableHi4 = myDecision.disableHistory) === null || _myDecision$disableHi4 === void 0 ? void 0 : _myDecision$disableHi4.join(',')),
|
|
22494
|
-
nr: myDecision.Number,
|
|
22495
|
-
decision: JSON.parse(JSON.stringify(myDecision))
|
|
22496
|
-
});
|
|
22497
22551
|
}
|
|
22552
|
+
beforeSnapshot = this.pushDecisionDebug(myDecision, beforeSnapshot);
|
|
22553
|
+
var endTime = Date.now();
|
|
22554
|
+
LOG$f.debug('decision ' + myDecision.Number + ' article ' + this.article.articleCodex + ' time ' + (endTime - startTime));
|
|
22498
22555
|
}
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
stack: decisionDebugStack,
|
|
22556
|
+
this.article.decisionDebugStacks.push({
|
|
22557
|
+
stack: this.decisionDebugStack,
|
|
22502
22558
|
variantValues: this.article.VariantValues
|
|
22503
22559
|
});
|
|
22504
22560
|
this.evalShowOnlyWhenHasPrice();
|
|
22505
22561
|
this.updateIDMSpecificFeatures();
|
|
22506
22562
|
}
|
|
22563
|
+
}, {
|
|
22564
|
+
key: "pushDecisionDebug",
|
|
22565
|
+
value: function pushDecisionDebug(decision, beforeSnapshot) {
|
|
22566
|
+
var _decision$disableHist;
|
|
22567
|
+
if (!this.article.set.logDecisions || !beforeSnapshot) return undefined;
|
|
22568
|
+
var afterSnapshot = this.article.snapshot;
|
|
22569
|
+
this.decisionDebugStack.push({
|
|
22570
|
+
text: decision.Number + ' type:' + decision.Type + ' ' + ((_decision$disableHist = decision.disableHistory) === null || _decision$disableHist === void 0 ? void 0 : _decision$disableHist.join(',')),
|
|
22571
|
+
nr: decision.Number,
|
|
22572
|
+
decision: JSON.parse(JSON.stringify(decision)),
|
|
22573
|
+
snapshots: {
|
|
22574
|
+
before: beforeSnapshot,
|
|
22575
|
+
after: afterSnapshot
|
|
22576
|
+
}
|
|
22577
|
+
});
|
|
22578
|
+
return afterSnapshot;
|
|
22579
|
+
}
|
|
22507
22580
|
|
|
22508
22581
|
/**
|
|
22509
22582
|
* @deprecated
|
|
@@ -22664,7 +22737,20 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22664
22737
|
}
|
|
22665
22738
|
break;
|
|
22666
22739
|
case '3':
|
|
22667
|
-
case 'SET_FEATURE_DEFAULT':
|
|
22740
|
+
case 'SET_FEATURE_DEFAULT':
|
|
22741
|
+
//wenn man einen Artikel mit bestehenden VariantValues initialisiert, sollten keine Defaultwerte gesetzt werden
|
|
22742
|
+
if (!myDoc.JsFormula || myDoc.JsFormula == '' || this.article.evalRule(myDoc.JsFormula)) {
|
|
22743
|
+
ignorNextAction = true;
|
|
22744
|
+
var _ops3 = this.article.getArticleOptionState('OPT' + myDA.OptionRefCodex);
|
|
22745
|
+
if (_ops3 && _ops3.val === undefined) {
|
|
22746
|
+
if (myDA.OptionValueRefCodex) {
|
|
22747
|
+
this.assignOptionValue('OPT' + myDA.OptionCodex, 'OPV' + myDA.OptionValueRefCodex);
|
|
22748
|
+
} else if (myDA.OptionRefCodex && _ops3) {
|
|
22749
|
+
this.assignOptionValue('OPT' + myDA.OptionCodex, 'OPV' + myDA.OptionCodex + _ops3.valCodex.replace('OPV' + _ops3.optionCodex.substring(3), ''));
|
|
22750
|
+
}
|
|
22751
|
+
}
|
|
22752
|
+
}
|
|
22753
|
+
break;
|
|
22668
22754
|
case 'SET_FEATURE_DEFAULT_NULL':
|
|
22669
22755
|
break;
|
|
22670
22756
|
case 'DISABLE_DECISION':
|
|
@@ -22747,13 +22833,13 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22747
22833
|
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
22748
22834
|
var _myDoc$Row;
|
|
22749
22835
|
var checkOptX = doAlsoCheckOPTs[f];
|
|
22750
|
-
var
|
|
22751
|
-
if (
|
|
22836
|
+
var _ops4 = this.article.getArticleOptionState(checkOptX);
|
|
22837
|
+
if (_ops4 && (_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[checkOptX] && _ops4.valCodex && !myDoc.Row[checkOptX].includes(_ops4.valCodex)) {
|
|
22752
22838
|
if (!myDoc.Row[checkOptX].find(function (o) {
|
|
22753
22839
|
return !o.startsWith('!');
|
|
22754
22840
|
})) {
|
|
22755
22841
|
//all is inverted
|
|
22756
|
-
if (myDoc.Row[checkOptX].includes('!' +
|
|
22842
|
+
if (myDoc.Row[checkOptX].includes('!' + _ops4.valCodex)) {
|
|
22757
22843
|
doUseDoc = false;
|
|
22758
22844
|
break;
|
|
22759
22845
|
}
|
|
@@ -22824,7 +22910,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22824
22910
|
var valCodex = ops.valCodex;
|
|
22825
22911
|
ops.visibleCount = Object.keys(possibleOPVs).length;
|
|
22826
22912
|
if ((!valCodex || !possibleOPVs[valCodex]) && Object.keys(possibleOPVs).length > 0) {
|
|
22827
|
-
|
|
22913
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
22914
|
+
this.clearOP(OPT, true);
|
|
22915
|
+
} else {
|
|
22916
|
+
this.updateArtOPV(this.article.getDefaultOpv(possibleOPVs), OPT, ops, undefined);
|
|
22917
|
+
}
|
|
22828
22918
|
}
|
|
22829
22919
|
doAlsoCheckOPTs.push(OPT);
|
|
22830
22920
|
//Hier führende Optionen prüfen
|
|
@@ -22854,8 +22944,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22854
22944
|
for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
|
|
22855
22945
|
var _myDoc$Row3;
|
|
22856
22946
|
var checkOptX = doAlsoCheckOPTs[f];
|
|
22857
|
-
var
|
|
22858
|
-
if (
|
|
22947
|
+
var _ops5 = this.article.getArticleOptionState(checkOptX);
|
|
22948
|
+
if (_ops5 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops5.valCodex && !myDoc.Row[checkOptX].includes(_ops5.valCodex)) {
|
|
22859
22949
|
doUseDoc = false;
|
|
22860
22950
|
break;
|
|
22861
22951
|
}
|
|
@@ -22886,7 +22976,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
22886
22976
|
var valCodex = ops.valCodex;
|
|
22887
22977
|
ops.visibleCount = Object.keys(possibleOPVs).length;
|
|
22888
22978
|
if ((!valCodex || !possibleOPVs[valCodex]) && Object.keys(possibleOPVs).length > 0) {
|
|
22889
|
-
|
|
22979
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
22980
|
+
this.clearOP(OPT, true);
|
|
22981
|
+
} else {
|
|
22982
|
+
this.updateArtOPV(this.article.getDefaultOpv(possibleOPVs), OPT, ops, undefined);
|
|
22983
|
+
}
|
|
22890
22984
|
}
|
|
22891
22985
|
} else if (p < myDecision.Options.length - 1) {
|
|
22892
22986
|
doAlsoCheckOPTs.push(OPT);
|
|
@@ -23108,6 +23202,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23108
23202
|
}
|
|
23109
23203
|
if (groupDecisionVal && groupDecisionVal.isValidDOC || key == -1) {
|
|
23110
23204
|
for (var b = 0; b < myPartlistArticles[key].length; b++) {
|
|
23205
|
+
var startTime = Date.now();
|
|
23111
23206
|
var myPartListPos = myPartlistArticles[key][b];
|
|
23112
23207
|
if (myPartListPos.ItemRefArticles) {
|
|
23113
23208
|
var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
|
|
@@ -23134,6 +23229,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23134
23229
|
}
|
|
23135
23230
|
}
|
|
23136
23231
|
}
|
|
23232
|
+
LOG$f.debug('partlist ' + myPartListPos.$id + ' article ' + this.article.articleCodex + ' time ' + (Date.now() - startTime));
|
|
23137
23233
|
}
|
|
23138
23234
|
}
|
|
23139
23235
|
}
|
|
@@ -23207,6 +23303,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23207
23303
|
RetailPrefix: myPartListPos.RetailPrefix,
|
|
23208
23304
|
Quantity: quanitity,
|
|
23209
23305
|
PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils.getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this2.article.VariantValues) : undefined,
|
|
23306
|
+
partlistDecisionNo: decisionNumber,
|
|
23210
23307
|
SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
|
|
23211
23308
|
initDecisions: initDecisionsFiltered,
|
|
23212
23309
|
RuleDesc: myRuleDesc,
|
|
@@ -23217,8 +23314,6 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23217
23314
|
optionImgForPrint: optionImgForPrint,
|
|
23218
23315
|
optionsForPrint: optionsForPrint
|
|
23219
23316
|
});
|
|
23220
|
-
} else {
|
|
23221
|
-
LOG$f.error(new DivaError('For article: ' + _this2.article.articleCodex + ' name: ' + _this2.article.name + ' decisionNr: ' + decisionNumber + ' was not found as DecisionType 3'));
|
|
23222
23317
|
}
|
|
23223
23318
|
};
|
|
23224
23319
|
for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
|
|
@@ -23248,7 +23343,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23248
23343
|
}
|
|
23249
23344
|
}
|
|
23250
23345
|
} else {
|
|
23251
|
-
LOG$f.error(new DivaError('For article: ' + this.article.articleCodex + ' name: ' + this.article.
|
|
23346
|
+
LOG$f.error(new DivaError('For article: ' + this.article.articleCodex + ' name: ' + this.article.origName + ' decisionNr: ' + DecisionNumber + ' was not found as DecisionType 3'));
|
|
23252
23347
|
}
|
|
23253
23348
|
}
|
|
23254
23349
|
return {
|
|
@@ -23328,7 +23423,7 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23328
23423
|
if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.article.parentHasSameOption(OP) && !((_ops$addToMeasure = ops.addToMeasure) !== null && _ops$addToMeasure !== void 0 && _ops$addToMeasure.length)) {
|
|
23329
23424
|
var freeTextMeasure = parseFloat(ops.freeText ? ops.freeText : '');
|
|
23330
23425
|
var newFreeTextMeasure = this.article.calcAddToMeasure(OP, freeTextMeasure);
|
|
23331
|
-
LOG$f.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, ops.addToMeasure);
|
|
23426
|
+
if (newFreeTextMeasure) LOG$f.debug('freetext changed by addToMeasure at price calculation', newFreeTextMeasure, freeTextMeasure, ops.addToMeasure);
|
|
23332
23427
|
freeTextMeasure = newFreeTextMeasure;
|
|
23333
23428
|
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23334
23429
|
if (calcUnitPrice != 0) {
|
|
@@ -23380,8 +23475,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23380
23475
|
_step6;
|
|
23381
23476
|
try {
|
|
23382
23477
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
23383
|
-
var
|
|
23384
|
-
var targetPPGPrefixes =
|
|
23478
|
+
var _ops6 = _step6.value;
|
|
23479
|
+
var targetPPGPrefixes = _ops6.targetPPGPrefixes;
|
|
23385
23480
|
if (!targetPPGPrefixes) continue;
|
|
23386
23481
|
var _loop5 = function _loop5() {
|
|
23387
23482
|
var targetPrefix = targetPPGPrefixes[_i5];
|
|
@@ -23390,8 +23485,8 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23390
23485
|
return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
|
|
23391
23486
|
});
|
|
23392
23487
|
if (priceRef) {
|
|
23393
|
-
if (
|
|
23394
|
-
priceRef.calcPrice = priceRef.Price * (1 +
|
|
23488
|
+
if (_ops6.isPercentage) {
|
|
23489
|
+
priceRef.calcPrice = priceRef.Price * (1 + _ops6.calcPrice);
|
|
23395
23490
|
}
|
|
23396
23491
|
}
|
|
23397
23492
|
};
|
|
@@ -23471,11 +23566,11 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23471
23566
|
_step9;
|
|
23472
23567
|
try {
|
|
23473
23568
|
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
23474
|
-
var
|
|
23475
|
-
var
|
|
23476
|
-
var targetOption = (
|
|
23477
|
-
if (
|
|
23478
|
-
articleUsedCalcPrice = articleUsedCalcPrice * (1 +
|
|
23569
|
+
var _ops7$targetPPGPrefix, _ops7$targetPPGPrefix2;
|
|
23570
|
+
var _ops7 = _step9.value;
|
|
23571
|
+
var targetOption = (_ops7$targetPPGPrefix = (_ops7$targetPPGPrefix2 = _ops7.targetPPGPrefixes) === null || _ops7$targetPPGPrefix2 === void 0 ? void 0 : _ops7$targetPPGPrefix2[0]) !== null && _ops7$targetPPGPrefix !== void 0 ? _ops7$targetPPGPrefix : _ops7.targetOption;
|
|
23572
|
+
if (_ops7.isPercentage && targetOption == 'GLOBAL') {
|
|
23573
|
+
articleUsedCalcPrice = articleUsedCalcPrice * (1 + _ops7.calcPrice);
|
|
23479
23574
|
}
|
|
23480
23575
|
}
|
|
23481
23576
|
} catch (err) {
|
|
@@ -23592,10 +23687,10 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23592
23687
|
_step10;
|
|
23593
23688
|
try {
|
|
23594
23689
|
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
23595
|
-
var
|
|
23596
|
-
if (
|
|
23597
|
-
if (
|
|
23598
|
-
myPercBasePrice +=
|
|
23690
|
+
var _ops8 = _step10.value;
|
|
23691
|
+
if (_ops8.ocd == searchOpt || _ops8.optionCodex == searchOpt) {
|
|
23692
|
+
if (_ops8 && _ops8.price > 0) {
|
|
23693
|
+
myPercBasePrice += _ops8.price * _ops8.quantity;
|
|
23599
23694
|
break;
|
|
23600
23695
|
}
|
|
23601
23696
|
}
|
|
@@ -23618,11 +23713,6 @@ var DivaEngine = /*#__PURE__*/function () {
|
|
|
23618
23713
|
return calculatedPrice;
|
|
23619
23714
|
}
|
|
23620
23715
|
}
|
|
23621
|
-
}, {
|
|
23622
|
-
key: "getDecisionDebugStacks",
|
|
23623
|
-
value: function getDecisionDebugStacks() {
|
|
23624
|
-
return this.decisionDebugStacks;
|
|
23625
|
-
}
|
|
23626
23716
|
}]);
|
|
23627
23717
|
}();
|
|
23628
23718
|
|
|
@@ -23636,7 +23726,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23636
23726
|
function IDMEngine(article) {
|
|
23637
23727
|
_classCallCheck(this, IDMEngine);
|
|
23638
23728
|
_defineProperty(this, "article", void 0);
|
|
23639
|
-
_defineProperty(this, "
|
|
23729
|
+
_defineProperty(this, "decisionDebugStack", []);
|
|
23640
23730
|
this.article = article;
|
|
23641
23731
|
}
|
|
23642
23732
|
return _createClass(IDMEngine, [{
|
|
@@ -23647,19 +23737,21 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23647
23737
|
var afterHash = undefined;
|
|
23648
23738
|
var count = 0;
|
|
23649
23739
|
var startTime = Date.now();
|
|
23650
|
-
|
|
23651
|
-
|
|
23740
|
+
this.article.decisionDebugStacks = [];
|
|
23741
|
+
do {
|
|
23742
|
+
var _afterHash;
|
|
23743
|
+
beforeHash = (_afterHash = afterHash) !== null && _afterHash !== void 0 ? _afterHash : JSON.stringify(this.article.snapshot);
|
|
23652
23744
|
this.evalDecisionsfunction();
|
|
23653
|
-
afterHash = this.article.snapshot;
|
|
23745
|
+
afterHash = JSON.stringify(this.article.snapshot);
|
|
23654
23746
|
count++;
|
|
23655
|
-
}
|
|
23747
|
+
} while (afterHash !== beforeHash && count < 50);
|
|
23656
23748
|
var endTime = Date.now();
|
|
23657
23749
|
LOG$e.debug('eval Decisions total time in ' + (endTime - startTime) + ' of ' + count);
|
|
23658
23750
|
}
|
|
23659
23751
|
}, {
|
|
23660
23752
|
key: "evalDecisionsfunction",
|
|
23661
23753
|
value: function evalDecisionsfunction() {
|
|
23662
|
-
var _unsortedDecisons
|
|
23754
|
+
var _unsortedDecisons;
|
|
23663
23755
|
var unsortedDecisons = this.article.articleIDMDecisions;
|
|
23664
23756
|
if (!((_unsortedDecisons = unsortedDecisons) !== null && _unsortedDecisons !== void 0 && _unsortedDecisons.length)) return;
|
|
23665
23757
|
//add the partlist spesific decisions to the normal decisions
|
|
@@ -23688,7 +23780,8 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23688
23780
|
} finally {
|
|
23689
23781
|
_iterator.f();
|
|
23690
23782
|
}
|
|
23691
|
-
|
|
23783
|
+
this.decisionDebugStack = [];
|
|
23784
|
+
var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
|
|
23692
23785
|
for (var m = 0; m < decisions.length; m++) {
|
|
23693
23786
|
var startTime = Date.now();
|
|
23694
23787
|
//Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltets
|
|
@@ -23697,50 +23790,47 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23697
23790
|
switch (decision.decisionType) {
|
|
23698
23791
|
case 2:
|
|
23699
23792
|
this.evalType2Decision(decision, decisions);
|
|
23700
|
-
decisionDebugStack.push({
|
|
23701
|
-
text: decision.decisionNo + ' type: 2 ' + ((_decision$disableHist = decision.disableHistory) === null || _decision$disableHist === void 0 ? void 0 : _decision$disableHist.join(',')),
|
|
23702
|
-
nr: decision.decisionNo,
|
|
23703
|
-
decision: JSON.parse(JSON.stringify(decision))
|
|
23704
|
-
});
|
|
23705
23793
|
break;
|
|
23706
23794
|
case 1:
|
|
23707
23795
|
this.evalType1Decision(decision);
|
|
23708
|
-
decisionDebugStack.push({
|
|
23709
|
-
text: decision.decisionNo + ' type: 1 ' + ((_decision$disableHist2 = decision.disableHistory) === null || _decision$disableHist2 === void 0 ? void 0 : _decision$disableHist2.join(',')),
|
|
23710
|
-
nr: decision.decisionNo,
|
|
23711
|
-
decision: JSON.parse(JSON.stringify(decision))
|
|
23712
|
-
});
|
|
23713
23796
|
break;
|
|
23714
23797
|
case 0:
|
|
23715
23798
|
this.evalType0Decision(decision);
|
|
23716
|
-
decisionDebugStack.push({
|
|
23717
|
-
text: decision.decisionNo + ' type: 0 ' + ((_decision$disableHist3 = decision.disableHistory) === null || _decision$disableHist3 === void 0 ? void 0 : _decision$disableHist3.join(',')),
|
|
23718
|
-
nr: decision.decisionNo,
|
|
23719
|
-
decision: JSON.parse(JSON.stringify(decision))
|
|
23720
|
-
});
|
|
23721
23799
|
break;
|
|
23800
|
+
case 3:
|
|
23801
|
+
continue;
|
|
23722
23802
|
default:
|
|
23723
23803
|
LOG$e.error(new Error('decisionType ' + decision.decisionType + ' not implemented'));
|
|
23724
23804
|
break;
|
|
23725
23805
|
}
|
|
23726
|
-
} else {
|
|
23727
|
-
var _decision$disableHist4;
|
|
23728
|
-
decisionDebugStack.push({
|
|
23729
|
-
text: decision.decisionNo + ' ' + ((_decision$disableHist4 = decision.disableHistory) === null || _decision$disableHist4 === void 0 ? void 0 : _decision$disableHist4.join(',')),
|
|
23730
|
-
nr: decision.decisionNo,
|
|
23731
|
-
decision: JSON.parse(JSON.stringify(decision))
|
|
23732
|
-
});
|
|
23733
23806
|
}
|
|
23807
|
+
beforeSnapshot = this.pushDecisionDebug(decision, beforeSnapshot);
|
|
23734
23808
|
var endTime = Date.now();
|
|
23735
23809
|
LOG$e.debug('decision ' + decision.decisionNo + ' time ' + (endTime - startTime));
|
|
23736
23810
|
}
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
stack: decisionDebugStack,
|
|
23811
|
+
this.article.decisionDebugStacks.push({
|
|
23812
|
+
stack: this.decisionDebugStack,
|
|
23740
23813
|
variantValues: this.article.VariantValues
|
|
23741
23814
|
});
|
|
23742
23815
|
this.updateIDMSpecificFeatures();
|
|
23743
23816
|
}
|
|
23817
|
+
}, {
|
|
23818
|
+
key: "pushDecisionDebug",
|
|
23819
|
+
value: function pushDecisionDebug(decision, beforeSnapshot) {
|
|
23820
|
+
var _decision$disableHist;
|
|
23821
|
+
if (!this.article.set.logDecisions || !beforeSnapshot) return undefined;
|
|
23822
|
+
var afterSnapshot = this.article.snapshot;
|
|
23823
|
+
this.decisionDebugStack.push({
|
|
23824
|
+
text: decision.decisionNo + ' type:' + decision.decisionType + ' ' + ((_decision$disableHist = decision.disableHistory) === null || _decision$disableHist === void 0 ? void 0 : _decision$disableHist.join(',')),
|
|
23825
|
+
nr: decision.decisionNo,
|
|
23826
|
+
decision: JSON.parse(JSON.stringify(decision)),
|
|
23827
|
+
snapshots: {
|
|
23828
|
+
before: beforeSnapshot,
|
|
23829
|
+
after: afterSnapshot
|
|
23830
|
+
}
|
|
23831
|
+
});
|
|
23832
|
+
return afterSnapshot;
|
|
23833
|
+
}
|
|
23744
23834
|
}, {
|
|
23745
23835
|
key: "sortFeatures",
|
|
23746
23836
|
value: function sortFeatures(featureNos) {
|
|
@@ -23850,7 +23940,11 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23850
23940
|
var valCodex = ops.valCodex;
|
|
23851
23941
|
ops.visibleCount = Object.keys(possibleOPVs).length;
|
|
23852
23942
|
if ((!valCodex || !possibleOPVs[valCodex]) && Object.keys(possibleOPVs).length > 0) {
|
|
23853
|
-
|
|
23943
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
23944
|
+
this.clearOP(featureNo, true);
|
|
23945
|
+
} else {
|
|
23946
|
+
this.updateArtOPV(this.article.getDefaultOpv(possibleOPVs), featureNo, ops, undefined);
|
|
23947
|
+
}
|
|
23854
23948
|
}
|
|
23855
23949
|
doAlsoCheckFeatureNos.push(featureNo);
|
|
23856
23950
|
//Hier führende Optionen prüfen
|
|
@@ -23917,7 +24011,11 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23917
24011
|
var valCodex = ops.valCodex;
|
|
23918
24012
|
ops.visibleCount = Object.keys(possibleOPVs).length;
|
|
23919
24013
|
if ((!valCodex || !possibleOPVs[valCodex]) && Object.keys(possibleOPVs).length > 0) {
|
|
23920
|
-
|
|
24014
|
+
if (this.article.CatalogData.useDiomexConfigLogic) {
|
|
24015
|
+
this.clearOP(featureNo, true);
|
|
24016
|
+
} else {
|
|
24017
|
+
this.updateArtOPV(this.article.getDefaultOpv(possibleOPVs), featureNo, ops, undefined);
|
|
24018
|
+
}
|
|
23921
24019
|
}
|
|
23922
24020
|
} else if (p < sortedDeatureRefs.length - 1) {
|
|
23923
24021
|
doAlsoCheckFeature.push(featureNo);
|
|
@@ -23949,7 +24047,6 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
23949
24047
|
case '0':
|
|
23950
24048
|
case 'SET_FEATURE_FIXED':
|
|
23951
24049
|
case 'SET_FEATURE':
|
|
23952
|
-
//Variante A: Option "myDA.OptionCodex" soll den Wert "OPV" + myDA.OptionValueRefCodex bekommen
|
|
23953
24050
|
if (!_this2.article.getArticleOptionState(action.target) || action.target == '') return 0; // continue
|
|
23954
24051
|
if (action.ref == 'FORMULA_REF') {
|
|
23955
24052
|
var _ops3 = _this2.article.getArticleOptionState(action.target);
|
|
@@ -24102,10 +24199,14 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24102
24199
|
}
|
|
24103
24200
|
}, {
|
|
24104
24201
|
key: "clearOP",
|
|
24105
|
-
value: function clearOP(
|
|
24202
|
+
value: function clearOP(featureNo, keepEnalbed) {
|
|
24106
24203
|
var _this$article$set$Vie;
|
|
24107
24204
|
//die Klasse ArticleOptionState wird einfach neu initialisiert
|
|
24108
|
-
var oldOPS = this.article.getArticleOptionState(
|
|
24205
|
+
var oldOPS = this.article.getArticleOptionState(featureNo);
|
|
24206
|
+
if (keepEnalbed) {
|
|
24207
|
+
oldOPS.val = undefined;
|
|
24208
|
+
return;
|
|
24209
|
+
}
|
|
24109
24210
|
var option = oldOPS.option;
|
|
24110
24211
|
var optionState = new ArticleOptionStateData(option, this.article.getIsConfigSingle, oldOPS.defaultOPV, (_this$article$set$Vie = this.article.set.ViewConfig) === null || _this$article$set$Vie === void 0 ? void 0 : _this$article$set$Vie.useIsOptionDefinedWarning);
|
|
24111
24212
|
optionState.isDisabled = true;
|
|
@@ -24150,15 +24251,16 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24150
24251
|
value: function setOP(featureNo, option, freeText, doDefine, byFormula) {
|
|
24151
24252
|
var myArtOPS = this.article.getArticleOptionState(featureNo);
|
|
24152
24253
|
if (!myArtOPS) {
|
|
24153
|
-
LOG$e.error(new DivaError('
|
|
24254
|
+
LOG$e.error(new DivaError('FeautureNo: ' + featureNo + ' in articleCodex: ' + this.article.articleCodex + ' not found!'));
|
|
24154
24255
|
return;
|
|
24155
24256
|
}
|
|
24156
24257
|
myArtOPS.val = option; //akteull OPV wird gesetzt
|
|
24157
24258
|
if (doDefine) {
|
|
24158
24259
|
myArtOPS.isDefined = true;
|
|
24159
24260
|
}
|
|
24160
|
-
var newName = option.name; // this.itemInfo(myOPVItem, true && !myArtOPS.option.hideGroupNameInOrderText, myArtOPS.freeText);
|
|
24261
|
+
var newName = option.name; // TODO add freetext info to current optionstate name this.itemInfo(myOPVItem, true && !myArtOPS.option.hideGroupNameInOrderText, myArtOPS.freeText);
|
|
24161
24262
|
myArtOPS.name = newName;
|
|
24263
|
+
myArtOPS.origName = newName;
|
|
24162
24264
|
myArtOPS.isDoShow = true;
|
|
24163
24265
|
myArtOPS.isDisabled = false;
|
|
24164
24266
|
if (myArtOPS.isFreeText) {
|
|
@@ -24186,56 +24288,9 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24186
24288
|
}, {
|
|
24187
24289
|
key: "evalSetFeatureDefaultDecisions",
|
|
24188
24290
|
value: function evalSetFeatureDefaultDecisions() {
|
|
24189
|
-
//
|
|
24190
|
-
//dieses wird später durch Schnittmengen mit mögliche ValidOptionValues reduziert
|
|
24191
|
-
var allDecisions = this.article.catalogArticle.articleDecisions;
|
|
24192
|
-
var ret = {};
|
|
24193
|
-
if (allDecisions.length > 0) {
|
|
24194
|
-
for (var i = 0; i < allDecisions.length; i++) {
|
|
24195
|
-
allDecisions[i].enabled = true;
|
|
24196
|
-
}
|
|
24197
|
-
for (var m = 0; m < allDecisions.length; m++) {
|
|
24198
|
-
//Alle Optionen Mit DOC Type 1 ermitten - diese zunächst alle ausblenden, werden dann später über Formeln wieder eingeschaltet
|
|
24199
|
-
var myDecision = allDecisions[m];
|
|
24200
|
-
var ignorNextAction = false;
|
|
24201
|
-
if (myDecision.enabled && myDecision.DOC) {
|
|
24202
|
-
for (var j = 0; j < myDecision.DOC.length; j++) {
|
|
24203
|
-
//DecisionOptionCombination
|
|
24291
|
+
//TODO for IDM
|
|
24204
24292
|
|
|
24205
|
-
|
|
24206
|
-
var myDoc = myDecision.DOC[j];
|
|
24207
|
-
//let isValidDOC = !myDoc.JsFormula || myDoc.JsFormula == "" || this.evalRule(myDoc.JsFormula);
|
|
24208
|
-
if (!ignorNextAction) {
|
|
24209
|
-
if (myDecision.Type == '2') {
|
|
24210
|
-
//Aktionsregel. Wenn das erste JsRule erfüllt ist muss man die restlichen DecisionOptionCombinations nicht mehr kontrollieren.
|
|
24211
|
-
if (myDoc.DA) {
|
|
24212
|
-
for (var _i = 0; _i < myDoc.DA.length; _i++) {
|
|
24213
|
-
var myDA = myDoc.DA[_i];
|
|
24214
|
-
var myOptionCodex = myDA.OptionCodex ? 'OPT' + myDA.OptionCodex : '';
|
|
24215
|
-
if (this.article.getArticleOptionState(myOptionCodex)) {
|
|
24216
|
-
if (myDA.Type == 'SET_FEATURE_DEFAULT' || myDA.Type == 'SET_FEATURE_DEFAULT_NULL') {
|
|
24217
|
-
//wenn man einen Artikel mit bestehenden VariantValues initialisiert, sollten keine Defaultwerte gesetzt werden
|
|
24218
|
-
if (!myDoc.JsFormula || myDoc.JsFormula == '' || this.article.evalRule(myDoc.JsFormula)) {
|
|
24219
|
-
ignorNextAction = true;
|
|
24220
|
-
ret[myOptionCodex] = 'OPV' + myDA.OptionValueRefCodex;
|
|
24221
|
-
}
|
|
24222
|
-
} else if (myDA.Type == 'SET_FEATURE_FIXED') {
|
|
24223
|
-
//wenn man einen Artikel mit bestehenden VariantValues initialisiert, sollten keine Defaultwerte gesetzt werden
|
|
24224
|
-
if (!myDoc.JsFormula || myDoc.JsFormula == '' || this.article.evalRule(myDoc.JsFormula)) {
|
|
24225
|
-
ignorNextAction = true;
|
|
24226
|
-
ret[myOptionCodex] = 'OPV' + myDA.OptionValueRefCodex;
|
|
24227
|
-
}
|
|
24228
|
-
}
|
|
24229
|
-
}
|
|
24230
|
-
}
|
|
24231
|
-
}
|
|
24232
|
-
}
|
|
24233
|
-
}
|
|
24234
|
-
}
|
|
24235
|
-
}
|
|
24236
|
-
}
|
|
24237
|
-
}
|
|
24238
|
-
return ret;
|
|
24293
|
+
return {};
|
|
24239
24294
|
}
|
|
24240
24295
|
|
|
24241
24296
|
//***********************************************Partlist evaluieren ************************************************/
|
|
@@ -24258,7 +24313,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24258
24313
|
var isValidDOC = relationTypeNone ? undefined : this.checkDecisionNumber(decision.decisionNo);
|
|
24259
24314
|
if (!isValidDOC && !relationTypeNone) continue;
|
|
24260
24315
|
partlistAdded = true;
|
|
24261
|
-
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
24316
|
+
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, undefined, !relationTypeNone ? decision.decisionNo : undefined);
|
|
24262
24317
|
break;
|
|
24263
24318
|
}
|
|
24264
24319
|
if (decisions.length === 0 && !partlistAdded) {
|
|
@@ -24273,7 +24328,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24273
24328
|
}
|
|
24274
24329
|
}, {
|
|
24275
24330
|
key: "addPartilstToPartlistArticlesToLoad",
|
|
24276
|
-
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, rule) {
|
|
24331
|
+
value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues, rule, decisionNo) {
|
|
24277
24332
|
var decisions = this.article.CatalogData.getDecisionsByNo(myPartListPos.decisions);
|
|
24278
24333
|
|
|
24279
24334
|
//const optionsForPrint: string[] = (myPartListPos.OptionsForPrint as string)?.split(';').map((o: string) => 'OPT' + o);
|
|
@@ -24335,6 +24390,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24335
24390
|
// TODO WWS IDM myPartListPos.RetailPrefix,
|
|
24336
24391
|
Quantity: quanitity,
|
|
24337
24392
|
PartlistRule: rule ? DivaUtils.getOptionValuePairsByRule(rule, this.article.VariantValues) : undefined,
|
|
24393
|
+
partlistDecisionNo: decisionNo,
|
|
24338
24394
|
//SupplierOrderCodex: // TODO WWS IDM ,myPartListPos.SupplierOrderCodex,
|
|
24339
24395
|
initDecisions: initDecisionsFiltered,
|
|
24340
24396
|
RuleDesc: myRuleDesc,
|
|
@@ -24388,7 +24444,7 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24388
24444
|
isValidDOC = true;
|
|
24389
24445
|
}
|
|
24390
24446
|
} else {
|
|
24391
|
-
LOG$e.error(new DivaError('For article: ' + this.article.articleCodex + ' name: ' + this.article.
|
|
24447
|
+
LOG$e.error(new DivaError('For article: ' + this.article.articleCodex + ' name: ' + this.article.origName + ' decisionNr: ' + decisionNo + ' was not found as DecisionType 3'));
|
|
24392
24448
|
}
|
|
24393
24449
|
}
|
|
24394
24450
|
return isValidDOC;
|
|
@@ -24494,11 +24550,6 @@ var IDMEngine = /*#__PURE__*/function () {
|
|
|
24494
24550
|
throw new Error('formula: ' + formula + 'failed to eval ' + origFormula);
|
|
24495
24551
|
}
|
|
24496
24552
|
}
|
|
24497
|
-
}, {
|
|
24498
|
-
key: "getDecisionDebugStacks",
|
|
24499
|
-
value: function getDecisionDebugStacks() {
|
|
24500
|
-
return this.decisionDebugStacks;
|
|
24501
|
-
}
|
|
24502
24553
|
}, {
|
|
24503
24554
|
key: "updateArticleOptionTree",
|
|
24504
24555
|
value: function updateArticleOptionTree() {}
|
|
@@ -24526,6 +24577,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24526
24577
|
_defineProperty(this, "actPlannerData", void 0);
|
|
24527
24578
|
//Hier steht die aktuelle Konfiguration
|
|
24528
24579
|
_defineProperty(this, "_engine", void 0);
|
|
24580
|
+
_defineProperty(this, "decisionDebugStacks", []);
|
|
24529
24581
|
_defineProperty(this, "getIsConfigSingle", function () {
|
|
24530
24582
|
return _this.set.configSingle;
|
|
24531
24583
|
});
|
|
@@ -24567,6 +24619,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24567
24619
|
loadingErrors: [],
|
|
24568
24620
|
priceRefs: [],
|
|
24569
24621
|
partlistRule: initParams.partlistRule,
|
|
24622
|
+
partlistDecisionNo: initParams.partlistDecisionNo,
|
|
24570
24623
|
partListParentArticle: initParams.parentArticle,
|
|
24571
24624
|
partlistArticleVisibleInTree: initParams.partlistArticleVisibleInTree,
|
|
24572
24625
|
hasPartlistArticle: initParams.hasPartlistArticle ? initParams.hasPartlistArticle : false,
|
|
@@ -24664,11 +24717,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24664
24717
|
this.actPlannerData.svgsWithFormula = plannerElement.topSvgsWithFormula;
|
|
24665
24718
|
}
|
|
24666
24719
|
}
|
|
24667
|
-
|
|
24668
|
-
key: "decisionDebugStacks",
|
|
24669
|
-
get: function get() {
|
|
24670
|
-
return this._engine.getDecisionDebugStacks();
|
|
24671
|
-
}
|
|
24720
|
+
|
|
24672
24721
|
/*************************************************GETTER & SETTER **************************************************************************** */
|
|
24673
24722
|
}, {
|
|
24674
24723
|
key: "basketId",
|
|
@@ -25119,7 +25168,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25119
25168
|
}
|
|
25120
25169
|
} else {
|
|
25121
25170
|
var _ops$val;
|
|
25122
|
-
ret += ops.optionOrigName + ': ' + DivaUtils.stripTags(ops.
|
|
25171
|
+
ret += ops.optionOrigName + ': ' + DivaUtils.stripTags(ops.origName) + ((_ops$val = ops.val) !== null && _ops$val !== void 0 && _ops$val.vCodex ? ' (' + ops.val.vCodex + ')' : '') + "'";
|
|
25123
25172
|
}
|
|
25124
25173
|
}
|
|
25125
25174
|
}
|
|
@@ -25187,11 +25236,25 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25187
25236
|
get: function get() {
|
|
25188
25237
|
return this.article.relatedToShelfGrid !== undefined ? true : false;
|
|
25189
25238
|
}
|
|
25239
|
+
}, {
|
|
25240
|
+
key: "origName",
|
|
25241
|
+
get: function get() {
|
|
25242
|
+
var _this$article$actDesc;
|
|
25243
|
+
var ret = (_this$article$actDesc = this.article.actDescription) !== null && _this$article$actDesc !== void 0 ? _this$article$actDesc : this.catalogArticleOrigName;
|
|
25244
|
+
return ret + this.addRuleDesc();
|
|
25245
|
+
}
|
|
25190
25246
|
}, {
|
|
25191
25247
|
key: "name",
|
|
25192
25248
|
get: function get() {
|
|
25193
|
-
var _this$article$
|
|
25194
|
-
var ret = (_this$article$
|
|
25249
|
+
var _this$article$actDesc2;
|
|
25250
|
+
var ret = (_this$article$actDesc2 = this.article.actDescription) !== null && _this$article$actDesc2 !== void 0 ? _this$article$actDesc2 : this.catalogArticleName;
|
|
25251
|
+
return ret + this.addRuleDesc();
|
|
25252
|
+
}
|
|
25253
|
+
}, {
|
|
25254
|
+
key: "addRuleDesc",
|
|
25255
|
+
value: function addRuleDesc() {
|
|
25256
|
+
var _this$optionsForPrint;
|
|
25257
|
+
var ret = '';
|
|
25195
25258
|
if (this.RetailPrefix != 'SAP' && this.article.ruleDesc && this.article.ruleDesc != '' && !((_this$optionsForPrint = this.optionsForPrint) !== null && _this$optionsForPrint !== void 0 && _this$optionsForPrint.length)) {
|
|
25196
25259
|
var ruleDesc = this.article.ruleDesc;
|
|
25197
25260
|
if (!this.set.api.ruleDescWithoutParenthesis()) ruleDesc = '(' + ruleDesc + ')';
|
|
@@ -25218,6 +25281,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25218
25281
|
}
|
|
25219
25282
|
}, {
|
|
25220
25283
|
key: "catalogArticleName",
|
|
25284
|
+
get: function get() {
|
|
25285
|
+
return this.article.catalogArticle.name;
|
|
25286
|
+
}
|
|
25287
|
+
}, {
|
|
25288
|
+
key: "catalogArticleOrigName",
|
|
25221
25289
|
get: function get() {
|
|
25222
25290
|
return this.article.catalogArticle.origName;
|
|
25223
25291
|
}
|
|
@@ -25586,6 +25654,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
25586
25654
|
get: function get() {
|
|
25587
25655
|
return this.article.partlistRule;
|
|
25588
25656
|
}
|
|
25657
|
+
}, {
|
|
25658
|
+
key: "partlistDecisionNo",
|
|
25659
|
+
get: function get() {
|
|
25660
|
+
return this.article.partlistDecisionNo;
|
|
25661
|
+
}
|
|
25589
25662
|
}, {
|
|
25590
25663
|
key: "bundleRules",
|
|
25591
25664
|
get: function get() {
|
|
@@ -26052,14 +26125,21 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26052
26125
|
_step9;
|
|
26053
26126
|
try {
|
|
26054
26127
|
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
26128
|
+
var _ops$val$codex, _ops$val4;
|
|
26055
26129
|
var ops = _step9.value;
|
|
26056
|
-
|
|
26057
|
-
|
|
26130
|
+
ret[ops.optionCodex] = {
|
|
26131
|
+
selOPV: (_ops$val$codex = (_ops$val4 = ops.val) === null || _ops$val4 === void 0 ? void 0 : _ops$val4.codex) !== null && _ops$val$codex !== void 0 ? _ops$val$codex : '',
|
|
26132
|
+
invisible: ops.isInvisible,
|
|
26133
|
+
visibleOPVs: Object.values(ops.visibleOptionValues).map(function (v) {
|
|
26058
26134
|
return v.codex;
|
|
26059
|
-
})
|
|
26060
|
-
|
|
26061
|
-
|
|
26062
|
-
|
|
26135
|
+
})
|
|
26136
|
+
};
|
|
26137
|
+
if (ops.freeText) {
|
|
26138
|
+
ret[ops.optionCodex + '_val'] = {
|
|
26139
|
+
selOPV: ops.freeText,
|
|
26140
|
+
visibleOPVs: [],
|
|
26141
|
+
invisible: true
|
|
26142
|
+
};
|
|
26063
26143
|
}
|
|
26064
26144
|
}
|
|
26065
26145
|
} catch (err) {
|
|
@@ -26067,7 +26147,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26067
26147
|
} finally {
|
|
26068
26148
|
_iterator9.f();
|
|
26069
26149
|
}
|
|
26070
|
-
return
|
|
26150
|
+
return ret;
|
|
26071
26151
|
}
|
|
26072
26152
|
}, {
|
|
26073
26153
|
key: "VisibleVariantValues",
|
|
@@ -26944,7 +27024,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
26944
27024
|
break;
|
|
26945
27025
|
}
|
|
26946
27026
|
_context.next = 4;
|
|
26947
|
-
return import('./ShelfPlanner-
|
|
27027
|
+
return import('./ShelfPlanner-f2164219.js');
|
|
26948
27028
|
case 4:
|
|
26949
27029
|
_yield$import = _context.sent;
|
|
26950
27030
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -27426,7 +27506,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27426
27506
|
}
|
|
27427
27507
|
if (ops.isDoShow && !doHideSizeOption && ops.val) {
|
|
27428
27508
|
if (ops.visibleCount > 0) {
|
|
27429
|
-
var _ops$valName_locales2, _this$optionsForPrint2, _this$optionsForPrint3, _ops$
|
|
27509
|
+
var _ops$valName_locales2, _this$optionsForPrint2, _this$optionsForPrint3, _ops$val5;
|
|
27430
27510
|
var isfreeText = false,
|
|
27431
27511
|
isMeasureValue = false,
|
|
27432
27512
|
freeText = undefined,
|
|
@@ -27443,13 +27523,15 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27443
27523
|
var myOptItem = {
|
|
27444
27524
|
BasketID: this.basketId,
|
|
27445
27525
|
OPT: this.CatalogData.isIDMFormat ? OP : OP.substring(3),
|
|
27526
|
+
MaskOPTName: ops.optionOrigName !== ops.optionName ? ops.optionName : undefined,
|
|
27446
27527
|
OPTName: ops.optionOrigName,
|
|
27447
27528
|
OPTName_locales: ops.optionName_locales,
|
|
27448
27529
|
OptionOCD: ops.optionOcd,
|
|
27449
27530
|
OCD: ops.ocd,
|
|
27450
27531
|
OPV: this.CatalogData.isIDMFormat ? ops.val.codex : ops.val.codex.substring(3),
|
|
27451
27532
|
vOPV: !this.CatalogData.dontUseVCodexInBasket ? ops.vCodex : undefined,
|
|
27452
|
-
OPVName: DivaUtils.stripTags(ops.
|
|
27533
|
+
OPVName: DivaUtils.stripTags(ops.origName),
|
|
27534
|
+
MaskOPVName: ops.origName !== ops.name ? DivaUtils.stripTags(ops.name) : undefined,
|
|
27453
27535
|
OPVName_locales: DivaUtils.stripTagsFromDict((_ops$valName_locales2 = ops.valName_locales) !== null && _ops$valName_locales2 !== void 0 ? _ops$valName_locales2 : {}),
|
|
27454
27536
|
OPVImage: ops.val.image ? this.CatalogData.getCatImageURL(ops.val.image, '_gal') : '',
|
|
27455
27537
|
FreeText: freeText,
|
|
@@ -27464,7 +27546,8 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27464
27546
|
PriceUnit: !ops.isPercentage ? ops.priceUnit : undefined,
|
|
27465
27547
|
CalcPrice: ops.calcPrice,
|
|
27466
27548
|
PriceID: ops.priceId,
|
|
27467
|
-
TabGroup: ops.
|
|
27549
|
+
TabGroup: ops.optionOrigTabGroup,
|
|
27550
|
+
MaskTabGroup: ops.optionTabGroup,
|
|
27468
27551
|
TabGroup_locales: ops.optionTabGroup_locales,
|
|
27469
27552
|
SendToSAP: ops.option.sendToSAP,
|
|
27470
27553
|
ArticlePlaceholder: ops.option.articlePlaceholder,
|
|
@@ -27472,7 +27555,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
27472
27555
|
HideInOrderText: ops.hideInOrderText,
|
|
27473
27556
|
IsDescribingState: ops.isDescribingState,
|
|
27474
27557
|
FreeTextLang: ops.freeTextLang,
|
|
27475
|
-
OPVHexVal: (_ops$
|
|
27558
|
+
OPVHexVal: (_ops$val5 = ops.val) === null || _ops$val5 === void 0 ? void 0 : _ops$val5.hexColor
|
|
27476
27559
|
};
|
|
27477
27560
|
variantBasketData.push(new VariantItemData(myOptItem));
|
|
27478
27561
|
}
|
|
@@ -28696,12 +28779,13 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
28696
28779
|
ruleDesc_locales: doLoadItem.RuleDesc_locales,
|
|
28697
28780
|
basketId: doLoadItem.BasketID,
|
|
28698
28781
|
partlistRule: doLoadItem.PartlistRule,
|
|
28782
|
+
partlistDecisionNo: doLoadItem.partlistDecisionNo,
|
|
28699
28783
|
retailArticleNr: doLoadItem.RetailArticleNr,
|
|
28700
28784
|
retailPrefix: doLoadItem.RetailPrefix,
|
|
28701
28785
|
configArticleCodex: doLoadItem.RetailArticleNr,
|
|
28702
28786
|
supplierOrderCodex: doLoadItem.SupplierOrderCodex,
|
|
28703
28787
|
initDecisions: doLoadItem.initDecisions,
|
|
28704
|
-
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0
|
|
28788
|
+
partlistArticleVisibleInTree: doLoadItem.PosInvisibility === 0,
|
|
28705
28789
|
optionsForPrint: doLoadItem.optionsForPrint,
|
|
28706
28790
|
optionImgForPrint: doLoadItem.optionImgForPrint,
|
|
28707
28791
|
catalogCodex: doLoadItem.CatalogCodex
|
|
@@ -29078,7 +29162,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29078
29162
|
TypeNr: article.typeNr,
|
|
29079
29163
|
ArticleEAN: article.articleEAN,
|
|
29080
29164
|
ArticleGUID: article.articleGUID,
|
|
29081
|
-
Name: article.
|
|
29165
|
+
Name: article.origName,
|
|
29166
|
+
MaskName: article.name,
|
|
29082
29167
|
Name_locales: article.name_locales,
|
|
29083
29168
|
Size: repairOnly ? undefined : article.actSizeText,
|
|
29084
29169
|
Width: article.width,
|
|
@@ -29258,7 +29343,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29258
29343
|
}, {
|
|
29259
29344
|
key: "getAccessoiresBasketData",
|
|
29260
29345
|
value: function getAccessoiresBasketData(setId, article, ops, PosNr) {
|
|
29261
|
-
var _ops$
|
|
29346
|
+
var _ops$val$origName, _ops$val2, _ops$val$name, _ops$val3;
|
|
29262
29347
|
return new OrderLineData({
|
|
29263
29348
|
SetID: setId,
|
|
29264
29349
|
BasketID: 'B' + nanoid(),
|
|
@@ -29270,7 +29355,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
29270
29355
|
PosNr: PosNr,
|
|
29271
29356
|
ArticleCodex: ops.isAccessoirArtNr,
|
|
29272
29357
|
ConfigArticleCodex: ops.isAccessoirArtNr,
|
|
29273
|
-
Name: ops.optionOrigName + ': ' + DivaUtils.stripTags((_ops$
|
|
29358
|
+
Name: ops.optionOrigName + ': ' + DivaUtils.stripTags((_ops$val$origName = (_ops$val2 = ops.val) === null || _ops$val2 === void 0 ? void 0 : _ops$val2.origName) !== null && _ops$val$origName !== void 0 ? _ops$val$origName : ''),
|
|
29359
|
+
MaskName: ops.optionName + ': ' + DivaUtils.stripTags((_ops$val$name = (_ops$val3 = ops.val) === null || _ops$val3 === void 0 ? void 0 : _ops$val3.name) !== null && _ops$val$name !== void 0 ? _ops$val$name : ''),
|
|
29274
29360
|
Quantity: ops.quantity,
|
|
29275
29361
|
Price: ops.calcPrice,
|
|
29276
29362
|
CalcPrice: ops.calcPrice * ops.quantity,
|
|
@@ -30275,6 +30361,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
30275
30361
|
_defineProperty(this, "matchingProduct", void 0);
|
|
30276
30362
|
_defineProperty(this, "matchingOrigProduct", void 0);
|
|
30277
30363
|
_defineProperty(this, "_supplierColors", void 0);
|
|
30364
|
+
_defineProperty(this, "_logDecisions", false);
|
|
30278
30365
|
/**Favorits state */
|
|
30279
30366
|
_defineProperty(this, "_handlelingCurrentFavorites", false);
|
|
30280
30367
|
_defineProperty(this, "_favorites", {
|
|
@@ -31548,7 +31635,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31548
31635
|
break;
|
|
31549
31636
|
}
|
|
31550
31637
|
_context5.next = 3;
|
|
31551
|
-
return import('./DoorPlanner-
|
|
31638
|
+
return import('./DoorPlanner-5762b7da.js');
|
|
31552
31639
|
case 3:
|
|
31553
31640
|
_yield$import = _context5.sent;
|
|
31554
31641
|
DoorPlanner = _yield$import["default"];
|
|
@@ -31707,6 +31794,14 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
31707
31794
|
set: function set(supplierColors) {
|
|
31708
31795
|
this._supplierColors = supplierColors;
|
|
31709
31796
|
}
|
|
31797
|
+
}, {
|
|
31798
|
+
key: "logDecisions",
|
|
31799
|
+
get: function get() {
|
|
31800
|
+
return this._logDecisions;
|
|
31801
|
+
},
|
|
31802
|
+
set: function set(val) {
|
|
31803
|
+
this._logDecisions = val;
|
|
31804
|
+
}
|
|
31710
31805
|
}, {
|
|
31711
31806
|
key: "showAccessioreOnLastTab",
|
|
31712
31807
|
get: function get() {
|
|
@@ -32808,7 +32903,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
32808
32903
|
var highestId = 0;
|
|
32809
32904
|
for (var i = 0; i < set.oldConfigVariants.length; i++) {
|
|
32810
32905
|
var variant = set.oldConfigVariants[i];
|
|
32811
|
-
if (variant.VariantID && highestId
|
|
32906
|
+
if (variant.VariantID && highestId <= variant.VariantID) {
|
|
32812
32907
|
highestId = variant.VariantID + 1;
|
|
32813
32908
|
}
|
|
32814
32909
|
}
|
|
@@ -38395,7 +38490,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38395
38490
|
break;
|
|
38396
38491
|
case 3:
|
|
38397
38492
|
_context12.next = 5;
|
|
38398
|
-
return import('./PfisterWWSHandler-
|
|
38493
|
+
return import('./PfisterWWSHandler-50bcdc0d.js');
|
|
38399
38494
|
case 5:
|
|
38400
38495
|
_yield$import = _context12.sent;
|
|
38401
38496
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -38403,7 +38498,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38403
38498
|
return _context12.abrupt("break", 27);
|
|
38404
38499
|
case 9:
|
|
38405
38500
|
_context12.next = 11;
|
|
38406
|
-
return import('./LiviqueWWSHandler-
|
|
38501
|
+
return import('./LiviqueWWSHandler-f124a938.js');
|
|
38407
38502
|
case 11:
|
|
38408
38503
|
_yield$import2 = _context12.sent;
|
|
38409
38504
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -38411,7 +38506,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38411
38506
|
return _context12.abrupt("break", 27);
|
|
38412
38507
|
case 15:
|
|
38413
38508
|
_context12.next = 17;
|
|
38414
|
-
return import('./SeriousBasketHandler-
|
|
38509
|
+
return import('./SeriousBasketHandler-41629ab4.js');
|
|
38415
38510
|
case 17:
|
|
38416
38511
|
_yield$import3 = _context12.sent;
|
|
38417
38512
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -38419,7 +38514,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
38419
38514
|
return _context12.abrupt("break", 27);
|
|
38420
38515
|
case 21:
|
|
38421
38516
|
_context12.next = 23;
|
|
38422
|
-
return import('./StandardWWSHandler-
|
|
38517
|
+
return import('./StandardWWSHandler-e0aaaf51.js');
|
|
38423
38518
|
case 23:
|
|
38424
38519
|
_yield$import4 = _context12.sent;
|
|
38425
38520
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -39847,7 +39942,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
39847
39942
|
while (1) switch (_context3.prev = _context3.next) {
|
|
39848
39943
|
case 0:
|
|
39849
39944
|
_context3.next = 2;
|
|
39850
|
-
return import('./Host3DSignalR-
|
|
39945
|
+
return import('./Host3DSignalR-3fa73b93.js');
|
|
39851
39946
|
case 2:
|
|
39852
39947
|
_yield$import = _context3.sent;
|
|
39853
39948
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -41401,7 +41496,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41401
41496
|
break;
|
|
41402
41497
|
case 8:
|
|
41403
41498
|
_context4.next = 10;
|
|
41404
|
-
return import('./DivaStandardPlanner-
|
|
41499
|
+
return import('./DivaStandardPlanner-8464bf41.js');
|
|
41405
41500
|
case 10:
|
|
41406
41501
|
_yield$import = _context4.sent;
|
|
41407
41502
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -41412,7 +41507,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
41412
41507
|
return _context4.abrupt("break", 21);
|
|
41413
41508
|
case 15:
|
|
41414
41509
|
_context4.next = 17;
|
|
41415
|
-
return import('./DivaBoxPlanner-
|
|
41510
|
+
return import('./DivaBoxPlanner-60e27a70.js');
|
|
41416
41511
|
case 17:
|
|
41417
41512
|
_yield$import2 = _context4.sent;
|
|
41418
41513
|
DivaBoxPlanner = _yield$import2["default"];
|