diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-17 21:06:17 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-17 21:06:17 +0530 |
commit | 4e880f6efe86c0b7e86e587e08eeee0f594417d5 (patch) | |
tree | 96eae2c903095550e3aa790dafd57117beb0d4cb /src/components/Display/SummaryDisplay.js | |
parent | ee77e57189a6b0375e840b386754973a376dc089 (diff) |
color coded ItemsDisplay
Diffstat (limited to 'src/components/Display/SummaryDisplay.js')
-rw-r--r-- | src/components/Display/SummaryDisplay.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/Display/SummaryDisplay.js b/src/components/Display/SummaryDisplay.js index 8acddc9..ebc382c 100644 --- a/src/components/Display/SummaryDisplay.js +++ b/src/components/Display/SummaryDisplay.js @@ -4,6 +4,7 @@ import "./Display.css"; const getSummary = (items) => { let totalRawPrice = 0; let totalQuantity = 0; + for (let i = 0; i < items.length; i++) { totalRawPrice += items[i].Price; totalQuantity += items[i].Quantity @@ -19,17 +20,16 @@ const getSummary = (items) => { const SummaryDisplayTR = (props) => { const summary = getSummary(props.items); - console.log(summary) return ( - <tr> + <tr className={"SummaryDisplayTR"}> <td>Total</td> - <td className={"altBorder"}></td> - <td className={"altBorder"}></td> + <td className={"disabledBorder"}></td> + <td className={"disabledBorder"}></td> <td>{summary.TotalQuantity}</td> + <td className={"disabledBorder"}></td> + <td className={"disabledBorder"}></td> <td>{summary.TotalRawPrice}</td> - <td className={"altBorder"}></td> - <td className={"altBorder"}></td> </tr> ); } |