thm-p3-configurator 0.0.456 → 0.0.458
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/dist/src/shared/__api__/queries.js +5 -7
- package/dist/src/shared/__components__/Header.js +3 -47
- package/dist/src/shared/__containers__/ProductCartSide.js +2 -5
- package/dist/src/shared/__containers__/ProductsCartOverview.js +5 -5
- package/dist/src/shared/__containers__/internal/InternalBranchSelectorModal.js +35 -118
- package/dist/src/shared/__containers__/internal/OrderTypeSelectorModal.js +0 -8
- package/dist/src/shared/__context__/OrderSessionContext.js +0 -2
- package/dist/src/shared/__helpers__/index.js +1 -30
- package/dist/src/shared/__helpers__/product.js +13 -1
- package/dist/src/shared/__helpers__/singleOrderArticles.js +15 -27
- package/dist/src/shared/__helpers__/singleOrderBranchSelector.js +2 -112
- package/dist/src/shared/__helpers__/singleOrderCustomerDetails.js +1 -1
- package/dist/src/shared/__hooks__/useBranchTheme.js +1 -12
- package/dist/src/shared/__pages__/internal/InternalLicensePlatePage.js +10 -26
- package/dist/src/shared/__pages__/internal/InternalManualSelectionPage.js +1 -8
- package/dist/src/shared/__pages__/internal/InternalSingleOrderPage.js +8 -21
- package/dist/src/shared/__style__/_variables-external.scss +0 -6
- package/dist/src/shared/__style__/_variables.scss +0 -6
- package/dist/src/shared/__style__/configurator/_configurator.scss +0 -100
- package/package.json +1 -1
- package/dist/public/assets/images/logo-th-icon.png +0 -0
- package/dist/public/assets/images/logo-th-primary.png +0 -0
- package/dist/public/assets/images/logo-thl-icon.png +0 -0
- package/dist/public/assets/images/logo-thl-primary.png +0 -0
- package/dist/public/assets/images/logo-wb-icon.png +0 -0
- package/dist/public/assets/images/logo-wb-primary.png +0 -0
- package/dist/src/shared/__components__/LocationsSelector/LocationDetails.js +0 -295
- package/dist/src/shared/__components__/LocationsSelector/LocationInfo.js +0 -140
- package/dist/src/shared/__components__/LocationsSelector/LocationList.js +0 -190
- package/dist/src/shared/__components__/LocationsSelector/LocationListItem.js +0 -116
- package/dist/src/shared/__components__/LocationsSelector/LocationTreeMarker.js +0 -97
- package/dist/src/shared/__components__/LocationsSelector/index.js +0 -156
- package/dist/src/shared/__components__/Modal.js +0 -78
- package/dist/src/shared/__components__/Navbar.js +0 -85
- package/dist/src/shared/__components__/NavigationSteps.js +0 -143
- package/dist/src/shared/__components__/Pagination.js +0 -53
- package/dist/src/shared/__components__/ProductCard/ProductCardCheckbox.js +0 -38
- package/dist/src/shared/__components__/ProductCard/ProductCardDescription.js +0 -84
- package/dist/src/shared/__components__/ProductCard/ProductCardDiscountAlert.js +0 -57
- package/dist/src/shared/__components__/ProductCard/ProductCardImage.js +0 -28
- package/dist/src/shared/__components__/ProductCard/ProductCardPrice.js +0 -37
- package/dist/src/shared/__components__/ProductCard/ProductCardRibbon.js +0 -28
- package/dist/src/shared/__components__/ProductCard/ProductCardSpecifications.js +0 -77
- package/dist/src/shared/__components__/ProductCard/ProductCardUsps.js +0 -82
- package/dist/src/shared/__components__/ProductCard/index.js +0 -246
- package/dist/src/shared/__components__/ProductTable/ProductTableEditableRow.js +0 -66
- package/dist/src/shared/__components__/ProductTable/ProductTableHead.js +0 -32
- package/dist/src/shared/__components__/ProductTable/ProductTableSection.js +0 -25
- package/dist/src/shared/__components__/ProductTable/ProductTableSectionTotal.js +0 -46
- package/dist/src/shared/__components__/ProductTable/ProductTableStaticRow.js +0 -47
- package/dist/src/shared/__components__/ProductTable/ProductTableTotal.js +0 -41
- package/dist/src/shared/__components__/ProductTable/index.js +0 -127
- package/dist/src/shared/__components__/SingleOrderCartCard.js +0 -85
- package/dist/src/shared/__components__/SingleOrderProductCard.js +0 -387
- package/dist/src/shared/__components__/Spinners/FullPageSpinner.js +0 -76
- package/dist/src/shared/__components__/Spinners/InlineSpinner.js +0 -26
- package/dist/src/shared/__components__/Spinners/TextSpinner.js +0 -31
- package/dist/src/shared/__components__/UspsList.js +0 -27
- package/dist/src/shared/__components__/internal/InternalCustomerDetailsForm.js +0 -1095
- package/dist/src/shared/__constants__/__tests__/index.test.js +0 -53
- package/dist/src/shared/__constants__/cartTable.js +0 -35
- package/dist/src/shared/__constants__/cookiebot.js +0 -7
- package/dist/src/shared/__constants__/index.js +0 -451
- package/dist/src/shared/__constants__/sentry.js +0 -20
- package/dist/src/shared/__containers__/ANWBMembershipInput.js +0 -170
- package/dist/src/shared/__containers__/AppointmentForm.js +0 -551
- package/dist/src/shared/__containers__/BoardComputerCard.js +0 -140
- package/dist/src/shared/__helpers__/__tests__/resetConfiguratorOrderCache.test.js +0 -39
- package/dist/src/shared/__helpers__/__tests__/singleOrderBranchSelector.test.js +0 -126
- package/dist/src/shared/__helpers__/__tests__/singleOrderWebshop.test.js +0 -17
- package/dist/src/shared/__helpers__/resetConfiguratorOrderCache.js +0 -22
- package/dist/src/shared/__helpers__/singleOrderWebshop.js +0 -46
|
@@ -541,8 +541,7 @@ exports.useSingleOrderCart = useSingleOrderCart;
|
|
|
541
541
|
const useOrderDataQuery = exports.useOrderDataQuery = function useOrderDataQuery() {
|
|
542
542
|
let orderParameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
543
543
|
const [{
|
|
544
|
-
existingDossierId
|
|
545
|
-
singleOrderFlowRevision
|
|
544
|
+
existingDossierId
|
|
546
545
|
}] = (0, _OrderSessionContext.useOrderSession)();
|
|
547
546
|
const pricingFormula = (0, _usePricingFormula.usePricingFormula)();
|
|
548
547
|
const normalizedOrderParams = (0, _queryKeyFactory.normalizeOrderParams)(_objectSpread(_objectSpread({}, orderParameters), {}, {
|
|
@@ -559,7 +558,7 @@ const useOrderDataQuery = exports.useOrderDataQuery = function useOrderDataQuery
|
|
|
559
558
|
initialized
|
|
560
559
|
} = (0, _AuthSessionContext.useAuthSession)();
|
|
561
560
|
const isSessionContextReady = (0, _useSessionContextReady.useSessionContextReady)();
|
|
562
|
-
const orderQueryKey = APP_CONFIG.internal ? [...(0, _queryKeyFactory.getOrderQueryKey)(normalizedOrderParams), initialized, authenticated, isSessionContextReady
|
|
561
|
+
const orderQueryKey = APP_CONFIG.internal ? [...(0, _queryKeyFactory.getOrderQueryKey)(normalizedOrderParams), initialized, authenticated, isSessionContextReady] : (0, _queryKeyFactory.getOrderQueryKey)(normalizedOrderParams);
|
|
563
562
|
const serializedOrderParams = (0, _queryKeyFactory.serializeOrderParams)(normalizedOrderParams);
|
|
564
563
|
const hasOrderInput = (licensePlate === null || licensePlate === void 0 ? void 0 : licensePlate.length) > 5 || !!(model !== null && model !== void 0 && model.length);
|
|
565
564
|
const orderQuery = (0, _reactQuery.useQuery)(orderQueryKey, {
|
|
@@ -705,7 +704,6 @@ const useQuestionsQuery = exports.useQuestionsQuery = function useQuestionsQuery
|
|
|
705
704
|
const {
|
|
706
705
|
orderData,
|
|
707
706
|
isFetchingOrder,
|
|
708
|
-
isLoadingOrder,
|
|
709
707
|
isOrderError,
|
|
710
708
|
orderError
|
|
711
709
|
} = useOrderDataQuery(normalizedQuestionParams);
|
|
@@ -721,7 +719,7 @@ const useQuestionsQuery = exports.useQuestionsQuery = function useQuestionsQuery
|
|
|
721
719
|
}, [orderData === null || orderData === void 0 || (_orderData$executionA4 = orderData.executionAnswerOptions) === null || _orderData$executionA4 === void 0 ? void 0 : _orderData$executionA4.execution2AnswerOptions]);
|
|
722
720
|
const durationQuestion = (0, _react.useMemo)(() => (0, _helpers__.parseArrayToInputOptions)(orderData === null || orderData === void 0 ? void 0 : orderData.durationAnswerOptions), [orderData === null || orderData === void 0 ? void 0 : orderData.durationAnswerOptions]);
|
|
723
721
|
return {
|
|
724
|
-
isLoadingQuestions: isFetchingOrder
|
|
722
|
+
isLoadingQuestions: isFetchingOrder,
|
|
725
723
|
isQuestionsError: isOrderError,
|
|
726
724
|
execution1Answer: orderData === null || orderData === void 0 || (_orderData$answers = orderData.answers) === null || _orderData$answers === void 0 ? void 0 : _orderData$answers.execution1,
|
|
727
725
|
execution2Answer: orderData === null || orderData === void 0 || (_orderData$answers2 = orderData.answers) === null || _orderData$answers2 === void 0 ? void 0 : _orderData$answers2.execution2,
|
|
@@ -735,14 +733,14 @@ const useQuestionsQuery = exports.useQuestionsQuery = function useQuestionsQuery
|
|
|
735
733
|
};
|
|
736
734
|
};
|
|
737
735
|
const useSingleOrderBranchesQuery = branchesParams => {
|
|
738
|
-
var _branchesParams
|
|
736
|
+
var _branchesParams;
|
|
739
737
|
branchesParams = _objectSpread(_objectSpread({}, branchesParams), {}, {
|
|
740
738
|
type: 'single-order'
|
|
741
739
|
});
|
|
742
740
|
const branchesParamsString = new URLSearchParams((0, _helpers__.removeNullishProps)(branchesParams)).toString();
|
|
743
741
|
const branchesQuery = (0, _reactQuery.useQuery)(['single-order-branches', branchesParamsString], {
|
|
744
742
|
queryFn: () => _authenticatedProxyApi.authenticatedProxyApi.getSingleOrderBranches(branchesParamsString).then(res => res.data),
|
|
745
|
-
enabled: !!((_branchesParams = branchesParams) !== null && _branchesParams !== void 0 && _branchesParams.branchTypeId)
|
|
743
|
+
enabled: !!((_branchesParams = branchesParams) !== null && _branchesParams !== void 0 && _branchesParams.branchTypeId)
|
|
746
744
|
});
|
|
747
745
|
return {
|
|
748
746
|
isLoadingSingleOrderBranches: branchesQuery.isLoading,
|
|
@@ -9,9 +9,6 @@ var _logoPrimaryIcon = _interopRequireDefault(require("../../../public/assets/im
|
|
|
9
9
|
var _logoThcWhite = _interopRequireDefault(require("../../../public/assets/images/logo-thc-white.svg"));
|
|
10
10
|
var _logoTmgPrimary = _interopRequireDefault(require("../../../public/assets/images/logo-tmg-primary.png"));
|
|
11
11
|
var _tmLogo = _interopRequireDefault(require("../../../public/assets/images/tm-logo.png"));
|
|
12
|
-
var _logoWbPrimary = _interopRequireDefault(require("../../../public/assets/images/logo-wb-primary.png"));
|
|
13
|
-
var _logoThlPrimary = _interopRequireDefault(require("../../../public/assets/images/logo-thl-primary.png"));
|
|
14
|
-
var _logoThPrimary = _interopRequireDefault(require("../../../public/assets/images/logo-th-primary.png"));
|
|
15
12
|
var _constants__ = require("../__constants__");
|
|
16
13
|
var _helpers__ = require("../__helpers__");
|
|
17
14
|
var _useBranchTheme = require("../__hooks__/useBranchTheme");
|
|
@@ -20,53 +17,12 @@ function _interopRequireDefault(e) {
|
|
|
20
17
|
default: e
|
|
21
18
|
};
|
|
22
19
|
}
|
|
23
|
-
const getHeaderLogo = theme => {
|
|
24
|
-
switch (theme) {
|
|
25
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.TowMotive:
|
|
26
|
-
return {
|
|
27
|
-
src: _tmLogo.default,
|
|
28
|
-
alt: 'TowMotive'
|
|
29
|
-
};
|
|
30
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakcentrum:
|
|
31
|
-
return {
|
|
32
|
-
src: _logoThcWhite.default,
|
|
33
|
-
alt: 'Trekhaakcentrum'
|
|
34
|
-
};
|
|
35
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup:
|
|
36
|
-
return {
|
|
37
|
-
src: _logoTmgPrimary.default,
|
|
38
|
-
alt: 'TowMotive Group'
|
|
39
|
-
};
|
|
40
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.WestfaliaBenelux:
|
|
41
|
-
return {
|
|
42
|
-
src: _logoWbPrimary.default,
|
|
43
|
-
alt: 'Westfalia Benelux'
|
|
44
|
-
};
|
|
45
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakland:
|
|
46
|
-
return {
|
|
47
|
-
src: _logoThlPrimary.default,
|
|
48
|
-
alt: 'Trekhaakland'
|
|
49
|
-
};
|
|
50
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaken:
|
|
51
|
-
return {
|
|
52
|
-
src: _logoThPrimary.default,
|
|
53
|
-
alt: 'Trekhaken.nl'
|
|
54
|
-
};
|
|
55
|
-
default:
|
|
56
|
-
return {
|
|
57
|
-
src: _logoPrimaryIcon.default,
|
|
58
|
-
alt: 'Trekhaak Montage'
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
20
|
const Header = _ref => {
|
|
63
21
|
let {
|
|
64
22
|
title,
|
|
65
23
|
subtitle = ''
|
|
66
24
|
} = _ref;
|
|
67
25
|
const theme = (0, _useBranchTheme.useBranchTheme)();
|
|
68
|
-
const headerLogo = getHeaderLogo(theme);
|
|
69
|
-
const isWebshopTheme = theme === _constants__.BRANCH_THEME_BY_FORMULA.WestfaliaBenelux || theme === _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakland || theme === _constants__.BRANCH_THEME_BY_FORMULA.Trekhaken;
|
|
70
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
27
|
className: (0, _helpers__.withStyle)("hero hero--offset")
|
|
72
28
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -76,9 +32,9 @@ const Header = _ref => {
|
|
|
76
32
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
33
|
className: (0, _helpers__.withStyle)('col hero__logo-container')
|
|
78
34
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
79
|
-
className: (0, _helpers__.withStyle)("hero__logo ".concat(theme === _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup ? 'hero__logo--tmg' : ''
|
|
80
|
-
src:
|
|
81
|
-
alt:
|
|
35
|
+
className: (0, _helpers__.withStyle)("hero__logo ".concat(theme === _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup ? 'hero__logo--tmg' : '')),
|
|
36
|
+
src: theme === _constants__.BRANCH_THEME_BY_FORMULA.TowMotive ? _tmLogo.default : theme === _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakcentrum ? _logoThcWhite.default : theme === _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup ? _logoTmgPrimary.default : _logoPrimaryIcon.default,
|
|
37
|
+
alt: "Trekhaak Montage"
|
|
82
38
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
83
39
|
className: (0, _helpers__.withStyle)('hero__inner d-none d-lg-block')
|
|
84
40
|
}, /*#__PURE__*/_react.default.createElement("h2", null, (title === null || title === void 0 ? void 0 : title.length) > 0 ? title : 'Trekhaak offerte opstellen'), (subtitle === null || subtitle === void 0 ? void 0 : subtitle.length) > 0 && /*#__PURE__*/_react.default.createElement("p", {
|
|
@@ -109,8 +109,7 @@ const ProductCartSide = () => {
|
|
|
109
109
|
montageRate,
|
|
110
110
|
extraPriceAmount,
|
|
111
111
|
discountCode,
|
|
112
|
-
priceCalculationDate
|
|
113
|
-
skipFilters
|
|
112
|
+
priceCalculationDate
|
|
114
113
|
} = order;
|
|
115
114
|
const isTmg = (0, _useIsTmg.useIsTmg)();
|
|
116
115
|
const isTowmotive = (0, _useIsTowmotive.useIsTowmotive)();
|
|
@@ -129,9 +128,7 @@ const ProductCartSide = () => {
|
|
|
129
128
|
consumerDiscounts,
|
|
130
129
|
touchedConsumerDiscounts
|
|
131
130
|
});
|
|
132
|
-
|
|
133
|
-
// an unfiltered request can return a different catalogue than the page.
|
|
134
|
-
const shouldRequestUnfilteredProducts = skipFilters || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
|
|
131
|
+
const shouldRequestUnfilteredProducts = (0, _product.shouldRequestUnfilteredProductsForCart)(cartInput) || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
|
|
135
132
|
const {
|
|
136
133
|
cart,
|
|
137
134
|
totals,
|
|
@@ -280,8 +280,7 @@ const ProductCartTable = () => {
|
|
|
280
280
|
touchedConsumerDiscounts,
|
|
281
281
|
montageRate,
|
|
282
282
|
isMontageTariffFixed,
|
|
283
|
-
extraPriceAmount
|
|
284
|
-
skipFilters
|
|
283
|
+
extraPriceAmount
|
|
285
284
|
}, dispatch] = (0, _OrderSessionContext.useOrderSession)();
|
|
286
285
|
|
|
287
286
|
// Determine display mode
|
|
@@ -355,9 +354,10 @@ const ProductCartTable = () => {
|
|
|
355
354
|
consumerDiscounts,
|
|
356
355
|
touchedConsumerDiscounts
|
|
357
356
|
});
|
|
358
|
-
//
|
|
359
|
-
//
|
|
360
|
-
|
|
357
|
+
// Also request unfiltered products when editing an existing dossier with
|
|
358
|
+
// article numbers that could not be classified into selectedTowbar etc. during
|
|
359
|
+
// hydration (e.g. formula-specific articles not in the TM catalogue).
|
|
360
|
+
const shouldRequestUnfilteredProducts = (0, _product.shouldRequestUnfilteredProductsForCart)(cartInput) || Boolean(existingDossierId && (allArticleNumbers === null || allArticleNumbers === void 0 ? void 0 : allArticleNumbers.length) > 0);
|
|
361
361
|
const durationAnswerForQuery = durationAnswerIsPrefilled ? undefined : durationAnswer;
|
|
362
362
|
const {
|
|
363
363
|
cart,
|
|
@@ -4,6 +4,7 @@ require("core-js/modules/es.array.includes.js");
|
|
|
4
4
|
require("core-js/modules/es.string.includes.js");
|
|
5
5
|
require("core-js/modules/es.weak-map.js");
|
|
6
6
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
7
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
7
8
|
require("core-js/modules/esnext.iterator.find.js");
|
|
8
9
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
9
10
|
require("core-js/modules/esnext.iterator.map.js");
|
|
@@ -17,6 +18,7 @@ exports.default = void 0;
|
|
|
17
18
|
require("core-js/modules/es.array.includes.js");
|
|
18
19
|
require("core-js/modules/es.string.includes.js");
|
|
19
20
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
21
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
20
22
|
require("core-js/modules/esnext.iterator.find.js");
|
|
21
23
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
22
24
|
require("core-js/modules/esnext.iterator.map.js");
|
|
@@ -28,7 +30,6 @@ var _DropdownInput = _interopRequireDefault(require("../../__components__/Form/D
|
|
|
28
30
|
var _Modal = _interopRequireDefault(require("../../__components__/Modal"));
|
|
29
31
|
var _FullPageSpinner = _interopRequireDefault(require("../../__components__/Spinners/FullPageSpinner"));
|
|
30
32
|
var _constants__ = require("../../__constants__");
|
|
31
|
-
var _singleOrderWebshop = require("../../__helpers__/singleOrderWebshop");
|
|
32
33
|
var _FormulaContext = require("../../__context__/FormulaContext");
|
|
33
34
|
var _OrderSessionContext = require("../../__context__/OrderSessionContext");
|
|
34
35
|
var _helpers__ = require("../../__helpers__");
|
|
@@ -208,15 +209,6 @@ const SingleOrderModalContent = _ref6 => {
|
|
|
208
209
|
} = (0, _queries.useBranchTypes)();
|
|
209
210
|
const [singleOrderBranchType, setSingleOrderBranchType] = (0, _react.useState)();
|
|
210
211
|
const [selectedBranchId, setLocalBranchId] = (0, _react.useState)();
|
|
211
|
-
const normalizedFormula = (0, _constants__.getConfiguratorFormulaCode)(formula);
|
|
212
|
-
const shouldShowBranchTypeSelector = (0, _singleOrderBranchSelector.shouldShowSingleOrderBranchTypeSelector)({
|
|
213
|
-
isTmgOrganization: isTMGOrganization,
|
|
214
|
-
formula: normalizedFormula
|
|
215
|
-
});
|
|
216
|
-
const previousDependenciesRef = (0, _react.useRef)({
|
|
217
|
-
formula: normalizedFormula,
|
|
218
|
-
branchTypeId: singleOrderBranchType
|
|
219
|
-
});
|
|
220
212
|
const {
|
|
221
213
|
singleOrderBranchTypes,
|
|
222
214
|
isLoadingSingleOrderBranchTypes
|
|
@@ -225,91 +217,70 @@ const SingleOrderModalContent = _ref6 => {
|
|
|
225
217
|
singleOrderBranches,
|
|
226
218
|
isLoadingSingleOrderBranches
|
|
227
219
|
} = (0, _queries.useSingleOrderBranchesQuery)({
|
|
228
|
-
branchTypeId:
|
|
229
|
-
|
|
230
|
-
formula: normalizedFormula,
|
|
231
|
-
selectedBranchTypeId: singleOrderBranchType
|
|
232
|
-
}),
|
|
233
|
-
formula: normalizedFormula,
|
|
220
|
+
branchTypeId: formula === _constants__.CONFIGURATOR_FORMULAS.TMG ? singleOrderBranchType : _constants__.VESTIGING_TYPE_ID,
|
|
221
|
+
formula: (0, _constants__.getConfiguratorFormulaCode)(formula),
|
|
234
222
|
limit: 500,
|
|
235
223
|
offset: 0
|
|
236
224
|
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (
|
|
240
|
-
|
|
241
|
-
formula: normalizedFormula,
|
|
242
|
-
previousBranchTypeId: previousDependencies.branchTypeId,
|
|
243
|
-
branchTypeId: singleOrderBranchType
|
|
244
|
-
})) {
|
|
245
|
-
setSelectedBranchId(undefined);
|
|
246
|
-
setLocalBranchId(undefined);
|
|
247
|
-
dispatch({
|
|
248
|
-
type: _OrderSessionContext.orderSessionActions.SET_SINGLE_ORDER_FORMULA_CODE,
|
|
249
|
-
payload: {
|
|
250
|
-
formulaCode: null
|
|
251
|
-
}
|
|
252
|
-
});
|
|
225
|
+
// Filter branches based on formula if not TMG
|
|
226
|
+
const filteredBranches = _react.default.useMemo(() => {
|
|
227
|
+
if (formula === _constants__.CONFIGURATOR_FORMULAS.TMG || !singleOrderBranches) {
|
|
228
|
+
return singleOrderBranches;
|
|
253
229
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
230
|
+
const normalizedFormula = (0, _constants__.getConfiguratorFormulaCode)(formula);
|
|
231
|
+
return singleOrderBranches.filter(branch => {
|
|
232
|
+
var _ref7, _branch$formulaCode, _branch$formule;
|
|
233
|
+
const branchFormula = (0, _constants__.getConfiguratorFormulaCode)((_ref7 = (_branch$formulaCode = branch === null || branch === void 0 ? void 0 : branch.formulaCode) !== null && _branch$formulaCode !== void 0 ? _branch$formulaCode : branch === null || branch === void 0 || (_branch$formule = branch.formule) === null || _branch$formule === void 0 ? void 0 : _branch$formule.code) !== null && _ref7 !== void 0 ? _ref7 : branch === null || branch === void 0 ? void 0 : branch.formule);
|
|
234
|
+
if ((0, _constants__.isThcFamilyFormula)(normalizedFormula)) {
|
|
235
|
+
return (0, _constants__.isThcFamilyFormula)(branchFormula);
|
|
236
|
+
}
|
|
237
|
+
return branchFormula === normalizedFormula;
|
|
238
|
+
});
|
|
239
|
+
}, [singleOrderBranches, formula]);
|
|
263
240
|
const branchIdWithFormulaCode = new Map();
|
|
264
241
|
filteredBranches === null || filteredBranches === void 0 || filteredBranches.forEach(branch => {
|
|
265
|
-
var _getConfiguratorFormu,
|
|
266
|
-
branchIdWithFormulaCode.set(branch === null || branch === void 0 ? void 0 : branch.entityId, (_getConfiguratorFormu = (0, _constants__.getConfiguratorFormulaCode)((
|
|
267
|
-
});
|
|
268
|
-
const customerSelectorCopy = (0, _singleOrderBranchSelector.getSingleOrderCustomerSelectorCopy)({
|
|
269
|
-
formula: normalizedFormula,
|
|
270
|
-
isSingleOrderPage: true
|
|
242
|
+
var _getConfiguratorFormu, _ref8, _branch$formulaCode2, _branch$formule2;
|
|
243
|
+
branchIdWithFormulaCode.set(branch === null || branch === void 0 ? void 0 : branch.entityId, (_getConfiguratorFormu = (0, _constants__.getConfiguratorFormulaCode)((_ref8 = (_branch$formulaCode2 = branch === null || branch === void 0 ? void 0 : branch.formulaCode) !== null && _branch$formulaCode2 !== void 0 ? _branch$formulaCode2 : branch === null || branch === void 0 || (_branch$formule2 = branch.formule) === null || _branch$formule2 === void 0 ? void 0 : _branch$formule2.code) !== null && _ref8 !== void 0 ? _ref8 : branch === null || branch === void 0 ? void 0 : branch.formule)) !== null && _getConfiguratorFormu !== void 0 ? _getConfiguratorFormu : (0, _constants__.getConfiguratorFormulaCode)(formula));
|
|
271
244
|
});
|
|
272
245
|
const branchOptions = filteredBranches === null || filteredBranches === void 0 ? void 0 : filteredBranches.map(branch => ({
|
|
273
|
-
label: (0,
|
|
274
|
-
branch,
|
|
275
|
-
formula: normalizedFormula
|
|
276
|
-
}),
|
|
246
|
+
label: "".concat(branch === null || branch === void 0 ? void 0 : branch.naamVestiging, " - ").concat(branch === null || branch === void 0 ? void 0 : branch.name),
|
|
277
247
|
value: branch === null || branch === void 0 ? void 0 : branch.entityId
|
|
278
248
|
}));
|
|
279
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
249
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formula === _constants__.CONFIGURATOR_FORMULAS.TMG && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
|
|
280
250
|
options: singleOrderBranchTypes === null || singleOrderBranchTypes === void 0 ? void 0 : singleOrderBranchTypes.map(branchType => ({
|
|
281
251
|
label: branchType === null || branchType === void 0 ? void 0 : branchType.title,
|
|
282
252
|
value: branchType === null || branchType === void 0 ? void 0 : branchType.entityId
|
|
283
253
|
})),
|
|
284
|
-
name: "
|
|
285
|
-
label: "
|
|
254
|
+
name: "channel",
|
|
255
|
+
label: "Branch soort:",
|
|
286
256
|
isRequired: true,
|
|
287
257
|
isLoading: isLoadingSingleOrderBranchTypes,
|
|
288
258
|
noOptionsMessage: "Geen opties beschikbaar",
|
|
289
259
|
placeholder: "Maak een keuze",
|
|
290
260
|
initialValue: singleOrderBranchType,
|
|
291
|
-
onChange:
|
|
261
|
+
onChange: _ref9 => {
|
|
292
262
|
let {
|
|
263
|
+
label,
|
|
293
264
|
value
|
|
294
|
-
} =
|
|
265
|
+
} = _ref9;
|
|
295
266
|
setSingleOrderBranchType(value);
|
|
296
267
|
setSelectedBranchId(undefined);
|
|
297
268
|
setLocalBranchId(undefined);
|
|
298
269
|
}
|
|
299
|
-
}), (
|
|
270
|
+
}), (formula === _constants__.CONFIGURATOR_FORMULAS.TMG ? singleOrderBranchType : true) && /*#__PURE__*/_react.default.createElement(_DropdownInput.default, {
|
|
300
271
|
options: branchOptions,
|
|
301
272
|
name: "branch",
|
|
302
|
-
label:
|
|
273
|
+
label: "Vestiging:",
|
|
303
274
|
isRequired: true,
|
|
304
275
|
isLoading: isLoadingSingleOrderBranches,
|
|
305
276
|
noOptionsMessage: "Geen opties beschikbaar",
|
|
306
277
|
placeholder: "Maak een keuze",
|
|
307
278
|
initialValue: selectedBranchId,
|
|
308
|
-
onChange:
|
|
279
|
+
onChange: _ref10 => {
|
|
309
280
|
let {
|
|
310
281
|
label,
|
|
311
282
|
value
|
|
312
|
-
} =
|
|
283
|
+
} = _ref10;
|
|
313
284
|
setSelectedBranchId(value);
|
|
314
285
|
setLocalBranchId(value);
|
|
315
286
|
const formulaCode = branchIdWithFormulaCode.get(value);
|
|
@@ -341,7 +312,6 @@ const InternalBranchSelectorModal = () => {
|
|
|
341
312
|
const [isDismissed, setIsDismissed] = (0, _react.useState)(false);
|
|
342
313
|
const isSingleOrderPage = (0, _useIsSingleOrder.default)();
|
|
343
314
|
const formula = (0, _FormulaContext.useFormula)();
|
|
344
|
-
const previousFormulaRef = (0, _react.useRef)(formula);
|
|
345
315
|
const isTMGOrganization = (0, _useIsTmg.useIsTmg)();
|
|
346
316
|
(0, _react.useEffect)(() => {
|
|
347
317
|
_setSelectedBranchId(undefined);
|
|
@@ -351,36 +321,12 @@ const InternalBranchSelectorModal = () => {
|
|
|
351
321
|
selectedBranch,
|
|
352
322
|
existingDossierId,
|
|
353
323
|
orderType,
|
|
354
|
-
webshop,
|
|
355
324
|
licensePlate,
|
|
356
325
|
model,
|
|
357
326
|
singleOrderFlowRevision
|
|
358
327
|
}, dispatch] = (0, _OrderSessionContext.useOrderSession)();
|
|
359
|
-
const defaultWebshop = (0, _singleOrderWebshop.getWebshopForFormula)(formula);
|
|
360
328
|
const previousSelectedBranchRef = (0, _react.useRef)(selectedBranch);
|
|
361
329
|
const previousLocationKeyRef = (0, _react.useRef)(location.key);
|
|
362
|
-
(0, _react.useEffect)(() => {
|
|
363
|
-
if ((0, _singleOrderBranchSelector.shouldResetSingleOrderBranchSelection)({
|
|
364
|
-
previousFormula: previousFormulaRef.current,
|
|
365
|
-
formula
|
|
366
|
-
})) {
|
|
367
|
-
_setSelectedBranchId(undefined);
|
|
368
|
-
setIsDismissed(false);
|
|
369
|
-
dispatch({
|
|
370
|
-
type: _OrderSessionContext.orderSessionActions.SET_SELECTED_BRANCH,
|
|
371
|
-
payload: {
|
|
372
|
-
branchId: null
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
dispatch({
|
|
376
|
-
type: _OrderSessionContext.orderSessionActions.SET_SINGLE_ORDER_FORMULA_CODE,
|
|
377
|
-
payload: {
|
|
378
|
-
formulaCode: null
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
previousFormulaRef.current = formula;
|
|
383
|
-
}, [dispatch, formula]);
|
|
384
330
|
const {
|
|
385
331
|
myBranches,
|
|
386
332
|
isLoadingMyBranches
|
|
@@ -388,26 +334,6 @@ const InternalBranchSelectorModal = () => {
|
|
|
388
334
|
const {
|
|
389
335
|
branchById
|
|
390
336
|
} = (0, _queries.useBranchByIdOrWidgetId)(selectedBranch);
|
|
391
|
-
(0, _react.useEffect)(() => {
|
|
392
|
-
if (!isSingleOrderPage || !defaultWebshop) {
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
if (webshop === defaultWebshop && orderType === _OrderTypeSelectorModal.ORDER_TYPES.ONLINE) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
dispatch({
|
|
399
|
-
type: _OrderSessionContext.orderSessionActions.SET_WEBSHOP,
|
|
400
|
-
payload: {
|
|
401
|
-
webshop: defaultWebshop
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
dispatch({
|
|
405
|
-
type: _OrderSessionContext.orderSessionActions.SET_ORDER_TYPE,
|
|
406
|
-
payload: {
|
|
407
|
-
orderType: _OrderTypeSelectorModal.ORDER_TYPES.ONLINE
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
}, [defaultWebshop, dispatch, isSingleOrderPage, orderType, webshop]);
|
|
411
337
|
const shouldResolveMyBranchesBeforeOpening = APP_CONFIG.internal && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !isDismissed;
|
|
412
338
|
const shouldAutoSelectSingleMyBranch = shouldResolveMyBranchesBeforeOpening && !isLoadingMyBranches && (myBranches === null || myBranches === void 0 ? void 0 : myBranches.length) === 1;
|
|
413
339
|
const shouldWaitForMyBranchResolution = shouldResolveMyBranchesBeforeOpening && (isLoadingMyBranches || shouldAutoSelectSingleMyBranch);
|
|
@@ -465,12 +391,7 @@ const InternalBranchSelectorModal = () => {
|
|
|
465
391
|
}
|
|
466
392
|
});
|
|
467
393
|
};
|
|
468
|
-
const shouldShowModalForSingleOrder = APP_CONFIG.internal &&
|
|
469
|
-
isSingleOrderPage,
|
|
470
|
-
selectedBranch,
|
|
471
|
-
existingDossierId,
|
|
472
|
-
isDismissed
|
|
473
|
-
});
|
|
394
|
+
const shouldShowModalForSingleOrder = APP_CONFIG.internal && !selectedBranch && !existingDossierId && isSingleOrderPage && !isDismissed;
|
|
474
395
|
const shouldShowModalForOtherPages = APP_CONFIG.internal && !selectedBranch && !existingDossierId && !isSingleOrderPage && !isTMGOrganization && !shouldWaitForMyBranchResolution && !isDismissed;
|
|
475
396
|
|
|
476
397
|
// Show loading state only when we actually need to show the modal
|
|
@@ -497,18 +418,14 @@ const InternalBranchSelectorModal = () => {
|
|
|
497
418
|
className: "ms-3"
|
|
498
419
|
}, "Vestigingen laden..."));
|
|
499
420
|
}
|
|
500
|
-
if ((shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && isTMGOrganization && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !orderType
|
|
421
|
+
if ((shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && isTMGOrganization && formula === _constants__.CONFIGURATOR_FORMULAS.TMG && !orderType) {
|
|
501
422
|
return /*#__PURE__*/_react.default.createElement(_OrderTypeSelectorModal.default, {
|
|
502
423
|
isOpen: true
|
|
503
424
|
});
|
|
504
425
|
}
|
|
505
|
-
const customerSelectorCopy = (0, _singleOrderBranchSelector.getSingleOrderCustomerSelectorCopy)({
|
|
506
|
-
formula,
|
|
507
|
-
isSingleOrderPage
|
|
508
|
-
});
|
|
509
426
|
return /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
510
|
-
isOpen: shouldShowModalForSingleOrder || shouldShowModalForOtherPages,
|
|
511
|
-
title:
|
|
427
|
+
isOpen: (shouldShowModalForSingleOrder || shouldShowModalForOtherPages) && !(isTMGOrganization && orderType === _OrderTypeSelectorModal.ORDER_TYPES.ONLINE),
|
|
428
|
+
title: 'Kies een vestiging:',
|
|
512
429
|
size: "wide",
|
|
513
430
|
hasSecondaryButton: false,
|
|
514
431
|
isPrimaryButtonDisabled: !_selectedBranchId,
|
|
@@ -47,7 +47,6 @@ const ORDER_TYPES = exports.ORDER_TYPES = {
|
|
|
47
47
|
OFFLINE: 'offline'
|
|
48
48
|
};
|
|
49
49
|
const WEBSHOPS = exports.WEBSHOPS = {
|
|
50
|
-
WESTFALIA_BENELUX: 'Westfalia Benelux',
|
|
51
50
|
TREKHAAKLAND: 'Trekhaakland',
|
|
52
51
|
TREKHAKEN_NL: 'Trekhaken.nl'
|
|
53
52
|
};
|
|
@@ -113,13 +112,6 @@ const OrderTypeSelectorModal = _ref => {
|
|
|
113
112
|
},
|
|
114
113
|
onClick: () => handleTypeSelect(ORDER_TYPES.OFFLINE)
|
|
115
114
|
}, "Offline order")), step === 'webshop' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
|
|
116
|
-
type: "button",
|
|
117
|
-
className: (0, _helpers__.withStyle)('btn btn-outline-primary btn-lg w-100 d-flex align-items-center justify-content-center p-4'),
|
|
118
|
-
style: {
|
|
119
|
-
minHeight: '80px'
|
|
120
|
-
},
|
|
121
|
-
onClick: () => handleWebshopSelect(WEBSHOPS.WESTFALIA_BENELUX)
|
|
122
|
-
}, "Westfalia Benelux"), /*#__PURE__*/_react.default.createElement("button", {
|
|
123
115
|
type: "button",
|
|
124
116
|
className: (0, _helpers__.withStyle)('btn btn-outline-primary btn-lg w-100 d-flex align-items-center justify-content-center p-4'),
|
|
125
117
|
style: {
|
|
@@ -488,7 +488,6 @@ const orderSessionReducer = (state, action) => {
|
|
|
488
488
|
orderType: (state === null || state === void 0 ? void 0 : state.orderType) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.orderType),
|
|
489
489
|
webshop: (state === null || state === void 0 ? void 0 : state.webshop) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.webshop),
|
|
490
490
|
discountCode: (state === null || state === void 0 ? void 0 : state.discountCode) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.discountCode),
|
|
491
|
-
singleOrderFlowRevision: state.singleOrderFlowRevision,
|
|
492
491
|
isTouched: true
|
|
493
492
|
});
|
|
494
493
|
}
|
|
@@ -512,7 +511,6 @@ const orderSessionReducer = (state, action) => {
|
|
|
512
511
|
discountCode: (state === null || state === void 0 ? void 0 : state.discountCode) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.discountCode),
|
|
513
512
|
singleOrderCart: (state === null || state === void 0 ? void 0 : state.singleOrderCart) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.singleOrderCart),
|
|
514
513
|
singleOrderFormulaCode: (state === null || state === void 0 ? void 0 : state.singleOrderFormulaCode) || (INITIAL_ORDER_SESSION_STATE === null || INITIAL_ORDER_SESSION_STATE === void 0 ? void 0 : INITIAL_ORDER_SESSION_STATE.singleOrderFormulaCode),
|
|
515
|
-
singleOrderFlowRevision: state.singleOrderFlowRevision,
|
|
516
514
|
isTouched: true
|
|
517
515
|
});
|
|
518
516
|
}
|
|
@@ -83,18 +83,6 @@ Object.keys(_countryOptions).forEach(function (key) {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
-
var _resetConfiguratorOrderCache = require("./resetConfiguratorOrderCache");
|
|
87
|
-
Object.keys(_resetConfiguratorOrderCache).forEach(function (key) {
|
|
88
|
-
if (key === "default" || key === "__esModule") return;
|
|
89
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
90
|
-
if (key in exports && exports[key] === _resetConfiguratorOrderCache[key]) return;
|
|
91
|
-
Object.defineProperty(exports, key, {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function get() {
|
|
94
|
-
return _resetConfiguratorOrderCache[key];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
86
|
function _interopRequireDefault(e) {
|
|
99
87
|
return e && e.__esModule ? e : {
|
|
100
88
|
default: e
|
|
@@ -162,12 +150,6 @@ const getConfiguratorThemeClass = theme => {
|
|
|
162
150
|
return 'tm';
|
|
163
151
|
case _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup:
|
|
164
152
|
return 'tmg';
|
|
165
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.WestfaliaBenelux:
|
|
166
|
-
return 'wb';
|
|
167
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakland:
|
|
168
|
-
return 'thl';
|
|
169
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaken:
|
|
170
|
-
return 'th';
|
|
171
153
|
default:
|
|
172
154
|
return '';
|
|
173
155
|
}
|
|
@@ -179,13 +161,8 @@ const getConfiguratorThemeClassByFormula = formula => {
|
|
|
179
161
|
return 'thc';
|
|
180
162
|
case _constants__.CONFIGURATOR_FORMULAS.TMG:
|
|
181
163
|
return 'tmg';
|
|
182
|
-
case _constants__.CONFIGURATOR_FORMULAS.WB:
|
|
183
|
-
return 'wb';
|
|
184
|
-
case _constants__.CONFIGURATOR_FORMULAS.THL:
|
|
185
|
-
return 'thl';
|
|
186
|
-
case _constants__.CONFIGURATOR_FORMULAS.TH:
|
|
187
|
-
return 'th';
|
|
188
164
|
case _constants__.CONFIGURATOR_FORMULAS.TOW:
|
|
165
|
+
case _constants__.CONFIGURATOR_FORMULAS.TH:
|
|
189
166
|
case _constants__.CONFIGURATOR_FORMULAS.TowMotive:
|
|
190
167
|
return 'tm';
|
|
191
168
|
default:
|
|
@@ -202,12 +179,6 @@ const getConfiguratorButtonVariant = exports.getConfiguratorButtonVariant = func
|
|
|
202
179
|
return outline ? 'outline-tm-primary' : 'tm-primary';
|
|
203
180
|
case _constants__.BRANCH_THEME_BY_FORMULA.TowMotiveGroup:
|
|
204
181
|
return outline ? 'outline-tmg-primary' : 'tmg-primary';
|
|
205
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.WestfaliaBenelux:
|
|
206
|
-
return outline ? 'outline-wb-primary' : 'wb-primary';
|
|
207
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaakland:
|
|
208
|
-
return outline ? 'outline-thl-primary' : 'thl-primary';
|
|
209
|
-
case _constants__.BRANCH_THEME_BY_FORMULA.Trekhaken:
|
|
210
|
-
return outline ? 'outline-th-primary' : 'th-primary';
|
|
211
182
|
default:
|
|
212
183
|
return outline ? 'outline-primary' : 'primary';
|
|
213
184
|
}
|
|
@@ -10,11 +10,12 @@ require("core-js/modules/esnext.iterator.filter.js");
|
|
|
10
10
|
require("core-js/modules/esnext.iterator.flat-map.js");
|
|
11
11
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
12
12
|
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
13
14
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
15
|
Object.defineProperty(exports, "__esModule", {
|
|
15
16
|
value: true
|
|
16
17
|
});
|
|
17
|
-
exports.validateCartInput = exports.shouldSelectBoardComputerUpdate = exports.resolveSingleOrderArticlePrices = exports.parseProductSpecifications = exports.getTowbarInfoTitle = exports.getEffectiveBoardComputerSelection = exports.getDetachableTowbarOrientation = exports.getArticleSubgroupLabel = exports.formatHyperDescription = exports.extractProductSpecsArray = exports.checkIfTowbarIsRecommended = exports.buildCartInput = void 0;
|
|
18
|
+
exports.validateCartInput = exports.shouldSelectBoardComputerUpdate = exports.shouldRequestUnfilteredProductsForCart = exports.resolveSingleOrderArticlePrices = exports.parseProductSpecifications = exports.getTowbarInfoTitle = exports.getEffectiveBoardComputerSelection = exports.getDetachableTowbarOrientation = exports.getArticleSubgroupLabel = exports.formatHyperDescription = exports.extractProductSpecsArray = exports.checkIfTowbarIsRecommended = exports.buildCartInput = void 0;
|
|
18
19
|
require("core-js/modules/es.array.flat-map.js");
|
|
19
20
|
require("core-js/modules/es.array.includes.js");
|
|
20
21
|
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
@@ -25,6 +26,7 @@ require("core-js/modules/esnext.iterator.filter.js");
|
|
|
25
26
|
require("core-js/modules/esnext.iterator.flat-map.js");
|
|
26
27
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
27
28
|
require("core-js/modules/esnext.iterator.map.js");
|
|
29
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
28
30
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
29
31
|
var _constants__ = require("../__constants__");
|
|
30
32
|
function ownKeys(e, r) {
|
|
@@ -98,6 +100,16 @@ const validateCartInput = exports.validateCartInput = function validateCartInput
|
|
|
98
100
|
}
|
|
99
101
|
return;
|
|
100
102
|
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description Cart overviews resolve selected articles from the order article lists.
|
|
106
|
+
* If the user selected an article that only appears with skipFilters enabled,
|
|
107
|
+
* those read-only lookups must request the unfiltered product list too.
|
|
108
|
+
*/
|
|
109
|
+
const shouldRequestUnfilteredProductsForCart = exports.shouldRequestUnfilteredProductsForCart = function shouldRequestUnfilteredProductsForCart() {
|
|
110
|
+
let cart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
111
|
+
return Array.isArray(cart) && cart.some(lineItem => (lineItem === null || lineItem === void 0 ? void 0 : lineItem.articleNumber) != null);
|
|
112
|
+
};
|
|
101
113
|
const getEffectiveBoardComputerSelection = exports.getEffectiveBoardComputerSelection = function getEffectiveBoardComputerSelection() {
|
|
102
114
|
var _ref3;
|
|
103
115
|
let {
|