thm-p3-configurator 0.0.143 → 0.0.145
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/App.js
CHANGED
|
@@ -26,6 +26,7 @@ var _OrderSessionContext = require("./__context__/OrderSessionContext");
|
|
|
26
26
|
var _cookiebot = require("./__helpers__/cookiebot");
|
|
27
27
|
var _queryClient = _interopRequireDefault(require("./__helpers__/queryClient"));
|
|
28
28
|
var _index = _interopRequireDefault(require("./__pages__/index"));
|
|
29
|
+
var _TEST_ONLY_INTERNAL_ROUTES = _interopRequireDefault(require("./__pages__/internal/__TEST_ONLY_INTERNAL_ROUTES"));
|
|
29
30
|
var _Experiments = _interopRequireDefault(require("./__services__/Experiments"));
|
|
30
31
|
var _mainExternal = _interopRequireDefault(require("./__style__/main-external.scss"));
|
|
31
32
|
var _main = _interopRequireDefault(require("./__style__/main.scss"));
|
|
@@ -59,8 +60,6 @@ function _interopRequireWildcard(e, r) {
|
|
|
59
60
|
}
|
|
60
61
|
return n.default = e, t && t.set(e, n), n;
|
|
61
62
|
}
|
|
62
|
-
// import TEST_ONLY_INTERNAL_ROUTES from './__pages__/internal/__TEST_ONLY_INTERNAL_ROUTES';
|
|
63
|
-
|
|
64
63
|
_reactGtmModule.default.initialize({
|
|
65
64
|
gtmId: APP_CONFIG.googleTagManagerId || 'GTM-TC67SZ4'
|
|
66
65
|
});
|
|
@@ -21,6 +21,7 @@ var _ProductCardPrice = _interopRequireDefault(require("./ProductCardPrice"));
|
|
|
21
21
|
var _ProductCardRibbon = _interopRequireDefault(require("./ProductCardRibbon"));
|
|
22
22
|
var _ProductCardSpecifications = _interopRequireDefault(require("./ProductCardSpecifications"));
|
|
23
23
|
var _ProductCardUsps = _interopRequireDefault(require("./ProductCardUsps"));
|
|
24
|
+
var _constants__ = require("../../__constants__");
|
|
24
25
|
function _interopRequireDefault(e) {
|
|
25
26
|
return e && e.__esModule ? e : {
|
|
26
27
|
default: e
|
|
@@ -52,12 +53,14 @@ function _interopRequireWildcard(e, r) {
|
|
|
52
53
|
return n.default = e, t && t.set(e, n), n;
|
|
53
54
|
}
|
|
54
55
|
const ProductCard = _ref => {
|
|
56
|
+
var _stock$quantity, _stock$quantity2;
|
|
55
57
|
let {
|
|
56
58
|
hasCheckbox = true,
|
|
57
59
|
isRecommended = false,
|
|
58
60
|
productId,
|
|
59
61
|
productTitle,
|
|
60
62
|
productDescription,
|
|
63
|
+
stock = null,
|
|
61
64
|
productUsps = [],
|
|
62
65
|
productImage = null,
|
|
63
66
|
isDisabled = false,
|
|
@@ -70,7 +73,8 @@ const ProductCard = _ref => {
|
|
|
70
73
|
canUnselect = true,
|
|
71
74
|
onSelect = () => {},
|
|
72
75
|
isOnlyProductInCategory = false,
|
|
73
|
-
isAnotherProductSelected = true
|
|
76
|
+
isAnotherProductSelected = true,
|
|
77
|
+
isTmg = false
|
|
74
78
|
} = _ref;
|
|
75
79
|
const [isSelected, setIsSelected] = (0, _react.useState)(defaultSelected);
|
|
76
80
|
const {
|
|
@@ -146,10 +150,18 @@ const ProductCard = _ref => {
|
|
|
146
150
|
description: productDescription
|
|
147
151
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
148
152
|
className: (0, _helpers__.withStyle)('card-footer pt-2 col-12 col-md-8 col-xxl-6 pb-0 justify-content-end')
|
|
149
|
-
},
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
+
className: (0, _helpers__.withStyle)('d-flex flex-column align-items-end')
|
|
155
|
+
}, showPrice && stock && /*#__PURE__*/_react.default.createElement("div", null, (stock === null || stock === void 0 ? void 0 : stock.status) === _constants__.StockStatus.OutOfStock ? /*#__PURE__*/_react.default.createElement("div", {
|
|
156
|
+
className: (0, _helpers__.withStyle)('text-danger mb-1')
|
|
157
|
+
}, "Niet op voorraad") : stock === _constants__.StockStatus.InsufficientStock ? /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: (0, _helpers__.withStyle)('text-warning mb-1')
|
|
159
|
+
}, isTmg ? "".concat((_stock$quantity = stock === null || stock === void 0 ? void 0 : stock.quantity) !== null && _stock$quantity !== void 0 ? _stock$quantity : 0, " op voorraad") : 'Weinig op voorraad') : /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
className: (0, _helpers__.withStyle)('text-success mb-1')
|
|
161
|
+
}, isTmg ? "".concat((_stock$quantity2 = stock === null || stock === void 0 ? void 0 : stock.quantity) !== null && _stock$quantity2 !== void 0 ? _stock$quantity2 : 0, " op voorraad") : 'Op voorraad')), hasCheckbox && /*#__PURE__*/_react.default.createElement(_ProductCardCheckbox.default, {
|
|
150
162
|
id: productId,
|
|
151
163
|
isDisabled: isDisabled,
|
|
152
164
|
defaultChecked: isSelected
|
|
153
|
-
}))))));
|
|
165
|
+
})))))));
|
|
154
166
|
};
|
|
155
167
|
var _default = exports.default = ProductCard;
|
|
@@ -172,8 +172,10 @@ const ExtraProductsOverview = () => {
|
|
|
172
172
|
className: (0, _helpers__.withStyle)(index === 0 ? 'mt-0' : 'mt-5'),
|
|
173
173
|
key: "category-".concat(item.categoryName)
|
|
174
174
|
}, /*#__PURE__*/_react.default.createElement("h2", null, item.categoryName), item.products.map((product, index) => {
|
|
175
|
-
var _product$images, _product$images2, _product$boldDescript;
|
|
175
|
+
var _product$locationPric, _product$images, _product$images2, _product$boldDescript;
|
|
176
176
|
return /*#__PURE__*/_react.default.createElement(_ProductCard.default, {
|
|
177
|
+
isTmg: isTmg,
|
|
178
|
+
stock: product === null || product === void 0 || (_product$locationPric = product.locationPrices) === null || _product$locationPric === void 0 ? void 0 : _product$locationPric.stock,
|
|
177
179
|
key: product.articleNumber,
|
|
178
180
|
hasCheckbox: true,
|
|
179
181
|
isRecommended: false,
|
|
@@ -207,7 +207,7 @@ const ProductsOverview = () => {
|
|
|
207
207
|
product: a,
|
|
208
208
|
category: productCategory
|
|
209
209
|
}) ? -1 : 0).map(product => {
|
|
210
|
-
var _product$images, _product$images2;
|
|
210
|
+
var _product$locationPric, _product$images, _product$images2;
|
|
211
211
|
const isRecommended = (0, _product.checkIfTowbarIsRecommended)({
|
|
212
212
|
product,
|
|
213
213
|
category: productCategory
|
|
@@ -237,6 +237,8 @@ const ProductsOverview = () => {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
return /*#__PURE__*/_react.default.createElement(_ProductCard.default, {
|
|
240
|
+
isTmg: isTmg,
|
|
241
|
+
stock: product === null || product === void 0 || (_product$locationPric = product.locationPrices) === null || _product$locationPric === void 0 ? void 0 : _product$locationPric.stock,
|
|
240
242
|
key: product.articleNumber,
|
|
241
243
|
hasCheckbox: (productsPerCategory === null || productsPerCategory === void 0 ? void 0 : productsPerCategory.length) > 1,
|
|
242
244
|
isRecommended: isRecommended,
|