render in DG rows values
This commit is contained in:
parent
2a9a9b1db5
commit
a065d0e603
@ -112,16 +112,18 @@ export default function DiscountDataGrid() {
|
|||||||
|
|
||||||
useDiscounts({ onNewDiscounts: setDiscounts });
|
useDiscounts({ onNewDiscounts: setDiscounts });
|
||||||
|
|
||||||
const rowBackDicounts: GridRowsProp = realDiscounts.filter(e => e.Layer > 0).map(discount => ({
|
const rowBackDicounts: GridRowsProp = realDiscounts.filter(e => e.Layer > 0).map(discount => {
|
||||||
|
console.log(discount.Condition[layerValue[discount.Layer] as keyof typeof discount.Condition])
|
||||||
|
return({
|
||||||
id: discount.ID,
|
id: discount.ID,
|
||||||
name: discount.Name,
|
name: discount.Name,
|
||||||
description: discount.Description,
|
description: discount.Description,
|
||||||
conditionType: layerTranslate[discount.Layer],
|
conditionType: layerTranslate[discount.Layer],
|
||||||
factor: formatDiscountFactor(discount.Target.Factor),
|
factor: formatDiscountFactor(discount.Target.Factor),
|
||||||
value: layerValue[discount.Layer],
|
value: discount.Condition[layerValue[discount.Layer] as keyof typeof discount.Condition],
|
||||||
active: discount.Deprecated ? "🚫" : "✅",
|
active: discount.Deprecated ? "🚫" : "✅",
|
||||||
deleted: discount.Audit.Deleted,
|
deleted: discount.Audit.Deleted,
|
||||||
}));
|
})});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ width: "100%", marginTop: "55px", p: "16px", maxWidth: "1000px" }}>
|
<Box sx={{ width: "100%", marginTop: "55px", p: "16px", maxWidth: "1000px" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user