thm-p3-configurator 0.0.265 → 0.0.266
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.
|
@@ -602,7 +602,8 @@ const ProductCartTable = () => {
|
|
|
602
602
|
var _product$consumerDisc, _product$images, _product$images2;
|
|
603
603
|
const isVehicleCodingProduct = (product === null || product === void 0 ? void 0 : product.subgroupName) === _constants__.VEHICLE_CODING_SUBGROUP_NAME || (product === null || product === void 0 ? void 0 : product.groupName) === _constants__.VEHICLE_CODING_SUBGROUP_NAME;
|
|
604
604
|
const lineDiscountValue = (_product$consumerDisc = product === null || product === void 0 ? void 0 : product.consumerDiscountPercentage) !== null && _product$consumerDisc !== void 0 ? _product$consumerDisc : isVehicleCodingProduct ? vehicleCodingDiscountPercentage : 0;
|
|
605
|
-
const
|
|
605
|
+
const allowLineDiscountMain = displayMode === _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_STANDARD && (isTowmotive || isTowFormula);
|
|
606
|
+
const discountInputCellMain = allowLineDiscountMain ? {
|
|
606
607
|
text: renderDiscountInput(product.articleNumber, lineDiscountValue, v => handleLineDiscountChange(product.articleNumber, v, {
|
|
607
608
|
isVehicleCoding: isVehicleCodingProduct
|
|
608
609
|
})),
|
|
@@ -621,7 +622,7 @@ const ProductCartTable = () => {
|
|
|
621
622
|
extraCells: (0, _cartTable2.getMainProductCells)({
|
|
622
623
|
displayMode,
|
|
623
624
|
priceInfo: product.priceInfo,
|
|
624
|
-
discountInputCell,
|
|
625
|
+
discountInputCell: discountInputCellMain,
|
|
625
626
|
vehicleCodingInputCell,
|
|
626
627
|
isVehicleCodingProduct
|
|
627
628
|
})
|
|
@@ -652,7 +653,8 @@ const ProductCartTable = () => {
|
|
|
652
653
|
}, accessoireProducts.map(product => {
|
|
653
654
|
var _product$consumerDisc2, _product$images3, _product$images4;
|
|
654
655
|
const lineDiscountValue = (_product$consumerDisc2 = product === null || product === void 0 ? void 0 : product.consumerDiscountPercentage) !== null && _product$consumerDisc2 !== void 0 ? _product$consumerDisc2 : null;
|
|
655
|
-
const
|
|
656
|
+
const allowLineDiscountAccessory = displayMode === _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_STANDARD && (isTowmotive || isTowFormula);
|
|
657
|
+
const discountInputCellAccessory = allowLineDiscountAccessory ? {
|
|
656
658
|
text: renderDiscountInput(product.articleNumber, lineDiscountValue, v => handleLineDiscountChange(product.articleNumber, v)),
|
|
657
659
|
className: _cartTable.CART_TABLE_PRICE_CELL_CLASS
|
|
658
660
|
} : {};
|
|
@@ -670,7 +672,7 @@ const ProductCartTable = () => {
|
|
|
670
672
|
extraCells: (0, _cartTable2.getAccessoryProductCells)({
|
|
671
673
|
displayMode,
|
|
672
674
|
priceInfo: product.priceInfo,
|
|
673
|
-
discountInputCell
|
|
675
|
+
discountInputCell: discountInputCellAccessory
|
|
674
676
|
}),
|
|
675
677
|
productAmount: selectedExtras[product.articleNumber],
|
|
676
678
|
onEdit: value => {
|