@crystaldesign/web-planner-logic 24.14.0-beta.9 → 24.15.0-beta.1
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-b8c943f9.js → DivaBoxPlanner-4789bc0a.js} +8 -6
- package/build/cjs/{DivaStandardPlanner-d545a524.js → DivaStandardPlanner-dbdb4ba0.js} +4 -4
- package/build/cjs/{DoorPlanner-cbf256ac.js → DoorPlanner-e05bdec4.js} +3 -3
- package/build/cjs/{Host3DSignalR-38042dd4.js → Host3DSignalR-908946a2.js} +10 -11
- package/build/cjs/{LiviqueWWSHandler-5968a440.js → LiviqueWWSHandler-4bad8cba.js} +5 -2
- package/build/cjs/{PfisterWWSHandler-a19fb640.js → PfisterWWSHandler-93d9fb4d.js} +69 -18
- package/build/cjs/{PlannerHandler2D-104c25e8.js → PlannerHandler2D-593db35b.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-afe39b25.js → SeriousBasketHandler-f1feae09.js} +5 -2
- package/build/cjs/{ShelfPlanner-b68a936a.js → ShelfPlanner-47d446eb.js} +3 -3
- package/build/cjs/{StandardWWSHandler-d56e153f.js → StandardWWSHandler-1e7710d3.js} +5 -2
- package/build/cjs/{index-fc73236c.js → index-5f530bbb.js} +1102 -892
- package/build/cjs/index.js +2 -2
- package/build/esm/{DivaBoxPlanner-d5cb2761.js → DivaBoxPlanner-11ab03fc.js} +8 -6
- package/build/esm/{DivaStandardPlanner-7b4a2363.js → DivaStandardPlanner-fcc8d692.js} +4 -4
- package/build/esm/{DoorPlanner-d637db66.js → DoorPlanner-36d5e093.js} +3 -3
- package/build/esm/{Host3DSignalR-cc8579c6.js → Host3DSignalR-9222f4e5.js} +10 -11
- package/build/esm/{LiviqueWWSHandler-36b3f3bf.js → LiviqueWWSHandler-b01ffddd.js} +5 -2
- package/build/esm/{PfisterWWSHandler-55960acc.js → PfisterWWSHandler-327b06c0.js} +69 -18
- package/build/esm/{PlannerHandler2D-c5f068a9.js → PlannerHandler2D-4ca09229.js} +1 -1
- package/build/esm/{SeriousBasketHandler-6c11ee06.js → SeriousBasketHandler-36a1b987.js} +5 -2
- package/build/esm/{ShelfPlanner-ab85b5ea.js → ShelfPlanner-a08089d2.js} +3 -3
- package/build/esm/{StandardWWSHandler-4f44c130.js → StandardWWSHandler-96622950.js} +5 -2
- package/build/esm/{index-21a4713a.js → index-16bf1098.js} +1102 -892
- package/build/esm/index.js +2 -2
- 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 +4 -7
- package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -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 +3 -1
- package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Basket/IDivaWWSHandler.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Basket/IDivaWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +5 -0
- package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
- 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 +1 -0
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/DecisionType.d.ts +1 -0
- 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 +2 -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 +9 -5
- 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 +0 -3
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +4 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/LiviqueWWSHandler.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/LiviqueWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/StandardWWSHandler.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/StandardWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DoorPlanner/DoorPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +4 -7
- 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/DivaWebPlanner.d.ts +8 -3
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +4 -2
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +35 -6
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts +26 -2
- package/build/types/web-planner-logic/src/logic/Product/DivaProductHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +12 -16
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +6 -11
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts +10 -3
- package/build/types/web-planner-logic/src/model/Articles/CatalogArticleData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
3
4
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
4
5
|
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
5
6
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
6
7
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
8
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
8
9
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
9
|
-
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
10
10
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
11
11
|
var axios$1 = require('axios');
|
|
12
12
|
var DivaUtils = require('@crystaldesign/diva-utils');
|
|
@@ -17,13 +17,13 @@ var _typeof = require('@babel/runtime/helpers/typeof');
|
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
20
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
20
21
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
21
22
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
22
23
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
23
24
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
25
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
25
26
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
26
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
27
27
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
28
28
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$1);
|
|
29
29
|
var DivaUtils__default = /*#__PURE__*/_interopDefaultLegacy(DivaUtils);
|
|
@@ -43,9 +43,9 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
|
43
43
|
})();
|
|
44
44
|
|
|
45
45
|
var _excluded = ["type"];
|
|
46
|
-
function ownKeys$
|
|
47
|
-
function _objectSpread$
|
|
48
|
-
var LOG$
|
|
46
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
47
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
48
|
+
var LOG$h = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
49
49
|
var JsonDataCache = /*#__PURE__*/function () {
|
|
50
50
|
function JsonDataCache() {
|
|
51
51
|
_classCallCheck__default["default"](this, JsonDataCache);
|
|
@@ -91,7 +91,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
91
91
|
if (plannerConfig.settings) {
|
|
92
92
|
this.initalizeWebConfigData(plannerConfig.settings, plannerConfig.lang);
|
|
93
93
|
} else {
|
|
94
|
-
LOG$
|
|
94
|
+
LOG$h.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
|
|
95
95
|
code: 'WC_0001'
|
|
96
96
|
}));
|
|
97
97
|
throw Error('Initalize failed!');
|
|
@@ -126,7 +126,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
126
126
|
while (1) switch (_context.prev = _context.next) {
|
|
127
127
|
case 0:
|
|
128
128
|
skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
|
|
129
|
-
LOG$
|
|
129
|
+
LOG$h.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
|
|
130
130
|
if (init) {
|
|
131
131
|
_context.next = 4;
|
|
132
132
|
break;
|
|
@@ -135,32 +135,31 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
135
135
|
case 4:
|
|
136
136
|
_context.prev = 4;
|
|
137
137
|
if (!(init.method === 'POST')) {
|
|
138
|
-
_context.next =
|
|
138
|
+
_context.next = 11;
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
_context.next = 9;
|
|
141
|
+
_context.next = 8;
|
|
143
142
|
return axios__default["default"].post(url, init.data, init.config);
|
|
144
|
-
case
|
|
143
|
+
case 8:
|
|
145
144
|
response = _context.sent;
|
|
146
|
-
_context.next =
|
|
145
|
+
_context.next = 16;
|
|
147
146
|
break;
|
|
148
|
-
case
|
|
147
|
+
case 11:
|
|
149
148
|
finalUrl = new URL(url);
|
|
150
149
|
if (skip) {
|
|
151
150
|
finalUrl.searchParams.append('skip', skip.toString());
|
|
152
151
|
}
|
|
153
|
-
_context.next =
|
|
152
|
+
_context.next = 15;
|
|
154
153
|
return axios__default["default"].get(finalUrl.toString(), init.config);
|
|
155
|
-
case
|
|
154
|
+
case 15:
|
|
156
155
|
response = _context.sent;
|
|
157
|
-
case
|
|
158
|
-
_context.next =
|
|
156
|
+
case 16:
|
|
157
|
+
_context.next = 18;
|
|
159
158
|
return response.data;
|
|
160
|
-
case
|
|
159
|
+
case 18:
|
|
161
160
|
data = _context.sent;
|
|
162
161
|
if (data !== null && data !== void 0 && data.Error) {
|
|
163
|
-
LOG$
|
|
162
|
+
LOG$h.error(new DivaUtils.DivaError(data.Error, {
|
|
164
163
|
code: 'WC_0001',
|
|
165
164
|
custom: {
|
|
166
165
|
url: url
|
|
@@ -169,36 +168,36 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
169
168
|
}
|
|
170
169
|
//if data is paginated iterate and fetch all
|
|
171
170
|
if (!(Array.isArray(data.data) && data.total)) {
|
|
172
|
-
_context.next =
|
|
171
|
+
_context.next = 34;
|
|
173
172
|
break;
|
|
174
173
|
}
|
|
175
174
|
if (!(data.data.length + skip < data.total)) {
|
|
176
|
-
_context.next =
|
|
175
|
+
_context.next = 33;
|
|
177
176
|
break;
|
|
178
177
|
}
|
|
179
178
|
nextSkip = skip + 20;
|
|
180
179
|
_context.t0 = [];
|
|
181
180
|
_context.t1 = _toConsumableArray__default["default"](data.data);
|
|
182
181
|
_context.t2 = _toConsumableArray__default["default"];
|
|
183
|
-
_context.next =
|
|
182
|
+
_context.next = 28;
|
|
184
183
|
return this.fetchData(url, init, nextSkip);
|
|
185
|
-
case
|
|
184
|
+
case 28:
|
|
186
185
|
_context.t3 = _context.sent;
|
|
187
186
|
_context.t4 = (0, _context.t2)(_context.t3);
|
|
188
187
|
return _context.abrupt("return", _context.t0.concat.call(_context.t0, _context.t1, _context.t4));
|
|
189
|
-
case
|
|
188
|
+
case 33:
|
|
190
189
|
return _context.abrupt("return", data.data);
|
|
191
|
-
case
|
|
190
|
+
case 34:
|
|
192
191
|
return _context.abrupt("return", data);
|
|
193
|
-
case
|
|
194
|
-
_context.prev =
|
|
192
|
+
case 37:
|
|
193
|
+
_context.prev = 37;
|
|
195
194
|
_context.t5 = _context["catch"](4);
|
|
196
195
|
throw Error('fetch failed! ' + url + ' Error: ' + _context.t5);
|
|
197
|
-
case
|
|
196
|
+
case 40:
|
|
198
197
|
case "end":
|
|
199
198
|
return _context.stop();
|
|
200
199
|
}
|
|
201
|
-
}, _callee, this, [[4,
|
|
200
|
+
}, _callee, this, [[4, 37]]);
|
|
202
201
|
}));
|
|
203
202
|
function fetchData(_x, _x2) {
|
|
204
203
|
return _fetchData.apply(this, arguments);
|
|
@@ -250,8 +249,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
250
249
|
if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
|
|
251
250
|
api2Url = this.apiConfig.api2.web;
|
|
252
251
|
}
|
|
253
|
-
_context2.t0 = _objectSpread$
|
|
254
|
-
_context2.t1 = _objectSpread$
|
|
252
|
+
_context2.t0 = _objectSpread$g;
|
|
253
|
+
_context2.t1 = _objectSpread$g({}, init.config.headers);
|
|
255
254
|
_context2.t2 = {};
|
|
256
255
|
_context2.next = 20;
|
|
257
256
|
return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
|
|
@@ -297,7 +296,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
297
296
|
_context3.next = 9;
|
|
298
297
|
break;
|
|
299
298
|
}
|
|
300
|
-
LOG$
|
|
299
|
+
LOG$h.debug('getDataFromInternalCache: ' + queryString);
|
|
301
300
|
if (!this.jsonDataCache.get(myQS)) {
|
|
302
301
|
_context3.next = 8;
|
|
303
302
|
break;
|
|
@@ -362,9 +361,9 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
362
361
|
return this.fetchData(url, init);
|
|
363
362
|
case 33:
|
|
364
363
|
result = _context3.sent;
|
|
365
|
-
this.jsonDataCache.set(myQS, result);
|
|
364
|
+
if (method !== 'POST') this.jsonDataCache.set(myQS, result);
|
|
366
365
|
if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
|
|
367
|
-
LOG$
|
|
366
|
+
LOG$h.debug('getDataFromApi: ' + queryString);
|
|
368
367
|
return _context3.abrupt("return", result);
|
|
369
368
|
case 38:
|
|
370
369
|
case "end":
|
|
@@ -400,7 +399,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
400
399
|
case 5:
|
|
401
400
|
_context4.prev = 5;
|
|
402
401
|
_context4.t0 = _context4["catch"](1);
|
|
403
|
-
LOG$
|
|
402
|
+
LOG$h.error(new DivaUtils.DivaError('could not create product in Configurator', {
|
|
404
403
|
cause: _context4.t0
|
|
405
404
|
}));
|
|
406
405
|
return _context4.abrupt("return", false);
|
|
@@ -431,11 +430,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
431
430
|
language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
|
|
432
431
|
abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
|
|
433
432
|
checkForProductsPrice: data.checkForProductsPrice,
|
|
433
|
+
checkForProductsMatch: data.checkForProductsMatch,
|
|
434
434
|
doDisablePlanner2D: data.doDisablePlanner2D,
|
|
435
435
|
diva3dStaticBGImage: data.diva3dStaticBGImage != undefined ? data.diva3dStaticBGImage : false,
|
|
436
436
|
diva3dStaticBGImage_DefaultRoomList: data.diva3dStaticBGImage_DefaultRoomList != undefined ? data.diva3dStaticBGImage_DefaultRoomList : '',
|
|
437
437
|
diva3DAllowDefaultCatRoomList: data.diva3DAllowDefaultCatRoomList != undefined ? data.diva3DAllowDefaultCatRoomList : true,
|
|
438
|
-
doCheckVariantData: data.doCheckVariantData,
|
|
439
438
|
templateConfig: data.templateConfig,
|
|
440
439
|
doAllowSetPlanner: data.doAllowSetPlanner,
|
|
441
440
|
onErrorHandling: data.onErrorHandling,
|
|
@@ -501,17 +500,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
501
500
|
var _this$divaWebConfigDa2;
|
|
502
501
|
return (_this$divaWebConfigDa2 = this.divaWebConfigData) === null || _this$divaWebConfigDa2 === void 0 ? void 0 : _this$divaWebConfigDa2.checkForProductsPrice;
|
|
503
502
|
}
|
|
503
|
+
}, {
|
|
504
|
+
key: "doCheckForProductsMatch",
|
|
505
|
+
value: function doCheckForProductsMatch() {
|
|
506
|
+
var _this$divaWebConfigDa3;
|
|
507
|
+
return (_this$divaWebConfigDa3 = this.divaWebConfigData) === null || _this$divaWebConfigDa3 === void 0 ? void 0 : _this$divaWebConfigDa3.checkForProductsMatch;
|
|
508
|
+
}
|
|
504
509
|
}, {
|
|
505
510
|
key: "getReportConfigIdentifier",
|
|
506
511
|
value: function getReportConfigIdentifier() {
|
|
507
|
-
var _this$
|
|
508
|
-
return (_this$
|
|
512
|
+
var _this$divaWebConfigDa4;
|
|
513
|
+
return (_this$divaWebConfigDa4 = this.divaWebConfigData) === null || _this$divaWebConfigDa4 === void 0 ? void 0 : _this$divaWebConfigDa4.reportConfigIdentifier;
|
|
509
514
|
}
|
|
510
515
|
}, {
|
|
511
516
|
key: "getPrintOptions",
|
|
512
517
|
value: function getPrintOptions() {
|
|
513
|
-
var _this$
|
|
514
|
-
var reportConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_this$
|
|
518
|
+
var _this$divaWebConfigDa5;
|
|
519
|
+
var reportConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (_this$divaWebConfigDa5 = this.divaWebConfigData) === null || _this$divaWebConfigDa5 === void 0 ? void 0 : _this$divaWebConfigDa5.reportConfig;
|
|
515
520
|
return {
|
|
516
521
|
Gdpr: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithGDPR),
|
|
517
522
|
PlanningSketch: !!(reportConfig !== null && reportConfig !== void 0 && reportConfig.printWithPlanningSketch),
|
|
@@ -531,8 +536,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
531
536
|
}, {
|
|
532
537
|
key: "get3DRenderGroup",
|
|
533
538
|
value: function get3DRenderGroup() {
|
|
534
|
-
var _this$
|
|
535
|
-
return (_this$
|
|
539
|
+
var _this$divaWebConfigDa6, _this$divaWebConfigDa7;
|
|
540
|
+
return (_this$divaWebConfigDa6 = (_this$divaWebConfigDa7 = this.divaWebConfigData) === null || _this$divaWebConfigDa7 === void 0 ? void 0 : _this$divaWebConfigDa7.diva3dRenderGroup) !== null && _this$divaWebConfigDa6 !== void 0 ? _this$divaWebConfigDa6 : '';
|
|
536
541
|
}
|
|
537
542
|
}, {
|
|
538
543
|
key: "getServerId",
|
|
@@ -569,86 +574,67 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
569
574
|
}, {
|
|
570
575
|
key: "getDiva3dStaticBGImage",
|
|
571
576
|
value: function getDiva3dStaticBGImage() {
|
|
572
|
-
var _this$
|
|
573
|
-
return (_this$
|
|
577
|
+
var _this$divaWebConfigDa8;
|
|
578
|
+
return (_this$divaWebConfigDa8 = this.divaWebConfigData) === null || _this$divaWebConfigDa8 === void 0 ? void 0 : _this$divaWebConfigDa8.diva3dStaticBGImage;
|
|
574
579
|
}
|
|
575
580
|
}, {
|
|
576
581
|
key: "getDiva3dStaticBGImage_DefaultRoomList",
|
|
577
582
|
value: function getDiva3dStaticBGImage_DefaultRoomList() {
|
|
578
|
-
var _this$
|
|
579
|
-
return ((_this$
|
|
583
|
+
var _this$divaWebConfigDa9, _this$divaWebConfigDa10;
|
|
584
|
+
return ((_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage_DefaultRoomList;
|
|
580
585
|
}
|
|
581
586
|
}, {
|
|
582
587
|
key: "getDiva3DAllowDefaultCatRoomList",
|
|
583
588
|
value: function getDiva3DAllowDefaultCatRoomList() {
|
|
584
|
-
var _this$
|
|
585
|
-
return (_this$
|
|
589
|
+
var _this$divaWebConfigDa11;
|
|
590
|
+
return (_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3DAllowDefaultCatRoomList;
|
|
586
591
|
}
|
|
587
592
|
}, {
|
|
588
593
|
key: "doAllowSetPlanner",
|
|
589
594
|
value: function doAllowSetPlanner() {
|
|
590
|
-
var _this$
|
|
591
|
-
return (_this$
|
|
595
|
+
var _this$divaWebConfigDa12;
|
|
596
|
+
return (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.doAllowSetPlanner;
|
|
592
597
|
}
|
|
593
598
|
}, {
|
|
594
599
|
key: "getHidePlanner",
|
|
595
600
|
value: function getHidePlanner() {
|
|
596
|
-
var _this$divaWebConfigDa12;
|
|
597
|
-
return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && (_this$divaWebConfigDa12 = _this$divaWebConfigDa12.viewConfig) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.hidePlanner);
|
|
598
|
-
}
|
|
599
|
-
}, {
|
|
600
|
-
key: "getDoShowAR",
|
|
601
|
-
value: function getDoShowAR() {
|
|
602
601
|
var _this$divaWebConfigDa13;
|
|
603
|
-
return (_this$divaWebConfigDa13 = this.divaWebConfigData)
|
|
604
|
-
}
|
|
605
|
-
}, {
|
|
606
|
-
key: "forceShowRTV",
|
|
607
|
-
value: function forceShowRTV() {
|
|
608
|
-
var _this$divaWebConfigDa14;
|
|
609
|
-
return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 || (_this$divaWebConfigDa14 = _this$divaWebConfigDa14.viewConfig) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.forceRTV;
|
|
610
|
-
}
|
|
611
|
-
}, {
|
|
612
|
-
key: "getDoShowRTV",
|
|
613
|
-
value: function getDoShowRTV() {
|
|
614
|
-
var _this$divaWebConfigDa15;
|
|
615
|
-
return (_this$divaWebConfigDa15 = this.divaWebConfigData) === null || _this$divaWebConfigDa15 === void 0 || (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) === null || _this$divaWebConfigDa15 === void 0 ? void 0 : _this$divaWebConfigDa15.enableRTV;
|
|
602
|
+
return !!((_this$divaWebConfigDa13 = this.divaWebConfigData) !== null && _this$divaWebConfigDa13 !== void 0 && (_this$divaWebConfigDa13 = _this$divaWebConfigDa13.viewConfig) !== null && _this$divaWebConfigDa13 !== void 0 && _this$divaWebConfigDa13.hidePlanner);
|
|
616
603
|
}
|
|
617
604
|
}, {
|
|
618
605
|
key: "getEnableRTVUnityKombi",
|
|
619
606
|
value: function getEnableRTVUnityKombi() {
|
|
620
|
-
|
|
621
|
-
return !!((_this$divaWebConfigDa16 = this.divaWebConfigData) !== null && _this$divaWebConfigDa16 !== void 0 && _this$divaWebConfigDa16.viewConfig.enableRtvUnityKombi);
|
|
607
|
+
return !!this.organization.settings.enableRTV;
|
|
622
608
|
}
|
|
623
609
|
}, {
|
|
624
610
|
key: "getDoDisablePlanner2D",
|
|
625
611
|
value: function getDoDisablePlanner2D() {
|
|
626
|
-
var _this$
|
|
627
|
-
return !!((_this$
|
|
612
|
+
var _this$divaWebConfigDa14;
|
|
613
|
+
return !!((_this$divaWebConfigDa14 = this.divaWebConfigData) !== null && _this$divaWebConfigDa14 !== void 0 && _this$divaWebConfigDa14.doDisablePlanner2D);
|
|
628
614
|
}
|
|
629
615
|
}, {
|
|
630
616
|
key: "getRoomListInProduct",
|
|
631
617
|
value: function getRoomListInProduct() {
|
|
632
|
-
var _this$
|
|
633
|
-
return !!((_this$
|
|
618
|
+
var _this$divaWebConfigDa15;
|
|
619
|
+
return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.roomListInProduct);
|
|
634
620
|
}
|
|
635
621
|
}, {
|
|
636
622
|
key: "getPlannerType",
|
|
637
623
|
value: function getPlannerType() {
|
|
638
|
-
var _this$
|
|
639
|
-
return (_this$
|
|
624
|
+
var _this$divaWebConfigDa16;
|
|
625
|
+
return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.plannerType;
|
|
640
626
|
}
|
|
641
627
|
}, {
|
|
642
628
|
key: "getLoadSupplierColors",
|
|
643
629
|
value: function getLoadSupplierColors() {
|
|
644
|
-
var _this$
|
|
645
|
-
return !!((_this$
|
|
630
|
+
var _this$divaWebConfigDa17;
|
|
631
|
+
return !!((_this$divaWebConfigDa17 = this.divaWebConfigData) !== null && _this$divaWebConfigDa17 !== void 0 && _this$divaWebConfigDa17.loadSupplierColors);
|
|
646
632
|
}
|
|
647
633
|
}, {
|
|
648
634
|
key: "showSelectionModeZero",
|
|
649
635
|
value: function showSelectionModeZero() {
|
|
650
|
-
var _this$
|
|
651
|
-
return !!((_this$
|
|
636
|
+
var _this$divaWebConfigDa18;
|
|
637
|
+
return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.showSelectionModeZero);
|
|
652
638
|
}
|
|
653
639
|
}, {
|
|
654
640
|
key: "ruleDescSeperator",
|
|
@@ -665,12 +651,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
665
651
|
var _this$organization3;
|
|
666
652
|
return !!((_this$organization3 = this.organization) !== null && _this$organization3 !== void 0 && (_this$organization3 = _this$organization3.settings) !== null && _this$organization3 !== void 0 && _this$organization3.ruleDescWithoutParenthesis);
|
|
667
653
|
}
|
|
668
|
-
}, {
|
|
669
|
-
key: "getDoCheckVariantData",
|
|
670
|
-
value: function getDoCheckVariantData() {
|
|
671
|
-
var _this$divaWebConfigDa22;
|
|
672
|
-
return (_this$divaWebConfigDa22 = this.divaWebConfigData) === null || _this$divaWebConfigDa22 === void 0 ? void 0 : _this$divaWebConfigDa22.doCheckVariantData;
|
|
673
|
-
}
|
|
674
654
|
}, {
|
|
675
655
|
key: "setI18n",
|
|
676
656
|
value: function setI18n(i18n) {
|
|
@@ -762,50 +742,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
762
742
|
}, {
|
|
763
743
|
key: "getViewConfig",
|
|
764
744
|
value: function getViewConfig() {
|
|
765
|
-
var _this$
|
|
766
|
-
return (_this$
|
|
745
|
+
var _this$divaWebConfigDa19;
|
|
746
|
+
return (_this$divaWebConfigDa19 = this.divaWebConfigData) === null || _this$divaWebConfigDa19 === void 0 ? void 0 : _this$divaWebConfigDa19.viewConfig;
|
|
767
747
|
}
|
|
768
748
|
}, {
|
|
769
749
|
key: "getEmailConfig",
|
|
770
750
|
value: function getEmailConfig() {
|
|
771
|
-
var _this$
|
|
772
|
-
return (_this$
|
|
751
|
+
var _this$divaWebConfigDa20;
|
|
752
|
+
return (_this$divaWebConfigDa20 = this.divaWebConfigData) === null || _this$divaWebConfigDa20 === void 0 ? void 0 : _this$divaWebConfigDa20.emailConfig;
|
|
773
753
|
}
|
|
774
754
|
}, {
|
|
775
755
|
key: "getABTestCases",
|
|
776
756
|
value: function getABTestCases() {
|
|
777
|
-
var _this$
|
|
778
|
-
return (_this$
|
|
757
|
+
var _this$divaWebConfigDa21, _this$divaWebConfigDa22;
|
|
758
|
+
return (_this$divaWebConfigDa21 = (_this$divaWebConfigDa22 = this.divaWebConfigData) === null || _this$divaWebConfigDa22 === void 0 ? void 0 : _this$divaWebConfigDa22.abTestCases) !== null && _this$divaWebConfigDa21 !== void 0 ? _this$divaWebConfigDa21 : [];
|
|
779
759
|
}
|
|
780
760
|
}, {
|
|
781
761
|
key: "getBarrierConfig",
|
|
782
762
|
value: function getBarrierConfig() {
|
|
783
|
-
var _this$
|
|
784
|
-
return (_this$
|
|
763
|
+
var _this$divaWebConfigDa23;
|
|
764
|
+
return (_this$divaWebConfigDa23 = this.divaWebConfigData) === null || _this$divaWebConfigDa23 === void 0 ? void 0 : _this$divaWebConfigDa23.barrierConfig;
|
|
785
765
|
}
|
|
786
766
|
}, {
|
|
787
767
|
key: "getTemplateConfig",
|
|
788
768
|
value: function getTemplateConfig() {
|
|
789
|
-
var _this$
|
|
790
|
-
return (_this$
|
|
769
|
+
var _this$divaWebConfigDa24;
|
|
770
|
+
return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.templateConfig;
|
|
791
771
|
}
|
|
792
772
|
}, {
|
|
793
773
|
key: "showDivaNr",
|
|
794
774
|
value: function showDivaNr() {
|
|
795
|
-
var _this$
|
|
796
|
-
return (_this$
|
|
775
|
+
var _this$divaWebConfigDa25;
|
|
776
|
+
return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.showDivaNr;
|
|
797
777
|
}
|
|
798
778
|
}, {
|
|
799
779
|
key: "onErrorHandling",
|
|
800
780
|
value: function onErrorHandling() {
|
|
801
|
-
var _this$
|
|
802
|
-
return (_this$
|
|
781
|
+
var _this$divaWebConfigDa26;
|
|
782
|
+
return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.onErrorHandling;
|
|
803
783
|
}
|
|
804
784
|
}, {
|
|
805
785
|
key: "diva3DRenderingDefault",
|
|
806
786
|
value: function diva3DRenderingDefault() {
|
|
807
|
-
var _this$
|
|
808
|
-
return (_this$
|
|
787
|
+
var _this$divaWebConfigDa27;
|
|
788
|
+
return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.diva3DRenderingDefault;
|
|
809
789
|
}
|
|
810
790
|
}, {
|
|
811
791
|
key: "getJwt",
|
|
@@ -820,8 +800,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
820
800
|
}, {
|
|
821
801
|
key: "getUseMask",
|
|
822
802
|
value: function getUseMask() {
|
|
823
|
-
var _this$
|
|
824
|
-
return (_this$
|
|
803
|
+
var _this$divaWebConfigDa28;
|
|
804
|
+
return (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.useMask;
|
|
825
805
|
}
|
|
826
806
|
}, {
|
|
827
807
|
key: "apiUrl",
|
|
@@ -993,11 +973,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
993
973
|
var qs = 'function=GetJsonArticlePrices' + '&catalogCodex=' + catalogCodex + '&articleCodex=' + articleCodex + (this.useEkPrices ? '&ekPrices=true' : '');
|
|
994
974
|
return DivaUtils.md5(qs.toLowerCase()).toUpperCase();
|
|
995
975
|
}
|
|
996
|
-
}, {
|
|
997
|
-
key: "getCheckVariantDataQS",
|
|
998
|
-
value: function getCheckVariantDataQS(setHash) {
|
|
999
|
-
return 'function=CheckVariantData&hash=' + setHash;
|
|
1000
|
-
}
|
|
1001
976
|
}, {
|
|
1002
977
|
key: "getApiAccountLogin",
|
|
1003
978
|
value: function getApiAccountLogin(accountGuid) {
|
|
@@ -1189,7 +1164,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1189
1164
|
case 9:
|
|
1190
1165
|
_context10.prev = 9;
|
|
1191
1166
|
_context10.t0 = _context10["catch"](4);
|
|
1192
|
-
LOG$
|
|
1167
|
+
LOG$h.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
|
|
1193
1168
|
cause: _context10.t0
|
|
1194
1169
|
}));
|
|
1195
1170
|
case 12:
|
|
@@ -1311,7 +1286,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1311
1286
|
case 14:
|
|
1312
1287
|
_context12.prev = 14;
|
|
1313
1288
|
_context12.t0 = _context12["catch"](6);
|
|
1314
|
-
LOG$
|
|
1289
|
+
LOG$h.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
|
|
1315
1290
|
cause: _context12.t0
|
|
1316
1291
|
}));
|
|
1317
1292
|
case 17:
|
|
@@ -1341,14 +1316,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1341
1316
|
}, {
|
|
1342
1317
|
key: "dontLoadAdditionalModelInfos",
|
|
1343
1318
|
get: function get() {
|
|
1344
|
-
var _this$
|
|
1345
|
-
return (_this$
|
|
1319
|
+
var _this$divaWebConfigDa29;
|
|
1320
|
+
return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.dontLoadAdditionalModelInfos;
|
|
1346
1321
|
}
|
|
1347
1322
|
}, {
|
|
1348
1323
|
key: "dontLoadCatalogEditorLiteMask",
|
|
1349
1324
|
get: function get() {
|
|
1350
|
-
var _this$
|
|
1351
|
-
return (_this$
|
|
1325
|
+
var _this$divaWebConfigDa30;
|
|
1326
|
+
return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.dontLoadCatalogEditorLiteMask;
|
|
1352
1327
|
}
|
|
1353
1328
|
}, {
|
|
1354
1329
|
key: "OrganizationId",
|
|
@@ -1356,6 +1331,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
|
|
|
1356
1331
|
var _this$organization4;
|
|
1357
1332
|
return (_this$organization4 = this.organization) === null || _this$organization4 === void 0 ? void 0 : _this$organization4._id;
|
|
1358
1333
|
}
|
|
1334
|
+
}, {
|
|
1335
|
+
key: "enableAR",
|
|
1336
|
+
get: function get() {
|
|
1337
|
+
var _this$organization5;
|
|
1338
|
+
return (_this$organization5 = this.organization) === null || _this$organization5 === void 0 || (_this$organization5 = _this$organization5.settings) === null || _this$organization5 === void 0 ? void 0 : _this$organization5.enableAR;
|
|
1339
|
+
}
|
|
1359
1340
|
}, {
|
|
1360
1341
|
key: "webConfig",
|
|
1361
1342
|
get: function get() {
|
|
@@ -1661,7 +1642,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
|
|
|
1661
1642
|
}();
|
|
1662
1643
|
|
|
1663
1644
|
var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
1664
|
-
function ArticleOptionValueData(codex, jsonOPV, catalogOPV, myArticle, isParentOPVG, parent) {
|
|
1645
|
+
function ArticleOptionValueData(codex, jsonOPV, catalogOPV, myArticle, isParentOPVG, parent, multiselectOptions) {
|
|
1665
1646
|
_classCallCheck__default["default"](this, ArticleOptionValueData);
|
|
1666
1647
|
_defineProperty__default["default"](this, "opv", void 0);
|
|
1667
1648
|
this.opv = {
|
|
@@ -1697,7 +1678,7 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
|
|
|
1697
1678
|
var mySubArticleReplaceMainArticleNr;
|
|
1698
1679
|
//Auf Preisliste von PriceArticleCodex zugreifen
|
|
1699
1680
|
if (this.opv.rul) {
|
|
1700
|
-
this.opv.rul = DivaUtils__default["default"].getRuleByFormula(this.opv.rul);
|
|
1681
|
+
this.opv.rul = DivaUtils__default["default"].getRuleByFormula(this.opv.rul, myArticle.catalogCodex, multiselectOptions);
|
|
1701
1682
|
}
|
|
1702
1683
|
if (myArticle.arePricesLoaded) {
|
|
1703
1684
|
var articlePrices = myArticle.articlePrices;
|
|
@@ -16039,7 +16020,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16039
16020
|
this.opv.images.push({
|
|
16040
16021
|
fileName: image.FileName,
|
|
16041
16022
|
functiontype: image.Functiontype,
|
|
16042
|
-
jsFormula: image.JsFormula ? DivaUtils__default["default"].getRuleByFormula(image.JsFormula, catalog.catalogCodex) : '',
|
|
16023
|
+
jsFormula: image.JsFormula ? DivaUtils__default["default"].getRuleByFormula(image.JsFormula, catalog.catalogCodex, catalog.multiselectOptions) : '',
|
|
16043
16024
|
name: image.Name,
|
|
16044
16025
|
replaceMainImage: image.ReplaceMainImage
|
|
16045
16026
|
});
|
|
@@ -16370,7 +16351,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
|
|
|
16370
16351
|
}]);
|
|
16371
16352
|
}();
|
|
16372
16353
|
|
|
16373
|
-
var LOG$
|
|
16354
|
+
var LOG$g = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
16374
16355
|
//kaufmännischer Artikel
|
|
16375
16356
|
var CatalogArticleData = /*#__PURE__*/function () {
|
|
16376
16357
|
function CatalogArticleData(jsonArticle, catalogData) {
|
|
@@ -16667,6 +16648,16 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
16667
16648
|
get: function get() {
|
|
16668
16649
|
return this.catalogArticle.partListArticles;
|
|
16669
16650
|
}
|
|
16651
|
+
}, {
|
|
16652
|
+
key: "getPartlistRuleOfArticleCodes",
|
|
16653
|
+
value: function getPartlistRuleOfArticleCodes(articleCodex) {
|
|
16654
|
+
var _this$partlistArticle;
|
|
16655
|
+
return (_this$partlistArticle = this.partlistArticlesRules) === null || _this$partlistArticle === void 0 || (_this$partlistArticle = _this$partlistArticle[0].PartListPos) === null || _this$partlistArticle === void 0 ? void 0 : _this$partlistArticle.find(function (p) {
|
|
16656
|
+
return p.ItemRefArticles.find(function (a) {
|
|
16657
|
+
return a.ArticleCodex === articleCodex;
|
|
16658
|
+
});
|
|
16659
|
+
});
|
|
16660
|
+
}
|
|
16670
16661
|
}, {
|
|
16671
16662
|
key: "groupedPartlists",
|
|
16672
16663
|
get: function get() {
|
|
@@ -17071,7 +17062,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17071
17062
|
}
|
|
17072
17063
|
if (json.Decisions && json.Decisions.length > 0) {
|
|
17073
17064
|
this.catalogArticle.decisions = json.Decisions;
|
|
17074
|
-
this.initDecisions();
|
|
17065
|
+
this.initDecisions(catalog);
|
|
17075
17066
|
}
|
|
17076
17067
|
if (json.TemplateCodex) {
|
|
17077
17068
|
this.catalogArticle.templateCodex = json.TemplateCodex;
|
|
@@ -17091,7 +17082,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17091
17082
|
if (json.ShowroomImages) {
|
|
17092
17083
|
for (var _i = 0; _i < json.ShowroomImages.length; _i++) {
|
|
17093
17084
|
if (json.ShowroomImages[_i].JsFormula) {
|
|
17094
|
-
json.ShowroomImages[_i].JsFormula = DivaUtils__default["default"].getRuleByFormula(json.ShowroomImages[_i].JsFormula);
|
|
17085
|
+
json.ShowroomImages[_i].JsFormula = DivaUtils__default["default"].getRuleByFormula(json.ShowroomImages[_i].JsFormula, catalog.catalogCodex, catalog.multiselectOptions);
|
|
17095
17086
|
}
|
|
17096
17087
|
}
|
|
17097
17088
|
this.catalogArticle.showroomImages = json.ShowroomImages;
|
|
@@ -17165,6 +17156,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17165
17156
|
}, {
|
|
17166
17157
|
key: "loadArticleOptions",
|
|
17167
17158
|
value: function loadArticleOptions(json, set, onlyRunLogic) {
|
|
17159
|
+
var multiselectOptions = json.OPT.filter(function (o) {
|
|
17160
|
+
var _o$OCD;
|
|
17161
|
+
return set.CatalogData.multiselectOptions.includes((_o$OCD = o.OCD) !== null && _o$OCD !== void 0 ? _o$OCD : o.Codex);
|
|
17162
|
+
}).map(function (o) {
|
|
17163
|
+
return o.Codex;
|
|
17164
|
+
});
|
|
17168
17165
|
if (json.OPT && json.OPT.length != 0) {
|
|
17169
17166
|
for (var i = 0; i < json.OPT.length; i++) {
|
|
17170
17167
|
var myOPT = json.OPT[i];
|
|
@@ -17189,7 +17186,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17189
17186
|
catOPV = set.CatalogData.getCatalogOptionValueByCodex(tmpOPV.OCD ? tmpOPV.OCD : tmpOPV.Codex, onlyRunLogic);
|
|
17190
17187
|
if (catOPV) {
|
|
17191
17188
|
if (!(catOPV !== null && catOPV !== void 0 && catOPV.groupName) && catOPG) catOPV.groupName = catOPG.name;
|
|
17192
|
-
var myOPV = new ArticleOptionValueData(tmpOPV.Codex, tmpOPV, catOPV, this, true, newOPG);
|
|
17189
|
+
var myOPV = new ArticleOptionValueData(tmpOPV.Codex, tmpOPV, catOPV, this, true, newOPG, multiselectOptions);
|
|
17193
17190
|
allOPVsOfOPG[tmpOPV.Codex] = myOPV;
|
|
17194
17191
|
}
|
|
17195
17192
|
}
|
|
@@ -17202,11 +17199,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17202
17199
|
var _tmpOPG = myOPT.OPV[_j],
|
|
17203
17200
|
_catOPG = set.CatalogData.getCatalogOptionValueByCodex(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex, onlyRunLogic);
|
|
17204
17201
|
if (_catOPG) {
|
|
17205
|
-
var _newOPG = new ArticleOptionValueData(_tmpOPG.Codex, _tmpOPG, _catOPG, this, false, newOPT);
|
|
17202
|
+
var _newOPG = new ArticleOptionValueData(_tmpOPG.Codex, _tmpOPG, _catOPG, this, false, newOPT, multiselectOptions);
|
|
17206
17203
|
allOPVsOfOPT[_tmpOPG.Codex] = _newOPG;
|
|
17207
17204
|
var _catOPV = set.CatalogData.getCatalogOptionValueByCodex(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex, onlyRunLogic);
|
|
17208
17205
|
if (_catOPV) {
|
|
17209
|
-
var _myOPV = new ArticleOptionValueData(_tmpOPG.Codex, _tmpOPG, _catOPV, this, true, _newOPG);
|
|
17206
|
+
var _myOPV = new ArticleOptionValueData(_tmpOPG.Codex, _tmpOPG, _catOPV, this, true, _newOPG, multiselectOptions);
|
|
17210
17207
|
_allOPVsOfOPG[_tmpOPG.Codex] = _myOPV;
|
|
17211
17208
|
}
|
|
17212
17209
|
_newOPG.initOPVsInOPG(_allOPVsOfOPG);
|
|
@@ -17218,7 +17215,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17218
17215
|
var _tmpOPV = myOPT.OPV[_j2],
|
|
17219
17216
|
_catOPV2 = set.CatalogData.getCatalogOptionValueByCodex(_tmpOPV.OCD ? _tmpOPV.OCD : _tmpOPV.Codex, onlyRunLogic);
|
|
17220
17217
|
if (_catOPV2) {
|
|
17221
|
-
var _myOPV2 = new ArticleOptionValueData(_tmpOPV.Codex, _tmpOPV, _catOPV2, this, true, newOPT);
|
|
17218
|
+
var _myOPV2 = new ArticleOptionValueData(_tmpOPV.Codex, _tmpOPV, _catOPV2, this, true, newOPT, multiselectOptions);
|
|
17222
17219
|
allOPVsOfOPT[_tmpOPV.Codex] = _myOPV2;
|
|
17223
17220
|
}
|
|
17224
17221
|
}
|
|
@@ -17243,7 +17240,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17243
17240
|
|
|
17244
17241
|
if (json.Decisions && json.Decisions.length > 0) {
|
|
17245
17242
|
this.catalogArticle.decisions = JSON.parse(JSON.stringify(json.Decisions));
|
|
17246
|
-
this.initDecisions();
|
|
17243
|
+
this.initDecisions(set.CatalogData);
|
|
17247
17244
|
}
|
|
17248
17245
|
if (json.PartLists && json.PartLists.length > 0) {
|
|
17249
17246
|
this.catalogArticle.partListArticles = json.PartLists;
|
|
@@ -17260,7 +17257,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17260
17257
|
}, catalog);
|
|
17261
17258
|
var articleOPG = new ArticleOptionValueData('OPVSUPPLIER_COLORS', {
|
|
17262
17259
|
RUL: rule
|
|
17263
|
-
}, catalogOPG, this, false, newOPT);
|
|
17260
|
+
}, catalogOPG, this, false, newOPT, catalog.multiselectOptions);
|
|
17264
17261
|
allOPVsOfOPT['OPVSUPPLIER_COLORS'] = articleOPG;
|
|
17265
17262
|
var supplierColorsOpvs = {};
|
|
17266
17263
|
for (var i = 0; i < supplierColors.length; i++) {
|
|
@@ -17271,17 +17268,17 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17271
17268
|
HexColor: col.HexColor,
|
|
17272
17269
|
GroupName: 'Lieferantenfarben'
|
|
17273
17270
|
}, catalog);
|
|
17274
|
-
supplierColorsOpvs['OPV' + col.OptionValueCodex] = new ArticleOptionValueData('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, this, true, articleOPG);
|
|
17271
|
+
supplierColorsOpvs['OPV' + col.OptionValueCodex] = new ArticleOptionValueData('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, this, true, articleOPG, catalog.multiselectOptions);
|
|
17275
17272
|
}
|
|
17276
17273
|
articleOPG.initOPVsInOPG(supplierColorsOpvs);
|
|
17277
17274
|
}
|
|
17278
17275
|
}, {
|
|
17279
17276
|
key: "loadPrices",
|
|
17280
|
-
value: function loadPrices(json) {
|
|
17277
|
+
value: function loadPrices(json, catalog) {
|
|
17281
17278
|
var jsonPrice = JSON.parse(JSON.stringify(json));
|
|
17282
17279
|
if (jsonPrice.Rules) {
|
|
17283
17280
|
for (var _key3 in jsonPrice.Rules) {
|
|
17284
|
-
jsonPrice.Rules[_key3].JsFormula = DivaUtils__default["default"].getRuleByFormula(jsonPrice.Rules[_key3].JsFormula);
|
|
17281
|
+
jsonPrice.Rules[_key3].JsFormula = DivaUtils__default["default"].getRuleByFormula(jsonPrice.Rules[_key3].JsFormula, catalog.catalogCodex, catalog.multiselectOptions);
|
|
17285
17282
|
}
|
|
17286
17283
|
}
|
|
17287
17284
|
this.catalogArticle.articlePrices = jsonPrice;
|
|
@@ -17289,7 +17286,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17289
17286
|
}
|
|
17290
17287
|
}, {
|
|
17291
17288
|
key: "initDecisions",
|
|
17292
|
-
value: function initDecisions() {
|
|
17289
|
+
value: function initDecisions(catalog) {
|
|
17293
17290
|
var myOptOrder = [];
|
|
17294
17291
|
if (this.catalogArticle.articleOptions) {
|
|
17295
17292
|
for (var _key4 in this.catalogArticle.articleOptions) {
|
|
@@ -17303,7 +17300,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17303
17300
|
for (var j = 0; j < myDecision.DOC.length; j++) {
|
|
17304
17301
|
//DecisionOptionCombination
|
|
17305
17302
|
var myDOC = myDecision.DOC[j];
|
|
17306
|
-
if (myDOC.JsFormula) myDOC.JsFormula = DivaUtils__default["default"].getRuleByFormula(myDOC.JsFormula);
|
|
17303
|
+
if (myDOC.JsFormula) myDOC.JsFormula = DivaUtils__default["default"].getRuleByFormula(myDOC.JsFormula, catalog.catalogCodex, catalog.multiselectOptions);
|
|
17307
17304
|
if (myDOC.ValidOptionValues) {
|
|
17308
17305
|
myDOC.ValidOptions = '';
|
|
17309
17306
|
var a = myDOC.ValidOptionValues.split(',');
|
|
@@ -17326,12 +17323,12 @@ var CatalogArticleData = /*#__PURE__*/function () {
|
|
|
17326
17323
|
articleCodex: this.articleCodex
|
|
17327
17324
|
};
|
|
17328
17325
|
if (myDecision.Type == '0') {
|
|
17329
|
-
LOG$
|
|
17326
|
+
LOG$g.error(new DivaUtils.DivaError(text, {
|
|
17330
17327
|
code: 'WC_0011',
|
|
17331
17328
|
custom: stack
|
|
17332
17329
|
}));
|
|
17333
17330
|
} else {
|
|
17334
|
-
LOG$
|
|
17331
|
+
LOG$g.warn(text, undefined, stack);
|
|
17335
17332
|
}
|
|
17336
17333
|
myDecision.Options.splice(m, 1);
|
|
17337
17334
|
m--;
|
|
@@ -18151,9 +18148,9 @@ var OptionCatalogData = /*#__PURE__*/function () {
|
|
|
18151
18148
|
}]);
|
|
18152
18149
|
}();
|
|
18153
18150
|
|
|
18154
|
-
function ownKeys$
|
|
18155
|
-
function _objectSpread$
|
|
18156
|
-
var LOG$
|
|
18151
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18152
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18153
|
+
var LOG$f = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
18157
18154
|
|
|
18158
18155
|
/*
|
|
18159
18156
|
Diese KLasse enthält Inforamtion zu einem Catalog (C)
|
|
@@ -18992,7 +18989,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
18992
18989
|
key: "getCatalogOptionValueByCodex",
|
|
18993
18990
|
value: function getCatalogOptionValueByCodex(codex, throwError) {
|
|
18994
18991
|
if (this.optionValues && this.optionValues[codex]) return this.optionValues[codex];
|
|
18995
|
-
LOG$
|
|
18992
|
+
LOG$f.error(new DivaUtils.DivaError('CatalogOptionValue: ' + codex + ' does not exist', {
|
|
18996
18993
|
code: 'WC_0017'
|
|
18997
18994
|
}));
|
|
18998
18995
|
if (throwError) {
|
|
@@ -19096,7 +19093,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19096
19093
|
if (this.catalogArticles[articleCodex]) {
|
|
19097
19094
|
return this.catalogArticles[articleCodex];
|
|
19098
19095
|
} else {
|
|
19099
|
-
LOG$
|
|
19096
|
+
LOG$f.error(new DivaUtils.DivaError('Artikelcodex ' + articleCodex + ' existiert nicht im Katalog ' + this.catalogCodex, {
|
|
19100
19097
|
code: 'WC_0006'
|
|
19101
19098
|
}));
|
|
19102
19099
|
if (throwError) {
|
|
@@ -19627,6 +19624,16 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19627
19624
|
get: function get() {
|
|
19628
19625
|
return this._api;
|
|
19629
19626
|
}
|
|
19627
|
+
}, {
|
|
19628
|
+
key: "multiselectOptions",
|
|
19629
|
+
get: function get() {
|
|
19630
|
+
var _this$options4;
|
|
19631
|
+
return Object.values((_this$options4 = this.options) !== null && _this$options4 !== void 0 ? _this$options4 : {}).filter(function (o) {
|
|
19632
|
+
return o.isMultiselect;
|
|
19633
|
+
}).map(function (o) {
|
|
19634
|
+
return o.codex;
|
|
19635
|
+
});
|
|
19636
|
+
}
|
|
19630
19637
|
}, {
|
|
19631
19638
|
key: "catalogMask",
|
|
19632
19639
|
get: function get() {
|
|
@@ -19693,7 +19700,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
|
|
|
19693
19700
|
var mapMask = function mapMask(mask) {
|
|
19694
19701
|
var _mappedMask$catalog;
|
|
19695
19702
|
if (!mask) return undefined;
|
|
19696
|
-
var mappedMask = _objectSpread$
|
|
19703
|
+
var mappedMask = _objectSpread$f({}, mask);
|
|
19697
19704
|
var mapProperties = function mapProperties(props) {
|
|
19698
19705
|
if (Array.isArray(props)) return props;
|
|
19699
19706
|
var mappedProps = [];
|
|
@@ -19722,7 +19729,7 @@ var mapMask = function mapMask(mask) {
|
|
|
19722
19729
|
return mappedMask;
|
|
19723
19730
|
};
|
|
19724
19731
|
|
|
19725
|
-
var LOG$
|
|
19732
|
+
var LOG$e = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
19726
19733
|
var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
19727
19734
|
function DivaCatalogHandler() {
|
|
19728
19735
|
_classCallCheck__default["default"](this, DivaCatalogHandler);
|
|
@@ -19743,7 +19750,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19743
19750
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19744
19751
|
case 5:
|
|
19745
19752
|
if (!orderSet) {
|
|
19746
|
-
_context.next =
|
|
19753
|
+
_context.next = 53;
|
|
19747
19754
|
break;
|
|
19748
19755
|
}
|
|
19749
19756
|
// ab hier parallell laden
|
|
@@ -19775,22 +19782,30 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19775
19782
|
case 23:
|
|
19776
19783
|
mask = _context.sent;
|
|
19777
19784
|
case 24:
|
|
19785
|
+
_context.next = 29;
|
|
19786
|
+
break;
|
|
19787
|
+
case 26:
|
|
19788
|
+
_context.prev = 26;
|
|
19789
|
+
_context.t0 = _context["catch"](19);
|
|
19790
|
+
LOG$e.debug('no mask found: ' + _context.t0);
|
|
19791
|
+
case 29:
|
|
19792
|
+
_context.prev = 29;
|
|
19778
19793
|
if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
|
|
19779
|
-
_context.next =
|
|
19794
|
+
_context.next = 34;
|
|
19780
19795
|
break;
|
|
19781
19796
|
}
|
|
19782
|
-
_context.next =
|
|
19797
|
+
_context.next = 33;
|
|
19783
19798
|
return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
|
|
19784
|
-
case
|
|
19799
|
+
case 33:
|
|
19785
19800
|
additionalModelInfos = _context.sent;
|
|
19786
|
-
case
|
|
19787
|
-
_context.next =
|
|
19801
|
+
case 34:
|
|
19802
|
+
_context.next = 39;
|
|
19788
19803
|
break;
|
|
19789
|
-
case
|
|
19790
|
-
_context.prev =
|
|
19791
|
-
_context.
|
|
19792
|
-
LOG$
|
|
19793
|
-
case
|
|
19804
|
+
case 36:
|
|
19805
|
+
_context.prev = 36;
|
|
19806
|
+
_context.t1 = _context["catch"](29);
|
|
19807
|
+
LOG$e.debug('no additionalModelInfos found: ' + _context.t1);
|
|
19808
|
+
case 39:
|
|
19794
19809
|
if (state.catalogMask || mask) {
|
|
19795
19810
|
if (!additionalModelInfos) additionalModelInfos = {
|
|
19796
19811
|
_id: ''
|
|
@@ -19799,19 +19814,19 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19799
19814
|
}
|
|
19800
19815
|
catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
|
|
19801
19816
|
if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
|
|
19802
|
-
_context.next =
|
|
19817
|
+
_context.next = 45;
|
|
19803
19818
|
break;
|
|
19804
19819
|
}
|
|
19805
19820
|
catalogData.initCatalogArticles(catalogArticleListData.Articles);
|
|
19806
|
-
_context.next =
|
|
19821
|
+
_context.next = 48;
|
|
19807
19822
|
break;
|
|
19808
|
-
case
|
|
19823
|
+
case 45:
|
|
19809
19824
|
DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
|
|
19810
|
-
LOG$
|
|
19825
|
+
LOG$e.error(new DivaUtils.DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
|
|
19811
19826
|
code: 'WC_0002'
|
|
19812
19827
|
}));
|
|
19813
19828
|
throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
|
|
19814
|
-
case
|
|
19829
|
+
case 48:
|
|
19815
19830
|
if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
|
|
19816
19831
|
catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
|
|
19817
19832
|
}
|
|
@@ -19828,16 +19843,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
|
|
|
19828
19843
|
|
|
19829
19844
|
DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
|
|
19830
19845
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19831
|
-
case
|
|
19832
|
-
LOG$
|
|
19846
|
+
case 53:
|
|
19847
|
+
LOG$e.error(new DivaUtils.DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
|
|
19833
19848
|
code: 'WC_0007'
|
|
19834
19849
|
}));
|
|
19835
19850
|
return _context.abrupt("return", state.divaCatalogs[catalogKey]);
|
|
19836
|
-
case
|
|
19851
|
+
case 55:
|
|
19837
19852
|
case "end":
|
|
19838
19853
|
return _context.stop();
|
|
19839
19854
|
}
|
|
19840
|
-
}, _callee, null, [[19,
|
|
19855
|
+
}, _callee, null, [[19, 26], [29, 36]]);
|
|
19841
19856
|
}));
|
|
19842
19857
|
function getCatalogData(_x, _x2, _x3) {
|
|
19843
19858
|
return _getCatalogData.apply(this, arguments);
|
|
@@ -19979,6 +19994,14 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
19979
19994
|
get: function get() {
|
|
19980
19995
|
return this.val ? this.val.codex : undefined;
|
|
19981
19996
|
}
|
|
19997
|
+
}, {
|
|
19998
|
+
key: "multiselectValCodex",
|
|
19999
|
+
get: function get() {
|
|
20000
|
+
var _this$multiSelects$ma, _this$multiSelects2;
|
|
20001
|
+
return (_this$multiSelects$ma = (_this$multiSelects2 = this.multiSelects) === null || _this$multiSelects2 === void 0 ? void 0 : _this$multiSelects2.map(function (v) {
|
|
20002
|
+
return v.codex;
|
|
20003
|
+
})) !== null && _this$multiSelects$ma !== void 0 ? _this$multiSelects$ma : [];
|
|
20004
|
+
}
|
|
19982
20005
|
}, {
|
|
19983
20006
|
key: "measureValue",
|
|
19984
20007
|
get: function get() {
|
|
@@ -20452,12 +20475,12 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20452
20475
|
}, {
|
|
20453
20476
|
key: "getSelectedVals",
|
|
20454
20477
|
get: function get() {
|
|
20455
|
-
var _this$
|
|
20456
|
-
if (this.isMultiselect && (_this$
|
|
20457
|
-
var _this$multiSelects$
|
|
20458
|
-
return (_this$multiSelects$
|
|
20478
|
+
var _this$multiSelects3;
|
|
20479
|
+
if (this.isMultiselect && (_this$multiSelects3 = this.multiSelects) !== null && _this$multiSelects3 !== void 0 && _this$multiSelects3.length) {
|
|
20480
|
+
var _this$multiSelects$ma2, _this$multiSelects4;
|
|
20481
|
+
return (_this$multiSelects$ma2 = (_this$multiSelects4 = this.multiSelects) === null || _this$multiSelects4 === void 0 ? void 0 : _this$multiSelects4.map(function (m) {
|
|
20459
20482
|
return m.codex;
|
|
20460
|
-
})) !== null && _this$multiSelects$
|
|
20483
|
+
})) !== null && _this$multiSelects$ma2 !== void 0 ? _this$multiSelects$ma2 : [];
|
|
20461
20484
|
}
|
|
20462
20485
|
if (this.val) {
|
|
20463
20486
|
return [this.val.codex];
|
|
@@ -20475,9 +20498,9 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
|
|
|
20475
20498
|
}]);
|
|
20476
20499
|
}();
|
|
20477
20500
|
|
|
20478
|
-
function ownKeys$
|
|
20479
|
-
function _objectSpread$
|
|
20480
|
-
var LOG$
|
|
20501
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20502
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20503
|
+
var LOG$d = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
20481
20504
|
var DivaArticle = /*#__PURE__*/function () {
|
|
20482
20505
|
//Hier steht die aktuelle Konfiguration
|
|
20483
20506
|
|
|
@@ -20690,7 +20713,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20690
20713
|
var partlistArticle = this.partlistArticles[basketId];
|
|
20691
20714
|
if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
|
|
20692
20715
|
if (partlistArticle.hasPartlistArticle) {
|
|
20693
|
-
partlistArticles = _objectSpread$
|
|
20716
|
+
partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
|
|
20694
20717
|
}
|
|
20695
20718
|
}
|
|
20696
20719
|
return partlistArticles;
|
|
@@ -20721,10 +20744,20 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20721
20744
|
}
|
|
20722
20745
|
}
|
|
20723
20746
|
if (Object.entries(partlistArticles).length && !this.CatalogData.bundleRules) {
|
|
20724
|
-
LOG$
|
|
20747
|
+
LOG$d.error(new DivaUtils.DivaError('sorting partlistarticles Failed', {
|
|
20725
20748
|
custom: {
|
|
20726
|
-
partlistArticles: partlistArticles
|
|
20727
|
-
|
|
20749
|
+
partlistArticles: Object.values(partlistArticles).map(function (p) {
|
|
20750
|
+
return {
|
|
20751
|
+
BasketId: p.basketId,
|
|
20752
|
+
ArticleCodex: p.articleCodex
|
|
20753
|
+
};
|
|
20754
|
+
}),
|
|
20755
|
+
partlistArticlesToLoad: partlistArticlesToLoad.map(function (p) {
|
|
20756
|
+
return {
|
|
20757
|
+
BasketId: p.ArticleCodex,
|
|
20758
|
+
ArticleCodex: p.ArticleCodex
|
|
20759
|
+
};
|
|
20760
|
+
})
|
|
20728
20761
|
}
|
|
20729
20762
|
}));
|
|
20730
20763
|
}
|
|
@@ -20747,14 +20780,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20747
20780
|
set: function set(posNr) {
|
|
20748
20781
|
this.article.posNr = posNr;
|
|
20749
20782
|
}
|
|
20750
|
-
}, {
|
|
20751
|
-
key: "curProduct",
|
|
20752
|
-
get: function get() {
|
|
20753
|
-
return this.article.curProduct;
|
|
20754
|
-
},
|
|
20755
|
-
set: function set(product) {
|
|
20756
|
-
this.article.curProduct = product;
|
|
20757
|
-
}
|
|
20758
20783
|
}, {
|
|
20759
20784
|
key: "isDockable",
|
|
20760
20785
|
get: function get() {
|
|
@@ -20822,18 +20847,25 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20822
20847
|
var bruttoPercentage = this.set.getBruttoPercentage(true);
|
|
20823
20848
|
var price = this.bruttoPrice;
|
|
20824
20849
|
if (bruttoPercentage) price = price - price * (bruttoPercentage / 100);
|
|
20825
|
-
var discountPercentage = this.
|
|
20850
|
+
var discountPercentage = this.getCurrentDisountPercentage();
|
|
20826
20851
|
if (discountPercentage) {
|
|
20827
20852
|
price = price - price * (discountPercentage / 100);
|
|
20828
20853
|
}
|
|
20829
20854
|
return price;
|
|
20830
20855
|
}
|
|
20856
|
+
}, {
|
|
20857
|
+
key: "discountPercentage",
|
|
20858
|
+
get: function get() {
|
|
20859
|
+
return this.article.discountPercentage;
|
|
20860
|
+
},
|
|
20861
|
+
set: function set(val) {
|
|
20862
|
+
this.article.discountPercentage = val;
|
|
20863
|
+
}
|
|
20831
20864
|
}, {
|
|
20832
20865
|
key: "bruttoPrice",
|
|
20833
20866
|
get: function get() {
|
|
20834
20867
|
if (this.noPrice) return 0;
|
|
20835
20868
|
var price = this.article.price;
|
|
20836
|
-
if (this.curProduct) return this.curProduct.price;
|
|
20837
20869
|
if (this.hasPartlistArticle) {
|
|
20838
20870
|
var partlistPrice = 0;
|
|
20839
20871
|
for (var key in this.partlistArticles) {
|
|
@@ -20849,7 +20881,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20849
20881
|
}, {
|
|
20850
20882
|
key: "mainPrice",
|
|
20851
20883
|
get: function get() {
|
|
20852
|
-
var discountPercentage = this.
|
|
20884
|
+
var discountPercentage = this.getCurrentDisountPercentage();
|
|
20853
20885
|
if (discountPercentage) {
|
|
20854
20886
|
return DivaUtils__default["default"].roundPrice(this.article.price - this.article.price * (discountPercentage / 100), 1, 2);
|
|
20855
20887
|
}
|
|
@@ -20858,7 +20890,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20858
20890
|
}, {
|
|
20859
20891
|
key: "calcPrice",
|
|
20860
20892
|
value: function calcPrice(dontCalcDiscount) {
|
|
20861
|
-
var discountPercentage = this.
|
|
20893
|
+
var discountPercentage = this.getCurrentDisountPercentage();
|
|
20862
20894
|
return DivaUtils__default["default"].roundPrice((dontCalcDiscount ? this.bruttoPrice : this.price) * this.quantity, !!discountPercentage ? 1 : this.CatalogData.rounding, !!discountPercentage ? 2 : this.CatalogData.digits);
|
|
20863
20895
|
}
|
|
20864
20896
|
}, {
|
|
@@ -20938,12 +20970,12 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20938
20970
|
}, {
|
|
20939
20971
|
key: "discounts",
|
|
20940
20972
|
get: function get() {
|
|
20941
|
-
var _this$
|
|
20942
|
-
if (!this.
|
|
20973
|
+
var _this$getCurrentDisou;
|
|
20974
|
+
if (!this.getCurrentDisountPercentage()) return undefined;
|
|
20943
20975
|
var diff = this.bruttoPrice - this.price;
|
|
20944
20976
|
return [{
|
|
20945
20977
|
isPercentage: true,
|
|
20946
|
-
percentageDiscount: (_this$
|
|
20978
|
+
percentageDiscount: (_this$getCurrentDisou = this.getCurrentDisountPercentage()) !== null && _this$getCurrentDisou !== void 0 ? _this$getCurrentDisou : 0,
|
|
20947
20979
|
fixDiscount: DivaUtils__default["default"].roundPrice(diff, this.CatalogData.rounding, this.CatalogData.digits),
|
|
20948
20980
|
fixDiscountFormatted: DivaUtils__default["default"].formatPrice(diff)
|
|
20949
20981
|
}];
|
|
@@ -20953,13 +20985,32 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
20953
20985
|
get: function get() {
|
|
20954
20986
|
return this.article.priceRefs;
|
|
20955
20987
|
}
|
|
20988
|
+
}, {
|
|
20989
|
+
key: "getCurrentDisountPercentage",
|
|
20990
|
+
value: function getCurrentDisountPercentage() {
|
|
20991
|
+
if (this.discountPercentage) return this.discountPercentage;
|
|
20992
|
+
return this.set.getCurrentDisountPercentage();
|
|
20993
|
+
}
|
|
20994
|
+
}, {
|
|
20995
|
+
key: "getArticleOptionStatesWithOptionsForPrint",
|
|
20996
|
+
value: function getArticleOptionStatesWithOptionsForPrint() {
|
|
20997
|
+
var opsObj = _objectSpread$e({}, this.articleOptionStates);
|
|
20998
|
+
if (this.article.optionsForPrint) {
|
|
20999
|
+
for (var i = 0; i < this.article.optionsForPrint.length; i++) {
|
|
21000
|
+
var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
|
|
21001
|
+
if (ops) opsObj[ops.optionCodex] = ops;
|
|
21002
|
+
}
|
|
21003
|
+
}
|
|
21004
|
+
return opsObj;
|
|
21005
|
+
}
|
|
20956
21006
|
}, {
|
|
20957
21007
|
key: "articleVariantDesc",
|
|
20958
21008
|
value: function articleVariantDesc() {
|
|
20959
21009
|
var newLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ', ';
|
|
21010
|
+
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
20960
21011
|
var ret = '';
|
|
20961
|
-
for (var key in
|
|
20962
|
-
var myOPS =
|
|
21012
|
+
for (var key in articleOptions) {
|
|
21013
|
+
var myOPS = articleOptions[key];
|
|
20963
21014
|
if (!myOPS.isInvisible && myOPS.selectionmode != 0 && myOPS.isDoShow && (myOPS.visibleCount > 1 || myOPS.option.forceShowVariantDesc)) {
|
|
20964
21015
|
if (ret != '') ret += newLine;
|
|
20965
21016
|
if (myOPS.valCodex) {
|
|
@@ -21151,13 +21202,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21151
21202
|
}, {
|
|
21152
21203
|
key: "articleOptionStatesWithParents",
|
|
21153
21204
|
get: function get() {
|
|
21154
|
-
return _objectSpread$
|
|
21205
|
+
return _objectSpread$e(_objectSpread$e({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
|
|
21155
21206
|
}
|
|
21156
21207
|
}, {
|
|
21157
21208
|
key: "getReqursiveArticleOptionStates",
|
|
21158
21209
|
value: function getReqursiveArticleOptionStates() {
|
|
21159
21210
|
var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
|
|
21160
|
-
return _objectSpread$
|
|
21211
|
+
return _objectSpread$e(_objectSpread$e(_objectSpread$e(_objectSpread$e({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
|
|
21161
21212
|
}
|
|
21162
21213
|
}, {
|
|
21163
21214
|
key: "clearArticleOptionStates",
|
|
@@ -21868,13 +21919,14 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
21868
21919
|
key: "articleProductHash",
|
|
21869
21920
|
get: function get() {
|
|
21870
21921
|
var hash = this.catalogCodex + '_' + this.articleCodex + '_' + this.quantity + '_';
|
|
21922
|
+
var variantValues = [];
|
|
21871
21923
|
for (var key in this.articleOptionStates) {
|
|
21872
21924
|
var myArtOption = this.articleOptionStates[key];
|
|
21873
21925
|
if (myArtOption.isDoShow && (!(myArtOption.idmVariantenArt == 95 || myArtOption.idmVariantenArt == 96 || myArtOption.idmVariantenArt == 97) || myArtOption.isVisibleFreeText) && myArtOption.val && myArtOption.visibleCount > 0 && !myArtOption.isDescribingState) {
|
|
21874
|
-
|
|
21926
|
+
variantValues.push(myArtOption.optionCodex.substring(3) + '_' + myArtOption.val.codex.substring(3) + (myArtOption.freeText ? '_' + myArtOption.freeText : myArtOption.measureValue ? '_' + myArtOption.measureValue : ''));
|
|
21875
21927
|
}
|
|
21876
21928
|
}
|
|
21877
|
-
return DivaUtils.md5(hash);
|
|
21929
|
+
return DivaUtils.md5(hash + variantValues.join());
|
|
21878
21930
|
}
|
|
21879
21931
|
}, {
|
|
21880
21932
|
key: "VariantValuesWithoutOPTandOPV",
|
|
@@ -22686,7 +22738,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22686
22738
|
this.article.doUpdatePlannerSize = true;
|
|
22687
22739
|
this.calcHeight = Math.round((newHeight + Number.EPSILON) * 100) / 100;
|
|
22688
22740
|
} catch (e) {
|
|
22689
|
-
LOG$
|
|
22741
|
+
LOG$d.warn('Invalid Planungdepth - IDMVariantenArt 97: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
22690
22742
|
}
|
|
22691
22743
|
}
|
|
22692
22744
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
@@ -22698,7 +22750,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22698
22750
|
this.article.doUpdatePlannerSize = true;
|
|
22699
22751
|
this.calcDepth = Math.round((newDepth + Number.EPSILON) * 100) / 100;
|
|
22700
22752
|
} catch (e) {
|
|
22701
|
-
LOG$
|
|
22753
|
+
LOG$d.warn('Invalid Planungdepth - IDMVariantenArt 96: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
22702
22754
|
}
|
|
22703
22755
|
}
|
|
22704
22756
|
//beim article abspeichern. Das Planungselement kann es sich per Funktion von dort dann holen
|
|
@@ -22711,7 +22763,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22711
22763
|
this.article.doUpdatePlannerSize = true;
|
|
22712
22764
|
this.calcWidth = Math.round((newWidth + Number.EPSILON) * 100) / 100;
|
|
22713
22765
|
} catch (e) {
|
|
22714
|
-
LOG$
|
|
22766
|
+
LOG$d.warn('Invalid Planungdepth - IDMVariantenArt 95: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
|
|
22715
22767
|
}
|
|
22716
22768
|
}
|
|
22717
22769
|
}
|
|
@@ -22746,7 +22798,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22746
22798
|
var myOptionStates = this.articleOptionStates;
|
|
22747
22799
|
var myArtOPS = myOptionStates[OptionCodex];
|
|
22748
22800
|
if (!myArtOPS) {
|
|
22749
|
-
LOG$
|
|
22801
|
+
LOG$d.error(new DivaUtils.DivaError('OptionCodex: ' + OptionCodex + ' in articleCodex: ' + this.articleCodex + ' not found!'));
|
|
22750
22802
|
return;
|
|
22751
22803
|
}
|
|
22752
22804
|
myArtOPS.val = myOPVItem; //akteull OPV wird gesetzt
|
|
@@ -22866,10 +22918,10 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22866
22918
|
}
|
|
22867
22919
|
}
|
|
22868
22920
|
if (decisions.length === 0) {
|
|
22869
|
-
LOG$
|
|
22921
|
+
LOG$d.log('partlistarticle loaded for haveing 0 decisions: ', myPartListPos.ItemRefArticles);
|
|
22870
22922
|
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
22871
22923
|
} else if (!partlistAdded && this.CatalogData.useDecisionPosCountValue && myPartListPos.PosCountValue > 0) {
|
|
22872
|
-
LOG$
|
|
22924
|
+
LOG$d.log('partlistarticle loaded for having default PosCountValue ', myPartListPos.ItemRefArticles);
|
|
22873
22925
|
partlistArticlesToLoad = this.addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, newConfigValues);
|
|
22874
22926
|
}
|
|
22875
22927
|
}
|
|
@@ -22943,13 +22995,13 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22943
22995
|
RuleDesc: myRuleDesc,
|
|
22944
22996
|
RuleDesc_locales: myRuleDesc_locales,
|
|
22945
22997
|
PosInvisibility: myPartListPos.PosInvisibility,
|
|
22946
|
-
VariantValues: _objectSpread$
|
|
22998
|
+
VariantValues: _objectSpread$e(_objectSpread$e({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
|
|
22947
22999
|
VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
|
|
22948
23000
|
optionImgForPrint: optionImgForPrint,
|
|
22949
23001
|
optionsForPrint: optionsForPrint
|
|
22950
23002
|
});
|
|
22951
23003
|
} else {
|
|
22952
|
-
LOG$
|
|
23004
|
+
LOG$d.debug('not loading partlistarticle: ' + articleCodex + ' cause quantity is zero');
|
|
22953
23005
|
}
|
|
22954
23006
|
}
|
|
22955
23007
|
return partlistArticlesToLoad;
|
|
@@ -22978,7 +23030,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22978
23030
|
}
|
|
22979
23031
|
}
|
|
22980
23032
|
} else {
|
|
22981
|
-
LOG$
|
|
23033
|
+
LOG$d.error(new DivaUtils.DivaError('For article: ' + this.articleCodex + ' name: ' + this.name + ' decisionNr: ' + DecisionNumber + ' was not found as DecisionType 3'));
|
|
22982
23034
|
}
|
|
22983
23035
|
}
|
|
22984
23036
|
return {
|
|
@@ -23019,7 +23071,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23019
23071
|
}
|
|
23020
23072
|
for (var key in this.articleOptionStates) {
|
|
23021
23073
|
var myOPS = this.articleOptionStates[key];
|
|
23022
|
-
myOPS.visibleOptionValues = _objectSpread$
|
|
23074
|
+
myOPS.visibleOptionValues = _objectSpread$e({}, myOPS.option.articleOptionValues);
|
|
23023
23075
|
myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
|
|
23024
23076
|
myOPS.definedBySetFeatureFixed = false;
|
|
23025
23077
|
}
|
|
@@ -23162,7 +23214,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23162
23214
|
}
|
|
23163
23215
|
break;
|
|
23164
23216
|
default:
|
|
23165
|
-
LOG$
|
|
23217
|
+
LOG$d.error(new DivaUtils.DivaError('Action type not supported in DecisionOptionCombination', {
|
|
23166
23218
|
code: 'WC_0011',
|
|
23167
23219
|
custom: {
|
|
23168
23220
|
actionType: myDA.Type,
|
|
@@ -23250,7 +23302,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23250
23302
|
}
|
|
23251
23303
|
if (ruleValid) {
|
|
23252
23304
|
ruleWasValidOnce = true;
|
|
23253
|
-
if (m == 0) validOPVs[OPT] = _objectSpread$
|
|
23305
|
+
if (m == 0) validOPVs[OPT] = _objectSpread$e({}, possibleOPVs);
|
|
23254
23306
|
opvCodex = opvCodex.slice(1);
|
|
23255
23307
|
if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
|
|
23256
23308
|
}
|
|
@@ -23462,7 +23514,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23462
23514
|
case 'ENABLE_DECISION':
|
|
23463
23515
|
break;
|
|
23464
23516
|
default:
|
|
23465
|
-
LOG$
|
|
23517
|
+
LOG$d.error(new DivaUtils.DivaError('Action type not supported in DecisionOptionCombination', {
|
|
23466
23518
|
code: 'WC_0011',
|
|
23467
23519
|
custom: {
|
|
23468
23520
|
actionType: myDA.Type,
|
|
@@ -23646,7 +23698,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23646
23698
|
break;
|
|
23647
23699
|
}
|
|
23648
23700
|
_context.next = 4;
|
|
23649
|
-
return Promise.resolve().then(function () { return require('./ShelfPlanner-
|
|
23701
|
+
return Promise.resolve().then(function () { return require('./ShelfPlanner-47d446eb.js'); });
|
|
23650
23702
|
case 4:
|
|
23651
23703
|
_yield$import = _context.sent;
|
|
23652
23704
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -24007,7 +24059,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24007
24059
|
this.article.priceRefs.push(newPriceRef);
|
|
24008
24060
|
}
|
|
24009
24061
|
} else {
|
|
24010
|
-
LOG$
|
|
24062
|
+
LOG$d.error(new DivaUtils.DivaError('getPriceRefs - RuleID not defined', {
|
|
24011
24063
|
code: 'WC_0011',
|
|
24012
24064
|
custom: {
|
|
24013
24065
|
myRuleID: myRuleID
|
|
@@ -24147,7 +24199,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24147
24199
|
}, {
|
|
24148
24200
|
key: "updateArticleSVG",
|
|
24149
24201
|
value: function updateArticleSVG() {
|
|
24150
|
-
var _this$article$catalog2,
|
|
24202
|
+
var _this$article$catalog2,
|
|
24203
|
+
_this$article$catalog3,
|
|
24204
|
+
_this4 = this;
|
|
24151
24205
|
var newSVGFile = null;
|
|
24152
24206
|
var svgChangedViaSvgTausch = false;
|
|
24153
24207
|
if (!this.hasCatalogPlannerArticle || ((_this$article$catalog2 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog2 === void 0 ? void 0 : _this$article$catalog2.topSvg) == undefined && ((_this$article$catalog3 = this.article.catalogArticle.catalogPlannerArticle) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.topSvgsWithFormula) == undefined) {
|
|
@@ -24167,7 +24221,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24167
24221
|
var svgsWithFormula = plannerCatArt.topSvgsWithFormula;
|
|
24168
24222
|
for (var i = 0; i < svgsWithFormula.length; i++) {
|
|
24169
24223
|
var mySVG = svgsWithFormula[i],
|
|
24170
|
-
myRule = DivaUtils__default["default"].getRuleByFormula(mySVG.JsFormula);
|
|
24224
|
+
myRule = DivaUtils__default["default"].getRuleByFormula(mySVG.JsFormula, this.catalogCodex, this.CatalogData.multiselectOptions);
|
|
24171
24225
|
if (this.evalRule(myRule, '')) {
|
|
24172
24226
|
newSVGFile = mySVG.SVG;
|
|
24173
24227
|
svgChangedViaSvgTausch = true;
|
|
@@ -24179,7 +24233,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24179
24233
|
this.actPlannerData.countAVS = mySVG.AVS;
|
|
24180
24234
|
this.actPlannerData.hasAVL = mySVG.HasAVL;
|
|
24181
24235
|
this.actPlannerData.hasAVR = mySVG.HasAVR;
|
|
24182
|
-
LOG$
|
|
24236
|
+
LOG$d.debug('new SVG by SVG tausch', {
|
|
24183
24237
|
svg: mySVG.SVG,
|
|
24184
24238
|
rule: myRule,
|
|
24185
24239
|
layer: mySVG.Layer,
|
|
@@ -24204,11 +24258,11 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24204
24258
|
}
|
|
24205
24259
|
if (!newSVGFile) {
|
|
24206
24260
|
var _plannerCatArt$topSvg;
|
|
24207
|
-
LOG$
|
|
24261
|
+
LOG$d.error(new DivaUtils.DivaError('No SVG found for current configuration', {
|
|
24208
24262
|
code: 'WC_0011',
|
|
24209
24263
|
custom: {
|
|
24210
24264
|
formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
|
|
24211
|
-
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula);
|
|
24265
|
+
return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this4.catalogCodex, _this4.CatalogData.multiselectOptions);
|
|
24212
24266
|
}),
|
|
24213
24267
|
catalogName: this.CatalogData.catalogName,
|
|
24214
24268
|
catalogCodex: this.catalogCodex,
|
|
@@ -24364,8 +24418,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24364
24418
|
isActive: isActive,
|
|
24365
24419
|
basketId: this.article.basketId,
|
|
24366
24420
|
posNr: this.posNr,
|
|
24367
|
-
elementId: this.article.elementId
|
|
24368
|
-
product: this.curProduct
|
|
24421
|
+
elementId: this.article.elementId
|
|
24369
24422
|
};
|
|
24370
24423
|
return ret;
|
|
24371
24424
|
}
|
|
@@ -24385,15 +24438,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24385
24438
|
key: "getVariantBasketData",
|
|
24386
24439
|
value: function getVariantBasketData() {
|
|
24387
24440
|
var variantBasketData = [];
|
|
24388
|
-
var
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
|
|
24392
|
-
if (ops) opsObj[ops.optionCodex] = ops;
|
|
24393
|
-
}
|
|
24394
|
-
}
|
|
24395
|
-
for (var key in opsObj) {
|
|
24396
|
-
var myArtOption = opsObj[key];
|
|
24441
|
+
var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
|
|
24442
|
+
for (var key in articleOptions) {
|
|
24443
|
+
var myArtOption = articleOptions[key];
|
|
24397
24444
|
var OP = myArtOption.optionCodex;
|
|
24398
24445
|
if (myArtOption) {
|
|
24399
24446
|
var doHideSizeOption = myArtOption.idmVariantenArt == 95 || myArtOption.idmVariantenArt == 96 || myArtOption.idmVariantenArt == 97;
|
|
@@ -24571,9 +24618,9 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
24571
24618
|
}]);
|
|
24572
24619
|
}();
|
|
24573
24620
|
|
|
24574
|
-
function ownKeys$
|
|
24575
|
-
function _objectSpread$
|
|
24576
|
-
var LOG$
|
|
24621
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24622
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24623
|
+
var LOG$c = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
24577
24624
|
|
|
24578
24625
|
//Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
|
|
24579
24626
|
//Diese Klasse beinhaltet alle Artikel eines Sets
|
|
@@ -24604,7 +24651,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24604
24651
|
return _context.abrupt("return", new DivaArticle(set, newBasketId, initParams, catalogArticle, catalog));
|
|
24605
24652
|
case 10:
|
|
24606
24653
|
//articleCodex does not exist anymore in catalog
|
|
24607
|
-
LOG$
|
|
24654
|
+
LOG$c.error(new DivaUtils.DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
|
|
24608
24655
|
code: 'WC_0011',
|
|
24609
24656
|
custom: {
|
|
24610
24657
|
articleCodex: articleCodex
|
|
@@ -24715,7 +24762,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24715
24762
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 2);
|
|
24716
24763
|
jsonPrices = _yield$Promise$all2[0];
|
|
24717
24764
|
jsonOption = _yield$Promise$all2[1];
|
|
24718
|
-
catalogArticle.loadPrices(jsonPrices);
|
|
24765
|
+
catalogArticle.loadPrices(jsonPrices, set.CatalogData);
|
|
24719
24766
|
catalogArticle.loadArticleOptions(jsonOption, set, set.onlyRunLogic);
|
|
24720
24767
|
case 17:
|
|
24721
24768
|
catalogArticle.areOptionsLoaded = true;
|
|
@@ -24829,7 +24876,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24829
24876
|
return _context6.abrupt("continue", 37);
|
|
24830
24877
|
case 11:
|
|
24831
24878
|
if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
|
|
24832
|
-
valuesArray[i] = actArticle.getValidValues(_objectSpread$
|
|
24879
|
+
valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
|
|
24833
24880
|
}
|
|
24834
24881
|
if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
|
|
24835
24882
|
_context6.next = 32;
|
|
@@ -25468,7 +25515,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25468
25515
|
}
|
|
25469
25516
|
doLoadItem.BasketID = nArticle.basketId;
|
|
25470
25517
|
_context15.next = 7;
|
|
25471
|
-
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$
|
|
25518
|
+
return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
|
|
25472
25519
|
case 7:
|
|
25473
25520
|
article.addPartlistArticle(nArticle);
|
|
25474
25521
|
case 8:
|
|
@@ -25627,7 +25674,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25627
25674
|
if (ruleValid) break;
|
|
25628
25675
|
}
|
|
25629
25676
|
if (ruleValid) {
|
|
25630
|
-
returnValue.push(_objectSpread$
|
|
25677
|
+
returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
25631
25678
|
index: i
|
|
25632
25679
|
}));
|
|
25633
25680
|
break;
|
|
@@ -25642,7 +25689,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25642
25689
|
if ((_rule$articles = rule.articles) !== null && _rule$articles !== void 0 && _rule$articles.length && !rule.articles.includes(article.articleCodex)) return false;
|
|
25643
25690
|
if (rule.variantValues && !this.objectIncudesObject(rule.variantValues, article.VariantValuesWithoutOPTandOPV)) return false;
|
|
25644
25691
|
if (rule.visitedOptions && !this.arrayIncludesArray(rule.visitedOptions, visitedOptions[article.basketId])) return false;
|
|
25645
|
-
if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula))) return false;
|
|
25692
|
+
if (rule.jsFormula && !article.evalRule(DivaUtils__default["default"].getRuleByFormula(rule.jsFormula, article.catalogCodex, article.CatalogData.multiselectOptions))) return false;
|
|
25646
25693
|
if (rule.sizes) {
|
|
25647
25694
|
console.error('size logic not jet implemented');
|
|
25648
25695
|
return false;
|
|
@@ -25809,7 +25856,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25809
25856
|
/***************************************Abspeichern orderLines******************************************************/
|
|
25810
25857
|
}, {
|
|
25811
25858
|
key: "getOrderLinesOfArticles",
|
|
25812
|
-
value: function getOrderLinesOfArticles(articles,
|
|
25859
|
+
value: function getOrderLinesOfArticles(articles, repairOnly, hasFavorites) {
|
|
25813
25860
|
var ret = [];
|
|
25814
25861
|
if (Object.values(articles).length == 0) return ret;
|
|
25815
25862
|
for (var key in articles) {
|
|
@@ -25818,7 +25865,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25818
25865
|
var catalogData = article.CatalogData;
|
|
25819
25866
|
var variantBasketDatas = article.getVariantBasketData();
|
|
25820
25867
|
var orderline = new basketModel.OrderLineData({
|
|
25821
|
-
SetID:
|
|
25868
|
+
SetID: article.set.getSetId(),
|
|
25822
25869
|
BasketID: article.basketId,
|
|
25823
25870
|
RelatedToBasketID: article.relatedToBasketId,
|
|
25824
25871
|
RelatedToSubItem: article.relatedToSubItem,
|
|
@@ -25844,7 +25891,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25844
25891
|
Quantity: article.quantity,
|
|
25845
25892
|
TabGroups: article.getTabgroupsAsString,
|
|
25846
25893
|
DockingPointInfos: setHandlerInstance.getFreeDockingPointsOfArticle(article),
|
|
25847
|
-
ArticleVariantID: DivaUtils.md5("_".concat(article.catalogCodex, "_").concat(
|
|
25894
|
+
ArticleVariantID: DivaUtils.md5("_".concat(article.catalogCodex, "_").concat(article.set.modelCodex, "_").concat(article.articleCodex, "_").concat(article.articleVariantValues.replace(/'/g, '@'))),
|
|
25848
25895
|
VariantDesc: article.articleVariantDesc(),
|
|
25849
25896
|
VariantDesc_locales: article.articleVariantDesc_locales(),
|
|
25850
25897
|
Image: article.image ? catalogData.getCatImageURL(article.image, '') : undefined,
|
|
@@ -25879,9 +25926,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25879
25926
|
|
|
25880
25927
|
//die Partlistarticle eines Articles auch in die Orderline pushen
|
|
25881
25928
|
if (article.hasPartlistArticle) {
|
|
25882
|
-
ret = ret.concat(this.getOrderLinesOfArticles(article.partlistArticles,
|
|
25929
|
+
ret = ret.concat(this.getOrderLinesOfArticles(article.partlistArticles, repairOnly, hasFavorites));
|
|
25883
25930
|
}
|
|
25884
|
-
ret = ret.concat(this.getOptiontreeAccessoiresArr(
|
|
25931
|
+
ret = ret.concat(this.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
|
|
25885
25932
|
}
|
|
25886
25933
|
return ret;
|
|
25887
25934
|
}
|
|
@@ -25894,7 +25941,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
25894
25941
|
key: "checkForRoundingError",
|
|
25895
25942
|
value: function checkForRoundingError(orderlines, set) {
|
|
25896
25943
|
var _set$CatalogData$disc;
|
|
25897
|
-
var product = set === null || set === void 0 ? void 0 : set.
|
|
25944
|
+
var product = set === null || set === void 0 ? void 0 : set.getMatchingProduct();
|
|
25898
25945
|
if (product !== null && product !== void 0 && product.percentage && product.percentage > ((_set$CatalogData$disc = set.CatalogData.discountPercentage) !== null && _set$CatalogData$disc !== void 0 ? _set$CatalogData$disc : 0)) {
|
|
25899
25946
|
var setPrice = set.getSetPrice();
|
|
25900
25947
|
var olPrice = orderlines.reduce(function (sum, ol) {
|
|
@@ -26209,7 +26256,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
26209
26256
|
}();
|
|
26210
26257
|
var articleHandlerInstance = new DivaArticleHandler();
|
|
26211
26258
|
|
|
26212
|
-
var LOG$
|
|
26259
|
+
var LOG$b = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26213
26260
|
//Der in einem Set gemergte Optionsbaum
|
|
26214
26261
|
var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
26215
26262
|
function DivaConfigTreeData() {
|
|
@@ -26898,7 +26945,7 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26898
26945
|
}
|
|
26899
26946
|
}
|
|
26900
26947
|
if (basketIds.length !== basketIdsSorted.length) {
|
|
26901
|
-
LOG$
|
|
26948
|
+
LOG$b.error(new DivaUtils.DivaError('something went wrong on build configtree'));
|
|
26902
26949
|
}
|
|
26903
26950
|
return basketIdsSorted;
|
|
26904
26951
|
}
|
|
@@ -26978,9 +27025,9 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
|
|
|
26978
27025
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26979
27026
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
26980
27027
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26981
|
-
function ownKeys$
|
|
26982
|
-
function _objectSpread$
|
|
26983
|
-
var LOG$
|
|
27028
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27029
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27030
|
+
var LOG$a = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
26984
27031
|
//plz delete me
|
|
26985
27032
|
var DivaSet = /*#__PURE__*/function () {
|
|
26986
27033
|
function DivaSet(catalog, _setId, orderSet, initSetState) {
|
|
@@ -27004,7 +27051,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27004
27051
|
_defineProperty__default["default"](this, "setType", 'PLANNING');
|
|
27005
27052
|
_defineProperty__default["default"](this, "configTreeData", void 0);
|
|
27006
27053
|
_defineProperty__default["default"](this, "doorPlannerHandler", void 0);
|
|
27007
|
-
_defineProperty__default["default"](this, "
|
|
27054
|
+
_defineProperty__default["default"](this, "matchingProduct", void 0);
|
|
27055
|
+
_defineProperty__default["default"](this, "matchingOrigProduct", void 0);
|
|
27008
27056
|
_defineProperty__default["default"](this, "_dontCalcPricePreviewDueToPerformanceIssues", false);
|
|
27009
27057
|
_defineProperty__default["default"](this, "_supplierColors", void 0);
|
|
27010
27058
|
/**Favorits state */
|
|
@@ -27078,7 +27126,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27078
27126
|
_context.next = 10;
|
|
27079
27127
|
break;
|
|
27080
27128
|
}
|
|
27081
|
-
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$
|
|
27129
|
+
validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
|
|
27082
27130
|
_context.t0 = partlistArticlesToLoad;
|
|
27083
27131
|
_context.next = 8;
|
|
27084
27132
|
return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
|
|
@@ -27460,32 +27508,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27460
27508
|
notPlannedAcc: notPlannedAcc
|
|
27461
27509
|
};
|
|
27462
27510
|
}
|
|
27463
|
-
}, {
|
|
27464
|
-
key: "getAccessoiresOfBasketIdAsArray",
|
|
27465
|
-
value: function getAccessoiresOfBasketIdAsArray(basketId, filter) {
|
|
27466
|
-
if (filter) {
|
|
27467
|
-
var acc = this.getSplitPlannedAccessoiresOfBasketId(basketId);
|
|
27468
|
-
if (filter === 'onlyNonPlanner') return Object.values(acc.notPlannedAcc);
|
|
27469
|
-
if (filter === 'onlyPlanner') return Object.values(acc.plannedAcc);
|
|
27470
|
-
}
|
|
27471
|
-
return Object.values(this.getAccessoiresOfBasketId(basketId));
|
|
27472
|
-
}
|
|
27473
|
-
}, {
|
|
27474
|
-
key: "getAccessoiresOfArticleRecursive",
|
|
27475
|
-
value: function getAccessoiresOfArticleRecursive(basketId, filter) {
|
|
27476
|
-
var accArticles = [];
|
|
27477
|
-
var nextAcc = [];
|
|
27478
|
-
nextAcc = this.getAccessoiresOfBasketIdAsArray(basketId, filter);
|
|
27479
|
-
while (nextAcc.length > 0) {
|
|
27480
|
-
accArticles = accArticles.concat(nextAcc);
|
|
27481
|
-
var tmpNextAcc = nextAcc;
|
|
27482
|
-
nextAcc = [];
|
|
27483
|
-
for (var i = 0; i < tmpNextAcc.length; i++) {
|
|
27484
|
-
nextAcc = nextAcc.concat(this.getAccessoiresOfBasketIdAsArray(tmpNextAcc[i].basketId, filter));
|
|
27485
|
-
}
|
|
27486
|
-
}
|
|
27487
|
-
return accArticles;
|
|
27488
|
-
}
|
|
27489
27511
|
}, {
|
|
27490
27512
|
key: "getImageOfOnlyElement",
|
|
27491
27513
|
value: function getImageOfOnlyElement() {
|
|
@@ -27498,6 +27520,13 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27498
27520
|
}
|
|
27499
27521
|
return null;
|
|
27500
27522
|
}
|
|
27523
|
+
//this getter includes pricelogics that are specificly only for the view of the configurator
|
|
27524
|
+
}, {
|
|
27525
|
+
key: "getViewSetPrice",
|
|
27526
|
+
value: function getViewSetPrice(dontTakeOverwrittePrice) {
|
|
27527
|
+
if (this.ViewOverwrittenPrice) return this.ViewOverwrittenPrice;
|
|
27528
|
+
return this.getSetPrice(dontTakeOverwrittePrice);
|
|
27529
|
+
}
|
|
27501
27530
|
}, {
|
|
27502
27531
|
key: "getSetPrice",
|
|
27503
27532
|
value: function getSetPrice(dontTakeOverwrittePrice) {
|
|
@@ -27508,18 +27537,29 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27508
27537
|
}
|
|
27509
27538
|
return setPrice;
|
|
27510
27539
|
}
|
|
27540
|
+
//this getter includes pricelogics that are specificly only for the view of the configurator
|
|
27541
|
+
}, {
|
|
27542
|
+
key: "getViewBruttoSetPrice",
|
|
27543
|
+
value: function getViewBruttoSetPrice(discountOnly) {
|
|
27544
|
+
var curProduct = this.getMatchingProduct();
|
|
27545
|
+
//1. if curproduct has a discount or if curproduct has no discount but added Price
|
|
27546
|
+
if (curProduct !== null && curProduct !== void 0 && curProduct.origPrice && curProduct !== null && curProduct !== void 0 && curProduct.onlyViewDiscountedPrice && (!discountOnly || (curProduct === null || curProduct === void 0 ? void 0 : curProduct.origPrice) !== (curProduct === null || curProduct === void 0 ? void 0 : curProduct.onlyViewDiscountedPrice))) {
|
|
27547
|
+
return curProduct.origPrice;
|
|
27548
|
+
}
|
|
27549
|
+
return this.getBruttoSetPrice(discountOnly);
|
|
27550
|
+
}
|
|
27511
27551
|
/**
|
|
27512
27552
|
*
|
|
27513
|
-
* @param
|
|
27553
|
+
* @param discountOnly ignore usecase for "verschönerter" price
|
|
27514
27554
|
* @returns
|
|
27515
27555
|
*/
|
|
27516
27556
|
}, {
|
|
27517
27557
|
key: "getBruttoSetPrice",
|
|
27518
|
-
value: function getBruttoSetPrice(
|
|
27519
|
-
var curProduct = this.
|
|
27558
|
+
value: function getBruttoSetPrice(discountOnly) {
|
|
27559
|
+
var curProduct = this.getMatchingProduct();
|
|
27520
27560
|
|
|
27521
27561
|
//1. if curproduct has a discount or if curproduct has no discount but added Price
|
|
27522
|
-
if (curProduct !== null && curProduct !== void 0 && curProduct.origPrice && curProduct !== null && curProduct !== void 0 && curProduct.discountPrice && (!
|
|
27562
|
+
if (curProduct !== null && curProduct !== void 0 && curProduct.origPrice && curProduct !== null && curProduct !== void 0 && curProduct.discountPrice && (!discountOnly || (curProduct === null || curProduct === void 0 ? void 0 : curProduct.origPrice) !== (curProduct === null || curProduct === void 0 ? void 0 : curProduct.discountPrice))) return curProduct.origPrice;
|
|
27523
27563
|
|
|
27524
27564
|
//2. if discount exists in catalog
|
|
27525
27565
|
if (this.catalogData.discountPercentage) {
|
|
@@ -27529,6 +27569,16 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27529
27569
|
}
|
|
27530
27570
|
return setPrice;
|
|
27531
27571
|
}
|
|
27572
|
+
//3. if any article has a discount
|
|
27573
|
+
if (Object.values(this.divaArticles).find(function (a) {
|
|
27574
|
+
return a.discountPercentage;
|
|
27575
|
+
})) {
|
|
27576
|
+
var _setPrice = 0;
|
|
27577
|
+
for (var _key4 in this.divaArticles) {
|
|
27578
|
+
_setPrice += this.divaArticles[_key4].bruttoCalcPrice;
|
|
27579
|
+
}
|
|
27580
|
+
return _setPrice;
|
|
27581
|
+
}
|
|
27532
27582
|
return undefined;
|
|
27533
27583
|
}
|
|
27534
27584
|
|
|
@@ -27645,8 +27695,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27645
27695
|
var articles = {};
|
|
27646
27696
|
for (var basketId in this.divaArticles) {
|
|
27647
27697
|
articles[basketId] = this.divaArticles[basketId];
|
|
27648
|
-
if (allPartlistArticlesAlso) articles = _objectSpread$
|
|
27649
|
-
if (visiblePartlistArticlesAlso) articles = _objectSpread$
|
|
27698
|
+
if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
|
|
27699
|
+
if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
|
|
27650
27700
|
}
|
|
27651
27701
|
return articles;
|
|
27652
27702
|
}
|
|
@@ -27752,19 +27802,6 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27752
27802
|
}
|
|
27753
27803
|
return articleVariantValues;
|
|
27754
27804
|
}
|
|
27755
|
-
}, {
|
|
27756
|
-
key: "getAllProducts",
|
|
27757
|
-
value: function getAllProducts() {
|
|
27758
|
-
var ret = {};
|
|
27759
|
-
for (var key in this.divaArticles) {
|
|
27760
|
-
var article = this.divaArticles[key];
|
|
27761
|
-
if (article.curProduct) {
|
|
27762
|
-
if (!ret[article.curProduct.productId]) ret[article.curProduct.productId] = 0;
|
|
27763
|
-
ret[article.curProduct.productId] += article.quantity;
|
|
27764
|
-
}
|
|
27765
|
-
}
|
|
27766
|
-
return ret;
|
|
27767
|
-
}
|
|
27768
27805
|
}, {
|
|
27769
27806
|
key: "deleteArticle",
|
|
27770
27807
|
value: function deleteArticle(basketId) {
|
|
@@ -27821,7 +27858,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27821
27858
|
for (var _i = 0; _i < sortable.length; _i++) {
|
|
27822
27859
|
this.divaArticles[sortable[_i][0]] = articles[sortable[_i][0]];
|
|
27823
27860
|
}
|
|
27824
|
-
LOG$
|
|
27861
|
+
LOG$a.debug('articles sorted');
|
|
27825
27862
|
}
|
|
27826
27863
|
}, {
|
|
27827
27864
|
key: "getArticlesWithAccessoires",
|
|
@@ -27957,6 +27994,8 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27957
27994
|
set: function set(val) {
|
|
27958
27995
|
this.setArticleNrPrefix = val;
|
|
27959
27996
|
}
|
|
27997
|
+
|
|
27998
|
+
//this getter includes pricelogics that are specificly only for the view of the configurator
|
|
27960
27999
|
}, {
|
|
27961
28000
|
key: "doAllowSetPlanner",
|
|
27962
28001
|
get: function get() {
|
|
@@ -27967,16 +28006,21 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
27967
28006
|
get: function get() {
|
|
27968
28007
|
return this.setState.onlyRunLogic;
|
|
27969
28008
|
}
|
|
28009
|
+
}, {
|
|
28010
|
+
key: "ViewOverwrittenPrice",
|
|
28011
|
+
get: function get() {
|
|
28012
|
+
var _this$getMatchingProd;
|
|
28013
|
+
var priceFromHash = (_this$getMatchingProd = this.getMatchingProduct()) === null || _this$getMatchingProd === void 0 ? void 0 : _this$getMatchingProd.onlyViewDiscountedPrice;
|
|
28014
|
+
if (priceFromHash) return priceFromHash;
|
|
28015
|
+
return undefined;
|
|
28016
|
+
}
|
|
27970
28017
|
}, {
|
|
27971
28018
|
key: "OverwrittenPrice",
|
|
27972
28019
|
get: function get() {
|
|
27973
|
-
var _this$
|
|
27974
|
-
var priceFromHash = (_this$
|
|
28020
|
+
var _this$getMatchingProd2;
|
|
28021
|
+
var priceFromHash = (_this$getMatchingProd2 = this.getMatchingProduct()) === null || _this$getMatchingProd2 === void 0 ? void 0 : _this$getMatchingProd2.discountPrice;
|
|
27975
28022
|
if (priceFromHash) return priceFromHash;
|
|
27976
28023
|
return this.overwrittenPrice;
|
|
27977
|
-
},
|
|
27978
|
-
set: function set(val) {
|
|
27979
|
-
this.overwrittenPrice = val;
|
|
27980
28024
|
}
|
|
27981
28025
|
}, {
|
|
27982
28026
|
key: "ActConfigStepKey",
|
|
@@ -28145,27 +28189,24 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28145
28189
|
return metaDatas;
|
|
28146
28190
|
}
|
|
28147
28191
|
}, {
|
|
28148
|
-
key: "
|
|
28149
|
-
value: function
|
|
28150
|
-
|
|
28151
|
-
return this.priceForHash[this.setHash];
|
|
28192
|
+
key: "getMatchingProduct",
|
|
28193
|
+
value: function getMatchingProduct() {
|
|
28194
|
+
return this.matchingProduct;
|
|
28152
28195
|
}
|
|
28153
28196
|
}, {
|
|
28154
|
-
key: "
|
|
28155
|
-
value: function
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
bruttoPercentage: !!product.addedPrice && discountExists && product.discountedPrice !== product.addedPrice ? (claculatedPrice - product.addedPrice) / (claculatedPrice / 100) : undefined
|
|
28168
|
-
};
|
|
28197
|
+
key: "setMatchingProduct",
|
|
28198
|
+
value: function setMatchingProduct(product) {
|
|
28199
|
+
this.matchingProduct = product;
|
|
28200
|
+
}
|
|
28201
|
+
}, {
|
|
28202
|
+
key: "getMatchingOrigProduct",
|
|
28203
|
+
value: function getMatchingOrigProduct() {
|
|
28204
|
+
return this.matchingOrigProduct;
|
|
28205
|
+
}
|
|
28206
|
+
}, {
|
|
28207
|
+
key: "setMatchingOrigProduct",
|
|
28208
|
+
value: function setMatchingOrigProduct(product) {
|
|
28209
|
+
this.matchingOrigProduct = product;
|
|
28169
28210
|
}
|
|
28170
28211
|
}, {
|
|
28171
28212
|
key: "initializeDoorPlanner",
|
|
@@ -28180,7 +28221,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28180
28221
|
break;
|
|
28181
28222
|
}
|
|
28182
28223
|
_context4.next = 3;
|
|
28183
|
-
return Promise.resolve().then(function () { return require('./DoorPlanner-
|
|
28224
|
+
return Promise.resolve().then(function () { return require('./DoorPlanner-e05bdec4.js'); });
|
|
28184
28225
|
case 3:
|
|
28185
28226
|
_yield$import = _context4.sent;
|
|
28186
28227
|
DoorPlanner = _yield$import["default"];
|
|
@@ -28262,16 +28303,23 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28262
28303
|
key: "getCurrentDisountPercentage",
|
|
28263
28304
|
value: function getCurrentDisountPercentage() {
|
|
28264
28305
|
var _this$catalogData$dis;
|
|
28265
|
-
var product = this.
|
|
28306
|
+
var product = this.getMatchingProduct();
|
|
28266
28307
|
if (product !== null && product !== void 0 && product.percentage && product.percentage > ((_this$catalogData$dis = this.catalogData.discountPercentage) !== null && _this$catalogData$dis !== void 0 ? _this$catalogData$dis : 0)) return product.percentage;
|
|
28267
28308
|
return this.catalogData.discountPercentage;
|
|
28268
28309
|
}
|
|
28269
28310
|
}, {
|
|
28270
28311
|
key: "getBruttoPercentage",
|
|
28271
28312
|
value: function getBruttoPercentage(ignoreMainPriceUsecase) {
|
|
28272
|
-
var product = this.
|
|
28313
|
+
var product = this.getMatchingProduct();
|
|
28273
28314
|
if ((product === null || product === void 0 ? void 0 : product.bruttoPercentage) !== undefined && (!ignoreMainPriceUsecase || !product.percentage)) return product === null || product === void 0 ? void 0 : product.bruttoPercentage;
|
|
28274
28315
|
if (this.catalogData.discountPercentage) return 0;
|
|
28316
|
+
|
|
28317
|
+
//3. if any article has a discount
|
|
28318
|
+
if (Object.values(this.divaArticles).find(function (a) {
|
|
28319
|
+
return a.discountPercentage;
|
|
28320
|
+
})) {
|
|
28321
|
+
return 0;
|
|
28322
|
+
}
|
|
28275
28323
|
return undefined;
|
|
28276
28324
|
}
|
|
28277
28325
|
}, {
|
|
@@ -29204,8 +29252,8 @@ var SummaryHandler = /*#__PURE__*/function () {
|
|
|
29204
29252
|
}();
|
|
29205
29253
|
var summaryHandlerInstance = new SummaryHandler();
|
|
29206
29254
|
|
|
29207
|
-
function ownKeys$
|
|
29208
|
-
function _objectSpread$
|
|
29255
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29256
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29209
29257
|
DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
29210
29258
|
var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
29211
29259
|
function DivaFavoritesHandler() {
|
|
@@ -29897,7 +29945,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29897
29945
|
if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
|
|
29898
29946
|
}
|
|
29899
29947
|
}
|
|
29900
|
-
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$
|
|
29948
|
+
configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$b(_objectSpread$b({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
|
|
29901
29949
|
set.basketConfigVariants.push(configVariant);
|
|
29902
29950
|
case 31:
|
|
29903
29951
|
case "end":
|
|
@@ -29991,8 +30039,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
|
|
|
29991
30039
|
}();
|
|
29992
30040
|
var favoritesHandlerInstance = new DivaFavoritesHandler();
|
|
29993
30041
|
|
|
29994
|
-
function ownKeys$
|
|
29995
|
-
function _objectSpread$
|
|
30042
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30043
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29996
30044
|
|
|
29997
30045
|
//Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
|
|
29998
30046
|
//Der in einem Set gemergte Optionsbaum
|
|
@@ -30553,7 +30601,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30553
30601
|
//get schnittmenge of all the articles
|
|
30554
30602
|
if (i === 0) {
|
|
30555
30603
|
constructionRules = myOptionState.constructionRules;
|
|
30556
|
-
configItems = _objectSpread$
|
|
30604
|
+
configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
|
|
30557
30605
|
} else {
|
|
30558
30606
|
for (var _key2 in configItems) {
|
|
30559
30607
|
if (!myOptionState.visibleOptionValues[_key2]) {
|
|
@@ -30786,84 +30834,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
|
|
|
30786
30834
|
}();
|
|
30787
30835
|
var configTreeHandler = new DivaConfigTreeHandler();
|
|
30788
30836
|
|
|
30789
|
-
|
|
30790
|
-
var
|
|
30791
|
-
|
|
30792
|
-
_classCallCheck__default["default"](this, DivaProductHandler);
|
|
30793
|
-
}
|
|
30794
|
-
return _createClass__default["default"](DivaProductHandler, [{
|
|
30795
|
-
key: "getPrice",
|
|
30796
|
-
value: function getPrice() {
|
|
30797
|
-
var price = 0;
|
|
30798
|
-
return price;
|
|
30799
|
-
}
|
|
30800
|
-
}, {
|
|
30801
|
-
key: "updateProducts",
|
|
30802
|
-
value: function () {
|
|
30803
|
-
var _updateProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(sets, api, from) {
|
|
30804
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
30805
|
-
while (1) switch (_context.prev = _context.next) {
|
|
30806
|
-
case 0:
|
|
30807
|
-
({
|
|
30808
|
-
catalogs: sets.map(function (set) {
|
|
30809
|
-
return {
|
|
30810
|
-
articles: Object.values(set.getDivaArticles()).map(function (article) {
|
|
30811
|
-
return {
|
|
30812
|
-
codex: article.articleCodex,
|
|
30813
|
-
hash: article.articleProductHash
|
|
30814
|
-
};
|
|
30815
|
-
}),
|
|
30816
|
-
catalogGuid: set.CatalogData.catalogGuid
|
|
30817
|
-
};
|
|
30818
|
-
})
|
|
30819
|
-
});
|
|
30820
|
-
return _context.abrupt("return");
|
|
30821
|
-
case 2:
|
|
30822
|
-
case "end":
|
|
30823
|
-
return _context.stop();
|
|
30824
|
-
}
|
|
30825
|
-
}, _callee);
|
|
30826
|
-
}));
|
|
30827
|
-
function updateProducts(_x, _x2, _x3) {
|
|
30828
|
-
return _updateProducts.apply(this, arguments);
|
|
30829
|
-
}
|
|
30830
|
-
return updateProducts;
|
|
30831
|
-
}()
|
|
30832
|
-
}, {
|
|
30833
|
-
key: "getBestMatch",
|
|
30834
|
-
value: function getBestMatch(articles, products) {
|
|
30835
|
-
var OPTION_CODEX = 'KOPFTEIL';
|
|
30836
|
-
if (!articles) return;
|
|
30837
|
-
for (var key in articles) {
|
|
30838
|
-
var _article$VariantValue;
|
|
30839
|
-
var article = articles[key];
|
|
30840
|
-
var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
|
|
30841
|
-
if (!products || !opv) continue;
|
|
30842
|
-
for (var i = 0; i < products.length; i++) {
|
|
30843
|
-
var _products$i$affiliate;
|
|
30844
|
-
if ((_products$i$affiliate = products[i].affiliate) !== null && _products$i$affiliate !== void 0 && _products$i$affiliate.length) if (this.findOPVCodexInVariantValues(products[i], OPTION_CODEX, opv)) {
|
|
30845
|
-
return products[i];
|
|
30846
|
-
}
|
|
30847
|
-
}
|
|
30848
|
-
}
|
|
30849
|
-
return undefined;
|
|
30850
|
-
}
|
|
30851
|
-
}, {
|
|
30852
|
-
key: "findOPVCodexInVariantValues",
|
|
30853
|
-
value: function findOPVCodexInVariantValues(product, opt, opv) {
|
|
30854
|
-
return product.articles.find(function (article) {
|
|
30855
|
-
return article.variantValues.find(function (variant) {
|
|
30856
|
-
return variant.OPT === opt && variant.OPV === opv;
|
|
30857
|
-
});
|
|
30858
|
-
});
|
|
30859
|
-
}
|
|
30860
|
-
}]);
|
|
30861
|
-
}();
|
|
30862
|
-
var productHandlerInstance = new DivaProductHandler();
|
|
30863
|
-
|
|
30864
|
-
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30865
|
-
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30866
|
-
var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
|
|
30837
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30838
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30839
|
+
var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
|
|
30867
30840
|
|
|
30868
30841
|
/*
|
|
30869
30842
|
Diese Klasse speichert alle Sets, die in einer Planung sind
|
|
@@ -31061,7 +31034,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31061
31034
|
_context4.next = 38;
|
|
31062
31035
|
break;
|
|
31063
31036
|
case 37:
|
|
31064
|
-
LOG$
|
|
31037
|
+
LOG$9.error(new DivaUtils.DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
|
|
31065
31038
|
code: 'WC_0011',
|
|
31066
31039
|
custom: {
|
|
31067
31040
|
articleCodex: toloadArtilce.articleCodex
|
|
@@ -31310,7 +31283,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31310
31283
|
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
|
|
31311
31284
|
while (1) switch (_context6.prev = _context6.next) {
|
|
31312
31285
|
case 0:
|
|
31313
|
-
LOG$
|
|
31286
|
+
LOG$9.debug('DivaSetHandler.initSetsByBasketData: ' + orderSet.SetID);
|
|
31314
31287
|
_context6.next = 3;
|
|
31315
31288
|
return catalogHandlerInstance.getCatalogData(initSetState, orderSet.ModelCatalogCodex ? orderSet.ModelCatalogCodex : orderSet.CatalogCodex, orderSet);
|
|
31316
31289
|
case 3:
|
|
@@ -31326,7 +31299,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31326
31299
|
params = {};
|
|
31327
31300
|
if ((initSetState.initEmptyPlanner || !orderSet.SetPlanData || orderSet.SetPlanData == '') && catalogData.useBoxPlanner) {
|
|
31328
31301
|
if (!catalogData.startPlannerArticle) {
|
|
31329
|
-
LOG$
|
|
31302
|
+
LOG$9.error(new DivaUtils.DivaError('No start Article defined for box planner catalog'));
|
|
31330
31303
|
} else {
|
|
31331
31304
|
params = {
|
|
31332
31305
|
boxElementID: 1,
|
|
@@ -31349,7 +31322,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31349
31322
|
}
|
|
31350
31323
|
variantValues = (_initSetState$initVar = initSetState.initVariantValues) !== null && _initSetState$initVar !== void 0 ? _initSetState$initVar : catalogData === null || catalogData === void 0 || (_catalogData$promoted = catalogData.promotedOpvs) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted.articles) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[articlesToInitialize[j]]) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[0]) === null || _catalogData$promoted === void 0 ? void 0 : _catalogData$promoted.variantValues;
|
|
31351
31324
|
_context6.next = 18;
|
|
31352
|
-
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$
|
|
31325
|
+
return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$9(_objectSpread$9({}, params), variantValues ? {
|
|
31353
31326
|
variantValues: variantValues
|
|
31354
31327
|
} : {}));
|
|
31355
31328
|
case 18:
|
|
@@ -31393,9 +31366,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31393
31366
|
if (doDestroy3DHostConnection) {
|
|
31394
31367
|
set.plannerHandler.clearHandler3D();
|
|
31395
31368
|
}
|
|
31396
|
-
LOG$
|
|
31369
|
+
LOG$9.debug('PlannerHandler of set ' + set.getSetId() + ' was destroyed successfully');
|
|
31397
31370
|
} else {
|
|
31398
|
-
LOG$
|
|
31371
|
+
LOG$9.debug('Unable to destroy PlannerHandler of set ' + set.getSetId());
|
|
31399
31372
|
}
|
|
31400
31373
|
case 2:
|
|
31401
31374
|
case "end":
|
|
@@ -31649,6 +31622,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31649
31622
|
newArticle,
|
|
31650
31623
|
_set$getArticleByBask2,
|
|
31651
31624
|
defaultHeaderValues,
|
|
31625
|
+
partlistRule,
|
|
31626
|
+
decisionNr,
|
|
31627
|
+
_newArticle$catalogAr,
|
|
31628
|
+
rule,
|
|
31629
|
+
value,
|
|
31652
31630
|
_args13 = arguments;
|
|
31653
31631
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context13) {
|
|
31654
31632
|
while (1) switch (_context13.prev = _context13.next) {
|
|
@@ -31677,16 +31655,42 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31677
31655
|
if (initParams.variantValues) {
|
|
31678
31656
|
defaultHeaderValues = Object.assign(defaultHeaderValues, initParams.variantValues);
|
|
31679
31657
|
}
|
|
31658
|
+
if (initParams.partlistCodexToInit) {
|
|
31659
|
+
partlistRule = newArticle.catalogArticle.getPartlistRuleOfArticleCodes(initParams.partlistCodexToInit);
|
|
31660
|
+
decisionNr = partlistRule === null || partlistRule === void 0 ? void 0 : partlistRule.PartListPosDecisionsAndPosCounts[0].DecisionNumber;
|
|
31661
|
+
if (decisionNr) {
|
|
31662
|
+
rule = (_newArticle$catalogAr = newArticle.catalogArticle.partlistDecisions) === null || _newArticle$catalogAr === void 0 || (_newArticle$catalogAr = _newArticle$catalogAr['D' + decisionNr]) === null || _newArticle$catalogAr === void 0 || (_newArticle$catalogAr = _newArticle$catalogAr.DOC) === null || _newArticle$catalogAr === void 0 ? void 0 : _newArticle$catalogAr[0].JsFormula;
|
|
31663
|
+
if (rule) {
|
|
31664
|
+
value = DivaUtils__default["default"].getVariantValuesFromRule(rule, {});
|
|
31665
|
+
if (value) defaultHeaderValues = Object.assign(defaultHeaderValues, value);
|
|
31666
|
+
}
|
|
31667
|
+
}
|
|
31668
|
+
}
|
|
31680
31669
|
if (!(from !== 'toDeleteShelf')) {
|
|
31681
|
-
_context13.next =
|
|
31670
|
+
_context13.next = 15;
|
|
31682
31671
|
break;
|
|
31683
31672
|
}
|
|
31684
31673
|
set.addArticle(newArticle);
|
|
31685
|
-
_context13.next =
|
|
31674
|
+
_context13.next = 15;
|
|
31686
31675
|
return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
|
|
31687
|
-
case 14:
|
|
31688
|
-
return _context13.abrupt("return", newArticle);
|
|
31689
31676
|
case 15:
|
|
31677
|
+
if (newArticle.relatedToBasketId) {
|
|
31678
|
+
LOG$9.businessEvent('onClickAccesorie', 'Planner', 'Accesorie wurde geplant', {
|
|
31679
|
+
article: {
|
|
31680
|
+
articleCodex: articleCodex,
|
|
31681
|
+
articleName: newArticle.name
|
|
31682
|
+
}
|
|
31683
|
+
});
|
|
31684
|
+
} else {
|
|
31685
|
+
LOG$9.businessEvent('onClickArticle', 'Planner', 'Accesorie wurde geplant', {
|
|
31686
|
+
article: {
|
|
31687
|
+
articleCodex: articleCodex,
|
|
31688
|
+
articleName: newArticle.name
|
|
31689
|
+
}
|
|
31690
|
+
});
|
|
31691
|
+
}
|
|
31692
|
+
return _context13.abrupt("return", newArticle);
|
|
31693
|
+
case 17:
|
|
31690
31694
|
case "end":
|
|
31691
31695
|
return _context13.stop();
|
|
31692
31696
|
}
|
|
@@ -31818,8 +31822,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31818
31822
|
}, {
|
|
31819
31823
|
key: "deleteElementFromSet",
|
|
31820
31824
|
value: function () {
|
|
31821
|
-
var _deleteElementFromSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload) {
|
|
31822
|
-
var
|
|
31825
|
+
var _deleteElementFromSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
|
|
31826
|
+
var _deletedArticle$doorP, _set$CatalogData;
|
|
31827
|
+
var setId, success, newSelectedElement, allElementsToDelete, i, art, deletedArticle, articles, key, oldTransform, result, _set$getArticleByBask3;
|
|
31823
31828
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
31824
31829
|
while (1) switch (_context16.prev = _context16.next) {
|
|
31825
31830
|
case 0:
|
|
@@ -31834,44 +31839,55 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31834
31839
|
setId: setId
|
|
31835
31840
|
});
|
|
31836
31841
|
case 3:
|
|
31837
|
-
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId);
|
|
31838
31842
|
success = false;
|
|
31839
31843
|
newSelectedElement = undefined;
|
|
31844
|
+
if (dontCheckInfluencedPlannerElements) {
|
|
31845
|
+
_context16.next = 15;
|
|
31846
|
+
break;
|
|
31847
|
+
}
|
|
31848
|
+
allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId);
|
|
31840
31849
|
i = 0;
|
|
31841
|
-
case
|
|
31850
|
+
case 8:
|
|
31842
31851
|
if (!(i < allElementsToDelete.length)) {
|
|
31843
|
-
_context16.next =
|
|
31852
|
+
_context16.next = 15;
|
|
31844
31853
|
break;
|
|
31845
31854
|
}
|
|
31846
|
-
|
|
31855
|
+
art = set.getArticleByElementId(allElementsToDelete[i]);
|
|
31856
|
+
_context16.next = 12;
|
|
31857
|
+
return this.deleteElementFromSet(set, art, undefined, undefined, true, true);
|
|
31858
|
+
case 12:
|
|
31859
|
+
i++;
|
|
31860
|
+
_context16.next = 8;
|
|
31861
|
+
break;
|
|
31862
|
+
case 15:
|
|
31847
31863
|
deletedArticle = article; //accessoires löschen
|
|
31848
31864
|
articles = set.getAccessoiresOfBasketId(article.basketId);
|
|
31849
31865
|
_context16.t0 = _regeneratorRuntime__default["default"].keys(articles);
|
|
31850
|
-
case
|
|
31866
|
+
case 18:
|
|
31851
31867
|
if ((_context16.t1 = _context16.t0()).done) {
|
|
31852
|
-
_context16.next =
|
|
31868
|
+
_context16.next = 24;
|
|
31853
31869
|
break;
|
|
31854
31870
|
}
|
|
31855
31871
|
key = _context16.t1.value;
|
|
31856
|
-
_context16.next =
|
|
31857
|
-
return this.deleteElementFromSet(set, articles[key]);
|
|
31858
|
-
case
|
|
31859
|
-
_context16.next =
|
|
31872
|
+
_context16.next = 22;
|
|
31873
|
+
return this.deleteElementFromSet(set, articles[key], undefined, undefined, true);
|
|
31874
|
+
case 22:
|
|
31875
|
+
_context16.next = 18;
|
|
31860
31876
|
break;
|
|
31861
|
-
case
|
|
31877
|
+
case 24:
|
|
31862
31878
|
oldTransform = undefined;
|
|
31863
31879
|
if (deletedArticle) deletedArticle.deleted = true;
|
|
31864
31880
|
if (!(deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.hasCatalogPlannerArticle)) {
|
|
31865
|
-
_context16.next =
|
|
31881
|
+
_context16.next = 32;
|
|
31866
31882
|
break;
|
|
31867
31883
|
}
|
|
31868
|
-
_context16.next =
|
|
31884
|
+
_context16.next = 29;
|
|
31869
31885
|
return set.plannerHandler.deletePlannerElement(setId, deletedArticle.elementId, autoCorrectAVL_AVR, deletionType);
|
|
31870
|
-
case
|
|
31886
|
+
case 29:
|
|
31871
31887
|
result = _context16.sent;
|
|
31872
31888
|
newSelectedElement = result.newElementToSelect;
|
|
31873
31889
|
oldTransform = result.transform;
|
|
31874
|
-
case
|
|
31890
|
+
case 32:
|
|
31875
31891
|
//falls ein Accessoire gelöscht wurde wird das Accessoire auch wo es beim Parent hinterlegt war auch gelöscht
|
|
31876
31892
|
if (deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.relatedToBasketId) {
|
|
31877
31893
|
(_set$getArticleByBask3 = set.getArticleByBasketId(deletedArticle.relatedToBasketId)) === null || _set$getArticleByBask3 === void 0 || _set$getArticleByBask3.removeAccessoire(deletedArticle.basketId);
|
|
@@ -31881,29 +31897,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31881
31897
|
deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$doorP = deletedArticle.doorPlanner) === null || _deletedArticle$doorP === void 0 || _deletedArticle$doorP.deleteElement(deletedArticle.basketId);
|
|
31882
31898
|
success = set.deleteArticle(article.basketId);
|
|
31883
31899
|
if (!((set.CatalogData.bundleRules || set.CatalogData.reconfigAfterArticleDocked || set !== null && set !== void 0 && (_set$CatalogData = set.CatalogData) !== null && _set$CatalogData !== void 0 && _set$CatalogData.getOption('OPTLASTSTACKEDARTICLE')) && !dontReload)) {
|
|
31884
|
-
_context16.next =
|
|
31900
|
+
_context16.next = 38;
|
|
31885
31901
|
break;
|
|
31886
31902
|
}
|
|
31887
|
-
_context16.next =
|
|
31903
|
+
_context16.next = 38;
|
|
31888
31904
|
return this.updateArticlesOptionStatesOfActSet(set, {}, []);
|
|
31889
|
-
case
|
|
31890
|
-
i++;
|
|
31891
|
-
_context16.next = 7;
|
|
31892
|
-
break;
|
|
31893
|
-
case 35:
|
|
31905
|
+
case 38:
|
|
31894
31906
|
return _context16.abrupt("return", {
|
|
31895
31907
|
success: success,
|
|
31896
31908
|
selectElementId: newSelectedElement,
|
|
31897
31909
|
setId: setId,
|
|
31898
31910
|
oldTransform: oldTransform
|
|
31899
31911
|
});
|
|
31900
|
-
case
|
|
31912
|
+
case 39:
|
|
31901
31913
|
case "end":
|
|
31902
31914
|
return _context16.stop();
|
|
31903
31915
|
}
|
|
31904
31916
|
}, _callee14, this);
|
|
31905
31917
|
}));
|
|
31906
|
-
function deleteElementFromSet(_x41, _x42, _x43, _x44, _x45) {
|
|
31918
|
+
function deleteElementFromSet(_x41, _x42, _x43, _x44, _x45, _x46) {
|
|
31907
31919
|
return _deleteElementFromSet.apply(this, arguments);
|
|
31908
31920
|
}
|
|
31909
31921
|
return deleteElementFromSet;
|
|
@@ -31967,7 +31979,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31967
31979
|
_context17.next = 24;
|
|
31968
31980
|
break;
|
|
31969
31981
|
}
|
|
31970
|
-
return _context17.abrupt("return", _objectSpread$
|
|
31982
|
+
return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
|
|
31971
31983
|
accessoire: accessoire
|
|
31972
31984
|
}));
|
|
31973
31985
|
case 24:
|
|
@@ -31978,7 +31990,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
31978
31990
|
}
|
|
31979
31991
|
}, _callee15, this);
|
|
31980
31992
|
}));
|
|
31981
|
-
function addAccessorieOnShelfPlanner(
|
|
31993
|
+
function addAccessorieOnShelfPlanner(_x47, _x48, _x49, _x50, _x51) {
|
|
31982
31994
|
return _addAccessorieOnShelfPlanner.apply(this, arguments);
|
|
31983
31995
|
}
|
|
31984
31996
|
return addAccessorieOnShelfPlanner;
|
|
@@ -32052,7 +32064,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32052
32064
|
}
|
|
32053
32065
|
}, _callee16, this);
|
|
32054
32066
|
}));
|
|
32055
|
-
function getFreeShelfGrids(
|
|
32067
|
+
function getFreeShelfGrids(_x52, _x53) {
|
|
32056
32068
|
return _getFreeShelfGrids.apply(this, arguments);
|
|
32057
32069
|
}
|
|
32058
32070
|
return getFreeShelfGrids;
|
|
@@ -32188,7 +32200,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32188
32200
|
}
|
|
32189
32201
|
}, _callee17, this);
|
|
32190
32202
|
}));
|
|
32191
|
-
function moveShelfItemToGrid(
|
|
32203
|
+
function moveShelfItemToGrid(_x54, _x55, _x56, _x57, _x58) {
|
|
32192
32204
|
return _moveShelfItemToGrid.apply(this, arguments);
|
|
32193
32205
|
}
|
|
32194
32206
|
return moveShelfItemToGrid;
|
|
@@ -32222,7 +32234,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32222
32234
|
}
|
|
32223
32235
|
}, _callee18, this);
|
|
32224
32236
|
}));
|
|
32225
|
-
function deleteAccessorieOnShelfPlanner(
|
|
32237
|
+
function deleteAccessorieOnShelfPlanner(_x59, _x60, _x61, _x62, _x63) {
|
|
32226
32238
|
return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
|
|
32227
32239
|
}
|
|
32228
32240
|
return deleteAccessorieOnShelfPlanner;
|
|
@@ -32248,7 +32260,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32248
32260
|
}
|
|
32249
32261
|
}, _callee19, this);
|
|
32250
32262
|
}));
|
|
32251
|
-
function updatePlannerTrans(
|
|
32263
|
+
function updatePlannerTrans(_x64, _x65, _x66, _x67, _x68, _x69, _x70) {
|
|
32252
32264
|
return _updatePlannerTrans.apply(this, arguments);
|
|
32253
32265
|
}
|
|
32254
32266
|
return updatePlannerTrans;
|
|
@@ -32362,7 +32374,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32362
32374
|
}
|
|
32363
32375
|
}, _callee20, this);
|
|
32364
32376
|
}));
|
|
32365
|
-
function deleteAccessoire(
|
|
32377
|
+
function deleteAccessoire(_x71, _x72, _x73) {
|
|
32366
32378
|
return _deleteAccessoire.apply(this, arguments);
|
|
32367
32379
|
}
|
|
32368
32380
|
return deleteAccessoire;
|
|
@@ -32376,18 +32388,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32376
32388
|
*/
|
|
32377
32389
|
}, {
|
|
32378
32390
|
key: "update3DPlannerView",
|
|
32379
|
-
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo,
|
|
32391
|
+
value: function update3DPlannerView(doRequestRendering, doRequestHqRenderScript, set, renderSize, planner3DGridEnabled, mediaServiceSaveMode, doShow3DDimensionLines, alternateRenderInfo, hybrid3DInfo) {
|
|
32380
32392
|
var _set$plannerHandler, _set$getAlternateRend2;
|
|
32381
32393
|
var width = renderSize.imgWidth;
|
|
32382
32394
|
var height = renderSize.imgHeight;
|
|
32383
|
-
(_set$plannerHandler = set.plannerHandler) === null || _set$plannerHandler === void 0 || _set$plannerHandler.request3D(doRequestRendering, doRequestHqRenderScript, (set === null || set === void 0 || (_set$getAlternateRend2 = set.getAlternateRenderInfo()) === null || _set$getAlternateRend2 === void 0 ? void 0 : _set$getAlternateRend2.length) > 0, alternateRenderInfo, undefined, {
|
|
32395
|
+
(_set$plannerHandler = set.plannerHandler) === null || _set$plannerHandler === void 0 || _set$plannerHandler.request3D(doRequestRendering, doRequestHqRenderScript, true, (set === null || set === void 0 || (_set$getAlternateRend2 = set.getAlternateRenderInfo()) === null || _set$getAlternateRend2 === void 0 ? void 0 : _set$getAlternateRend2.length) > 0, alternateRenderInfo, undefined, {
|
|
32384
32396
|
width: width,
|
|
32385
32397
|
height: height,
|
|
32386
32398
|
isFullscreenRendering: false,
|
|
32387
32399
|
planner3DGridEnabled: planner3DGridEnabled,
|
|
32388
32400
|
mediaServiceSaveMode: mediaServiceSaveMode,
|
|
32389
32401
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
32390
|
-
},
|
|
32402
|
+
}, hybrid3DInfo);
|
|
32391
32403
|
}
|
|
32392
32404
|
}, {
|
|
32393
32405
|
key: "getPlannerPaletteViewInfo",
|
|
@@ -32399,7 +32411,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32399
32411
|
var articlecodex = plannerElement.articleCodex;
|
|
32400
32412
|
if (type == 'PLANNERSWITCH' && selectedArticle) {
|
|
32401
32413
|
if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
|
|
32402
|
-
cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32414
|
+
cleanedCaltaogPlannerArticles.push(_objectSpread$9(_objectSpread$9({}, plannerElement), {}, {
|
|
32403
32415
|
sel: articlecodex == selectedArticle,
|
|
32404
32416
|
groupName: ''
|
|
32405
32417
|
}));
|
|
@@ -32413,12 +32425,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32413
32425
|
plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
|
|
32414
32426
|
}
|
|
32415
32427
|
}
|
|
32416
|
-
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$
|
|
32428
|
+
if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$9(_objectSpread$9({}, plannerElement), {}, {
|
|
32417
32429
|
sel: articlecodex == selectedArticle
|
|
32418
32430
|
}));
|
|
32419
32431
|
}
|
|
32420
32432
|
}
|
|
32421
|
-
return _objectSpread$
|
|
32433
|
+
return _objectSpread$9(_objectSpread$9({}, plannerViewInfo), {}, {
|
|
32422
32434
|
catalogPlannerArticles: cleanedCaltaogPlannerArticles
|
|
32423
32435
|
});
|
|
32424
32436
|
}
|
|
@@ -32516,7 +32528,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32516
32528
|
}
|
|
32517
32529
|
}, _callee21, this);
|
|
32518
32530
|
}));
|
|
32519
|
-
function configSingleIsChanged(
|
|
32531
|
+
function configSingleIsChanged(_x74, _x75, _x76, _x77) {
|
|
32520
32532
|
return _configSingleIsChanged.apply(this, arguments);
|
|
32521
32533
|
}
|
|
32522
32534
|
return configSingleIsChanged;
|
|
@@ -32571,7 +32583,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32571
32583
|
}, {
|
|
32572
32584
|
key: "loadPaletteInfos",
|
|
32573
32585
|
value: function loadPaletteInfos(set, configStepKey, activeArticles, targetArticles) {
|
|
32574
|
-
var _articles$activeArtic2;
|
|
32575
32586
|
if (!activeArticles) {
|
|
32576
32587
|
//wir befinden uns im planner und die Infos aller Artikel werden benötigt!
|
|
32577
32588
|
activeArticles = [];
|
|
@@ -32608,7 +32619,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32608
32619
|
articleInfos: articleInfos,
|
|
32609
32620
|
doShowConfigSingle: doShowConfigSingle && groupedArticles.length > 1,
|
|
32610
32621
|
isConfigSingle: isConfigSingle,
|
|
32611
|
-
articleName:
|
|
32622
|
+
articleName: ''
|
|
32612
32623
|
};
|
|
32613
32624
|
}
|
|
32614
32625
|
}, {
|
|
@@ -32634,7 +32645,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32634
32645
|
filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
|
|
32635
32646
|
stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
|
|
32636
32647
|
contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
|
|
32637
|
-
return _context24.abrupt("return", _objectSpread$
|
|
32648
|
+
return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
|
|
32638
32649
|
isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
|
|
32639
32650
|
isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
|
|
32640
32651
|
visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
|
|
@@ -32651,7 +32662,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32651
32662
|
}
|
|
32652
32663
|
}, _callee22, this);
|
|
32653
32664
|
}));
|
|
32654
|
-
function loadConfigItemsOfActSetByConfigStepKey(
|
|
32665
|
+
function loadConfigItemsOfActSetByConfigStepKey(_x78, _x79, _x80) {
|
|
32655
32666
|
return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
|
|
32656
32667
|
}
|
|
32657
32668
|
return loadConfigItemsOfActSetByConfigStepKey;
|
|
@@ -32738,7 +32749,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32738
32749
|
}
|
|
32739
32750
|
}, _callee23, this);
|
|
32740
32751
|
}));
|
|
32741
|
-
function variantsEvaluator(
|
|
32752
|
+
function variantsEvaluator(_x81, _x82, _x83, _x84) {
|
|
32742
32753
|
return _variantsEvaluator.apply(this, arguments);
|
|
32743
32754
|
}
|
|
32744
32755
|
return variantsEvaluator;
|
|
@@ -32816,7 +32827,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32816
32827
|
}
|
|
32817
32828
|
}, _callee24, this);
|
|
32818
32829
|
}));
|
|
32819
|
-
function calcVariants(
|
|
32830
|
+
function calcVariants(_x85, _x86, _x87) {
|
|
32820
32831
|
return _calcVariants.apply(this, arguments);
|
|
32821
32832
|
}
|
|
32822
32833
|
return calcVariants;
|
|
@@ -32981,7 +32992,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
32981
32992
|
}
|
|
32982
32993
|
}, _callee25, this);
|
|
32983
32994
|
}));
|
|
32984
|
-
function updateArticlesOptionStatesOfActSet(
|
|
32995
|
+
function updateArticlesOptionStatesOfActSet(_x88, _x89, _x90, _x91, _x92, _x93) {
|
|
32985
32996
|
return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
|
|
32986
32997
|
}
|
|
32987
32998
|
return updateArticlesOptionStatesOfActSet;
|
|
@@ -33072,7 +33083,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33072
33083
|
break;
|
|
33073
33084
|
}
|
|
33074
33085
|
_context28.next = 17;
|
|
33075
|
-
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$
|
|
33086
|
+
return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i5]), {}, {
|
|
33076
33087
|
basketId: oldBasketIds[_i5]
|
|
33077
33088
|
}), true);
|
|
33078
33089
|
case 17:
|
|
@@ -33091,7 +33102,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33091
33102
|
}
|
|
33092
33103
|
}, _callee26, this);
|
|
33093
33104
|
}));
|
|
33094
|
-
function updateEdoArticles(
|
|
33105
|
+
function updateEdoArticles(_x94, _x95) {
|
|
33095
33106
|
return _updateEdoArticles.apply(this, arguments);
|
|
33096
33107
|
}
|
|
33097
33108
|
return updateEdoArticles;
|
|
@@ -33218,70 +33229,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33218
33229
|
}
|
|
33219
33230
|
return ret;
|
|
33220
33231
|
}
|
|
33232
|
+
|
|
33233
|
+
/***********************************************Speichern Prozess / OrderSets******************************************************/
|
|
33221
33234
|
}, {
|
|
33222
|
-
key: "
|
|
33223
|
-
value: function () {
|
|
33224
|
-
var _checkVariantData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(set) {
|
|
33225
|
-
var somethingChanged, data;
|
|
33226
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context29) {
|
|
33227
|
-
while (1) switch (_context29.prev = _context29.next) {
|
|
33228
|
-
case 0:
|
|
33229
|
-
somethingChanged = false;
|
|
33230
|
-
_context29.next = 3;
|
|
33231
|
-
return set.api.getDataCache(set.api.getCheckVariantDataQS(set.setHash), undefined, set.getAccountSessionGuid());
|
|
33232
|
-
case 3:
|
|
33233
|
-
data = _context29.sent;
|
|
33234
|
-
if (data.Found) {
|
|
33235
|
-
if (set.OverwrittenPrice != data.VkPrice) {
|
|
33236
|
-
somethingChanged = true;
|
|
33237
|
-
}
|
|
33238
|
-
set.OverwrittenPrice = data.VkPrice;
|
|
33239
|
-
set.SetArticleNrPrefix = 'SAP';
|
|
33240
|
-
set.SetArticleNr = data.SapArticleNr;
|
|
33241
|
-
} else {
|
|
33242
|
-
if (set.OverwrittenPrice) {
|
|
33243
|
-
somethingChanged = true;
|
|
33244
|
-
}
|
|
33245
|
-
set.SetArticleNr = set.CatalogData.retailArticleNr;
|
|
33246
|
-
set.SetArticleNrPrefix = 'ZKAT';
|
|
33247
|
-
set.OverwrittenPrice = undefined;
|
|
33248
|
-
}
|
|
33249
|
-
return _context29.abrupt("return", somethingChanged);
|
|
33250
|
-
case 6:
|
|
33251
|
-
case "end":
|
|
33252
|
-
return _context29.stop();
|
|
33253
|
-
}
|
|
33254
|
-
}, _callee27);
|
|
33255
|
-
}));
|
|
33256
|
-
function checkVariantData(_x95) {
|
|
33257
|
-
return _checkVariantData.apply(this, arguments);
|
|
33258
|
-
}
|
|
33259
|
-
return checkVariantData;
|
|
33260
|
-
}() /***********************************************Speichern Prozess / OrderSets******************************************************/
|
|
33261
|
-
}, {
|
|
33262
|
-
key: "getTotalPrice",
|
|
33263
|
-
value: function getTotalPrice(sets) {
|
|
33264
|
-
var _this$actSet;
|
|
33235
|
+
key: "getTotalViewPrice",
|
|
33236
|
+
value: function getTotalViewPrice(sets) {
|
|
33265
33237
|
var price = 0;
|
|
33266
|
-
if ((_this$actSet = this.actSet(sets)) !== null && _this$actSet !== void 0 && (_this$actSet = _this$actSet.WebConfig) !== null && _this$actSet !== void 0 && _this$actSet.checkForProductsPrice && productHandlerInstance.getPrice()) {
|
|
33267
|
-
return productHandlerInstance.getPrice();
|
|
33268
|
-
}
|
|
33269
33238
|
for (var key in sets) {
|
|
33270
|
-
price = price + sets[key].
|
|
33239
|
+
price = price + sets[key].getViewSetPrice();
|
|
33271
33240
|
}
|
|
33272
33241
|
return price;
|
|
33273
33242
|
}
|
|
33274
33243
|
}, {
|
|
33275
|
-
key: "
|
|
33276
|
-
value: function
|
|
33277
|
-
var _this$actSet2;
|
|
33244
|
+
key: "getTotalViewBruttoPrice",
|
|
33245
|
+
value: function getTotalViewBruttoPrice(sets) {
|
|
33278
33246
|
var price = 0;
|
|
33279
33247
|
var bruttoActive = false;
|
|
33280
|
-
if ((_this$actSet2 = this.actSet(sets)) !== null && _this$actSet2 !== void 0 && (_this$actSet2 = _this$actSet2.WebConfig) !== null && _this$actSet2 !== void 0 && _this$actSet2.checkForProductsPrice && productHandlerInstance.getPrice()) {
|
|
33281
|
-
return productHandlerInstance.getPrice();
|
|
33282
|
-
}
|
|
33283
33248
|
for (var key in sets) {
|
|
33284
|
-
var bruttoSetPrice = sets[key].
|
|
33249
|
+
var bruttoSetPrice = sets[key].getViewBruttoSetPrice(true);
|
|
33285
33250
|
if (bruttoSetPrice) bruttoActive = true;
|
|
33286
33251
|
price = price + (bruttoSetPrice !== null && bruttoSetPrice !== void 0 ? bruttoSetPrice : sets[key].getSetPrice());
|
|
33287
33252
|
}
|
|
@@ -33303,51 +33268,47 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33303
33268
|
}, {
|
|
33304
33269
|
key: "fillOrderLinesAndOrderSets",
|
|
33305
33270
|
value: function () {
|
|
33306
|
-
var _fillOrderLinesAndOrderSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33307
|
-
var _set$
|
|
33308
|
-
var orderSets, basketData, set, setPosNr,
|
|
33309
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33310
|
-
while (1) switch (
|
|
33271
|
+
var _fillOrderLinesAndOrderSets = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee27(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
|
|
33272
|
+
var _set$getMatchingProdu2, _set$getMatchingProdu3;
|
|
33273
|
+
var orderSets, basketData, set, setPosNr, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
|
|
33274
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee27$(_context29) {
|
|
33275
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
33311
33276
|
case 0:
|
|
33312
33277
|
orderSets = [];
|
|
33313
33278
|
basketData = divaBasketHandler.actBasket;
|
|
33314
33279
|
set = this.actSet(sets); //ACHTUNG: Wenn man das nicht zuerst löscht, gibt es beim wiederholten basket Speichern doppelte Einträge
|
|
33315
33280
|
basketData.setSAPOrderLines([]);
|
|
33316
33281
|
setPosNr = 0;
|
|
33317
|
-
if (set !== null && set !== void 0 &&
|
|
33318
|
-
|
|
33319
|
-
if (!
|
|
33320
|
-
basketData.OrigProductId = undefined;
|
|
33321
|
-
}
|
|
33282
|
+
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
33283
|
+
// TODO: this need a better solution, to be decided with mathias
|
|
33284
|
+
if (!((_set$getMatchingProdu = set.getMatchingProduct()) !== null && _set$getMatchingProdu !== void 0 && _set$getMatchingProdu._id)) basketData.OrigProductId = undefined;
|
|
33322
33285
|
}
|
|
33323
|
-
|
|
33324
|
-
|
|
33325
|
-
|
|
33326
|
-
|
|
33286
|
+
basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
|
|
33287
|
+
basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
|
|
33288
|
+
_context29.t0 = _regeneratorRuntime__default["default"].keys(sets);
|
|
33289
|
+
case 9:
|
|
33290
|
+
if ((_context29.t1 = _context29.t0()).done) {
|
|
33291
|
+
_context29.next = 31;
|
|
33327
33292
|
break;
|
|
33328
33293
|
}
|
|
33329
|
-
key =
|
|
33294
|
+
key = _context29.t1.value;
|
|
33330
33295
|
setPosNr++;
|
|
33331
33296
|
_set = sets[key];
|
|
33332
33297
|
catalogData = _set.CatalogData;
|
|
33333
33298
|
articles = _set.getDivaArticles();
|
|
33334
|
-
|
|
33335
|
-
setId: _set.getSetId(),
|
|
33336
|
-
modelCodex: _set.modelCodex
|
|
33337
|
-
};
|
|
33338
|
-
_context30.next = 16;
|
|
33299
|
+
_context29.next = 17;
|
|
33339
33300
|
return this.getOrderSet(_set, catalogData, setPosNr, divaBasketHandler.actDivaNr, repairOnly, returnTo);
|
|
33340
|
-
case
|
|
33341
|
-
newOrderSet =
|
|
33301
|
+
case 17:
|
|
33302
|
+
newOrderSet = _context29.sent;
|
|
33342
33303
|
basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
|
|
33343
|
-
OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles,
|
|
33304
|
+
OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
|
|
33344
33305
|
articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
|
|
33345
33306
|
if (OrderLinesOfActSet.length) {
|
|
33346
|
-
|
|
33307
|
+
_context29.next = 23;
|
|
33347
33308
|
break;
|
|
33348
33309
|
}
|
|
33349
|
-
return
|
|
33350
|
-
case
|
|
33310
|
+
return _context29.abrupt("continue", 9);
|
|
33311
|
+
case 23:
|
|
33351
33312
|
OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
|
|
33352
33313
|
if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
|
|
33353
33314
|
newOrderSet.SetImage = OrderLinesOfActSet[0].Image.replace('_low', '');
|
|
@@ -33368,56 +33329,56 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33368
33329
|
}
|
|
33369
33330
|
newOrderSet.setOrderLines(OrderLinesOfActSet);
|
|
33370
33331
|
orderSets.push(newOrderSet);
|
|
33371
|
-
|
|
33332
|
+
_context29.next = 9;
|
|
33372
33333
|
break;
|
|
33373
|
-
case
|
|
33334
|
+
case 31:
|
|
33374
33335
|
//fill diva3DProject for renderings & AR Converter
|
|
33375
33336
|
basketData.Diva3DProject = DivaUtils__default["default"].encodeBase64(set === null || set === void 0 ? void 0 : set.plannerHandler.getProject3D());
|
|
33376
33337
|
i = 0;
|
|
33377
|
-
case
|
|
33338
|
+
case 33:
|
|
33378
33339
|
if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
|
|
33379
|
-
|
|
33340
|
+
_context29.next = 48;
|
|
33380
33341
|
break;
|
|
33381
33342
|
}
|
|
33382
33343
|
oderSetsIsInActPlanning = false;
|
|
33383
33344
|
setId = basketData.OrderSets[i].SetID;
|
|
33384
33345
|
j = 0;
|
|
33385
|
-
case
|
|
33346
|
+
case 37:
|
|
33386
33347
|
if (!(j < orderSets.length)) {
|
|
33387
|
-
|
|
33348
|
+
_context29.next = 44;
|
|
33388
33349
|
break;
|
|
33389
33350
|
}
|
|
33390
33351
|
if (!(orderSets[j].SetID == setId)) {
|
|
33391
|
-
|
|
33352
|
+
_context29.next = 41;
|
|
33392
33353
|
break;
|
|
33393
33354
|
}
|
|
33394
33355
|
oderSetsIsInActPlanning = true;
|
|
33395
|
-
return
|
|
33396
|
-
case
|
|
33356
|
+
return _context29.abrupt("break", 44);
|
|
33357
|
+
case 41:
|
|
33397
33358
|
j++;
|
|
33398
|
-
|
|
33359
|
+
_context29.next = 37;
|
|
33399
33360
|
break;
|
|
33400
|
-
case
|
|
33361
|
+
case 44:
|
|
33401
33362
|
if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
|
|
33402
33363
|
orderSets.push(basketData.OrderSets[i]);
|
|
33403
33364
|
}
|
|
33404
|
-
case
|
|
33365
|
+
case 45:
|
|
33405
33366
|
i++;
|
|
33406
|
-
|
|
33367
|
+
_context29.next = 33;
|
|
33407
33368
|
break;
|
|
33408
|
-
case
|
|
33369
|
+
case 48:
|
|
33409
33370
|
basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
|
|
33410
33371
|
if (repairOnly) {
|
|
33411
33372
|
this.repairOrderSets(basketData, orderSets);
|
|
33412
33373
|
} else {
|
|
33413
33374
|
basketData.setOrderSets(orderSets);
|
|
33414
33375
|
}
|
|
33415
|
-
return
|
|
33416
|
-
case
|
|
33376
|
+
return _context29.abrupt("return", basketData);
|
|
33377
|
+
case 51:
|
|
33417
33378
|
case "end":
|
|
33418
|
-
return
|
|
33379
|
+
return _context29.stop();
|
|
33419
33380
|
}
|
|
33420
|
-
},
|
|
33381
|
+
}, _callee27, this);
|
|
33421
33382
|
}));
|
|
33422
33383
|
function fillOrderLinesAndOrderSets(_x96, _x97, _x98, _x99, _x100) {
|
|
33423
33384
|
return _fillOrderLinesAndOrderSets.apply(this, arguments);
|
|
@@ -33476,7 +33437,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33476
33437
|
var _origOrderSet$ConfigV;
|
|
33477
33438
|
var configVariant = (_origOrderSet$ConfigV = origOrderSet.ConfigVariants) === null || _origOrderSet$ConfigV === void 0 ? void 0 : _origOrderSet$ConfigV[index];
|
|
33478
33439
|
if (!configVariant) return variant;
|
|
33479
|
-
return _objectSpread$
|
|
33440
|
+
return _objectSpread$9(_objectSpread$9({}, variant), {}, {
|
|
33480
33441
|
SetImage: configVariant.SetImage,
|
|
33481
33442
|
HQRenderScript: configVariant.HQRenderScript,
|
|
33482
33443
|
Set2DImage: configVariant.Set2DImage,
|
|
@@ -33503,11 +33464,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33503
33464
|
}, {
|
|
33504
33465
|
key: "getOrderSet",
|
|
33505
33466
|
value: function () {
|
|
33506
|
-
var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33507
|
-
var _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
33467
|
+
var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(set, catalogData, posNr, divaNr, repairOnly, returnTo) {
|
|
33468
|
+
var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
|
|
33508
33469
|
var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
|
|
33509
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33510
|
-
while (1) switch (
|
|
33470
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context30) {
|
|
33471
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
33511
33472
|
case 0:
|
|
33512
33473
|
dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
|
|
33513
33474
|
DivaUtils__default["default"].startSpanOfApm('GetSet3D und 2D Image');
|
|
@@ -33519,7 +33480,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33519
33480
|
hqRenderScript = undefined;
|
|
33520
33481
|
dimensions = {};
|
|
33521
33482
|
if (dontGenerateImages) {
|
|
33522
|
-
|
|
33483
|
+
_context30.next = 28;
|
|
33523
33484
|
break;
|
|
33524
33485
|
}
|
|
33525
33486
|
promise3D = this.getSetImage(set, typeof window === 'undefined');
|
|
@@ -33527,10 +33488,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33527
33488
|
if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
|
|
33528
33489
|
promise3DAlternate = this.getAlternateSetImages(set);
|
|
33529
33490
|
}
|
|
33530
|
-
|
|
33491
|
+
_context30.next = 15;
|
|
33531
33492
|
return Promise.all([promise3D, promise2D, promise3DAlternate]);
|
|
33532
33493
|
case 15:
|
|
33533
|
-
_yield$Promise$all =
|
|
33494
|
+
_yield$Promise$all = _context30.sent;
|
|
33534
33495
|
_yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
|
|
33535
33496
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
33536
33497
|
setImage = _yield$Promise$all2$.url;
|
|
@@ -33538,10 +33499,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33538
33499
|
urlToPlanning2D = _yield$Promise$all2[1];
|
|
33539
33500
|
alternateSetImages = _yield$Promise$all2[2];
|
|
33540
33501
|
promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
|
|
33541
|
-
|
|
33502
|
+
_context30.next = 25;
|
|
33542
33503
|
return Promise.all([promiseHQRenderScript]);
|
|
33543
33504
|
case 25:
|
|
33544
|
-
_yield$Promise$all3 =
|
|
33505
|
+
_yield$Promise$all3 = _context30.sent;
|
|
33545
33506
|
_yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
|
|
33546
33507
|
hqRenderScript = _yield$Promise$all4[0];
|
|
33547
33508
|
case 28:
|
|
@@ -33572,7 +33533,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33572
33533
|
SetArticleNrPrefix: set.SetArticleNrPrefix,
|
|
33573
33534
|
BBox: this.getBBoxObject(set, dimensions),
|
|
33574
33535
|
SetVariantBasketDatas: set.getVariantBasketData(),
|
|
33575
|
-
SetImage: setImage,
|
|
33536
|
+
SetImage: set.PlannerMode == 'No' ? (_Object$values$ = Object.values((_set$getDivaArticles = set.getDivaArticles()) !== null && _set$getDivaArticles !== void 0 ? _set$getDivaArticles : {})[0]) === null || _Object$values$ === void 0 ? void 0 : _Object$values$.imageUrl : setImage,
|
|
33576
33537
|
//Add url string of current rendering.
|
|
33577
33538
|
HQRenderScript: (_hqRenderScript = hqRenderScript) === null || _hqRenderScript === void 0 ? void 0 : _hqRenderScript._id,
|
|
33578
33539
|
Set2DImage: urlToPlanning2D,
|
|
@@ -33603,12 +33564,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33603
33564
|
MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
|
|
33604
33565
|
MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
|
|
33605
33566
|
});
|
|
33606
|
-
return
|
|
33567
|
+
return _context30.abrupt("return", orderSet);
|
|
33607
33568
|
case 34:
|
|
33608
33569
|
case "end":
|
|
33609
|
-
return
|
|
33570
|
+
return _context30.stop();
|
|
33610
33571
|
}
|
|
33611
|
-
},
|
|
33572
|
+
}, _callee28, this);
|
|
33612
33573
|
}));
|
|
33613
33574
|
function getOrderSet(_x101, _x102, _x103, _x104, _x105, _x106) {
|
|
33614
33575
|
return _getOrderSet.apply(this, arguments);
|
|
@@ -33623,31 +33584,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33623
33584
|
}, {
|
|
33624
33585
|
key: "getSetImage",
|
|
33625
33586
|
value: (function () {
|
|
33626
|
-
var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33587
|
+
var _getSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(set, overwriteLastSavedRendering) {
|
|
33627
33588
|
var is3D, _yield$set$plannerHan, dimensions, url;
|
|
33628
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33629
|
-
while (1) switch (
|
|
33589
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context31) {
|
|
33590
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
33630
33591
|
case 0:
|
|
33631
33592
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33632
33593
|
if (!is3D) {
|
|
33633
|
-
|
|
33594
|
+
_context31.next = 10;
|
|
33634
33595
|
break;
|
|
33635
33596
|
}
|
|
33636
|
-
|
|
33597
|
+
_context31.next = 4;
|
|
33637
33598
|
return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
|
|
33638
33599
|
case 4:
|
|
33639
|
-
|
|
33600
|
+
_context31.next = 6;
|
|
33640
33601
|
return set.plannerHandler.getSetImageAsUrl(set.getSetId());
|
|
33641
33602
|
case 6:
|
|
33642
|
-
_yield$set$plannerHan =
|
|
33603
|
+
_yield$set$plannerHan = _context31.sent;
|
|
33643
33604
|
dimensions = _yield$set$plannerHan.dimensions;
|
|
33644
33605
|
url = _yield$set$plannerHan.url;
|
|
33645
|
-
return
|
|
33606
|
+
return _context31.abrupt("return", {
|
|
33646
33607
|
dimensions: dimensions,
|
|
33647
33608
|
url: url
|
|
33648
33609
|
});
|
|
33649
33610
|
case 10:
|
|
33650
|
-
return
|
|
33611
|
+
return _context31.abrupt("return", {
|
|
33651
33612
|
dimensions: {
|
|
33652
33613
|
w: undefined,
|
|
33653
33614
|
h: undefined,
|
|
@@ -33656,9 +33617,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33656
33617
|
});
|
|
33657
33618
|
case 11:
|
|
33658
33619
|
case "end":
|
|
33659
|
-
return
|
|
33620
|
+
return _context31.stop();
|
|
33660
33621
|
}
|
|
33661
|
-
},
|
|
33622
|
+
}, _callee29);
|
|
33662
33623
|
}));
|
|
33663
33624
|
function getSetImage(_x107, _x108) {
|
|
33664
33625
|
return _getSetImage.apply(this, arguments);
|
|
@@ -33668,43 +33629,43 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33668
33629
|
}, {
|
|
33669
33630
|
key: "getHQRenderScript",
|
|
33670
33631
|
value: function () {
|
|
33671
|
-
var _getHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33632
|
+
var _getHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, divaNr) {
|
|
33672
33633
|
var is3D, hqRenderScript, createdHQRenderScript;
|
|
33673
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33674
|
-
while (1) switch (
|
|
33634
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
|
|
33635
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
33675
33636
|
case 0:
|
|
33676
33637
|
//if not 3d
|
|
33677
33638
|
is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
|
|
33678
33639
|
if (is3D) {
|
|
33679
|
-
|
|
33640
|
+
_context32.next = 3;
|
|
33680
33641
|
break;
|
|
33681
33642
|
}
|
|
33682
|
-
return
|
|
33643
|
+
return _context32.abrupt("return");
|
|
33683
33644
|
case 3:
|
|
33684
|
-
|
|
33645
|
+
_context32.next = 5;
|
|
33685
33646
|
return set.plannerHandler.saveSetHQRenderScript();
|
|
33686
33647
|
case 5:
|
|
33687
33648
|
hqRenderScript = set.plannerHandler.getSetHQRenderScript();
|
|
33688
33649
|
if (hqRenderScript) {
|
|
33689
|
-
|
|
33650
|
+
_context32.next = 8;
|
|
33690
33651
|
break;
|
|
33691
33652
|
}
|
|
33692
|
-
return
|
|
33653
|
+
return _context32.abrupt("return");
|
|
33693
33654
|
case 8:
|
|
33694
|
-
|
|
33655
|
+
_context32.next = 10;
|
|
33695
33656
|
return set.api.postHQRenderScript({
|
|
33696
33657
|
divaNr: divaNr,
|
|
33697
33658
|
hqRenderscript: hqRenderScript,
|
|
33698
33659
|
organization: set.api.OrganizationId
|
|
33699
33660
|
});
|
|
33700
33661
|
case 10:
|
|
33701
|
-
createdHQRenderScript =
|
|
33702
|
-
return
|
|
33662
|
+
createdHQRenderScript = _context32.sent;
|
|
33663
|
+
return _context32.abrupt("return", createdHQRenderScript);
|
|
33703
33664
|
case 12:
|
|
33704
33665
|
case "end":
|
|
33705
|
-
return
|
|
33666
|
+
return _context32.stop();
|
|
33706
33667
|
}
|
|
33707
|
-
},
|
|
33668
|
+
}, _callee30);
|
|
33708
33669
|
}));
|
|
33709
33670
|
function getHQRenderScript(_x109, _x110) {
|
|
33710
33671
|
return _getHQRenderScript.apply(this, arguments);
|
|
@@ -33720,32 +33681,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33720
33681
|
}, {
|
|
33721
33682
|
key: "getAlternateSetImages",
|
|
33722
33683
|
value: (function () {
|
|
33723
|
-
var _getAlternateSetImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33684
|
+
var _getAlternateSetImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(set) {
|
|
33724
33685
|
var is2D, catalogData, setImages;
|
|
33725
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33726
|
-
while (1) switch (
|
|
33686
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context33) {
|
|
33687
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
33727
33688
|
case 0:
|
|
33728
33689
|
is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
|
|
33729
33690
|
if (!(is2D || set.onlyRunLogic)) {
|
|
33730
|
-
|
|
33691
|
+
_context33.next = 3;
|
|
33731
33692
|
break;
|
|
33732
33693
|
}
|
|
33733
|
-
return
|
|
33694
|
+
return _context33.abrupt("return", []);
|
|
33734
33695
|
case 3:
|
|
33735
33696
|
catalogData = set.CatalogData;
|
|
33736
|
-
|
|
33697
|
+
_context33.next = 6;
|
|
33737
33698
|
return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
|
|
33738
33699
|
case 6:
|
|
33739
|
-
|
|
33700
|
+
_context33.next = 8;
|
|
33740
33701
|
return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
|
|
33741
33702
|
case 8:
|
|
33742
|
-
setImages =
|
|
33743
|
-
return
|
|
33703
|
+
setImages = _context33.sent;
|
|
33704
|
+
return _context33.abrupt("return", setImages);
|
|
33744
33705
|
case 10:
|
|
33745
33706
|
case "end":
|
|
33746
|
-
return
|
|
33707
|
+
return _context33.stop();
|
|
33747
33708
|
}
|
|
33748
|
-
},
|
|
33709
|
+
}, _callee31);
|
|
33749
33710
|
}));
|
|
33750
33711
|
function getAlternateSetImages(_x111) {
|
|
33751
33712
|
return _getAlternateSetImages.apply(this, arguments);
|
|
@@ -33755,28 +33716,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33755
33716
|
}, {
|
|
33756
33717
|
key: "get2DSetImage",
|
|
33757
33718
|
value: function () {
|
|
33758
|
-
var _get2DSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33719
|
+
var _get2DSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32(set) {
|
|
33759
33720
|
var urlToPlanning2D, catalogData, planning2DAsJPGBase64;
|
|
33760
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33761
|
-
while (1) switch (
|
|
33721
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context34) {
|
|
33722
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
33762
33723
|
case 0:
|
|
33763
33724
|
urlToPlanning2D = undefined, catalogData = set.CatalogData;
|
|
33764
33725
|
planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
|
|
33765
33726
|
if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
|
|
33766
|
-
|
|
33727
|
+
_context34.next = 6;
|
|
33767
33728
|
break;
|
|
33768
33729
|
}
|
|
33769
|
-
|
|
33730
|
+
_context34.next = 5;
|
|
33770
33731
|
return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
|
|
33771
33732
|
case 5:
|
|
33772
|
-
urlToPlanning2D =
|
|
33733
|
+
urlToPlanning2D = _context34.sent;
|
|
33773
33734
|
case 6:
|
|
33774
|
-
return
|
|
33735
|
+
return _context34.abrupt("return", urlToPlanning2D);
|
|
33775
33736
|
case 7:
|
|
33776
33737
|
case "end":
|
|
33777
|
-
return
|
|
33738
|
+
return _context34.stop();
|
|
33778
33739
|
}
|
|
33779
|
-
},
|
|
33740
|
+
}, _callee32);
|
|
33780
33741
|
}));
|
|
33781
33742
|
function get2DSetImage(_x112) {
|
|
33782
33743
|
return _get2DSetImage.apply(this, arguments);
|
|
@@ -33793,23 +33754,16 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33793
33754
|
Y: (_dimensions$d = dimensions === null || dimensions === void 0 ? void 0 : dimensions.d) !== null && _dimensions$d !== void 0 ? _dimensions$d : bbox.depth,
|
|
33794
33755
|
Z: (_dimensions$h = dimensions === null || dimensions === void 0 ? void 0 : dimensions.h) !== null && _dimensions$h !== void 0 ? _dimensions$h : bbox.height
|
|
33795
33756
|
};
|
|
33796
|
-
|
|
33797
|
-
|
|
33757
|
+
if (set.PlannerMode == 'No') {
|
|
33758
|
+
var article = Object.values(set.getDivaArticles())[0];
|
|
33759
|
+
dim.X = article === null || article === void 0 ? void 0 : article.width;
|
|
33760
|
+
dim.Y = article === null || article === void 0 ? void 0 : article.depth;
|
|
33761
|
+
dim.Z = article === null || article === void 0 ? void 0 : article.height;
|
|
33762
|
+
}
|
|
33763
|
+
return _objectSpread$9(_objectSpread$9({}, dim), {}, {
|
|
33764
|
+
Info: ((_set$api$getI18n$t = (_set$api$getI18n = set.api.getI18n()) === null || _set$api$getI18n === void 0 || (_set$api$getI18n$t2 = _set$api$getI18n.t) === null || _set$api$getI18n$t2 === void 0 ? void 0 : _set$api$getI18n$t2.call(_set$api$getI18n, 'utils.width_first_letter', 'B')) !== null && _set$api$getI18n$t !== void 0 ? _set$api$getI18n$t : 'B') + ': ' + dim.X + ' cm x ' + ((_set$api$getI18n$t3 = (_set$api$getI18n2 = set.api.getI18n()) === null || _set$api$getI18n2 === void 0 || (_set$api$getI18n2$t = _set$api$getI18n2.t) === null || _set$api$getI18n2$t === void 0 ? void 0 : _set$api$getI18n2$t.call(_set$api$getI18n2, 'utils.depth_first_letter', 'T')) !== null && _set$api$getI18n$t3 !== void 0 ? _set$api$getI18n$t3 : 'T') + ': ' + dim.Y + ' cm' + (dim.Z ? ' x ' + ((_set$api$getI18n$t4 = (_set$api$getI18n3 = set.api.getI18n()) === null || _set$api$getI18n3 === void 0 || (_set$api$getI18n3$t = _set$api$getI18n3.t) === null || _set$api$getI18n3$t === void 0 ? void 0 : _set$api$getI18n3$t.call(_set$api$getI18n3, 'utils.height_first_letter', 'H')) !== null && _set$api$getI18n$t4 !== void 0 ? _set$api$getI18n$t4 : 'H') + ': ' + dim.Z + ' cm' : '')
|
|
33798
33765
|
});
|
|
33799
33766
|
}
|
|
33800
|
-
}, {
|
|
33801
|
-
key: "getAllProducts",
|
|
33802
|
-
value: function getAllProducts(sets) {
|
|
33803
|
-
var ret = {};
|
|
33804
|
-
for (var key in sets) {
|
|
33805
|
-
var productsQuantity = sets[key].getAllProducts();
|
|
33806
|
-
for (var _key3 in productsQuantity) {
|
|
33807
|
-
if (!ret[_key3]) ret[_key3] = 0;
|
|
33808
|
-
ret[_key3] += productsQuantity[_key3];
|
|
33809
|
-
}
|
|
33810
|
-
}
|
|
33811
|
-
return ret;
|
|
33812
|
-
}
|
|
33813
33767
|
}, {
|
|
33814
33768
|
key: "findLoadedSet",
|
|
33815
33769
|
value: function findLoadedSet(sets, catalogCodex, accountGUID) {
|
|
@@ -33824,23 +33778,23 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33824
33778
|
}, {
|
|
33825
33779
|
key: "addOrderSetArticlesToExistingSet",
|
|
33826
33780
|
value: function () {
|
|
33827
|
-
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
33828
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
33829
|
-
while (1) switch (
|
|
33781
|
+
var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(set, orderSet, lastSetToInitialize) {
|
|
33782
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context35) {
|
|
33783
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
33830
33784
|
case 0:
|
|
33831
33785
|
//TODO: GLOBAL STUFF
|
|
33832
33786
|
//this.updateActSet(set);
|
|
33833
33787
|
orderSet.changeBasketIds();
|
|
33834
|
-
|
|
33788
|
+
_context35.next = 3;
|
|
33835
33789
|
return this.initOrderLineArticles(set, orderSet);
|
|
33836
33790
|
case 3:
|
|
33837
|
-
|
|
33791
|
+
_context35.next = 5;
|
|
33838
33792
|
return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
|
|
33839
33793
|
case 5:
|
|
33840
33794
|
case "end":
|
|
33841
|
-
return
|
|
33795
|
+
return _context35.stop();
|
|
33842
33796
|
}
|
|
33843
|
-
},
|
|
33797
|
+
}, _callee33, this);
|
|
33844
33798
|
}));
|
|
33845
33799
|
function addOrderSetArticlesToExistingSet(_x113, _x114, _x115) {
|
|
33846
33800
|
return _addOrderSetArticlesToExistingSet.apply(this, arguments);
|
|
@@ -33859,9 +33813,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33859
33813
|
}();
|
|
33860
33814
|
var setHandlerInstance = new DivaSetHandler();
|
|
33861
33815
|
|
|
33862
|
-
function ownKeys$
|
|
33863
|
-
function _objectSpread$
|
|
33864
|
-
var LOG$
|
|
33816
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33817
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33818
|
+
var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
33865
33819
|
var DivaBasketHandler = /*#__PURE__*/function () {
|
|
33866
33820
|
function DivaBasketHandler(plannerConfig) {
|
|
33867
33821
|
var _this = this,
|
|
@@ -33897,7 +33851,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33897
33851
|
this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
|
|
33898
33852
|
this._handler = plannerConfig.handler;
|
|
33899
33853
|
if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.ViewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.ViewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
|
|
33900
|
-
LOG$
|
|
33854
|
+
LOG$8.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
|
|
33901
33855
|
code: 'WC_0003'
|
|
33902
33856
|
}));
|
|
33903
33857
|
}
|
|
@@ -33907,7 +33861,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33907
33861
|
}
|
|
33908
33862
|
if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
|
|
33909
33863
|
var _this$plannerConfig$a2, _this$plannerConfig$a3;
|
|
33910
|
-
this._basketHandler = new BasketHandler__default["default"](LOG$
|
|
33864
|
+
this._basketHandler = new BasketHandler__default["default"](LOG$8, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
|
|
33911
33865
|
}
|
|
33912
33866
|
}
|
|
33913
33867
|
return _createClass__default["default"](DivaBasketHandler, [{
|
|
@@ -33976,7 +33930,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
33976
33930
|
case 0:
|
|
33977
33931
|
this.basketWasSavedWithCurrentDocVersion = false;
|
|
33978
33932
|
this.startProductId = undefined;
|
|
33979
|
-
LOG$
|
|
33933
|
+
LOG$8.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
|
|
33980
33934
|
if (this.ignoreInitObjectWhenInitializing) {
|
|
33981
33935
|
_context.next = 37;
|
|
33982
33936
|
break;
|
|
@@ -34153,7 +34107,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34153
34107
|
title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
|
|
34154
34108
|
text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
|
|
34155
34109
|
});
|
|
34156
|
-
LOG$
|
|
34110
|
+
LOG$8.error(new DivaUtils.DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
|
|
34157
34111
|
case 84:
|
|
34158
34112
|
_context.next = 91;
|
|
34159
34113
|
break;
|
|
@@ -34321,12 +34275,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34321
34275
|
case 0:
|
|
34322
34276
|
basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
|
|
34323
34277
|
if (origProductId) basketFromAPI.OrigProductId = origProductId;
|
|
34324
|
-
basket = _objectSpread$
|
|
34278
|
+
basket = _objectSpread$8({}, basketFromAPI);
|
|
34325
34279
|
if (!basketFromAPI) {
|
|
34326
34280
|
_context5.next = 48;
|
|
34327
34281
|
break;
|
|
34328
34282
|
}
|
|
34329
|
-
LOG$
|
|
34283
|
+
LOG$8.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
|
|
34330
34284
|
if (basketFromAPI.OrigDivaNr) {
|
|
34331
34285
|
this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
|
|
34332
34286
|
} else if (basketFromAPI.OrigCatalogCodex) {
|
|
@@ -34449,8 +34403,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34449
34403
|
}
|
|
34450
34404
|
}, {
|
|
34451
34405
|
key: "getBasketData",
|
|
34452
|
-
value: function getBasketData(divaNr) {
|
|
34453
|
-
|
|
34406
|
+
value: function getBasketData(divaNr, variantId) {
|
|
34407
|
+
var _this$baskets;
|
|
34408
|
+
return (_this$baskets = this.baskets[divaNr + '-' + variantId]) !== null && _this$baskets !== void 0 ? _this$baskets : this.baskets[divaNr];
|
|
34454
34409
|
}
|
|
34455
34410
|
}, {
|
|
34456
34411
|
key: "setBasketData",
|
|
@@ -34537,7 +34492,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34537
34492
|
case 9:
|
|
34538
34493
|
_context7.prev = 9;
|
|
34539
34494
|
_context7.t0 = _context7["catch"](0);
|
|
34540
|
-
LOG$
|
|
34495
|
+
LOG$8.error(new DivaUtils.DivaError('DivaNr cannot be found in Database', {
|
|
34541
34496
|
code: 'WC_0004',
|
|
34542
34497
|
custom: {
|
|
34543
34498
|
divaNr: divaNr
|
|
@@ -34574,7 +34529,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34574
34529
|
_context8.next = 9;
|
|
34575
34530
|
break;
|
|
34576
34531
|
}
|
|
34577
|
-
LOG$
|
|
34532
|
+
LOG$8.error(new DivaUtils.DivaError('CustomProductId cannot be found in Database', {
|
|
34578
34533
|
code: 'WC_0005',
|
|
34579
34534
|
custom: {
|
|
34580
34535
|
key: key,
|
|
@@ -34590,7 +34545,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34590
34545
|
case 12:
|
|
34591
34546
|
_context8.prev = 12;
|
|
34592
34547
|
_context8.t0 = _context8["catch"](0);
|
|
34593
|
-
LOG$
|
|
34548
|
+
LOG$8.error(new DivaUtils.DivaError('Error while fetching product data', {
|
|
34594
34549
|
code: 'WC_0005',
|
|
34595
34550
|
custom: {
|
|
34596
34551
|
productId: productId
|
|
@@ -34624,7 +34579,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34624
34579
|
_context9.next = 6;
|
|
34625
34580
|
break;
|
|
34626
34581
|
}
|
|
34627
|
-
LOG$
|
|
34582
|
+
LOG$8.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
|
|
34628
34583
|
code: 'WC_0005',
|
|
34629
34584
|
custom: {
|
|
34630
34585
|
productId: productId
|
|
@@ -34867,7 +34822,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34867
34822
|
if (_loop2()) continue;
|
|
34868
34823
|
}
|
|
34869
34824
|
var variantValues = article.VariantValuesParentOption;
|
|
34870
|
-
var data = _objectSpread$
|
|
34825
|
+
var data = _objectSpread$8(_objectSpread$8({}, this.actBasket), {}, {
|
|
34871
34826
|
changedValues: changedValues,
|
|
34872
34827
|
variantValues: variantValues,
|
|
34873
34828
|
isInit: isInit,
|
|
@@ -34892,7 +34847,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34892
34847
|
break;
|
|
34893
34848
|
case 3:
|
|
34894
34849
|
_context12.next = 5;
|
|
34895
|
-
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-
|
|
34850
|
+
return Promise.resolve().then(function () { return require('./PfisterWWSHandler-93d9fb4d.js'); });
|
|
34896
34851
|
case 5:
|
|
34897
34852
|
_yield$import = _context12.sent;
|
|
34898
34853
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -34900,7 +34855,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34900
34855
|
return _context12.abrupt("break", 27);
|
|
34901
34856
|
case 9:
|
|
34902
34857
|
_context12.next = 11;
|
|
34903
|
-
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-
|
|
34858
|
+
return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-4bad8cba.js'); });
|
|
34904
34859
|
case 11:
|
|
34905
34860
|
_yield$import2 = _context12.sent;
|
|
34906
34861
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -34908,7 +34863,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34908
34863
|
return _context12.abrupt("break", 27);
|
|
34909
34864
|
case 15:
|
|
34910
34865
|
_context12.next = 17;
|
|
34911
|
-
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-
|
|
34866
|
+
return Promise.resolve().then(function () { return require('./SeriousBasketHandler-f1feae09.js'); });
|
|
34912
34867
|
case 17:
|
|
34913
34868
|
_yield$import3 = _context12.sent;
|
|
34914
34869
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -34916,7 +34871,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34916
34871
|
return _context12.abrupt("break", 27);
|
|
34917
34872
|
case 21:
|
|
34918
34873
|
_context12.next = 23;
|
|
34919
|
-
return Promise.resolve().then(function () { return require('./StandardWWSHandler-
|
|
34874
|
+
return Promise.resolve().then(function () { return require('./StandardWWSHandler-1e7710d3.js'); });
|
|
34920
34875
|
case 23:
|
|
34921
34876
|
_yield$import4 = _context12.sent;
|
|
34922
34877
|
StandardWWSHandler = _yield$import4["default"];
|
|
@@ -34936,6 +34891,175 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
34936
34891
|
}]);
|
|
34937
34892
|
}();
|
|
34938
34893
|
|
|
34894
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34895
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34896
|
+
var LOG$7 = DivaUtils__default["default"].initLog('Products', 'WEB-PLANNER-LOGIC');
|
|
34897
|
+
var DivaProductHandler = /*#__PURE__*/function () {
|
|
34898
|
+
function DivaProductHandler() {
|
|
34899
|
+
_classCallCheck__default["default"](this, DivaProductHandler);
|
|
34900
|
+
}
|
|
34901
|
+
return _createClass__default["default"](DivaProductHandler, [{
|
|
34902
|
+
key: "updateProducts",
|
|
34903
|
+
value: function () {
|
|
34904
|
+
var _updateProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(sets, api, wwsHandler, from) {
|
|
34905
|
+
var set, _ref, customProductNrsPair, matchPrefix, data, _ref2, products, customProducts;
|
|
34906
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
34907
|
+
while (1) switch (_context.prev = _context.next) {
|
|
34908
|
+
case 0:
|
|
34909
|
+
if (!(sets.length > 1)) {
|
|
34910
|
+
_context.next = 3;
|
|
34911
|
+
break;
|
|
34912
|
+
}
|
|
34913
|
+
console.error('matching product logic with more than one set needs to implemented');
|
|
34914
|
+
return _context.abrupt("return");
|
|
34915
|
+
case 3:
|
|
34916
|
+
set = sets[0];
|
|
34917
|
+
set.setMatchingProduct();
|
|
34918
|
+
set.SetArticleNr = undefined;
|
|
34919
|
+
set.SetArticleNrPrefix = undefined;
|
|
34920
|
+
this.setCustonProductNrFieldsOnArticles(set, [], []);
|
|
34921
|
+
_ref = wwsHandler.getCustomIdsForProductsMatch(set), customProductNrsPair = _ref.customProductNrsPair, matchPrefix = _ref.matchPrefix;
|
|
34922
|
+
data = {
|
|
34923
|
+
catalogs: sets.map(function (set) {
|
|
34924
|
+
return {
|
|
34925
|
+
articles: Object.values(set.getDivaArticles()).map(function (article) {
|
|
34926
|
+
return {
|
|
34927
|
+
codex: article.articleCodex,
|
|
34928
|
+
hash: article.articleProductHash
|
|
34929
|
+
};
|
|
34930
|
+
}),
|
|
34931
|
+
catalogGuid: set.CatalogData.catalogGuid
|
|
34932
|
+
};
|
|
34933
|
+
}),
|
|
34934
|
+
organizationId: api.OrganizationId,
|
|
34935
|
+
customProductNrs: customProductNrsPair.map(function (c) {
|
|
34936
|
+
return c.customProductNrs;
|
|
34937
|
+
})
|
|
34938
|
+
};
|
|
34939
|
+
_context.next = 12;
|
|
34940
|
+
return api.getDataCache(api.checkMatchingProducts(), DivaUtils.md5(JSON.stringify(_objectSpread$7(_objectSpread$7({}, data), {}, {
|
|
34941
|
+
organizationId: api.OrganizationId
|
|
34942
|
+
}))), '', 'catalog', 'POST', data);
|
|
34943
|
+
case 12:
|
|
34944
|
+
_ref2 = _context.sent;
|
|
34945
|
+
products = _ref2.products;
|
|
34946
|
+
customProducts = _ref2.customProducts;
|
|
34947
|
+
LOG$7.debug('matchingProducts triggered by: ' + from, products, customProducts);
|
|
34948
|
+
if (products.length) this.handleFountMatchingProducts(set, products, undefined, matchPrefix);else if (customProducts.length) this.setCustonProductNrFieldsOnArticles(set, customProducts, customProductNrsPair);
|
|
34949
|
+
case 17:
|
|
34950
|
+
case "end":
|
|
34951
|
+
return _context.stop();
|
|
34952
|
+
}
|
|
34953
|
+
}, _callee, this);
|
|
34954
|
+
}));
|
|
34955
|
+
function updateProducts(_x, _x2, _x3, _x4) {
|
|
34956
|
+
return _updateProducts.apply(this, arguments);
|
|
34957
|
+
}
|
|
34958
|
+
return updateProducts;
|
|
34959
|
+
}()
|
|
34960
|
+
}, {
|
|
34961
|
+
key: "handleFountMatchingProducts",
|
|
34962
|
+
value: function handleFountMatchingProducts(set, products, setHash, matchPrefix) {
|
|
34963
|
+
var _product$retailerArti, _product$discountedPr, _product$discountedPr2, _product$discountedPr3;
|
|
34964
|
+
var product = this.cheapestOfMatchingProducts(products);
|
|
34965
|
+
var calculatedPrice = set.getSetPrice(true);
|
|
34966
|
+
set.SetArticleNr = (_product$retailerArti = product.retailerArticleNr) === null || _product$retailerArti === void 0 ? void 0 : _product$retailerArti.toString();
|
|
34967
|
+
set.SetArticleNrPrefix = matchPrefix;
|
|
34968
|
+
if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && calculatedPrice == product.calculatedPrice) {
|
|
34969
|
+
//no discount
|
|
34970
|
+
set.setMatchingProduct({
|
|
34971
|
+
discountPrice: 0,
|
|
34972
|
+
origPrice: product.addedPrice,
|
|
34973
|
+
percentage: 0
|
|
34974
|
+
});
|
|
34975
|
+
return;
|
|
34976
|
+
}
|
|
34977
|
+
var discountExists = !!product.discountedPrice || set.CatalogData.discountPercentage;
|
|
34978
|
+
//hier ist noch zu unterscheide ob der Rabatt nur angeziegt werden soll oder auch in der WWS logic angewendet werden soll
|
|
34979
|
+
var currentProduct = {
|
|
34980
|
+
discountPrice: (_product$discountedPr = product.discountedPrice) !== null && _product$discountedPr !== void 0 ? _product$discountedPr : 0,
|
|
34981
|
+
onlyViewDiscountedPrice: (_product$discountedPr2 = product.discountedPrice) !== null && _product$discountedPr2 !== void 0 ? _product$discountedPr2 : 0,
|
|
34982
|
+
origPrice: product.addedPrice,
|
|
34983
|
+
percentage: (calculatedPrice - ((_product$discountedPr3 = product.discountedPrice) !== null && _product$discountedPr3 !== void 0 ? _product$discountedPr3 : product.addedPrice)) / (calculatedPrice / 100),
|
|
34984
|
+
bruttoPercentage: !!product.addedPrice && discountExists && product.discountedPrice !== product.addedPrice ? (calculatedPrice - product.addedPrice) / (calculatedPrice / 100) : undefined,
|
|
34985
|
+
retailerArticleNr: product.retailerArticleNr,
|
|
34986
|
+
setHash: setHash,
|
|
34987
|
+
_id: product._id
|
|
34988
|
+
};
|
|
34989
|
+
if (setHash) set.setMatchingOrigProduct(currentProduct);
|
|
34990
|
+
set.setMatchingProduct(currentProduct);
|
|
34991
|
+
}
|
|
34992
|
+
}, {
|
|
34993
|
+
key: "setCustonProductNrFieldsOnArticles",
|
|
34994
|
+
value: function setCustonProductNrFieldsOnArticles(set, customProducts, customProductNrsPair) {
|
|
34995
|
+
var articles = set.getDivaArticles(false, true);
|
|
34996
|
+
for (var key in articles) {
|
|
34997
|
+
articles[key].discountPercentage = undefined;
|
|
34998
|
+
}
|
|
34999
|
+
var _loop = function _loop() {
|
|
35000
|
+
var _customProductNrsPair, _customProductNrsPair2;
|
|
35001
|
+
var customNr = customProducts[i];
|
|
35002
|
+
var basketIds = (_customProductNrsPair = (_customProductNrsPair2 = customProductNrsPair.find(function (c) {
|
|
35003
|
+
return c.customProductNrs == customNr.retailerArticleNr.toString();
|
|
35004
|
+
})) === null || _customProductNrsPair2 === void 0 ? void 0 : _customProductNrsPair2.basketIds) !== null && _customProductNrsPair !== void 0 ? _customProductNrsPair : [];
|
|
35005
|
+
for (var j = 0; j < basketIds.length; j++) {
|
|
35006
|
+
articles[basketIds[j]].discountPercentage = customNr.percentageDiscount;
|
|
35007
|
+
}
|
|
35008
|
+
};
|
|
35009
|
+
for (var i = 0; i < customProducts.length; i++) {
|
|
35010
|
+
_loop();
|
|
35011
|
+
}
|
|
35012
|
+
}
|
|
35013
|
+
}, {
|
|
35014
|
+
key: "cheapestOfMatchingProducts",
|
|
35015
|
+
value: function cheapestOfMatchingProducts(products) {
|
|
35016
|
+
var bestIndex = 0;
|
|
35017
|
+
for (var i = 1; i < products.length; i++) {
|
|
35018
|
+
var _currentBestProduct$d, _potencialBetterProdu;
|
|
35019
|
+
var currentBestProduct = products[bestIndex];
|
|
35020
|
+
var potencialBetterProduct = products[i];
|
|
35021
|
+
if (((_currentBestProduct$d = currentBestProduct.discountedPrice) !== null && _currentBestProduct$d !== void 0 ? _currentBestProduct$d : currentBestProduct.addedPrice) > ((_potencialBetterProdu = potencialBetterProduct.discountedPrice) !== null && _potencialBetterProdu !== void 0 ? _potencialBetterProdu : potencialBetterProduct.addedPrice)) {
|
|
35022
|
+
bestIndex = i;
|
|
35023
|
+
}
|
|
35024
|
+
}
|
|
35025
|
+
return products[bestIndex];
|
|
35026
|
+
}
|
|
35027
|
+
|
|
35028
|
+
/**
|
|
35029
|
+
* Schlaraffia specific code
|
|
35030
|
+
*/
|
|
35031
|
+
}, {
|
|
35032
|
+
key: "getBestMatch",
|
|
35033
|
+
value: function getBestMatch(articles, products) {
|
|
35034
|
+
var OPTION_CODEX = 'KOPFTEIL';
|
|
35035
|
+
if (!articles) return;
|
|
35036
|
+
for (var key in articles) {
|
|
35037
|
+
var _article$VariantValue;
|
|
35038
|
+
var article = articles[key];
|
|
35039
|
+
var opv = (_article$VariantValue = article.VariantValues['OPT' + OPTION_CODEX]) === null || _article$VariantValue === void 0 ? void 0 : _article$VariantValue.replace('OPV', '');
|
|
35040
|
+
if (!products || !opv) continue;
|
|
35041
|
+
for (var i = 0; i < products.length; i++) {
|
|
35042
|
+
var _products$i$affiliate;
|
|
35043
|
+
if ((_products$i$affiliate = products[i].affiliate) !== null && _products$i$affiliate !== void 0 && _products$i$affiliate.length) if (this.findOPVCodexInVariantValues(products[i], OPTION_CODEX, opv)) {
|
|
35044
|
+
return products[i];
|
|
35045
|
+
}
|
|
35046
|
+
}
|
|
35047
|
+
}
|
|
35048
|
+
return undefined;
|
|
35049
|
+
}
|
|
35050
|
+
}, {
|
|
35051
|
+
key: "findOPVCodexInVariantValues",
|
|
35052
|
+
value: function findOPVCodexInVariantValues(product, opt, opv) {
|
|
35053
|
+
return product.articles.find(function (article) {
|
|
35054
|
+
return article.variantValues.find(function (variant) {
|
|
35055
|
+
return variant.OPT === opt && variant.OPV === opv;
|
|
35056
|
+
});
|
|
35057
|
+
});
|
|
35058
|
+
}
|
|
35059
|
+
}]);
|
|
35060
|
+
}();
|
|
35061
|
+
var productHandlerInstance = new DivaProductHandler();
|
|
35062
|
+
|
|
34939
35063
|
var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
34940
35064
|
var ViewPointHandler = /*#__PURE__*/function () {
|
|
34941
35065
|
function ViewPointHandler() {
|
|
@@ -35568,6 +35692,14 @@ var Rendering = /*#__PURE__*/function () {
|
|
|
35568
35692
|
return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
|
|
35569
35693
|
}
|
|
35570
35694
|
}
|
|
35695
|
+
|
|
35696
|
+
/**This function returns the entry of the BBOXGEO from the UIPolygon Information in order to process when working with hybrid3D Viewer */
|
|
35697
|
+
}, {
|
|
35698
|
+
key: "getBBoxGeoFromUnity",
|
|
35699
|
+
value: function getBBoxGeoFromUnity() {
|
|
35700
|
+
if (this.uiInfo && this.uiInfo['BBOXGEO']) return this.uiInfo['BBOXGEO'];
|
|
35701
|
+
return null;
|
|
35702
|
+
}
|
|
35571
35703
|
}, {
|
|
35572
35704
|
key: "getOutlinePolygonForSVG",
|
|
35573
35705
|
value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
|
|
@@ -36044,8 +36176,9 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36044
36176
|
//function called when no render client is found when only updating view
|
|
36045
36177
|
_defineProperty__default["default"](this, "renderSettings", void 0);
|
|
36046
36178
|
_defineProperty__default["default"](this, "todoAfterLogin", void 0);
|
|
36179
|
+
_defineProperty__default["default"](this, "currentCamera", void 0);
|
|
36047
36180
|
_defineProperty__default["default"](this, "jwt", void 0);
|
|
36048
|
-
_defineProperty__default["default"](this, "
|
|
36181
|
+
_defineProperty__default["default"](this, "latestHybridInfo", void 0);
|
|
36049
36182
|
/**
|
|
36050
36183
|
* This function is called from the connectionHandler when something happens during requesting rendering.
|
|
36051
36184
|
* Eg. there is no free renderClient
|
|
@@ -36251,7 +36384,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36251
36384
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36252
36385
|
case 0:
|
|
36253
36386
|
_context3.next = 2;
|
|
36254
|
-
return Promise.resolve().then(function () { return require('./Host3DSignalR-
|
|
36387
|
+
return Promise.resolve().then(function () { return require('./Host3DSignalR-908946a2.js'); });
|
|
36255
36388
|
case 2:
|
|
36256
36389
|
_yield$import = _context3.sent;
|
|
36257
36390
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -36343,7 +36476,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36343
36476
|
value: function onReceiveHQRenderScript(planningHash, hqRenderScriptString) {
|
|
36344
36477
|
if (!this.waitForHQRenderScript.has(planningHash)) return;
|
|
36345
36478
|
var hqRenderScript = this.waitForHQRenderScript.get(planningHash);
|
|
36346
|
-
|
|
36479
|
+
var hqr = JSON.parse(hqRenderScriptString);
|
|
36480
|
+
this.lastSavedHQRenderScript = hqr;
|
|
36347
36481
|
hqRenderScript.HqRenderScript = hqRenderScriptString;
|
|
36348
36482
|
this.hqRenderScriptCache.set(planningHash, hqRenderScript);
|
|
36349
36483
|
this.waitForHQRenderScript["delete"](planningHash);
|
|
@@ -36353,9 +36487,9 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36353
36487
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
36354
36488
|
var _step$value = _slicedToArray__default["default"](_step.value, 2),
|
|
36355
36489
|
key = _step$value[0],
|
|
36356
|
-
|
|
36357
|
-
if (!(
|
|
36358
|
-
if (
|
|
36490
|
+
_hqr = _step$value[1];
|
|
36491
|
+
if (!(_hqr !== null && _hqr !== void 0 && _hqr.CreationTime)) continue;
|
|
36492
|
+
if (_hqr.CreationTime < hqRenderScript.CreationTime) this.waitForHQRenderScript["delete"](key);
|
|
36359
36493
|
}
|
|
36360
36494
|
} catch (err) {
|
|
36361
36495
|
_iterator.e(err);
|
|
@@ -36704,7 +36838,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36704
36838
|
value: (function () {
|
|
36705
36839
|
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
|
|
36706
36840
|
var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
|
|
36707
|
-
var room, newRenderSize, doReloadWholePlanning,
|
|
36841
|
+
var room, newRenderSize, doReloadWholePlanning, hybridInfo, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, returnRequest;
|
|
36708
36842
|
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
|
|
36709
36843
|
while (1) switch (_context7.prev = _context7.next) {
|
|
36710
36844
|
case 0:
|
|
@@ -36717,23 +36851,32 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36717
36851
|
this.todoAfterLogin.request3D.doRequest3D = true;
|
|
36718
36852
|
return _context7.abrupt("return");
|
|
36719
36853
|
case 5:
|
|
36720
|
-
LOG$4.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
|
|
36721
36854
|
room = this.viewPointHandler.getCurRoomCodex();
|
|
36722
36855
|
newRenderSize = this.setRoomInfoInPlanningData(params.planningData, (_params$renderRequest = (_params$renderRequest2 = params.renderRequestInfos) === null || _params$renderRequest2 === void 0 ? void 0 : _params$renderRequest2.width) !== null && _params$renderRequest !== void 0 ? _params$renderRequest : 500, (_params$renderRequest3 = (_params$renderRequest4 = params.renderRequestInfos) === null || _params$renderRequest4 === void 0 ? void 0 : _params$renderRequest4.height) !== null && _params$renderRequest3 !== void 0 ? _params$renderRequest3 : 500, (_params$renderRequest5 = (_params$renderRequest6 = params.renderRequestInfos) === null || _params$renderRequest6 === void 0 ? void 0 : _params$renderRequest6.mediaServiceSaveMode) !== null && _params$renderRequest5 !== void 0 ? _params$renderRequest5 : undefined);
|
|
36723
36856
|
doReloadWholePlanning = true;
|
|
36724
36857
|
if (params.doRequestRendering) {
|
|
36725
36858
|
params.renderRequestInfos.width = newRenderSize.newRenderWidth;
|
|
36726
36859
|
params.renderRequestInfos.height = newRenderSize.newRenderHeight;
|
|
36727
|
-
if (params.renderRequestInfos.mediaServiceSaveMode == 'PERMANENT') doReloadWholePlanning = true;
|
|
36728
36860
|
}
|
|
36729
36861
|
|
|
36730
36862
|
//Check if viewPoint is changed based on alternateRendering
|
|
36731
36863
|
//Do check if viewpoint has to be changed
|
|
36732
36864
|
if (params.alternateRenderInfo && (params.alternateRenderInfo.overwrittenViewPointName || params.alternateRenderInfo.viewPointName)) this.handleStaticVP(params.alternateRenderInfo.overwrittenViewPointName ? params.alternateRenderInfo.overwrittenViewPointName : params.alternateRenderInfo.viewPointName);
|
|
36733
|
-
|
|
36734
|
-
|
|
36865
|
+
hybridInfo = params.hybrid3DInfo || !this.latestHybridInfo ? params.hybrid3DInfo : _objectSpread$6(_objectSpread$6({}, this.latestHybridInfo), {}, {
|
|
36866
|
+
focus: _objectSpread$6(_objectSpread$6({}, this.latestHybridInfo.focus), {}, {
|
|
36867
|
+
rotationCenter: this.currentCamera.targetPos,
|
|
36868
|
+
adjustZoomInUnity: true,
|
|
36869
|
+
onlyAdjustZoomBBChanged: true
|
|
36870
|
+
}),
|
|
36871
|
+
currentCamera: this.currentCamera
|
|
36872
|
+
}); //When we do need to adjust the zoom in unity based on Bbox changed - send last bboxinformation
|
|
36873
|
+
if (this.currRendering && hybridInfo && hybridInfo.focus.adjustZoomInUnity && hybridInfo.focus.onlyAdjustZoomBBChanged) {
|
|
36874
|
+
hybridInfo.bboxgeoInfoLastFrame = this.currRendering.getBBoxGeoFromUnity();
|
|
36875
|
+
}
|
|
36876
|
+
planningHash = DivaUtils.md5(JSON.stringify(params.planningData));
|
|
36735
36877
|
if (planningHash == this.lastFramePlanningHash) doReloadWholePlanning = false;
|
|
36736
36878
|
if (params.forceReloadPlanning || (_this$viewPointHandle = this.viewPointHandler.getCurRoomlistVP()) !== null && _this$viewPointHandle !== void 0 && _this$viewPointHandle.isStatic) doReloadWholePlanning = true;
|
|
36879
|
+
if (params.renderRequestInfos && params.renderRequestInfos.mediaServiceSaveMode == 'PERMANENT') doReloadWholePlanning = true;
|
|
36737
36880
|
this.lastFramePlanningHash = planningHash;
|
|
36738
36881
|
requestRenderingFrom3DHost = false;
|
|
36739
36882
|
requestHqRenderScriptFrom3DHost = false;
|
|
@@ -36760,7 +36903,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36760
36903
|
if (params.doRequestRendering) {
|
|
36761
36904
|
viewPointName = this.viewPointHandler.getCurViewPointToRender();
|
|
36762
36905
|
sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
|
|
36763
|
-
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(
|
|
36906
|
+
renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify(hybridInfo === null || hybridInfo === void 0 ? void 0 : hybridInfo.currentCamera));
|
|
36764
36907
|
this.lastRequestedRenderHash = renderHash;
|
|
36765
36908
|
LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
|
|
36766
36909
|
if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
|
|
@@ -36793,7 +36936,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36793
36936
|
}
|
|
36794
36937
|
}
|
|
36795
36938
|
if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
|
|
36796
|
-
_context7.next =
|
|
36939
|
+
_context7.next = 34;
|
|
36797
36940
|
break;
|
|
36798
36941
|
}
|
|
36799
36942
|
if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
|
|
@@ -36820,20 +36963,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36820
36963
|
viewPointInfo: this.viewPointHandler.getCurRoomlistVP(),
|
|
36821
36964
|
alternateRenderingsExist: params.alternateRenderingsExist,
|
|
36822
36965
|
alternateRenderInfo: params.alternateRenderInfo,
|
|
36823
|
-
|
|
36824
|
-
forceUseCam: !!camera
|
|
36966
|
+
hybrid3DInfo: hybridInfo
|
|
36825
36967
|
} : undefined
|
|
36826
36968
|
});
|
|
36827
|
-
if (
|
|
36969
|
+
if (hybridInfo !== null && hybridInfo !== void 0 && hybridInfo.currentCamera) this.currentCamera = hybridInfo === null || hybridInfo === void 0 ? void 0 : hybridInfo.currentCamera;
|
|
36970
|
+
if (hybridInfo) this.latestHybridInfo = hybridInfo;
|
|
36828
36971
|
if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
|
|
36829
|
-
_context7.next =
|
|
36972
|
+
_context7.next = 32;
|
|
36830
36973
|
break;
|
|
36831
36974
|
}
|
|
36832
36975
|
LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
|
|
36833
36976
|
code: 'WC_0013'
|
|
36834
36977
|
}));
|
|
36835
36978
|
return _context7.abrupt("return");
|
|
36836
|
-
case
|
|
36979
|
+
case 32:
|
|
36837
36980
|
if (requestHqRenderScriptFrom3DHost) {
|
|
36838
36981
|
if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
|
|
36839
36982
|
this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
|
|
@@ -36845,12 +36988,12 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36845
36988
|
if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
|
|
36846
36989
|
}
|
|
36847
36990
|
}
|
|
36848
|
-
case
|
|
36991
|
+
case 34:
|
|
36849
36992
|
return _context7.abrupt("return", {
|
|
36850
36993
|
planningHash: planningHash,
|
|
36851
36994
|
renderHash: renderHash
|
|
36852
36995
|
});
|
|
36853
|
-
case
|
|
36996
|
+
case 35:
|
|
36854
36997
|
case "end":
|
|
36855
36998
|
return _context7.stop();
|
|
36856
36999
|
}
|
|
@@ -37034,6 +37177,11 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37034
37177
|
value: function setOrigConfigurationCallback(callback) {
|
|
37035
37178
|
this.getOrigConfiguration = callback;
|
|
37036
37179
|
}
|
|
37180
|
+
}, {
|
|
37181
|
+
key: "updateCamPosition",
|
|
37182
|
+
value: function updateCamPosition(cam) {
|
|
37183
|
+
this.currentCamera = cam;
|
|
37184
|
+
}
|
|
37037
37185
|
}, {
|
|
37038
37186
|
key: "getLastSavedHQRenderScript",
|
|
37039
37187
|
value: function getLastSavedHQRenderScript() {
|
|
@@ -37093,7 +37241,8 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
37093
37241
|
_this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
|
|
37094
37242
|
connectionId: data.connectionId
|
|
37095
37243
|
});
|
|
37096
|
-
|
|
37244
|
+
var apllyConfiguratorSessionId = DivaUtils__default["default"].ConfigurationId ? '&configurationId=' + DivaUtils__default["default"].ConfigurationId : '';
|
|
37245
|
+
resolve(_this2.liveArViewerUrl + '?liveArConnectionId=' + data.connectionId + '&organizationId=' + _this2.renderSettings.OrganizationId + '&divaSessionId=' + DivaUtils__default["default"].SessionId + apllyConfiguratorSessionId);
|
|
37097
37246
|
});
|
|
37098
37247
|
_this2.liveArSocket.on('connect_error', function (err) {
|
|
37099
37248
|
return reject(err);
|
|
@@ -37566,7 +37715,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37566
37715
|
*/
|
|
37567
37716
|
_defineProperty__default["default"](this, "noRenderClientFound", function (doMakeRendering, doMakeHQRenderScript, width, height, isFullscreenRendering, planner3DGridEnabled, doShow3DDimensionLines, plannerMeasureDigits, alternateRendererInfo, alternateRenderingsExist) {
|
|
37568
37717
|
LOG$2.debug('noRenderClientFound - Request rendering again by sending all planningData');
|
|
37569
|
-
_this.request3D(doMakeRendering, doMakeHQRenderScript, !!alternateRenderingsExist, alternateRendererInfo, true, {
|
|
37718
|
+
_this.request3D(doMakeRendering, doMakeHQRenderScript, true, !!alternateRenderingsExist, alternateRendererInfo, true, {
|
|
37570
37719
|
width: width,
|
|
37571
37720
|
height: height,
|
|
37572
37721
|
isFullscreenRendering: isFullscreenRendering,
|
|
@@ -37598,7 +37747,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37598
37747
|
renderGroup = initSetState.api.get3DRenderGroup();
|
|
37599
37748
|
this.plannerHandlerFunctions = plannerHandlerFunctions;
|
|
37600
37749
|
diva3dServerUrl = initSetState.api.get3DServerUrl();
|
|
37601
|
-
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl(); //
|
|
37750
|
+
divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl(); //renderGroup = 'LeaTest';
|
|
37602
37751
|
//diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
|
|
37603
37752
|
// diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
|
|
37604
37753
|
//diva3dServerUrl = 'https://localhost:44315/';
|
|
@@ -37794,18 +37943,18 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
37794
37943
|
break;
|
|
37795
37944
|
case 8:
|
|
37796
37945
|
_context4.next = 10;
|
|
37797
|
-
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-
|
|
37946
|
+
return Promise.resolve().then(function () { return require('./DivaStandardPlanner-dbdb4ba0.js'); });
|
|
37798
37947
|
case 10:
|
|
37799
37948
|
_yield$import = _context4.sent;
|
|
37800
37949
|
DivaStandardPlanner = _yield$import["default"];
|
|
37801
|
-
planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.
|
|
37950
|
+
planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.enableAR, set.api.getDoDisablePlanner2D(), hasStaticBackground);
|
|
37802
37951
|
if (catalogData.isIDM3DCat) {
|
|
37803
37952
|
planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
|
|
37804
37953
|
}
|
|
37805
37954
|
return _context4.abrupt("break", 21);
|
|
37806
37955
|
case 15:
|
|
37807
37956
|
_context4.next = 17;
|
|
37808
|
-
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-
|
|
37957
|
+
return Promise.resolve().then(function () { return require('./DivaBoxPlanner-4789bc0a.js'); });
|
|
37809
37958
|
case 17:
|
|
37810
37959
|
_yield$import2 = _context4.sent;
|
|
37811
37960
|
DivaBoxPlanner = _yield$import2["default"];
|
|
@@ -38078,7 +38227,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38078
38227
|
case 0:
|
|
38079
38228
|
DivaUtils__default["default"].startSpanOfApm('DivaPlannerHandler saveSetHQRenderScript');
|
|
38080
38229
|
_context9.next = 3;
|
|
38081
|
-
return this.request3D(false, true);
|
|
38230
|
+
return this.request3D(false, true, true);
|
|
38082
38231
|
case 3:
|
|
38083
38232
|
hashes = _context9.sent;
|
|
38084
38233
|
if (hashes) {
|
|
@@ -38135,7 +38284,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38135
38284
|
break;
|
|
38136
38285
|
}
|
|
38137
38286
|
_context10.next = 4;
|
|
38138
|
-
return this.request3D(true, false, false, undefined, true, {
|
|
38287
|
+
return this.request3D(true, false, true, false, undefined, true, {
|
|
38139
38288
|
width: 100,
|
|
38140
38289
|
height: 100,
|
|
38141
38290
|
isFullscreenRendering: false,
|
|
@@ -38548,14 +38697,14 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38548
38697
|
key: "handle3DVisualizationChanged",
|
|
38549
38698
|
value: function handle3DVisualizationChanged(mode, params, doShow3DDimensionLines, alternateRenderingsExist) {
|
|
38550
38699
|
if (mode == 'Nav3DFullScreen') {
|
|
38551
|
-
this.request3D(true, false, alternateRenderingsExist, undefined, false, {
|
|
38700
|
+
this.request3D(true, false, true, alternateRenderingsExist, undefined, false, {
|
|
38552
38701
|
width: params.nav3DFullScreen.renderWidth,
|
|
38553
38702
|
height: params.nav3DFullScreen.renderHeight,
|
|
38554
38703
|
isFullscreenRendering: true,
|
|
38555
38704
|
planner3DGridEnabled: false,
|
|
38556
38705
|
mediaServiceSaveMode: 'STREAM',
|
|
38557
38706
|
doShow3DDimensionLines: !!doShow3DDimensionLines
|
|
38558
|
-
}, undefined
|
|
38707
|
+
}, undefined);
|
|
38559
38708
|
} else {
|
|
38560
38709
|
this.handler3D.handle3DVisualizationChanged(mode, params);
|
|
38561
38710
|
}
|
|
@@ -38588,7 +38737,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38588
38737
|
}, {
|
|
38589
38738
|
key: "request3D",
|
|
38590
38739
|
value: function () {
|
|
38591
|
-
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos,
|
|
38740
|
+
var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, useLatestCamera, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, hybrid3DInfo) {
|
|
38592
38741
|
var _this3 = this;
|
|
38593
38742
|
var plannerData, loadedCatData, plannerExists, savedSetId;
|
|
38594
38743
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
@@ -38659,7 +38808,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38659
38808
|
forceReloadPlanning: forceReloadPlanning,
|
|
38660
38809
|
alternateRenderInfo: alternateRenderInfo,
|
|
38661
38810
|
alternateRenderingsExist: alternateRenderingsExist,
|
|
38662
|
-
|
|
38811
|
+
hybrid3DInfo: hybrid3DInfo,
|
|
38663
38812
|
useLatestCamera: useLatestCamera
|
|
38664
38813
|
});
|
|
38665
38814
|
case 18:
|
|
@@ -38741,6 +38890,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38741
38890
|
value: function openARObserverConnection(handleNoHqrs) {
|
|
38742
38891
|
return this.handler3D.openARObserverConnection(handleNoHqrs);
|
|
38743
38892
|
}
|
|
38893
|
+
}, {
|
|
38894
|
+
key: "updateCamPosition",
|
|
38895
|
+
value: function updateCamPosition(cam) {
|
|
38896
|
+
return this.handler3D.updateCamPosition(cam);
|
|
38897
|
+
}
|
|
38744
38898
|
}]);
|
|
38745
38899
|
}();
|
|
38746
38900
|
|
|
@@ -39050,13 +39204,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39050
39204
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39051
39205
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newArticle.basketId);
|
|
39052
39206
|
if (!dontUpdateView) (_this$updateElementSe = _this.updateElementSelectionPlanner) === null || _this$updateElementSe === void 0 || _this$updateElementSe.call(_this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
39053
|
-
|
|
39054
|
-
_context3.next = 29;
|
|
39055
|
-
return _this.checkVariantData();
|
|
39056
|
-
case 29:
|
|
39207
|
+
_this.checkMatchingProducts('onAdd');
|
|
39057
39208
|
_this.plannerChangeLog('onAddPlanner');
|
|
39058
39209
|
return _context3.abrupt("return", 'ElementAdded');
|
|
39059
|
-
case
|
|
39210
|
+
case 29:
|
|
39060
39211
|
case "end":
|
|
39061
39212
|
return _context3.stop();
|
|
39062
39213
|
}
|
|
@@ -39104,8 +39255,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39104
39255
|
(_this$updateElementSe2 = _this.updateElementSelectionPlanner) === null || _this$updateElementSe2 === void 0 || _this$updateElementSe2.call(_this, [article.setId], [article.elementId], true);
|
|
39105
39256
|
_this.updatePriceInView();
|
|
39106
39257
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39258
|
+
_this.checkMatchingProducts('onSwitch');
|
|
39107
39259
|
_this.plannerChangeLog('onSwitchPlanner');
|
|
39108
|
-
case
|
|
39260
|
+
case 24:
|
|
39109
39261
|
case "end":
|
|
39110
39262
|
return _context4.stop();
|
|
39111
39263
|
}
|
|
@@ -39137,11 +39289,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39137
39289
|
(_this$updateViewPlann3 = _this.updateViewPlannerElements) === null || _this$updateViewPlann3 === void 0 || _this$updateViewPlann3.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39138
39290
|
_this.updatePlannerView('ADD_ACC_ON_SHELF_PLANNER');
|
|
39139
39291
|
}
|
|
39292
|
+
_this.checkMatchingProducts('onShelfAdd');
|
|
39140
39293
|
_this.plannerChangeLog('onAddPlanner');
|
|
39141
|
-
productHandlerInstance.updateProducts(_this.setsAsArray, _this.api, 'onShelfAdd');
|
|
39142
|
-
_this.checkVariantData();
|
|
39143
39294
|
return _context5.abrupt("return", retVal);
|
|
39144
|
-
case
|
|
39295
|
+
case 10:
|
|
39145
39296
|
case "end":
|
|
39146
39297
|
return _context5.stop();
|
|
39147
39298
|
}
|
|
@@ -39185,10 +39336,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39185
39336
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39186
39337
|
(_this$updateViewPlann5 = _this.updateViewPlannerElements) === null || _this$updateViewPlann5 === void 0 || _this$updateViewPlann5.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
|
|
39187
39338
|
_this.updatePlannerView('DELETE_ACC_ON_SHELF_PLANNER');
|
|
39339
|
+
_this.checkMatchingProducts('onShelfDelete');
|
|
39188
39340
|
_this.plannerChangeLog('onDeletePlanner');
|
|
39189
|
-
|
|
39190
|
-
_this.checkVariantData();
|
|
39191
|
-
case 12:
|
|
39341
|
+
case 11:
|
|
39192
39342
|
case "end":
|
|
39193
39343
|
return _context6.stop();
|
|
39194
39344
|
}
|
|
@@ -39261,10 +39411,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39261
39411
|
_this.updatePlannerView('UPDATE_ACC_QUANTITY');
|
|
39262
39412
|
_this.updatePriceInView();
|
|
39263
39413
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39264
|
-
|
|
39265
|
-
_this.checkVariantData();
|
|
39414
|
+
_this.checkMatchingProducts('onAccessoireUpdate');
|
|
39266
39415
|
_this.plannerChangeLog('onUpdateAccessoireQuantity');
|
|
39267
|
-
case
|
|
39416
|
+
case 12:
|
|
39268
39417
|
case "end":
|
|
39269
39418
|
return _context8.stop();
|
|
39270
39419
|
}
|
|
@@ -39292,11 +39441,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39292
39441
|
_this.updatePriceInView();
|
|
39293
39442
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39294
39443
|
}
|
|
39295
|
-
|
|
39296
|
-
_this.checkVariantData();
|
|
39444
|
+
_this.checkMatchingProducts('onAccessoireDelete');
|
|
39297
39445
|
_this.plannerChangeLog('onDeletePlanner');
|
|
39298
39446
|
return _context9.abrupt("return", wasDeleted);
|
|
39299
|
-
case
|
|
39447
|
+
case 8:
|
|
39300
39448
|
case "end":
|
|
39301
39449
|
return _context9.stop();
|
|
39302
39450
|
}
|
|
@@ -39378,10 +39526,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39378
39526
|
returnValues = _context11.sent;
|
|
39379
39527
|
(_this$actions14 = _this.actions) === null || _this$actions14 === void 0 || (_this$actions14$toggl = _this$actions14.toggleLoading) === null || _this$actions14$toggl === void 0 || _this$actions14$toggl.call(_this$actions14, 'doConfigure', false, false);
|
|
39380
39528
|
structure = setHandlerInstance.loadConfigStructureOfActSet(set, _this.getCurPlannerType());
|
|
39381
|
-
|
|
39382
|
-
_this.checkVariantData();
|
|
39529
|
+
_this.checkMatchingProducts('onConfig');
|
|
39383
39530
|
if (dontUpdatePlannerView) {
|
|
39384
|
-
_context11.next =
|
|
39531
|
+
_context11.next = 18;
|
|
39385
39532
|
break;
|
|
39386
39533
|
}
|
|
39387
39534
|
_this.updateConfiguratorStructure(structure);
|
|
@@ -39395,18 +39542,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39395
39542
|
_this.updateViewButtonsDependigOnConfigStructure();
|
|
39396
39543
|
_this.updatePlannerView('DO_CONFIGURE', myValues);
|
|
39397
39544
|
_this.updateWebConfiguratorTitle();
|
|
39398
|
-
_context11.next =
|
|
39545
|
+
_context11.next = 18;
|
|
39399
39546
|
return _this.getFreePlacesOnGrids(undefined, 'doConfigure');
|
|
39400
|
-
case
|
|
39547
|
+
case 18:
|
|
39401
39548
|
if (dontCallEvents) {
|
|
39402
|
-
_context11.next =
|
|
39549
|
+
_context11.next = 21;
|
|
39403
39550
|
break;
|
|
39404
39551
|
}
|
|
39405
|
-
_context11.next =
|
|
39552
|
+
_context11.next = 21;
|
|
39406
39553
|
return _this.fillBaksetforOnWebPlanerConfigChange(myValues);
|
|
39554
|
+
case 21:
|
|
39555
|
+
_this.configuratorChangeLog('onConfiguratorStep', myValues);
|
|
39407
39556
|
case 22:
|
|
39408
|
-
_this.configuratorChangeLog('onConfiguratorStep');
|
|
39409
|
-
case 23:
|
|
39410
39557
|
case "end":
|
|
39411
39558
|
return _context11.stop();
|
|
39412
39559
|
}
|
|
@@ -39506,7 +39653,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39506
39653
|
key: "initialize",
|
|
39507
39654
|
value: function () {
|
|
39508
39655
|
var _initialize = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
|
|
39509
|
-
var viewReadyPromise, loadSuccessful,
|
|
39656
|
+
var viewReadyPromise, loadSuccessful, _this$actions16, _set$getDivaArticles, _this$actions15, _this$actions15$toggl, initSetState, set, oldProductId, result, _this$actions17, catalogData, initializationId, _this$plannerConfig$a;
|
|
39510
39657
|
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
|
|
39511
39658
|
while (1) switch (_context13.prev = _context13.next) {
|
|
39512
39659
|
case 0:
|
|
@@ -39531,71 +39678,63 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39531
39678
|
return this.divaBasketHandler.initializeBasket(this.api);
|
|
39532
39679
|
case 12:
|
|
39533
39680
|
loadSuccessful = _context13.sent;
|
|
39681
|
+
if (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils__default["default"].businessMetrics.getConfiguratorSessionId() == undefined) {
|
|
39682
|
+
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
39683
|
+
}
|
|
39534
39684
|
if (!loadSuccessful) {
|
|
39535
|
-
_context13.next =
|
|
39685
|
+
_context13.next = 56;
|
|
39536
39686
|
break;
|
|
39537
39687
|
}
|
|
39538
39688
|
if (!(typeof loadSuccessful != 'boolean')) {
|
|
39539
|
-
_context13.next =
|
|
39689
|
+
_context13.next = 24;
|
|
39540
39690
|
break;
|
|
39541
39691
|
}
|
|
39542
39692
|
if (!(loadSuccessful.type == 'ProductList')) {
|
|
39543
|
-
_context13.next =
|
|
39693
|
+
_context13.next = 24;
|
|
39544
39694
|
break;
|
|
39545
39695
|
}
|
|
39546
|
-
_context13.next =
|
|
39696
|
+
_context13.next = 19;
|
|
39547
39697
|
return viewReadyPromise;
|
|
39548
|
-
case
|
|
39549
|
-
_context13.next =
|
|
39698
|
+
case 19:
|
|
39699
|
+
_context13.next = 21;
|
|
39550
39700
|
return this.initView();
|
|
39551
|
-
case
|
|
39701
|
+
case 21:
|
|
39552
39702
|
this.subscribeToWebPlannerEvents();
|
|
39553
39703
|
(_this$actions15 = this.actions) === null || _this$actions15 === void 0 || (_this$actions15$toggl = _this$actions15.toggleLoading) === null || _this$actions15$toggl === void 0 || _this$actions15$toggl.call(_this$actions15, 'Planner_Loading', false, false);
|
|
39554
39704
|
return _context13.abrupt("return", true);
|
|
39555
|
-
case
|
|
39556
|
-
_context13.next = 26;
|
|
39557
|
-
break;
|
|
39558
|
-
case 25:
|
|
39559
|
-
if (this.api.doCheckForProductsPrice()) ;
|
|
39560
|
-
case 26:
|
|
39705
|
+
case 24:
|
|
39561
39706
|
this.divaNr = this.divaBasketHandler.actDivaNr;
|
|
39562
39707
|
initSetState = this.getInitStateForSet();
|
|
39563
39708
|
this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
|
|
39564
|
-
_context13.next =
|
|
39709
|
+
_context13.next = 29;
|
|
39565
39710
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
39566
|
-
case
|
|
39711
|
+
case 29:
|
|
39567
39712
|
set = this.actSet();
|
|
39568
|
-
|
|
39569
|
-
|
|
39570
|
-
break;
|
|
39571
|
-
}
|
|
39572
|
-
if (!(typeof loadSuccessful != 'boolean' && loadSuccessful.type == 'ProductId')) {
|
|
39713
|
+
oldProductId = this.divaBasketHandler.actBasket.MatchingProductId || this.divaBasketHandler.actBasket.OrigProductId;
|
|
39714
|
+
if (!(oldProductId && set)) {
|
|
39573
39715
|
_context13.next = 38;
|
|
39574
39716
|
break;
|
|
39575
39717
|
}
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39718
|
+
_context13.next = 34;
|
|
39719
|
+
return this.divaBasketHandler.getProduct(this.api, oldProductId);
|
|
39720
|
+
case 34:
|
|
39721
|
+
result = _context13.sent;
|
|
39722
|
+
if (result) productHandlerInstance.handleFountMatchingProducts(set, [result], set.setHash);
|
|
39723
|
+
_context13.next = 39;
|
|
39579
39724
|
break;
|
|
39580
39725
|
case 38:
|
|
39581
|
-
if (
|
|
39582
|
-
|
|
39583
|
-
|
|
39726
|
+
if (typeof loadSuccessful != 'boolean' && set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
39727
|
+
if (loadSuccessful.type != 'ProductList') {
|
|
39728
|
+
productHandlerInstance.handleFountMatchingProducts(set, [loadSuccessful], set.setHash);
|
|
39729
|
+
}
|
|
39584
39730
|
}
|
|
39731
|
+
case 39:
|
|
39585
39732
|
_context13.next = 41;
|
|
39586
|
-
return this.divaBasketHandler.getProduct(this.api, this.divaBasketHandler.actBasket.OrigProductId);
|
|
39587
|
-
case 41:
|
|
39588
|
-
result = _context13.sent;
|
|
39589
|
-
if (result) {
|
|
39590
|
-
set === null || set === void 0 || set.remindPriceForHash(result);
|
|
39591
|
-
}
|
|
39592
|
-
case 43:
|
|
39593
|
-
_context13.next = 45;
|
|
39594
39733
|
return viewReadyPromise;
|
|
39595
|
-
case
|
|
39596
|
-
_context13.next =
|
|
39734
|
+
case 41:
|
|
39735
|
+
_context13.next = 43;
|
|
39597
39736
|
return this.initView();
|
|
39598
|
-
case
|
|
39737
|
+
case 43:
|
|
39599
39738
|
(_this$actions16 = this.actions) === null || _this$actions16 === void 0 || _this$actions16.onEvent({
|
|
39600
39739
|
type: 'onConfiguratorReady'
|
|
39601
39740
|
});
|
|
@@ -39607,9 +39746,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39607
39746
|
this.subscribeToWebPlannerEvents();
|
|
39608
39747
|
this.divaBasketHandler.actBasket;
|
|
39609
39748
|
catalogData = set === null || set === void 0 ? void 0 : set.CatalogData;
|
|
39610
|
-
if (!this.divaBasketHandler.hasConfiguratorSessionIdGetter || DivaUtils__default["default"].businessMetrics.getConfiguratorSessionId() == undefined) {
|
|
39611
|
-
DivaUtils__default["default"].businessMetrics.setConfiguratorSessionId();
|
|
39612
|
-
}
|
|
39613
39749
|
initializationId = undefined;
|
|
39614
39750
|
if (this.divaBasketHandler.initializationTypeGetter == 'PRODUCT_ID') {
|
|
39615
39751
|
//KONFIGURATOR LOADED BY PRODUCT. LOG THIS HERE! WITH PRODUCT NAME AND PRODUCT ID
|
|
@@ -39626,23 +39762,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39626
39762
|
catalogCodex: catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogCodex,
|
|
39627
39763
|
catalogName: catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogName,
|
|
39628
39764
|
accountName: catalogData === null || catalogData === void 0 ? void 0 : catalogData.accountName,
|
|
39629
|
-
supplierId: catalogData === null || catalogData === void 0 ? void 0 : catalogData.
|
|
39765
|
+
supplierId: catalogData === null || catalogData === void 0 ? void 0 : catalogData.accountGuid,
|
|
39630
39766
|
plannerInitialization: this.divaBasketHandler.initializationTypeGetter,
|
|
39631
39767
|
productGroup: catalogData === null || catalogData === void 0 ? void 0 : catalogData.mainCategory,
|
|
39632
39768
|
hasPlannerInitialization: this.initMode ? false : true,
|
|
39633
39769
|
initializationType: this.divaBasketHandler.initializationTypeGetter,
|
|
39634
39770
|
initializationId: initializationId
|
|
39635
39771
|
}, false);
|
|
39636
|
-
_context13.next =
|
|
39772
|
+
_context13.next = 53;
|
|
39637
39773
|
return this.fillBaksetforOnWebPlanerConfigChange(undefined, true);
|
|
39638
|
-
case
|
|
39774
|
+
case 53:
|
|
39639
39775
|
return _context13.abrupt("return", true);
|
|
39640
|
-
case
|
|
39776
|
+
case 56:
|
|
39641
39777
|
this.onInitializationError();
|
|
39642
39778
|
//fehler beim laden vom basket..
|
|
39643
39779
|
LOG$1.errorTransaction('LOADING_BASKET', 'BASKET_0002', 'Fehler beim Laden des Baskets', {}, true);
|
|
39644
39780
|
return _context13.abrupt("return", false);
|
|
39645
|
-
case
|
|
39781
|
+
case 59:
|
|
39646
39782
|
case "end":
|
|
39647
39783
|
return _context13.stop();
|
|
39648
39784
|
}
|
|
@@ -39804,7 +39940,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39804
39940
|
break;
|
|
39805
39941
|
}
|
|
39806
39942
|
(_this$initConfigurato = this.initConfiguratorStructure) === null || _this$initConfigurato === void 0 || _this$initConfigurato.call(this, setHandlerInstance.loadConfigStructureForOnlyProductsList());
|
|
39807
|
-
_context15.next =
|
|
39943
|
+
_context15.next = 17;
|
|
39808
39944
|
break;
|
|
39809
39945
|
case 7:
|
|
39810
39946
|
_context15.next = 9;
|
|
@@ -39819,12 +39955,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39819
39955
|
(_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
|
|
39820
39956
|
this.updatePlannerView('INIT_VIEW');
|
|
39821
39957
|
this.onBasketInitialized();
|
|
39822
|
-
|
|
39823
|
-
|
|
39824
|
-
|
|
39825
|
-
_context15.next = 20;
|
|
39958
|
+
this.checkMatchingProducts('onInit');
|
|
39959
|
+
case 17:
|
|
39960
|
+
_context15.next = 19;
|
|
39826
39961
|
return this.runInitMode(plannerMode);
|
|
39827
|
-
case
|
|
39962
|
+
case 19:
|
|
39828
39963
|
case "end":
|
|
39829
39964
|
return _context15.stop();
|
|
39830
39965
|
}
|
|
@@ -39850,39 +39985,36 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39850
39985
|
key: "runInitMode",
|
|
39851
39986
|
value: function () {
|
|
39852
39987
|
var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
|
|
39853
|
-
var _this$navigateToTabGr2;
|
|
39854
|
-
var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
39988
|
+
var doDefault, _this$navigateToTabGr2, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
|
|
39855
39989
|
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
|
|
39856
39990
|
while (1) switch (_context16.prev = _context16.next) {
|
|
39857
39991
|
case 0:
|
|
39858
39992
|
doDefault = true;
|
|
39859
|
-
if (!this.plannerConfig.initMode) {
|
|
39860
|
-
_context16.next =
|
|
39993
|
+
if (!(this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER' || this.plannerConfig.initMode == 'SHOW_PDF')) {
|
|
39994
|
+
_context16.next = 10;
|
|
39861
39995
|
break;
|
|
39862
39996
|
}
|
|
39863
|
-
_context16.t0 = this.plannerConfig.initMode;
|
|
39864
|
-
_context16.next = _context16.t0 === 'OPEN_LEAFLET_BARRIER' ? 5 : _context16.t0 === 'SHOW_PDF' ? 5 : _context16.t0 === 'OPENCONFIGTABGROUP' ? 12 : 15;
|
|
39865
|
-
break;
|
|
39866
|
-
case 5:
|
|
39867
39997
|
if (this.plannerConfig.initMode == 'OPEN_LEAFLET_BARRIER') this.ReturnTo = 'OPEN_LEAFLET_BARRIER';
|
|
39868
39998
|
if (this.plannerConfig.initMode == 'SHOW_PDF') this.ReturnTo = 'OPEN_PDF';
|
|
39869
39999
|
(_this$navigateToTabGr2 = this.navigateToTabGroup) === null || _this$navigateToTabGr2 === void 0 || _this$navigateToTabGr2.call(this, 'SUMMARY', undefined, true);
|
|
39870
40000
|
//TODO lea bug das hier ist nur ein temporäre lößung https://app.asana.com/0/1200869909950432/1200998848659806
|
|
39871
|
-
_context16.next =
|
|
40001
|
+
_context16.next = 7;
|
|
39872
40002
|
return this.saveToBasketWrapper();
|
|
39873
|
-
case
|
|
40003
|
+
case 7:
|
|
39874
40004
|
doDefault = false;
|
|
39875
|
-
|
|
39876
|
-
|
|
39877
|
-
|
|
39878
|
-
if (
|
|
39879
|
-
this.
|
|
39880
|
-
|
|
39881
|
-
|
|
39882
|
-
|
|
40005
|
+
_context16.next = 11;
|
|
40006
|
+
break;
|
|
40007
|
+
case 10:
|
|
40008
|
+
if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER') {
|
|
40009
|
+
configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
|
|
40010
|
+
if (configStepKey) {
|
|
40011
|
+
this.navigateToConfigStep(configStepKey, !this.plannerConfig.opt, true);
|
|
40012
|
+
doDefault = false;
|
|
40013
|
+
} else {
|
|
40014
|
+
LOG$1.warn('Option: ' + this.plannerConfig.opt + ' could not be found');
|
|
40015
|
+
}
|
|
39883
40016
|
}
|
|
39884
|
-
|
|
39885
|
-
case 15:
|
|
40017
|
+
case 11:
|
|
39886
40018
|
if (doDefault) {
|
|
39887
40019
|
if (plannerMode == 'ProductList') {
|
|
39888
40020
|
(_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
|
|
@@ -39892,7 +40024,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39892
40024
|
(_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
|
|
39893
40025
|
}
|
|
39894
40026
|
}
|
|
39895
|
-
case
|
|
40027
|
+
case 12:
|
|
39896
40028
|
case "end":
|
|
39897
40029
|
return _context16.stop();
|
|
39898
40030
|
}
|
|
@@ -39936,7 +40068,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
39936
40068
|
_context17.next = 15;
|
|
39937
40069
|
return setHandlerInstance.addOrderSetArticlesToExistingSet(loadedSet, orderset, lastSetToInitialize);
|
|
39938
40070
|
case 15:
|
|
39939
|
-
|
|
40071
|
+
this.checkMatchingProducts('onAdd');
|
|
39940
40072
|
_context17.next = 20;
|
|
39941
40073
|
break;
|
|
39942
40074
|
case 18:
|
|
@@ -40044,7 +40176,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40044
40176
|
*/
|
|
40045
40177
|
}, {
|
|
40046
40178
|
key: "updatePlannerView",
|
|
40047
|
-
value: function updatePlannerView(callingFrom, onDoConfigureValues,
|
|
40179
|
+
value: function updatePlannerView(callingFrom, onDoConfigureValues, hybridInfo) {
|
|
40048
40180
|
var _this$getCurrentAlter, _set$getAlternateRend, _this$getDoShow3DDime2, _this$getDoShow3DDime3, _this$getDoShow3DDime4;
|
|
40049
40181
|
var set = this.actSet();
|
|
40050
40182
|
if (!set) return;
|
|
@@ -40081,12 +40213,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40081
40213
|
LOG$1.debug('lvl 1: ', this.getCurPlannerViewMode());
|
|
40082
40214
|
switch (this.getCurPlannerViewMode()) {
|
|
40083
40215
|
case '3DCOMB':
|
|
40084
|
-
setHandlerInstance.update3DPlannerView(true,
|
|
40216
|
+
setHandlerInstance.update3DPlannerView(true, !hybridInfo || hybridInfo && hybridInfo.focus.adjustZoomInUnity, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, hybridInfo ? {
|
|
40217
|
+
focus: hybridInfo.focus,
|
|
40218
|
+
forceRTCam: true,
|
|
40219
|
+
currentCamera: hybridInfo.currentCamera
|
|
40220
|
+
} : undefined);
|
|
40085
40221
|
break;
|
|
40086
40222
|
case 'RTViewer':
|
|
40087
40223
|
//Request HQRenderscript + rendering
|
|
40088
40224
|
//Request new Rendering
|
|
40089
|
-
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo,
|
|
40225
|
+
setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo, undefined);
|
|
40090
40226
|
break;
|
|
40091
40227
|
case '3DImage':
|
|
40092
40228
|
//Request new Rendering
|
|
@@ -40175,13 +40311,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40175
40311
|
if (result.selectElementId) (_this$updateElementSe5 = this.updateElementSelectionPlanner) === null || _this$updateElementSe5 === void 0 || _this$updateElementSe5.call(this, [result.setId], [result.selectElementId], true);else (_this$updateElementSe6 = this.updateElementSelectionPlanner) === null || _this$updateElementSe6 === void 0 || _this$updateElementSe6.call(this, [], [], true);
|
|
40176
40312
|
}
|
|
40177
40313
|
this.updatePriceInView();
|
|
40178
|
-
|
|
40179
|
-
|
|
40180
|
-
_context19.next = 15;
|
|
40314
|
+
this.checkMatchingProducts('onDelete');
|
|
40315
|
+
_context19.next = 14;
|
|
40181
40316
|
return this.getFreePlacesOnGrids(undefined, 'deleteElement');
|
|
40182
|
-
case
|
|
40317
|
+
case 14:
|
|
40183
40318
|
this.plannerChangeLog('onDeletePlanner');
|
|
40184
|
-
case
|
|
40319
|
+
case 15:
|
|
40185
40320
|
case "end":
|
|
40186
40321
|
return _context19.stop();
|
|
40187
40322
|
}
|
|
@@ -40224,12 +40359,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40224
40359
|
baseArticle = setHandlerInstance.getBaseParentArticleOfAccessoire(set, newSelectedArticle.basketId);
|
|
40225
40360
|
(_this$updateElementSe7 = this.updateElementSelectionPlanner) === null || _this$updateElementSe7 === void 0 || _this$updateElementSe7.call(this, [baseArticle.setId], [baseArticle.elementId], true);
|
|
40226
40361
|
}
|
|
40227
|
-
|
|
40228
|
-
_context20.next = 14;
|
|
40229
|
-
return this.checkVariantData();
|
|
40230
|
-
case 14:
|
|
40362
|
+
this.checkMatchingProducts('onCopy');
|
|
40231
40363
|
return _context20.abrupt("return", newConfigStepKey);
|
|
40232
|
-
case
|
|
40364
|
+
case 13:
|
|
40233
40365
|
case "end":
|
|
40234
40366
|
return _context20.stop();
|
|
40235
40367
|
}
|
|
@@ -40387,36 +40519,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40387
40519
|
}
|
|
40388
40520
|
return resetArticle;
|
|
40389
40521
|
}()
|
|
40390
|
-
}, {
|
|
40391
|
-
key: "checkVariantData",
|
|
40392
|
-
value: function () {
|
|
40393
|
-
var _checkVariantData = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24() {
|
|
40394
|
-
var somethingChanged;
|
|
40395
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
|
|
40396
|
-
while (1) switch (_context24.prev = _context24.next) {
|
|
40397
|
-
case 0:
|
|
40398
|
-
if (!this.api.getDoCheckVariantData()) {
|
|
40399
|
-
_context24.next = 5;
|
|
40400
|
-
break;
|
|
40401
|
-
}
|
|
40402
|
-
_context24.next = 3;
|
|
40403
|
-
return setHandlerInstance.checkVariantData(this.actSet());
|
|
40404
|
-
case 3:
|
|
40405
|
-
somethingChanged = _context24.sent;
|
|
40406
|
-
if (somethingChanged) {
|
|
40407
|
-
this.updatePriceInView();
|
|
40408
|
-
}
|
|
40409
|
-
case 5:
|
|
40410
|
-
case "end":
|
|
40411
|
-
return _context24.stop();
|
|
40412
|
-
}
|
|
40413
|
-
}, _callee24, this);
|
|
40414
|
-
}));
|
|
40415
|
-
function checkVariantData() {
|
|
40416
|
-
return _checkVariantData.apply(this, arguments);
|
|
40417
|
-
}
|
|
40418
|
-
return checkVariantData;
|
|
40419
|
-
}()
|
|
40420
40522
|
}, {
|
|
40421
40523
|
key: "defineArticlesOnOptions",
|
|
40422
40524
|
value: function defineArticlesOnOptions(basketIdsOnOptions) {
|
|
@@ -40439,7 +40541,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40439
40541
|
var _this$actSet8;
|
|
40440
40542
|
(_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
|
|
40441
40543
|
}
|
|
40442
|
-
|
|
40544
|
+
}, {
|
|
40545
|
+
key: "checkMatchingProducts",
|
|
40546
|
+
value: function () {
|
|
40547
|
+
var _checkMatchingProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee24(from) {
|
|
40548
|
+
var set, _set$getMatchingProdu, _set$getMatchingOrigP, _set$getMatchingOrigP2, _set$getMatchingProdu2;
|
|
40549
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee24$(_context24) {
|
|
40550
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
40551
|
+
case 0:
|
|
40552
|
+
set = this.actSet();
|
|
40553
|
+
if (set !== null && set !== void 0 && set.api.doCheckForProductsPrice()) {
|
|
40554
|
+
if (((_set$getMatchingProdu = set.getMatchingProduct()) === null || _set$getMatchingProdu === void 0 ? void 0 : _set$getMatchingProdu.setHash) !== set.setHash) {
|
|
40555
|
+
set.setMatchingProduct();
|
|
40556
|
+
this.updatePriceInView();
|
|
40557
|
+
}
|
|
40558
|
+
if (set.getMatchingOrigProduct() && ((_set$getMatchingOrigP = set.getMatchingOrigProduct()) === null || _set$getMatchingOrigP === void 0 ? void 0 : _set$getMatchingOrigP.setHash) === set.setHash && ((_set$getMatchingOrigP2 = set.getMatchingOrigProduct()) === null || _set$getMatchingOrigP2 === void 0 ? void 0 : _set$getMatchingOrigP2.setHash) !== ((_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2.setHash)) {
|
|
40559
|
+
set.setMatchingProduct(set.getMatchingOrigProduct());
|
|
40560
|
+
this.updatePriceInView();
|
|
40561
|
+
}
|
|
40562
|
+
}
|
|
40563
|
+
if (!(set !== null && set !== void 0 && set.api.doCheckForProductsMatch())) {
|
|
40564
|
+
_context24.next = 6;
|
|
40565
|
+
break;
|
|
40566
|
+
}
|
|
40567
|
+
_context24.next = 5;
|
|
40568
|
+
return productHandlerInstance.updateProducts(this.setsAsArray, this.api, this.divaBasketHandler.divaWWSHandler, from);
|
|
40569
|
+
case 5:
|
|
40570
|
+
this.updatePriceInView();
|
|
40571
|
+
case 6:
|
|
40572
|
+
case "end":
|
|
40573
|
+
return _context24.stop();
|
|
40574
|
+
}
|
|
40575
|
+
}, _callee24, this);
|
|
40576
|
+
}));
|
|
40577
|
+
function checkMatchingProducts(_x64) {
|
|
40578
|
+
return _checkMatchingProducts.apply(this, arguments);
|
|
40579
|
+
}
|
|
40580
|
+
return checkMatchingProducts;
|
|
40581
|
+
}()
|
|
40443
40582
|
/**
|
|
40444
40583
|
* Updated the Price in the View.
|
|
40445
40584
|
* Should always be called after something was changed!
|
|
@@ -40449,7 +40588,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40449
40588
|
value: function updatePriceInView() {
|
|
40450
40589
|
var _this$updatePrice;
|
|
40451
40590
|
setHandlerInstance.getActSetPriceFormat(this.actSet());
|
|
40452
|
-
(_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.
|
|
40591
|
+
(_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets));
|
|
40453
40592
|
}
|
|
40454
40593
|
|
|
40455
40594
|
/**
|
|
@@ -40619,7 +40758,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40619
40758
|
}
|
|
40620
40759
|
}, _callee25, this);
|
|
40621
40760
|
}));
|
|
40622
|
-
function saveToBasketWrapper(
|
|
40761
|
+
function saveToBasketWrapper(_x65, _x66, _x67) {
|
|
40623
40762
|
return _saveToBasketWrapper.apply(this, arguments);
|
|
40624
40763
|
}
|
|
40625
40764
|
return saveToBasketWrapper;
|
|
@@ -40628,7 +40767,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40628
40767
|
key: "saveToBasket",
|
|
40629
40768
|
value: function () {
|
|
40630
40769
|
var _saveToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee26(event, repairOnly, force) {
|
|
40631
|
-
var _returnTo, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34;
|
|
40770
|
+
var _returnTo, _returnTo2, _returnTo3, _this$actions32, _this$actions33, _this$actions34, _this$divaBasketHandl2;
|
|
40632
40771
|
var set, actBasket, returnTo, oldReturnTo, result, newDivaNr, _result2, product;
|
|
40633
40772
|
return _regeneratorRuntime__default["default"].wrap(function _callee26$(_context26) {
|
|
40634
40773
|
while (1) switch (_context26.prev = _context26.next) {
|
|
@@ -40746,7 +40885,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40746
40885
|
return _context26.abrupt("break", 52);
|
|
40747
40886
|
case 52:
|
|
40748
40887
|
if (returnTo == 'DONT_SAVE_BASKET') event = 'dontSaveBasket';
|
|
40749
|
-
actBasket = this.divaBasketHandler.getBasketData(actBasket.DivaNr); //get pdf documenturl from saved basket
|
|
40888
|
+
actBasket = (_this$divaBasketHandl2 = this.divaBasketHandler.getBasketData(actBasket.DivaNr, actBasket.DocumentVersion)) !== null && _this$divaBasketHandl2 !== void 0 ? _this$divaBasketHandl2 : actBasket; //get pdf documenturl from saved basket
|
|
40750
40889
|
_context26.next = 56;
|
|
40751
40890
|
return this.addToBasket(actBasket, event);
|
|
40752
40891
|
case 56:
|
|
@@ -40758,7 +40897,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40758
40897
|
}
|
|
40759
40898
|
}, _callee26, this);
|
|
40760
40899
|
}));
|
|
40761
|
-
function saveToBasket(
|
|
40900
|
+
function saveToBasket(_x68, _x69, _x70) {
|
|
40762
40901
|
return _saveToBasket.apply(this, arguments);
|
|
40763
40902
|
}
|
|
40764
40903
|
return saveToBasket;
|
|
@@ -40811,6 +40950,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40811
40950
|
plannerType = 'PLANNER';
|
|
40812
40951
|
}
|
|
40813
40952
|
}
|
|
40953
|
+
if (plannerType === 'JUMP_OVER_PLANNER') {
|
|
40954
|
+
ret = 'PLANNER';
|
|
40955
|
+
plannerType = undefined;
|
|
40956
|
+
}
|
|
40814
40957
|
if (plannerType === 'CUSTOMER_OPTIMIZED_PLANNER') {
|
|
40815
40958
|
var _set$CatalogData$allC;
|
|
40816
40959
|
var optimizationReason = undefined;
|
|
@@ -40896,8 +41039,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40896
41039
|
}, {
|
|
40897
41040
|
key: "doAllowSetPlanner",
|
|
40898
41041
|
value: function doAllowSetPlanner() {
|
|
40899
|
-
var _this$returnTo, _this$
|
|
40900
|
-
return this.api.doAllowSetPlanner() || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$
|
|
41042
|
+
var _this$returnTo, _this$divaBasketHandl3;
|
|
41043
|
+
return this.api.doAllowSetPlanner() || ((_this$returnTo = this.returnTo) === null || _this$returnTo === void 0 ? void 0 : _this$returnTo.startsWith('SETPLANNER')) || !!((_this$divaBasketHandl3 = this.divaBasketHandler) !== null && _this$divaBasketHandl3 !== void 0 && (_this$divaBasketHandl3 = _this$divaBasketHandl3.actBasket) !== null && _this$divaBasketHandl3 !== void 0 && _this$divaBasketHandl3.SetPlannerInfos);
|
|
40901
41044
|
}
|
|
40902
41045
|
}, {
|
|
40903
41046
|
key: "doShow3DDimensionLines",
|
|
@@ -40934,18 +41077,18 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
40934
41077
|
}, {
|
|
40935
41078
|
key: "getAllowRTV",
|
|
40936
41079
|
value: function getAllowRTV() {
|
|
40937
|
-
var _this$actSet22, _this$actSet23;
|
|
41080
|
+
var _this$state3, _this$actSet22, _this$state4, _this$actSet23;
|
|
40938
41081
|
if (this.getEnableUnityRtvKombi()) return false;
|
|
40939
|
-
if (this.
|
|
41082
|
+
if ((_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.organization.settings.forceRTV) return true;
|
|
40940
41083
|
if ((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaForceRTV) return true;
|
|
40941
|
-
if (this.
|
|
41084
|
+
if ((_this$state4 = this.state) !== null && _this$state4 !== void 0 && _this$state4.organization.settings.enableRTV && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
|
|
40942
41085
|
return false;
|
|
40943
41086
|
}
|
|
40944
41087
|
}, {
|
|
40945
|
-
key: "
|
|
40946
|
-
value: function
|
|
41088
|
+
key: "getAllowQRCodeAR",
|
|
41089
|
+
value: function getAllowQRCodeAR() {
|
|
40947
41090
|
var _this$actSet24;
|
|
40948
|
-
if (this.api.
|
|
41091
|
+
if (this.api.enableAR && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
|
|
40949
41092
|
return false;
|
|
40950
41093
|
}
|
|
40951
41094
|
}, {
|
|
@@ -41023,7 +41166,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41023
41166
|
_this$actions37,
|
|
41024
41167
|
_this$actions38,
|
|
41025
41168
|
_this$actions39,
|
|
41026
|
-
_this$
|
|
41169
|
+
_this$divaBasketHandl4,
|
|
41027
41170
|
_this3 = this,
|
|
41028
41171
|
_this$actions40,
|
|
41029
41172
|
_this$actions41,
|
|
@@ -41075,7 +41218,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41075
41218
|
});
|
|
41076
41219
|
return _context28.abrupt("break", 32);
|
|
41077
41220
|
case 15:
|
|
41078
|
-
emailConfig = (_this$
|
|
41221
|
+
emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
|
|
41079
41222
|
this.divaBasketHandler.emailConfig = undefined;
|
|
41080
41223
|
if (emailConfig) {
|
|
41081
41224
|
to = (_emailConfig$to$split = (_emailConfig$to = emailConfig.to) === null || _emailConfig$to === void 0 ? void 0 : _emailConfig$to.split(',').map(function (mail) {
|
|
@@ -41145,7 +41288,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41145
41288
|
}
|
|
41146
41289
|
}, _callee28, this);
|
|
41147
41290
|
}));
|
|
41148
|
-
function addToBasket(
|
|
41291
|
+
function addToBasket(_x71) {
|
|
41149
41292
|
return _addToBasket.apply(this, arguments);
|
|
41150
41293
|
}
|
|
41151
41294
|
return addToBasket;
|
|
@@ -41440,7 +41583,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41440
41583
|
}
|
|
41441
41584
|
}, _callee29, this);
|
|
41442
41585
|
}));
|
|
41443
|
-
function initApiForLogicOnly(
|
|
41586
|
+
function initApiForLogicOnly(_x72, _x73, _x74, _x75, _x76, _x77, _x78) {
|
|
41444
41587
|
return _initApiForLogicOnly.apply(this, arguments);
|
|
41445
41588
|
}
|
|
41446
41589
|
return initApiForLogicOnly;
|
|
@@ -41478,8 +41621,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41478
41621
|
key: "initBasket",
|
|
41479
41622
|
value: function () {
|
|
41480
41623
|
var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(init3D, ignoreFavorites, onlyCalcVariants) {
|
|
41481
|
-
var
|
|
41482
|
-
var initSetState, sets, result, _sets$, set, basket;
|
|
41624
|
+
var initSetState, set, basket;
|
|
41483
41625
|
return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
|
|
41484
41626
|
while (1) switch (_context31.prev = _context31.next) {
|
|
41485
41627
|
case 0:
|
|
@@ -41489,45 +41631,29 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41489
41631
|
_context31.next = 5;
|
|
41490
41632
|
return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
|
|
41491
41633
|
case 5:
|
|
41492
|
-
|
|
41493
|
-
if (!((_initSetState$api$web2 = initSetState.api.webConfig) !== null && _initSetState$api$web2 !== void 0 && _initSetState$api$web2.checkForProductsPrice)) {
|
|
41494
|
-
_context31.next = 12;
|
|
41495
|
-
break;
|
|
41496
|
-
}
|
|
41497
|
-
if (!this.divaBasketHandler.actBasket.OrigProductId) {
|
|
41498
|
-
_context31.next = 12;
|
|
41499
|
-
break;
|
|
41500
|
-
}
|
|
41501
|
-
_context31.next = 10;
|
|
41502
|
-
return this.divaBasketHandler.getProduct(this.api, this.divaBasketHandler.actBasket.OrigProductId);
|
|
41503
|
-
case 10:
|
|
41504
|
-
result = _context31.sent;
|
|
41505
|
-
if (result) {
|
|
41506
|
-
(_sets$ = sets[0]) === null || _sets$ === void 0 || _sets$.remindPriceForHash(result);
|
|
41507
|
-
}
|
|
41508
|
-
case 12:
|
|
41634
|
+
//TODO check if when basket gets repaired the product match gets called
|
|
41509
41635
|
set = this.actSet();
|
|
41510
41636
|
if (set) set.onlyCalcVariants = onlyCalcVariants;
|
|
41511
41637
|
setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
|
|
41512
41638
|
if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
|
|
41513
|
-
_context31.next =
|
|
41639
|
+
_context31.next = 11;
|
|
41514
41640
|
break;
|
|
41515
41641
|
}
|
|
41516
|
-
_context31.next =
|
|
41642
|
+
_context31.next = 11;
|
|
41517
41643
|
return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
|
|
41518
|
-
case
|
|
41519
|
-
_context31.next =
|
|
41644
|
+
case 11:
|
|
41645
|
+
_context31.next = 13;
|
|
41520
41646
|
return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
|
|
41521
|
-
case
|
|
41647
|
+
case 13:
|
|
41522
41648
|
basket = _context31.sent;
|
|
41523
41649
|
return _context31.abrupt("return", basket);
|
|
41524
|
-
case
|
|
41650
|
+
case 15:
|
|
41525
41651
|
case "end":
|
|
41526
41652
|
return _context31.stop();
|
|
41527
41653
|
}
|
|
41528
41654
|
}, _callee31, this);
|
|
41529
41655
|
}));
|
|
41530
|
-
function initBasket(
|
|
41656
|
+
function initBasket(_x79, _x80, _x81) {
|
|
41531
41657
|
return _initBasket.apply(this, arguments);
|
|
41532
41658
|
}
|
|
41533
41659
|
return initBasket;
|
|
@@ -41604,7 +41730,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41604
41730
|
}
|
|
41605
41731
|
}, _callee33, this);
|
|
41606
41732
|
}));
|
|
41607
|
-
function handleFavorites(
|
|
41733
|
+
function handleFavorites(_x82) {
|
|
41608
41734
|
return _handleFavorites.apply(this, arguments);
|
|
41609
41735
|
}
|
|
41610
41736
|
return handleFavorites;
|
|
@@ -41658,7 +41784,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41658
41784
|
}
|
|
41659
41785
|
}, _callee34, this);
|
|
41660
41786
|
}));
|
|
41661
|
-
function initSapOrderLinesFromBasket(
|
|
41787
|
+
function initSapOrderLinesFromBasket(_x83, _x84, _x85) {
|
|
41662
41788
|
return _initSapOrderLinesFromBasket.apply(this, arguments);
|
|
41663
41789
|
}
|
|
41664
41790
|
return initSapOrderLinesFromBasket;
|
|
@@ -41705,6 +41831,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41705
41831
|
value: function openARObserverConnection(handleNoHqrs) {
|
|
41706
41832
|
return this.getPlannerHandler().openARObserverConnection(handleNoHqrs);
|
|
41707
41833
|
}
|
|
41834
|
+
}, {
|
|
41835
|
+
key: "updateCameraInformation",
|
|
41836
|
+
value: function updateCameraInformation(cam) {
|
|
41837
|
+
return this.getPlannerHandler().updateCamPosition(cam);
|
|
41838
|
+
}
|
|
41708
41839
|
}, {
|
|
41709
41840
|
key: "doLoadHQR",
|
|
41710
41841
|
get: function get() {
|
|
@@ -41717,13 +41848,15 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41717
41848
|
key: "plannerChangeLog",
|
|
41718
41849
|
value: function plannerChangeLog(action) {
|
|
41719
41850
|
var set = this.actSet();
|
|
41851
|
+
var articleCodex = [];
|
|
41852
|
+
var accesoriesCodex = [];
|
|
41720
41853
|
var articles = [];
|
|
41721
41854
|
if (set) {
|
|
41722
41855
|
for (var _i = 0, _Object$values = Object.values(set.getDivaArticles()); _i < _Object$values.length; _i++) {
|
|
41723
41856
|
var article = _Object$values[_i];
|
|
41724
41857
|
if (article.relatedToBasketId) {
|
|
41725
41858
|
var toAdd = {
|
|
41726
|
-
|
|
41859
|
+
codex: article.configArticleCodex,
|
|
41727
41860
|
basketId: article.basketId,
|
|
41728
41861
|
relatedBasektId: article.relatedToBasketId,
|
|
41729
41862
|
type: 'ACCESSORIE'
|
|
@@ -41733,9 +41866,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41733
41866
|
} else {
|
|
41734
41867
|
articles.push(toAdd);
|
|
41735
41868
|
}
|
|
41869
|
+
if (article.configArticleCodex) accesoriesCodex.push(article.configArticleCodex);
|
|
41736
41870
|
} else {
|
|
41737
41871
|
var _toAdd = {
|
|
41738
|
-
|
|
41872
|
+
codex: article.configArticleCodex,
|
|
41739
41873
|
basketId: article.basketId,
|
|
41740
41874
|
type: 'ARTICLE'
|
|
41741
41875
|
};
|
|
@@ -41744,36 +41878,112 @@ var DivaWebPlanner = /*#__PURE__*/function () {
|
|
|
41744
41878
|
} else {
|
|
41745
41879
|
articles.push(_toAdd);
|
|
41746
41880
|
}
|
|
41881
|
+
if (article.configArticleCodex) articleCodex.push(article.configArticleCodex);
|
|
41747
41882
|
}
|
|
41748
41883
|
}
|
|
41749
41884
|
}
|
|
41750
41885
|
LOG$1.businessEvent(action, 'Planner', 'Planner wurde verändert', {
|
|
41751
|
-
|
|
41886
|
+
article: {
|
|
41887
|
+
articleCodex: articleCodex,
|
|
41888
|
+
accesoriesCodex: accesoriesCodex,
|
|
41889
|
+
article_nested: articles
|
|
41890
|
+
}
|
|
41891
|
+
});
|
|
41892
|
+
LOG$1.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value:' + this.getCurSetPrice(), {
|
|
41893
|
+
basketValue: this.getCurSetPrice()
|
|
41752
41894
|
});
|
|
41753
41895
|
}
|
|
41754
41896
|
}, {
|
|
41755
41897
|
key: "configuratorChangeLog",
|
|
41756
|
-
value: function configuratorChangeLog(action) {
|
|
41898
|
+
value: function configuratorChangeLog(action, myValues) {
|
|
41757
41899
|
var set = this.actSet();
|
|
41758
41900
|
var configuration = [];
|
|
41901
|
+
var allOpt = [];
|
|
41902
|
+
var allOpv = [];
|
|
41903
|
+
var latestOpv = {};
|
|
41904
|
+
var latestOpt = {};
|
|
41759
41905
|
if (set) {
|
|
41906
|
+
if (myValues) {
|
|
41907
|
+
var _set$CatalogData$getO, _set$CatalogData$getO2;
|
|
41908
|
+
latestOpt = {
|
|
41909
|
+
codex: Object.keys(myValues)[0],
|
|
41910
|
+
name: (_set$CatalogData$getO = set.CatalogData.getOption(Object.keys(myValues)[0])) === null || _set$CatalogData$getO === void 0 ? void 0 : _set$CatalogData$getO.name
|
|
41911
|
+
};
|
|
41912
|
+
latestOpv = {
|
|
41913
|
+
codex: Object.values(myValues)[0],
|
|
41914
|
+
name: (_set$CatalogData$getO2 = set.CatalogData.getOptionValue(Object.values(myValues)[0])) === null || _set$CatalogData$getO2 === void 0 ? void 0 : _set$CatalogData$getO2.name
|
|
41915
|
+
};
|
|
41916
|
+
}
|
|
41760
41917
|
for (var _i2 = 0, _Object$values2 = Object.values(set.getDivaArticles()); _i2 < _Object$values2.length; _i2++) {
|
|
41761
41918
|
var article = _Object$values2[_i2];
|
|
41762
41919
|
if (!configuration) {
|
|
41763
41920
|
configuration = [{
|
|
41764
41921
|
varientValues: article.VariantValues,
|
|
41765
|
-
basketId: article.basketId
|
|
41922
|
+
basketId: article.basketId,
|
|
41923
|
+
opt: Object.keys(article.VariantValues).map(function (key) {
|
|
41924
|
+
var _set$CatalogData$getO3;
|
|
41925
|
+
return {
|
|
41926
|
+
codex: key,
|
|
41927
|
+
name: (_set$CatalogData$getO3 = set.CatalogData.getOption(key)) === null || _set$CatalogData$getO3 === void 0 ? void 0 : _set$CatalogData$getO3.name
|
|
41928
|
+
};
|
|
41929
|
+
}),
|
|
41930
|
+
opv: Object.values(article.VariantValues).map(function (value) {
|
|
41931
|
+
var _set$CatalogData$getO4;
|
|
41932
|
+
return {
|
|
41933
|
+
codex: value,
|
|
41934
|
+
name: (_set$CatalogData$getO4 = set.CatalogData.getOption(value)) === null || _set$CatalogData$getO4 === void 0 ? void 0 : _set$CatalogData$getO4.name
|
|
41935
|
+
};
|
|
41936
|
+
})
|
|
41766
41937
|
}];
|
|
41767
41938
|
} else {
|
|
41768
41939
|
configuration.push({
|
|
41769
41940
|
varientValues: article.VariantValues,
|
|
41770
|
-
basketId: article.basketId
|
|
41941
|
+
basketId: article.basketId,
|
|
41942
|
+
opt: Object.keys(article.VariantValues).map(function (key) {
|
|
41943
|
+
var _set$CatalogData$getO5;
|
|
41944
|
+
return {
|
|
41945
|
+
codex: key,
|
|
41946
|
+
name: (_set$CatalogData$getO5 = set.CatalogData.getOption(key)) === null || _set$CatalogData$getO5 === void 0 ? void 0 : _set$CatalogData$getO5.name
|
|
41947
|
+
};
|
|
41948
|
+
}),
|
|
41949
|
+
opv: Object.values(article.VariantValues).map(function (value) {
|
|
41950
|
+
var _set$CatalogData$getO6;
|
|
41951
|
+
return {
|
|
41952
|
+
codex: value,
|
|
41953
|
+
name: (_set$CatalogData$getO6 = set.CatalogData.getOptionValue(value)) === null || _set$CatalogData$getO6 === void 0 ? void 0 : _set$CatalogData$getO6.name
|
|
41954
|
+
};
|
|
41955
|
+
})
|
|
41956
|
+
});
|
|
41957
|
+
}
|
|
41958
|
+
for (var _i3 = 0, _Object$entries = Object.entries(article.VariantValues); _i3 < _Object$entries.length; _i3++) {
|
|
41959
|
+
var _set$CatalogData$getO7, _set$CatalogData$getO8;
|
|
41960
|
+
var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i3], 2),
|
|
41961
|
+
opt = _Object$entries$_i[0],
|
|
41962
|
+
opv = _Object$entries$_i[1];
|
|
41963
|
+
allOpt.push({
|
|
41964
|
+
codex: opt,
|
|
41965
|
+
name: (_set$CatalogData$getO7 = set.CatalogData.getOption(opt)) === null || _set$CatalogData$getO7 === void 0 ? void 0 : _set$CatalogData$getO7.name
|
|
41966
|
+
});
|
|
41967
|
+
allOpv.push({
|
|
41968
|
+
codex: opv,
|
|
41969
|
+
name: (_set$CatalogData$getO8 = set.CatalogData.getOptionValue(opv)) === null || _set$CatalogData$getO8 === void 0 ? void 0 : _set$CatalogData$getO8.name
|
|
41771
41970
|
});
|
|
41772
41971
|
}
|
|
41773
41972
|
}
|
|
41774
41973
|
}
|
|
41775
41974
|
LOG$1.businessEvent(action, 'Planner', 'Configurator wurde verändert', {
|
|
41776
|
-
configuration:
|
|
41975
|
+
configuration: {
|
|
41976
|
+
latest: {
|
|
41977
|
+
opv: latestOpv,
|
|
41978
|
+
opt: latestOpt
|
|
41979
|
+
},
|
|
41980
|
+
opt: allOpt,
|
|
41981
|
+
opv: allOpv,
|
|
41982
|
+
configuration_nested: configuration
|
|
41983
|
+
}
|
|
41984
|
+
});
|
|
41985
|
+
LOG$1.businessEvent('onActualBasketValue', 'Planner', 'Aktueller Basket Value:' + this.getCurSetPrice(), {
|
|
41986
|
+
basketValue: this.getCurSetPrice()
|
|
41777
41987
|
});
|
|
41778
41988
|
}
|
|
41779
41989
|
}, {
|
|
@@ -42271,7 +42481,7 @@ var Grid = /*#__PURE__*/function () {
|
|
|
42271
42481
|
if (this.heightGridCellCountOnRule) {
|
|
42272
42482
|
for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
|
|
42273
42483
|
var gridOnRule = this.heightGridCellCountOnRule[i];
|
|
42274
|
-
if (this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(gridOnRule.Rule))) {
|
|
42484
|
+
if (this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(gridOnRule.Rule, article.catalogCodex, article.CatalogData.multiselectOptions))) {
|
|
42275
42485
|
var _gridOnRule$HeightGri, _gridOnRule$ArticleRe;
|
|
42276
42486
|
cellCount = (_gridOnRule$HeightGri = gridOnRule.HeightGridCellCount) !== null && _gridOnRule$HeightGri !== void 0 ? _gridOnRule$HeightGri : grid.HeightGridCellCount;
|
|
42277
42487
|
this.articleRelations = (_gridOnRule$ArticleRe = gridOnRule.ArticleRelations) !== null && _gridOnRule$ArticleRe !== void 0 ? _gridOnRule$ArticleRe : grid.ArticleRelations;
|