thm-p3-configurator 0.0.263 → 0.0.265
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.
|
@@ -144,6 +144,8 @@ function _toPrimitive(t, r) {
|
|
|
144
144
|
|
|
145
145
|
const ProductCartTable = () => {
|
|
146
146
|
const formula = (0, _FormulaContext.useFormula)();
|
|
147
|
+
const isThc = formula === _constants__.CONFIGURATOR_FORMULAS.THC;
|
|
148
|
+
const isTowFormula = formula === _constants__.CONFIGURATOR_FORMULAS.TOW || formula === _constants__.CONFIGURATOR_FORMULAS.TM;
|
|
147
149
|
const isTmg = (0, _useIsTmg.useIsTmg)();
|
|
148
150
|
const isTowmotive = (0, _useIsTowmotive.useIsTowmotive)();
|
|
149
151
|
const [isToggled, setIsToggled] = (0, _react.useState)(false);
|
|
@@ -170,7 +172,8 @@ const ProductCartTable = () => {
|
|
|
170
172
|
}, dispatch] = (0, _OrderSessionContext.useOrderSession)();
|
|
171
173
|
|
|
172
174
|
// Determine display mode
|
|
173
|
-
const
|
|
175
|
+
const useTmgDisplayMode = isTmg && !isTowFormula;
|
|
176
|
+
const displayMode = (0, _cartTable2.getCartTableDisplayMode)(isToggled, useTmgDisplayMode);
|
|
174
177
|
const handleVehicleCodingDiscountChange = function handleVehicleCodingDiscountChange(value) {
|
|
175
178
|
let articleNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
176
179
|
const sanitized = value === null || value === void 0 ? void 0 : value.toString().replace(/[^0-9]/g, '');
|
|
@@ -545,7 +548,7 @@ const ProductCartTable = () => {
|
|
|
545
548
|
isRequired: false,
|
|
546
549
|
onChange: v => handleVehicleCodingDiscountChange(v, articleNumber)
|
|
547
550
|
})));
|
|
548
|
-
const renderMontageRateInput = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
551
|
+
const renderMontageRateInput = () => isThc ? null : /*#__PURE__*/_react.default.createElement("div", {
|
|
549
552
|
className: (0, _helpers__.withStyle)('d-flex flex-column align-items-end justify-content-end gap-1')
|
|
550
553
|
}, /*#__PURE__*/_react.default.createElement(_DecimalInput.default, {
|
|
551
554
|
label: "Montage tarief",
|
|
@@ -571,11 +574,11 @@ const ProductCartTable = () => {
|
|
|
571
574
|
return /*#__PURE__*/_react.default.createElement(_FullPageSpinner.default, null);
|
|
572
575
|
}
|
|
573
576
|
const headerColumns = (0, _cartTable2.getCartTableHeaderColumns)(displayMode);
|
|
574
|
-
const montageRateInputCell = {
|
|
577
|
+
const montageRateInputCell = isThc ? {} : {
|
|
575
578
|
text: renderMontageRateInput(),
|
|
576
579
|
className: _cartTable.CART_TABLE_PRICE_CELL_CLASS
|
|
577
580
|
};
|
|
578
|
-
const montageRateCellOverrides = APP_CONFIG.internal && renderMontageRateInput ? displayMode === _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_STANDARD ? {
|
|
581
|
+
const montageRateCellOverrides = APP_CONFIG.internal && !isThc && renderMontageRateInput ? displayMode === _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_STANDARD ? {
|
|
579
582
|
// Show input in discount column; keep price column as price
|
|
580
583
|
discountCell: montageRateInputCell
|
|
581
584
|
} : displayMode === _cartTable.CART_TABLE_DISPLAY_MODES.DEFAULT ? {
|