@crystaldesign/web-planner-logic 24.10.0-beta.1 → 24.10.0-beta.10
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-6a883291.js → DivaBoxPlanner-d100fdb8.js} +3 -3
- package/build/cjs/{DivaSingleProductPlanner-fcf3e4be.js → DivaSingleProductPlanner-a308bc4c.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-a18f752d.js → DivaStandardPlanner-3ead2b7c.js} +3 -3
- package/build/cjs/{DockingPointHandler-5c6b6024.js → DockingPointHandler-26105372.js} +1 -1
- package/build/cjs/{DoorPlanner-5164c50d.js → DoorPlanner-96be0550.js} +1 -1
- package/build/cjs/{Host3DSignalR-f13134cb.js → Host3DSignalR-e4ca360e.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-32bb295f.js → LiviqueWWSHandler-735014f7.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-0447de84.js → PfisterWWSHandler-224c584c.js} +1 -1
- package/build/cjs/{PlannerHandler2D-a941c306.js → PlannerHandler2D-01fb3b8e.js} +2 -2
- package/build/cjs/{ProductBasketHandler-144386d9.js → ProductBasketHandler-034a3339.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-e7f5bfb9.js → SeriousBasketHandler-3f4b1594.js} +1 -1
- package/build/cjs/{ShelfPlanner-63df1fef.js → ShelfPlanner-402344f9.js} +2 -2
- package/build/cjs/{StandardWWSHandler-96b3ab81.js → StandardWWSHandler-b61cae22.js} +1 -1
- package/build/cjs/{index-0cf8efc1.js → index-0fbd8bd2.js} +263 -168
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-0a38d41b.js → DivaBoxPlanner-19c913f4.js} +3 -3
- package/build/esm/{DivaSingleProductPlanner-76dcd48c.js → DivaSingleProductPlanner-355443b6.js} +2 -2
- package/build/esm/{DivaStandardPlanner-774854f1.js → DivaStandardPlanner-f8d55f53.js} +3 -3
- package/build/esm/{DockingPointHandler-c35c0ee3.js → DockingPointHandler-072c0cdc.js} +1 -1
- package/build/esm/{DoorPlanner-c9293a3a.js → DoorPlanner-8e9ebc6a.js} +1 -1
- package/build/esm/{Host3DSignalR-3ca1dd9c.js → Host3DSignalR-9c502b78.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-28edc334.js → LiviqueWWSHandler-817f6954.js} +1 -1
- package/build/esm/{PfisterWWSHandler-21e4c2f3.js → PfisterWWSHandler-f3758c94.js} +1 -1
- package/build/esm/{PlannerHandler2D-9f4f8efb.js → PlannerHandler2D-0d5bb96d.js} +2 -2
- package/build/esm/{ProductBasketHandler-fa0c1a9e.js → ProductBasketHandler-9e2c5c1a.js} +1 -1
- package/build/esm/{SeriousBasketHandler-2e0ab157.js → SeriousBasketHandler-9a45b419.js} +1 -1
- package/build/esm/{ShelfPlanner-c52e6233.js → ShelfPlanner-4c376e6b.js} +2 -2
- package/build/esm/{StandardWWSHandler-72ea1ffc.js → StandardWWSHandler-0dc1e038.js} +1 -1
- package/build/esm/{index-622ebf68.js → index-fe659872.js} +263 -168
- 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/API/TemplateConfigType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +12 -4
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +44 -14
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -2
- package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -846,7 +846,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
846
846
|
}, {
|
|
847
847
|
key: "apiUrl",
|
|
848
848
|
value: function apiUrl(queryString, useWebServiceApi) {
|
|
849
|
-
var _this$
|
|
849
|
+
var _this$apiConfig21, _this$apiConfig22;
|
|
850
850
|
if (useWebServiceApi == 'catalog') {
|
|
851
851
|
var _this$apiConfig13, _this$apiConfig14;
|
|
852
852
|
if (!((_this$apiConfig13 = this.apiConfig) !== null && _this$apiConfig13 !== void 0 && _this$apiConfig13.catalogService)) throw new Error('No catalog Service defined');
|
|
@@ -862,8 +862,13 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
862
862
|
if (!((_this$apiConfig17 = this.apiConfig) !== null && _this$apiConfig17 !== void 0 && _this$apiConfig17.reportService)) throw new Error('No report Service defined');
|
|
863
863
|
return ((_this$apiConfig18 = this.apiConfig) === null || _this$apiConfig18 === void 0 ? void 0 : _this$apiConfig18.reportService) + queryString;
|
|
864
864
|
}
|
|
865
|
-
|
|
866
|
-
|
|
865
|
+
if (useWebServiceApi == 'enricher') {
|
|
866
|
+
var _this$apiConfig19, _this$apiConfig20;
|
|
867
|
+
if (!((_this$apiConfig19 = this.apiConfig) !== null && _this$apiConfig19 !== void 0 && _this$apiConfig19.enricherService)) throw new Error('No report Service defined');
|
|
868
|
+
return ((_this$apiConfig20 = this.apiConfig) === null || _this$apiConfig20 === void 0 ? void 0 : _this$apiConfig20.enricherService) + queryString;
|
|
869
|
+
}
|
|
870
|
+
var url = (_this$apiConfig21 = this.apiConfig) === null || _this$apiConfig21 === void 0 ? void 0 : _this$apiConfig21.api2["default"];
|
|
871
|
+
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig22 = this.apiConfig) !== null && _this$apiConfig22 !== void 0 && _this$apiConfig22.api2.web) {
|
|
867
872
|
url = this.apiConfig.api2.web;
|
|
868
873
|
}
|
|
869
874
|
if (!url) throw new Error('No API2 defined');
|
|
@@ -927,7 +932,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
927
932
|
}, {
|
|
928
933
|
key: "getCatalogProductUrl",
|
|
929
934
|
value: function getCatalogProductUrl(catalogCodex) {
|
|
930
|
-
var search = '{catCodex,contains,' + catalogCodex +
|
|
935
|
+
var search = '{catCodex,contains,' + catalogCodex + "},{availableForOrganizations,eq,".concat(this.organization._id, "}");
|
|
931
936
|
return '/v1/products?' + 'search=' + encodeURIComponent('[' + search + ']') + '&organizationIds=' + this.organization._id + '&fields=' + encodeURIComponent('{divaNr,addedPrice,discountedPrice,shortDescription,image,dockingPoints,articles,originDivaNr,variantId,affiliate,retailerArticleNr,minQuantity,increments,calculatedPrice}');
|
|
932
937
|
}
|
|
933
938
|
}, {
|
|
@@ -966,6 +971,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
966
971
|
value: function getAdditionalModelInfosQS(accountGuid, catalogGuid) {
|
|
967
972
|
return '/additionalModelInfos/one?' + '&accountGuid=' + accountGuid + '&catalogGuid=' + catalogGuid;
|
|
968
973
|
}
|
|
974
|
+
}, {
|
|
975
|
+
key: "getCatalogMaskQS",
|
|
976
|
+
value: function getCatalogMaskQS(catalogGuid, organizationId) {
|
|
977
|
+
return '/live/mask/' + catalogGuid + '/mask?organizationId=' + organizationId;
|
|
978
|
+
}
|
|
969
979
|
}, {
|
|
970
980
|
key: "getAdditionalModelInfosPostMaskQS",
|
|
971
981
|
value: function getAdditionalModelInfosPostMaskQS(id) {
|
|
@@ -1235,12 +1245,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1235
1245
|
key: "getDimensionbyId",
|
|
1236
1246
|
value: function () {
|
|
1237
1247
|
var _getDimensionbyId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(id, iln, catalogCodex, plannedOptions) {
|
|
1238
|
-
var _this$
|
|
1248
|
+
var _this$apiConfig23;
|
|
1239
1249
|
var fullUrl, res, headers;
|
|
1240
1250
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
1241
1251
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1242
1252
|
case 0:
|
|
1243
|
-
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$
|
|
1253
|
+
fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig23 = this.apiConfig) === null || _this$apiConfig23 === void 0 ? void 0 : _this$apiConfig23.useDebugUrl);
|
|
1244
1254
|
headers = {};
|
|
1245
1255
|
if (this.jwt) headers = {
|
|
1246
1256
|
Authorization: 'Bearer ' + this.jwt
|
|
@@ -16026,7 +16036,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16026
16036
|
showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
|
|
16027
16037
|
priceUnit: jsonOPV.PriceUnit,
|
|
16028
16038
|
value: jsonOPV.Value,
|
|
16029
|
-
property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties :
|
|
16039
|
+
property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray(Object.values((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : {}))),
|
|
16030
16040
|
textbausteine: jsonOPV.Textbausteine
|
|
16031
16041
|
};
|
|
16032
16042
|
this.opv.colorGroups = this.mapRALColorToGroup();
|
|
@@ -16408,7 +16418,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16408
16418
|
arePricesLoaded: false,
|
|
16409
16419
|
articleOptions: {},
|
|
16410
16420
|
decisions: [],
|
|
16411
|
-
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 :
|
|
16421
|
+
properties: [].concat(_toConsumableArray((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray(Object.values((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : {}))),
|
|
16412
16422
|
image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
|
|
16413
16423
|
imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
|
|
16414
16424
|
imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
|
|
@@ -17812,10 +17822,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
|
|
|
17812
17822
|
|
|
17813
17823
|
var OptionCatalogData = /*#__PURE__*/function () {
|
|
17814
17824
|
function OptionCatalogData(codex, jsonOPT, catalogData) {
|
|
17815
|
-
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout,
|
|
17825
|
+
var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _jsonOPT$Properties, _optionMask$propertie, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt;
|
|
17816
17826
|
_classCallCheck(this, OptionCatalogData);
|
|
17817
17827
|
_defineProperty(this, "opt", void 0);
|
|
17818
17828
|
var optionMask = (_catalogData$catalogM = (_catalogData$catalogM2 = catalogData.catalogMask) === null || _catalogData$catalogM2 === void 0 || (_catalogData$catalogM2 = _catalogData$catalogM2.options) === null || _catalogData$catalogM2 === void 0 ? void 0 : _catalogData$catalogM2[codex]) !== null && _catalogData$catalogM !== void 0 ? _catalogData$catalogM : codex.startsWith('OPT') ? (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 || (_catalogData$catalogM3 = _catalogData$catalogM3.options) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3[codex.substring(3)] : undefined;
|
|
17829
|
+
var properties = [].concat(_toConsumableArray((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray(Object.values((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : {})));
|
|
17819
17830
|
this.opt = {
|
|
17820
17831
|
codex: codex,
|
|
17821
17832
|
name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[(_catalogData$api$getL = catalogData.api.getLanguage()) === null || _catalogData$api$getL === void 0 ? void 0 : _catalogData$api$getL.toLowerCase()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
|
|
@@ -17826,9 +17837,9 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17826
17837
|
image: jsonOPT.Image ? jsonOPT.Image : undefined,
|
|
17827
17838
|
invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : jsonOPT.Invisible != undefined ? jsonOPT.Invisible : false,
|
|
17828
17839
|
maskTabgroup: optionMask === null || optionMask === void 0 || (_optionMask$tabGroup = optionMask.tabGroup) === null || _optionMask$tabGroup === void 0 ? void 0 : _optionMask$tabGroup[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()],
|
|
17829
|
-
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout :
|
|
17840
|
+
layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : properties === null || properties === void 0 || (_properties$find = properties.find(function (p) {
|
|
17830
17841
|
return p.Codex == 'LAYOUT';
|
|
17831
|
-
})) === null ||
|
|
17842
|
+
})) === null || _properties$find === void 0 ? void 0 : _properties$find.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
|
|
17832
17843
|
multiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false,
|
|
17833
17844
|
sendToPIM: !!jsonOPT.SendToPIM,
|
|
17834
17845
|
useMaxPriceOfGroup: jsonOPT.UseMaxPriceOfGroup != undefined ? Number(jsonOPT.UseMaxPriceOfGroup) : undefined,
|
|
@@ -17837,7 +17848,7 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
17837
17848
|
hideInOrderText: jsonOPT.hideInOrderText != undefined ? jsonOPT.hideInOrderText == 'True' : false,
|
|
17838
17849
|
showOPVCodex: jsonOPT.showOPVCodex != undefined ? jsonOPT.showOPVCodex == 'True' : false,
|
|
17839
17850
|
showOPVAsArticleNr: typeof jsonOPT.showOPVAsArticleNr == 'boolean' ? jsonOPT.showOPVAsArticleNr : ((_jsonOPT$showOPVAsArt = jsonOPT.showOPVAsArticleNr) === null || _jsonOPT$showOPVAsArt === void 0 ? void 0 : _jsonOPT$showOPVAsArt.toLowerCase()) == 'true',
|
|
17840
|
-
property:
|
|
17851
|
+
property: properties,
|
|
17841
17852
|
parentOptionCodex: jsonOPT.ParentOptionCodex,
|
|
17842
17853
|
articlePlaceholder: jsonOPT.ArticlePlaceholder && jsonOPT.ArticlePlaceholder == 'True' ? true : false,
|
|
17843
17854
|
isMultiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false
|
|
@@ -18272,7 +18283,28 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18272
18283
|
// old tag
|
|
18273
18284
|
useDecisionPosCountValue: false,
|
|
18274
18285
|
useShelfPlannerRTV: false,
|
|
18275
|
-
notificationsRules: [
|
|
18286
|
+
notificationsRules: [{
|
|
18287
|
+
rules: [{
|
|
18288
|
+
visitedOptions: ['SHELFARTICLE_1'],
|
|
18289
|
+
articles: [''],
|
|
18290
|
+
jsFormula: '',
|
|
18291
|
+
variantValues: {}
|
|
18292
|
+
}],
|
|
18293
|
+
checkOnEvents: {
|
|
18294
|
+
option: 'GR',
|
|
18295
|
+
articleCodex: '',
|
|
18296
|
+
optionValue: ''
|
|
18297
|
+
},
|
|
18298
|
+
type: 'notification',
|
|
18299
|
+
showInModal: true,
|
|
18300
|
+
onlyShowOnce: true,
|
|
18301
|
+
messageTitle: {
|
|
18302
|
+
DE: 'ospele'
|
|
18303
|
+
},
|
|
18304
|
+
message: {
|
|
18305
|
+
DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
|
|
18306
|
+
}
|
|
18307
|
+
}],
|
|
18276
18308
|
warningRule: [],
|
|
18277
18309
|
summaryTabGroupPosition: undefined,
|
|
18278
18310
|
onConfigSingleDontGeneralize: false,
|
|
@@ -18318,7 +18350,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18318
18350
|
var _this$catalogMask$cat;
|
|
18319
18351
|
if ((_this$catalogMask$cat = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat !== void 0 && _this$catalogMask$cat[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
|
|
18320
18352
|
if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
|
|
18321
|
-
if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(this.catalogMask.catalog.properties)));
|
|
18353
|
+
if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(Object.values(this.catalogMask.catalog.properties))));
|
|
18322
18354
|
}
|
|
18323
18355
|
}
|
|
18324
18356
|
}, {
|
|
@@ -18576,6 +18608,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18576
18608
|
_this.catalogData.bundleRules = JSON.parse(item.Value);
|
|
18577
18609
|
} else if (item.Codex == 'NOTIFICATIONS') {
|
|
18578
18610
|
_this.catalogData.notificationsRules = JSON.parse(item.Value);
|
|
18611
|
+
} else if (item.Codex == 'WARNINGS') {
|
|
18612
|
+
_this.catalogData.warningRule = JSON.parse(item.Value);
|
|
18579
18613
|
} else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
|
|
18580
18614
|
_this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
|
|
18581
18615
|
} else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
|
|
@@ -19597,7 +19631,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19597
19631
|
key: "getCatalogData",
|
|
19598
19632
|
value: function () {
|
|
19599
19633
|
var _getCatalogData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(state, catalogCodex, orderSet) {
|
|
19600
|
-
var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, catalogData, _state$actions;
|
|
19634
|
+
var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, mask, _state$catalogMask, catalogData, _state$actions;
|
|
19601
19635
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19602
19636
|
while (1) switch (_context.prev = _context.next) {
|
|
19603
19637
|
case 0:
|
|
@@ -19609,7 +19643,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19609
19643
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19610
19644
|
case 5:
|
|
19611
19645
|
if (!orderSet) {
|
|
19612
|
-
_context.next =
|
|
19646
|
+
_context.next = 46;
|
|
19613
19647
|
break;
|
|
19614
19648
|
}
|
|
19615
19649
|
// ab hier parallell laden
|
|
@@ -19630,43 +19664,49 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19630
19664
|
throw new Error(catalogApiData.Error);
|
|
19631
19665
|
case 17:
|
|
19632
19666
|
additionalModelInfos = undefined;
|
|
19667
|
+
mask = undefined;
|
|
19668
|
+
_context.prev = 19;
|
|
19669
|
+
_context.next = 22;
|
|
19670
|
+
return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher');
|
|
19671
|
+
case 22:
|
|
19672
|
+
mask = _context.sent;
|
|
19633
19673
|
if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
|
|
19634
|
-
_context.next =
|
|
19674
|
+
_context.next = 27;
|
|
19635
19675
|
break;
|
|
19636
19676
|
}
|
|
19637
|
-
_context.
|
|
19638
|
-
_context.next = 22;
|
|
19677
|
+
_context.next = 26;
|
|
19639
19678
|
return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
|
|
19640
|
-
case
|
|
19679
|
+
case 26:
|
|
19641
19680
|
additionalModelInfos = _context.sent;
|
|
19642
|
-
|
|
19681
|
+
case 27:
|
|
19682
|
+
_context.next = 32;
|
|
19643
19683
|
break;
|
|
19644
|
-
case
|
|
19645
|
-
_context.prev =
|
|
19684
|
+
case 29:
|
|
19685
|
+
_context.prev = 29;
|
|
19646
19686
|
_context.t0 = _context["catch"](19);
|
|
19647
19687
|
LOG$d.debug('no additionalModelInfos found: ' + _context.t0);
|
|
19648
|
-
case
|
|
19649
|
-
if (state.catalogMask) {
|
|
19688
|
+
case 32:
|
|
19689
|
+
if (state.catalogMask || mask) {
|
|
19650
19690
|
if (!additionalModelInfos) additionalModelInfos = {
|
|
19651
19691
|
_id: ''
|
|
19652
19692
|
};
|
|
19653
|
-
additionalModelInfos.catalogMask = state.catalogMask;
|
|
19693
|
+
additionalModelInfos.catalogMask = (_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask;
|
|
19654
19694
|
}
|
|
19655
19695
|
catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
|
|
19656
19696
|
if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
|
|
19657
|
-
_context.next =
|
|
19697
|
+
_context.next = 38;
|
|
19658
19698
|
break;
|
|
19659
19699
|
}
|
|
19660
19700
|
catalogData.initCatalogArticles(catalogArticleListData.Articles);
|
|
19661
|
-
_context.next =
|
|
19701
|
+
_context.next = 41;
|
|
19662
19702
|
break;
|
|
19663
|
-
case
|
|
19703
|
+
case 38:
|
|
19664
19704
|
DivaUtils.endSpanOfApm('Catalog initialize');
|
|
19665
19705
|
LOG$d.error(new DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
|
|
19666
19706
|
code: 'WC_0002'
|
|
19667
19707
|
}));
|
|
19668
19708
|
throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
|
|
19669
|
-
case
|
|
19709
|
+
case 41:
|
|
19670
19710
|
if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
|
|
19671
19711
|
catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
|
|
19672
19712
|
}
|
|
@@ -19683,16 +19723,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19683
19723
|
|
|
19684
19724
|
DivaUtils.endSpanOfApm('Catalog initialize');
|
|
19685
19725
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19686
|
-
case
|
|
19726
|
+
case 46:
|
|
19687
19727
|
LOG$d.error(new DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
|
|
19688
19728
|
code: 'WC_0007'
|
|
19689
19729
|
}));
|
|
19690
19730
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19691
|
-
case
|
|
19731
|
+
case 48:
|
|
19692
19732
|
case "end":
|
|
19693
19733
|
return _context.stop();
|
|
19694
19734
|
}
|
|
19695
|
-
}, _callee, null, [[19,
|
|
19735
|
+
}, _callee, null, [[19, 29]]);
|
|
19696
19736
|
}));
|
|
19697
19737
|
function getCatalogData(_x, _x2, _x3) {
|
|
19698
19738
|
return _getCatalogData.apply(this, arguments);
|
|
@@ -23487,7 +23527,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23487
23527
|
break;
|
|
23488
23528
|
}
|
|
23489
23529
|
_context.next = 4;
|
|
23490
|
-
return import('./ShelfPlanner-
|
|
23530
|
+
return import('./ShelfPlanner-4c376e6b.js');
|
|
23491
23531
|
case 4:
|
|
23492
23532
|
_yield$import = _context.sent;
|
|
23493
23533
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -23551,6 +23591,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23551
23591
|
calcUnitPrice = 0,
|
|
23552
23592
|
calcUnit2Price = 0,
|
|
23553
23593
|
firstUnit2Param = 0,
|
|
23594
|
+
secondUnit2Param = 0,
|
|
23554
23595
|
idmPriceMeasureFactor = 1;
|
|
23555
23596
|
//CalcPreise berechnen
|
|
23556
23597
|
for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
|
|
@@ -23581,76 +23622,82 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23581
23622
|
if (myArtOPS.replaceMainArtNr) {
|
|
23582
23623
|
this.configArticleCodex = myArtOPS.replaceMainArtNr;
|
|
23583
23624
|
}
|
|
23625
|
+
var name = myArtOPS.name;
|
|
23626
|
+
console.log('name', name);
|
|
23584
23627
|
if (!tmpOPT.useMaxPriceOfGroup) {
|
|
23585
23628
|
myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
|
|
23586
23629
|
}
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
}
|
|
23611
|
-
if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23612
|
-
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23613
|
-
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23614
|
-
if (calcUnitPrice != 0) {
|
|
23615
|
-
var quantity = 0;
|
|
23616
|
-
if (OP == 'OPTUMFANG') {
|
|
23617
|
-
mUnit = 'cm';
|
|
23618
|
-
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23619
|
-
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23620
|
-
mUnit = 'cm';
|
|
23621
|
-
quantity = this.calcWidth * Math.PI;
|
|
23630
|
+
if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
|
|
23631
|
+
var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
|
|
23632
|
+
myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
|
|
23633
|
+
} else {
|
|
23634
|
+
switch (pUnit) {
|
|
23635
|
+
case 'm':
|
|
23636
|
+
calcUnitPrice += myArtOPS.calcPrice / 100;
|
|
23637
|
+
break;
|
|
23638
|
+
case 'cm':
|
|
23639
|
+
calcUnitPrice += myArtOPS.calcPrice;
|
|
23640
|
+
break;
|
|
23641
|
+
case 'm2':
|
|
23642
|
+
calcUnit2Price += myArtOPS.calcPrice / 10000;
|
|
23643
|
+
break;
|
|
23644
|
+
case 'cm2':
|
|
23645
|
+
calcUnit2Price += myArtOPS.calcPrice;
|
|
23646
|
+
break;
|
|
23647
|
+
default:
|
|
23648
|
+
if (myArtOPS.isPercentage) {
|
|
23649
|
+
//hier myArtOPS.TargetOption auswerten
|
|
23650
|
+
if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
|
|
23651
|
+
myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
|
|
23652
|
+
}
|
|
23622
23653
|
} else {
|
|
23623
|
-
|
|
23654
|
+
myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
|
|
23624
23655
|
}
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23656
|
+
break;
|
|
23657
|
+
}
|
|
23658
|
+
if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23659
|
+
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23660
|
+
if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
|
|
23661
|
+
if (calcUnitPrice != 0) {
|
|
23662
|
+
var quantity = 0;
|
|
23663
|
+
if (OP == 'OPTUMFANG') {
|
|
23664
|
+
mUnit = 'cm';
|
|
23665
|
+
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23666
|
+
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23667
|
+
mUnit = 'cm';
|
|
23668
|
+
quantity = this.calcWidth * Math.PI;
|
|
23669
|
+
} else {
|
|
23670
|
+
quantity = freeTextMeasure;
|
|
23671
|
+
}
|
|
23672
|
+
if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
|
|
23673
|
+
} else if (calcUnit2Price != 0) {
|
|
23674
|
+
//for diamter option
|
|
23675
|
+
if (myArtOPS.option.diameter) {
|
|
23676
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
|
|
23634
23677
|
} else {
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23678
|
+
if (firstUnit2Param == 0) {
|
|
23679
|
+
firstUnit2Param = freeTextMeasure;
|
|
23680
|
+
if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
|
|
23681
|
+
} else {
|
|
23682
|
+
secondUnit2Param = freeTextMeasure;
|
|
23683
|
+
if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
|
|
23684
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
|
|
23685
|
+
}
|
|
23638
23686
|
}
|
|
23639
23687
|
}
|
|
23640
23688
|
}
|
|
23641
23689
|
}
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23690
|
+
if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
|
|
23691
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
|
|
23692
|
+
}
|
|
23693
|
+
if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
|
|
23694
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
|
|
23695
|
+
}
|
|
23696
|
+
if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
|
|
23697
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
|
|
23698
|
+
}
|
|
23651
23699
|
}
|
|
23652
23700
|
}
|
|
23653
|
-
|
|
23654
23701
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
23655
23702
|
for (var _iKey3 in myArtOPSs) {
|
|
23656
23703
|
var _myArtOPS = myArtOPSs[_iKey3];
|
|
@@ -23746,6 +23793,21 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23746
23793
|
}
|
|
23747
23794
|
this.article.price = articleUsedCalcPrice;
|
|
23748
23795
|
}
|
|
23796
|
+
}, {
|
|
23797
|
+
key: "getCalcPerUnit",
|
|
23798
|
+
value: function getCalcPerUnit(unit, calcPrice) {
|
|
23799
|
+
switch (unit) {
|
|
23800
|
+
case 'm':
|
|
23801
|
+
return calcPrice / 100;
|
|
23802
|
+
case 'cm':
|
|
23803
|
+
return calcPrice;
|
|
23804
|
+
case 'm2':
|
|
23805
|
+
return calcPrice / 10000;
|
|
23806
|
+
case 'cm2':
|
|
23807
|
+
return calcPrice;
|
|
23808
|
+
}
|
|
23809
|
+
return 0;
|
|
23810
|
+
}
|
|
23749
23811
|
}, {
|
|
23750
23812
|
key: "getOptionPrice",
|
|
23751
23813
|
value: function getOptionPrice(calculatedPrice, optItem, digits) {
|
|
@@ -27926,8 +27988,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27926
27988
|
}, {
|
|
27927
27989
|
key: "remindPriceForHash",
|
|
27928
27990
|
value: function remindPriceForHash(product) {
|
|
27929
|
-
var _product$discountedPr, _product$discountedPr2;
|
|
27930
|
-
if (!product.
|
|
27991
|
+
var _product$availableFor, _product$discountedPr, _product$discountedPr2;
|
|
27992
|
+
if (!((_product$availableFor = product.availableForOrganizations) !== null && _product$availableFor !== void 0 && _product$availableFor.includes(this.getSetState.organizationId))) return;
|
|
27931
27993
|
var claculatedPrice = this.getSetPrice(true);
|
|
27932
27994
|
if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && claculatedPrice == product.calculatedPrice) {
|
|
27933
27995
|
return;
|
|
@@ -27953,7 +28015,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27953
28015
|
break;
|
|
27954
28016
|
}
|
|
27955
28017
|
_context4.next = 3;
|
|
27956
|
-
return import('./DoorPlanner-
|
|
28018
|
+
return import('./DoorPlanner-8e9ebc6a.js');
|
|
27957
28019
|
case 3:
|
|
27958
28020
|
_yield$import = _context4.sent;
|
|
27959
28021
|
DoorPlanner = _yield$import["default"];
|
|
@@ -29378,7 +29440,7 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29378
29440
|
if (article.getArticleOptionState('OPT' + optionCodexes[0])) {
|
|
29379
29441
|
for (var i = 0; i < optionCodexes.length; i++) {
|
|
29380
29442
|
var optionState = article.getArticleOptionState('OPT' + optionCodexes[i]);
|
|
29381
|
-
if (!optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
|
|
29443
|
+
if (optionState && !optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
|
|
29382
29444
|
opss.push(optionState);
|
|
29383
29445
|
}
|
|
29384
29446
|
}
|
|
@@ -29670,10 +29732,10 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29670
29732
|
setHashes = {};
|
|
29671
29733
|
variantId = this.getVariantIdToStart(set);
|
|
29672
29734
|
origConfig = articles[Object.keys(articles)[0]].VariantValues;
|
|
29673
|
-
i =
|
|
29735
|
+
i = 0;
|
|
29674
29736
|
case 6:
|
|
29675
|
-
if (!(i
|
|
29676
|
-
_context3.next =
|
|
29737
|
+
if (!(i < variants.length)) {
|
|
29738
|
+
_context3.next = 53;
|
|
29677
29739
|
break;
|
|
29678
29740
|
}
|
|
29679
29741
|
variantForTargetArticles = variants[i];
|
|
@@ -29776,9 +29838,14 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29776
29838
|
variantForTargetArticles.configVariantValues = configVariantValues;
|
|
29777
29839
|
variantForTargetArticles.price = set === null || set === void 0 ? void 0 : set.getSetPrice();
|
|
29778
29840
|
variantForTargetArticles.title = set === null || set === void 0 ? void 0 : set.CatalogData.catalogName;
|
|
29779
|
-
if (
|
|
29780
|
-
|
|
29841
|
+
if (variantIsValid) {
|
|
29842
|
+
_context3.next = 48;
|
|
29843
|
+
break;
|
|
29781
29844
|
}
|
|
29845
|
+
variants.splice(i, 1);
|
|
29846
|
+
i--;
|
|
29847
|
+
return _context3.abrupt("continue", 50);
|
|
29848
|
+
case 48:
|
|
29782
29849
|
reservedId = this.tryGetOldVariantIdForVariant(set, variants[i]);
|
|
29783
29850
|
if (reservedId !== undefined) {
|
|
29784
29851
|
variants[i].id = reservedId;
|
|
@@ -29786,21 +29853,21 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29786
29853
|
variants[i].id = variantId;
|
|
29787
29854
|
variantId++;
|
|
29788
29855
|
}
|
|
29789
|
-
case
|
|
29790
|
-
i
|
|
29856
|
+
case 50:
|
|
29857
|
+
i++;
|
|
29791
29858
|
_context3.next = 6;
|
|
29792
29859
|
break;
|
|
29793
|
-
case
|
|
29860
|
+
case 53:
|
|
29794
29861
|
if (!set.favoritesChanged) this.evalOldConfigVariants(set, variants);
|
|
29795
|
-
_context3.next =
|
|
29862
|
+
_context3.next = 56;
|
|
29796
29863
|
return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, origConfig, Object.keys(articles), true);
|
|
29797
|
-
case
|
|
29864
|
+
case 56:
|
|
29798
29865
|
set.allVariantsCache = variants;
|
|
29799
29866
|
variants.sort(function (a, b) {
|
|
29800
29867
|
return a.id - b.id;
|
|
29801
29868
|
});
|
|
29802
29869
|
return _context3.abrupt("return", variants);
|
|
29803
|
-
case
|
|
29870
|
+
case 59:
|
|
29804
29871
|
case "end":
|
|
29805
29872
|
return _context3.stop();
|
|
29806
29873
|
}
|
|
@@ -30087,7 +30154,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30087
30154
|
allvariants = _context4.t0;
|
|
30088
30155
|
validVariants = [];
|
|
30089
30156
|
for (i = 0; i < allvariants.length; i++) {
|
|
30090
|
-
if (!set.disabledVariants.includes(i)) {
|
|
30157
|
+
if (!set.disabledVariants.includes(allvariants[i].id)) {
|
|
30091
30158
|
validVariants.push(allvariants[i]);
|
|
30092
30159
|
}
|
|
30093
30160
|
}
|
|
@@ -30282,8 +30349,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30282
30349
|
if (!((_set$oldConfigVariant3 = set.oldConfigVariants) !== null && _set$oldConfigVariant3 !== void 0 && _set$oldConfigVariant3.length)) return;
|
|
30283
30350
|
//set all invalid
|
|
30284
30351
|
set.disabledVariants = [];
|
|
30285
|
-
variants.map(function (v
|
|
30286
|
-
return set.disabledVariants.push(
|
|
30352
|
+
variants.map(function (v) {
|
|
30353
|
+
return set.disabledVariants.push(v.id);
|
|
30287
30354
|
});
|
|
30288
30355
|
var oldConfigVariants = _toConsumableArray(set.oldConfigVariants);
|
|
30289
30356
|
for (var i = 0; i < variants.length; i++) {
|
|
@@ -30306,7 +30373,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
30306
30373
|
if (tryNext) break;
|
|
30307
30374
|
}
|
|
30308
30375
|
if (!tryNext) {
|
|
30309
|
-
var index = set.disabledVariants.indexOf(
|
|
30376
|
+
var index = set.disabledVariants.indexOf(variant.id);
|
|
30310
30377
|
if (index != -1) set.disabledVariants.splice(index, 1);
|
|
30311
30378
|
oldConfigVariants.splice(j, 1);
|
|
30312
30379
|
}
|
|
@@ -34802,7 +34869,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34802
34869
|
value: function () {
|
|
34803
34870
|
var _initializeBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(api) {
|
|
34804
34871
|
var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
|
|
34805
|
-
var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
|
|
34872
|
+
var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
|
|
34806
34873
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34807
34874
|
while (1) switch (_context.prev = _context.next) {
|
|
34808
34875
|
case 0:
|
|
@@ -34935,9 +35002,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34935
35002
|
op: 'eq',
|
|
34936
35003
|
value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
|
|
34937
35004
|
}, {
|
|
34938
|
-
id: '
|
|
35005
|
+
id: 'availableForOrganizations',
|
|
34939
35006
|
op: 'eq',
|
|
34940
|
-
value:
|
|
35007
|
+
value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
|
|
34941
35008
|
}]);
|
|
34942
35009
|
case 60:
|
|
34943
35010
|
result = _context.sent;
|
|
@@ -35571,7 +35638,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35571
35638
|
key: "saveToBasket",
|
|
35572
35639
|
value: function () {
|
|
35573
35640
|
var _saveToBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(api, actBasket, returnTo) {
|
|
35574
|
-
var _this$plannerConfig$
|
|
35641
|
+
var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
|
|
35575
35642
|
var response;
|
|
35576
35643
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
35577
35644
|
while (1) switch (_context12.prev = _context12.next) {
|
|
@@ -35590,7 +35657,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35590
35657
|
return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
|
|
35591
35658
|
case 8:
|
|
35592
35659
|
actBasket.UserLanguage = api.getLanguage();
|
|
35593
|
-
actBasket.PrintRetailLogo = (_this$plannerConfig$
|
|
35660
|
+
actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
|
|
35594
35661
|
_context12.next = 12;
|
|
35595
35662
|
return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
|
|
35596
35663
|
jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
|
|
@@ -35746,7 +35813,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35746
35813
|
break;
|
|
35747
35814
|
case 3:
|
|
35748
35815
|
_context13.next = 5;
|
|
35749
|
-
return import('./PfisterWWSHandler-
|
|
35816
|
+
return import('./PfisterWWSHandler-f3758c94.js');
|
|
35750
35817
|
case 5:
|
|
35751
35818
|
_yield$import = _context13.sent;
|
|
35752
35819
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35754,7 +35821,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35754
35821
|
return _context13.abrupt("break", 33);
|
|
35755
35822
|
case 9:
|
|
35756
35823
|
_context13.next = 11;
|
|
35757
|
-
return import('./LiviqueWWSHandler-
|
|
35824
|
+
return import('./LiviqueWWSHandler-817f6954.js');
|
|
35758
35825
|
case 11:
|
|
35759
35826
|
_yield$import2 = _context13.sent;
|
|
35760
35827
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35762,7 +35829,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35762
35829
|
return _context13.abrupt("break", 33);
|
|
35763
35830
|
case 15:
|
|
35764
35831
|
_context13.next = 17;
|
|
35765
|
-
return import('./SeriousBasketHandler-
|
|
35832
|
+
return import('./SeriousBasketHandler-9a45b419.js');
|
|
35766
35833
|
case 17:
|
|
35767
35834
|
_yield$import3 = _context13.sent;
|
|
35768
35835
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35770,7 +35837,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35770
35837
|
return _context13.abrupt("break", 33);
|
|
35771
35838
|
case 21:
|
|
35772
35839
|
_context13.next = 23;
|
|
35773
|
-
return import('./ProductBasketHandler-
|
|
35840
|
+
return import('./ProductBasketHandler-9e2c5c1a.js');
|
|
35774
35841
|
case 23:
|
|
35775
35842
|
_yield$import4 = _context13.sent;
|
|
35776
35843
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35778,7 +35845,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35778
35845
|
return _context13.abrupt("break", 33);
|
|
35779
35846
|
case 27:
|
|
35780
35847
|
_context13.next = 29;
|
|
35781
|
-
return import('./StandardWWSHandler-
|
|
35848
|
+
return import('./StandardWWSHandler-0dc1e038.js');
|
|
35782
35849
|
case 29:
|
|
35783
35850
|
_yield$import5 = _context13.sent;
|
|
35784
35851
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -35809,43 +35876,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35809
35876
|
//if no shopType is set in parent organization, no ropo effekt
|
|
35810
35877
|
if (!organization.shopType) return;
|
|
35811
35878
|
if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
|
|
35812
|
-
var _this$plannerConfig$
|
|
35879
|
+
var _this$plannerConfig$c5;
|
|
35813
35880
|
LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
|
|
35814
35881
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35815
35882
|
sourceOrgId: sourceOrganizationId.id,
|
|
35816
|
-
targetOrgId: (_this$plannerConfig$
|
|
35883
|
+
targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
|
|
35817
35884
|
});
|
|
35818
35885
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
|
|
35819
|
-
var _this$plannerConfig$
|
|
35886
|
+
var _this$plannerConfig$c6;
|
|
35820
35887
|
LOG$6.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
|
|
35821
35888
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35822
35889
|
sourceOrgId: sourceOrganizationId.id,
|
|
35823
|
-
targetOrgId: (_this$plannerConfig$
|
|
35890
|
+
targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
|
|
35824
35891
|
});
|
|
35825
35892
|
} else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
|
|
35826
|
-
var _this$plannerConfig$
|
|
35893
|
+
var _this$plannerConfig$c7;
|
|
35827
35894
|
LOG$6.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
|
|
35828
35895
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35829
35896
|
sourceOrgId: sourceOrganizationId.id,
|
|
35830
|
-
targetOrgId: (_this$plannerConfig$
|
|
35897
|
+
targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
|
|
35831
35898
|
});
|
|
35832
35899
|
} else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
|
|
35833
|
-
var _this$plannerConfig$
|
|
35900
|
+
var _this$plannerConfig$c8;
|
|
35834
35901
|
LOG$6.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
|
|
35835
35902
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35836
35903
|
sourceOrgId: sourceOrganizationId.id,
|
|
35837
|
-
targetOrgId: (_this$plannerConfig$
|
|
35904
|
+
targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
|
|
35838
35905
|
});
|
|
35839
35906
|
}
|
|
35840
35907
|
} catch (e) {
|
|
35841
|
-
var _this$plannerConfig$
|
|
35908
|
+
var _this$plannerConfig$c9;
|
|
35842
35909
|
LOG$6.error(new DivaError('Error on Evaluating ROPO Effect', {
|
|
35843
35910
|
code: 'SELLER_0006',
|
|
35844
35911
|
cause: e,
|
|
35845
35912
|
custom: {
|
|
35846
35913
|
sourceDivaNr: sourceBasket.DivaNr,
|
|
35847
35914
|
sourceOrgId: sourceOrganizationId,
|
|
35848
|
-
targetOrgId: (_this$plannerConfig$
|
|
35915
|
+
targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
|
|
35849
35916
|
}
|
|
35850
35917
|
}));
|
|
35851
35918
|
}
|
|
@@ -36983,7 +37050,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36983
37050
|
break;
|
|
36984
37051
|
}
|
|
36985
37052
|
_context3.next = 3;
|
|
36986
|
-
return import('./Host3DSignalR-
|
|
37053
|
+
return import('./Host3DSignalR-9c502b78.js');
|
|
36987
37054
|
case 3:
|
|
36988
37055
|
_yield$import = _context3.sent;
|
|
36989
37056
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38543,7 +38610,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38543
38610
|
break;
|
|
38544
38611
|
}
|
|
38545
38612
|
_context4.next = 11;
|
|
38546
|
-
return import('./DivaSingleProductPlanner-
|
|
38613
|
+
return import('./DivaSingleProductPlanner-355443b6.js');
|
|
38547
38614
|
case 11:
|
|
38548
38615
|
_yield$import = _context4.sent;
|
|
38549
38616
|
DivaSingleProductPlanner = _yield$import["default"];
|
|
@@ -38552,7 +38619,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38552
38619
|
break;
|
|
38553
38620
|
case 16:
|
|
38554
38621
|
_context4.next = 18;
|
|
38555
|
-
return import('./DivaStandardPlanner-
|
|
38622
|
+
return import('./DivaStandardPlanner-f8d55f53.js');
|
|
38556
38623
|
case 18:
|
|
38557
38624
|
_yield$import2 = _context4.sent;
|
|
38558
38625
|
DivaStandardPlanner = _yield$import2["default"];
|
|
@@ -38564,7 +38631,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38564
38631
|
return _context4.abrupt("break", 29);
|
|
38565
38632
|
case 23:
|
|
38566
38633
|
_context4.next = 25;
|
|
38567
|
-
return import('./DivaBoxPlanner-
|
|
38634
|
+
return import('./DivaBoxPlanner-19c913f4.js');
|
|
38568
38635
|
case 25:
|
|
38569
38636
|
_yield$import3 = _context4.sent;
|
|
38570
38637
|
DivaBoxPlanner = _yield$import3["default"];
|
|
@@ -42957,6 +43024,8 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42957
43024
|
// E.g: "Grid Left" or "Grid Middle" or "Grid Right"
|
|
42958
43025
|
_defineProperty(this, "gridName", void 0);
|
|
42959
43026
|
_defineProperty(this, "maxAccessoireInGridCounter", void 0);
|
|
43027
|
+
//only one array of accessoires is plannable together in one grid. the accessoires of the mid array exclude each other. The outer array is for te usage of this rule in different usecases.
|
|
43028
|
+
_defineProperty(this, "excludeAccessoiresByAccessoiresInGrid", void 0);
|
|
42960
43029
|
_defineProperty(this, "influencedByNeighborGrids", void 0);
|
|
42961
43030
|
_defineProperty(this, "influencedByOverlappingGrids", void 0);
|
|
42962
43031
|
var grid = data.ShelfPlanner[index];
|
|
@@ -42972,6 +43041,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42972
43041
|
this.requiredWarning = grid.RequiredWarning;
|
|
42973
43042
|
this.gridName = grid.GridName;
|
|
42974
43043
|
this.maxAccessoireInGridCounter = grid.MaxAccessoireInGridCounter;
|
|
43044
|
+
this.excludeAccessoiresByAccessoiresInGrid = grid.ExcludeAccessoiresByAccessoiresInGrid;
|
|
42975
43045
|
this.influencedByNeighborGrids = grid.InfluencedByNeighborGrids;
|
|
42976
43046
|
this.influencedByOverlappingGrids = grid.InfluencedByOverlappingGrids;
|
|
42977
43047
|
this._group = grid.Group;
|
|
@@ -42984,8 +43054,9 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42984
43054
|
for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
|
|
42985
43055
|
var gridOnRule = this.heightGridCellCountOnRule[i];
|
|
42986
43056
|
if (this.article.evalRule(DivaUtils.getRuleByFormula(gridOnRule.Rule))) {
|
|
42987
|
-
|
|
42988
|
-
|
|
43057
|
+
var _gridOnRule$HeightGri, _gridOnRule$ArticleRe;
|
|
43058
|
+
cellCount = (_gridOnRule$HeightGri = gridOnRule.HeightGridCellCount) !== null && _gridOnRule$HeightGri !== void 0 ? _gridOnRule$HeightGri : grid.HeightGridCellCount;
|
|
43059
|
+
this.articleRelations = (_gridOnRule$ArticleRe = gridOnRule.ArticleRelations) !== null && _gridOnRule$ArticleRe !== void 0 ? _gridOnRule$ArticleRe : grid.ArticleRelations;
|
|
42989
43060
|
if (gridOnRule.initAccArr) this.initAccArr = gridOnRule.initAccArr;
|
|
42990
43061
|
this.currentLoadedRuleIndex = i;
|
|
42991
43062
|
}
|
|
@@ -43657,7 +43728,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43657
43728
|
key: "getFreeSpacesOfAccessoire",
|
|
43658
43729
|
value: function getFreeSpacesOfAccessoire(accessoire) {
|
|
43659
43730
|
var size = accessoire.shelfHeight;
|
|
43660
|
-
if (!size || this.disabledByRule || this.
|
|
43731
|
+
if (!size || this.disabledByRule || this.checkAccessoireInGridRules(accessoire)) return [];
|
|
43661
43732
|
var freeCells = [];
|
|
43662
43733
|
for (var i = 0; i < this.Cells.length; i++) {
|
|
43663
43734
|
var _cell$Article4;
|
|
@@ -43692,22 +43763,51 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43692
43763
|
return _toConsumableArray(new Set(freeCells));
|
|
43693
43764
|
}
|
|
43694
43765
|
}, {
|
|
43695
|
-
key: "
|
|
43696
|
-
value: function
|
|
43697
|
-
var _this$maxAccessoireIn;
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
var
|
|
43701
|
-
|
|
43702
|
-
|
|
43703
|
-
|
|
43704
|
-
|
|
43705
|
-
var
|
|
43706
|
-
|
|
43707
|
-
|
|
43766
|
+
key: "checkAccessoireInGridRules",
|
|
43767
|
+
value: function checkAccessoireInGridRules(accessoire) {
|
|
43768
|
+
var _this$maxAccessoireIn, _this$excludeAccessoi;
|
|
43769
|
+
//max count in grid logic
|
|
43770
|
+
if ((_this$maxAccessoireIn = this.maxAccessoireInGridCounter) !== null && _this$maxAccessoireIn !== void 0 && _this$maxAccessoireIn.length) {
|
|
43771
|
+
for (var i = 0; i < this.maxAccessoireInGridCounter.length; i++) {
|
|
43772
|
+
var rule = this.maxAccessoireInGridCounter[i];
|
|
43773
|
+
var counter = 0;
|
|
43774
|
+
if (rule.accessoires.includes(accessoire.articleCodex)) {
|
|
43775
|
+
var currentAccessoires = Object.values(this.Accessoires);
|
|
43776
|
+
for (var j = 0; j < currentAccessoires.length; j++) {
|
|
43777
|
+
var curAcc = currentAccessoires[j];
|
|
43778
|
+
if (rule.accessoires.includes(curAcc.articleCodex)) {
|
|
43779
|
+
counter = counter + curAcc.quantity;
|
|
43780
|
+
}
|
|
43781
|
+
}
|
|
43782
|
+
if (counter >= rule.maxCount) return true;
|
|
43783
|
+
}
|
|
43784
|
+
}
|
|
43785
|
+
}
|
|
43786
|
+
|
|
43787
|
+
//accessories excluded eachother
|
|
43788
|
+
if ((_this$excludeAccessoi = this.excludeAccessoiresByAccessoiresInGrid) !== null && _this$excludeAccessoi !== void 0 && _this$excludeAccessoi.length) {
|
|
43789
|
+
var excludeAccessoiresGroup = this.excludeAccessoiresByAccessoiresInGrid;
|
|
43790
|
+
for (var _j2 = 0; _j2 < excludeAccessoiresGroup.length; _j2++) {
|
|
43791
|
+
var plannedAccessoireIndex = -1;
|
|
43792
|
+
var excludeAccessoires = excludeAccessoiresGroup[_j2];
|
|
43793
|
+
for (var _i16 = 0; _i16 < excludeAccessoires.length; _i16++) {
|
|
43794
|
+
var accessoireArray = excludeAccessoires[_i16];
|
|
43795
|
+
for (var basketId in this.Accessoires) {
|
|
43796
|
+
var palnnedAccessoire = this.Accessoires[basketId];
|
|
43797
|
+
if (accessoireArray.includes(palnnedAccessoire.articleCodex)) {
|
|
43798
|
+
plannedAccessoireIndex = _i16;
|
|
43799
|
+
break;
|
|
43800
|
+
}
|
|
43801
|
+
}
|
|
43802
|
+
if (plannedAccessoireIndex >= 0) break;
|
|
43803
|
+
}
|
|
43804
|
+
if (plannedAccessoireIndex >= 0) {
|
|
43805
|
+
for (var _i17 = 0; _i17 < excludeAccessoires.length; _i17++) {
|
|
43806
|
+
var _accessoireArray = excludeAccessoires[_i17];
|
|
43807
|
+
if (plannedAccessoireIndex == _i17) continue;
|
|
43808
|
+
if (_accessoireArray.includes(accessoire.articleCodex)) return true;
|
|
43708
43809
|
}
|
|
43709
43810
|
}
|
|
43710
|
-
if (counter >= rule.maxCount) return true;
|
|
43711
43811
|
}
|
|
43712
43812
|
}
|
|
43713
43813
|
return false;
|
|
@@ -43752,16 +43852,16 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43752
43852
|
}
|
|
43753
43853
|
}
|
|
43754
43854
|
if ((_this$influencedByNei = this.influencedByNeighborGrids) !== null && _this$influencedByNei !== void 0 && _this$influencedByNei.length) {
|
|
43755
|
-
for (var
|
|
43855
|
+
for (var _i18 = 0; _i18 < this.influencedByNeighborGrids.length; _i18++) {
|
|
43756
43856
|
var _this$article$shelfPl2;
|
|
43757
|
-
var _influenced = this.influencedByNeighborGrids[
|
|
43857
|
+
var _influenced = this.influencedByNeighborGrids[_i18];
|
|
43758
43858
|
var neighborGrid = (_this$article$shelfPl2 = this.article.shelfPlanner) === null || _this$article$shelfPl2 === void 0 ? void 0 : _this$article$shelfPl2.getGridByGridName(_influenced.GridName);
|
|
43759
43859
|
var _ret = false;
|
|
43760
43860
|
if (!neighborGrid) continue;
|
|
43761
43861
|
if (neighborGrid.Direction === this.Direction) {
|
|
43762
|
-
for (var
|
|
43862
|
+
for (var _j3 = 0; _j3 < size; _j3++) {
|
|
43763
43863
|
var _cell$Article5;
|
|
43764
|
-
var cell = neighborGrid.cells[
|
|
43864
|
+
var cell = neighborGrid.cells[_j3 + index];
|
|
43765
43865
|
if ((cell === null || cell === void 0 ? void 0 : cell.InUse) !== -1 && ((_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId) !== accessoire.basketId) {
|
|
43766
43866
|
_ret = true;
|
|
43767
43867
|
}
|
|
@@ -43864,19 +43964,20 @@ var Grid = /*#__PURE__*/function () {
|
|
|
43864
43964
|
});
|
|
43865
43965
|
if (alternative) return alternative.ArticleRelations;
|
|
43866
43966
|
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false) {
|
|
43867
|
-
|
|
43967
|
+
var curGrid = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex];
|
|
43968
|
+
if (curGrid.ArticleRelations) return curGrid.ArticleRelations;
|
|
43868
43969
|
}
|
|
43869
43970
|
return this.articleRelations;
|
|
43870
43971
|
}
|
|
43871
43972
|
}, {
|
|
43872
43973
|
key: "getGridIdByArticleCodex",
|
|
43873
43974
|
value: function getGridIdByArticleCodex(articleCodex) {
|
|
43874
|
-
var _this$ArticleRelation3;
|
|
43975
|
+
var _this$ArticleRelation3, _this$heightGridCellC;
|
|
43875
43976
|
var alternative = (_this$ArticleRelation3 = this.ArticleRelationsForOtherGroups) === null || _this$ArticleRelation3 === void 0 ? void 0 : _this$ArticleRelation3.find(function (g) {
|
|
43876
43977
|
return g.ArticleRelations.includes(articleCodex);
|
|
43877
43978
|
});
|
|
43878
43979
|
if (alternative) return alternative.Group;
|
|
43879
|
-
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations.includes(articleCodex)) {
|
|
43980
|
+
if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && (_this$heightGridCellC = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations) !== null && _this$heightGridCellC !== void 0 && _this$heightGridCellC.includes(articleCodex)) {
|
|
43880
43981
|
return this.gridGroup;
|
|
43881
43982
|
}
|
|
43882
43983
|
if (this.articleRelations.includes(articleCodex)) {
|
|
@@ -59867,7 +59968,7 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
59867
59968
|
*/
|
|
59868
59969
|
_defineProperty(this, "loadProducts", /*#__PURE__*/function () {
|
|
59869
59970
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
59870
|
-
var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17
|
|
59971
|
+
var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17;
|
|
59871
59972
|
var basket, catalogData, productData, classificationFields, products, baseProduct, variantProducts, isSet, dockingPoints, orderDescription, catalogDataName, catalogDataDescription, setName, _ProductHandler$calcu, shortDescription, shortDescriptionModified, _ProductHandler$calcu2, addedPrice, addedPriceModified, articles, baseData, classificationData, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, _basket$OrderSets$0$C2, usedConfigVariants, differingOPTs, _basket$OrderSets$0$C3, opts, i;
|
|
59872
59973
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
59873
59974
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -59979,10 +60080,9 @@ var ProductHandler = /*#__PURE__*/function () {
|
|
|
59979
60080
|
mainCategory: _this.mainCategory,
|
|
59980
60081
|
subCategory: _this.subCategory,
|
|
59981
60082
|
retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
|
|
59982
|
-
available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
|
|
59983
60083
|
dockingPoints: dockingPoints,
|
|
59984
|
-
media: (
|
|
59985
|
-
affiliate: (
|
|
60084
|
+
media: (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.media,
|
|
60085
|
+
affiliate: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.affiliate
|
|
59986
60086
|
}; //get classification data and remove field prefix
|
|
59987
60087
|
classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
|
|
59988
60088
|
variantData = [];
|
|
@@ -60464,11 +60564,6 @@ _defineProperty(ProductHandler, "baseDataFields", [{
|
|
|
60464
60564
|
type: 'text',
|
|
60465
60565
|
title: 'productcreator.fields.technicalDescription',
|
|
60466
60566
|
fieldType: 'BASE'
|
|
60467
|
-
}, {
|
|
60468
|
-
field: 'available',
|
|
60469
|
-
type: 'boolean',
|
|
60470
|
-
title: 'productcreator.fields.available',
|
|
60471
|
-
fieldType: 'BASE'
|
|
60472
60567
|
}, {
|
|
60473
60568
|
field: 'calculatedPrice',
|
|
60474
60569
|
type: 'price',
|