Updated format on reporting screen. RPS-26

This commit is contained in:
Patrick Fic
2020-10-28 06:32:37 -07:00
parent 016a3ea6fe
commit 8e4cc5756c
2 changed files with 62 additions and 32 deletions

View File

@@ -9,6 +9,7 @@ import { setSelectedJobId } from "../../../redux/application/application.actions
import {
selectReportData,
selectReportLoading,
selectScorecard,
} from "../../../redux/reporting/reporting.selectors";
const { ipcRenderer } = window;
@@ -16,12 +17,14 @@ const { ipcRenderer } = window;
const mapStateToProps = createStructuredSelector({
reportingLoading: selectReportLoading,
reportData: selectReportData,
scoreCard: selectScorecard,
});
const mapDispatchToProps = (dispatch) => ({
setSelectedJobId: (id) => dispatch(setSelectedJobId(id)),
});
export function ReportingJobsListMolecule({
scoreCard,
reportingLoading,
reportData,
setSelectedJobId,
@@ -147,6 +150,24 @@ export function ReportingJobsListMolecule({
scroll={{
x: true,
}}
summary={() => (
<Table.Summary.Row>
<Table.Summary.Cell index={0}></Table.Summary.Cell>
<Table.Summary.Cell index={1}></Table.Summary.Cell>
<Table.Summary.Cell index={2}></Table.Summary.Cell>
<Table.Summary.Cell index={3}></Table.Summary.Cell>
<Table.Summary.Cell index={4}></Table.Summary.Cell>
<Table.Summary.Cell index={5}>
{scoreCard && scoreCard.allJobsSumDbPrice.toFormat()}
</Table.Summary.Cell>
<Table.Summary.Cell index={6}>
{" "}
{scoreCard && scoreCard.allJobsSumActPrice.toFormat()}
</Table.Summary.Cell>
<Table.Summary.Cell index={7}></Table.Summary.Cell>
<Table.Summary.Cell index={8}></Table.Summary.Cell>
</Table.Summary.Row>
)}
/>
</div>
);

View File

@@ -35,38 +35,47 @@ export function ReportingTotalsStatsMolecule({ reportingLoading, scoreCard }) {
marginBottom: "1rem",
}}
>
<Statistic
title="RPS Total"
value={scoreCard.shopRpsTotalDollars.toFormat()}
/>
<Statistic
title="RPS Expectation"
value={scoreCard.shopRpsExpectedDollars.toFormat()}
/>
<Statistic
title="RPS Variance $"
valueStyle={{
color:
scoreCard.varianceDollars.getAmount() < 0 ? "tomato" : "seagreen",
}}
value={scoreCard.varianceDollars.toFormat()}
/>
<Statistic
title="Current RPS %"
valueStyle={{
color:
(scoreCard.currentRpsPc || 0) <= (scoreCard.targetRpsPc || 0)
? "tomato"
: "seagreen",
}}
value={((scoreCard.currentRpsPc || 0) * 100).toFixed(1)}
suffix="%"
/>
<Statistic
title="Target RPS %"
value={((scoreCard.targetRpsPc || 0) * 100).toFixed(1)}
suffix="%"
/>
<div style={{ display: "flex" }}>
<Statistic
title="Target RPS %"
style={{ margin: "0rem .5rem" }}
value={((scoreCard.targetRpsPc || 0) * 100).toFixed(1)}
suffix="%"
/>
<Statistic
title="Current RPS %"
style={{ margin: "0rem .5rem" }}
valueStyle={{
color:
(scoreCard.currentRpsPc || 0) <= (scoreCard.targetRpsPc || 0)
? "tomato"
: "seagreen",
}}
value={((scoreCard.currentRpsPc || 0) * 100).toFixed(1)}
suffix="%"
/>
</div>
<div style={{ display: "flex" }}>
<Statistic
title="Target RPS $"
style={{ margin: "0rem .5rem" }}
value={scoreCard.shopRpsExpectedDollars.toFormat()}
/>
<Statistic
title="Current RPS $"
style={{ margin: "0rem .5rem" }}
value={scoreCard.shopRpsTotalDollars.toFormat()}
/>
<Statistic
title="RPS Variance $"
style={{ margin: "0rem .5rem" }}
valueStyle={{
color:
scoreCard.varianceDollars.getAmount() < 0 ? "tomato" : "seagreen",
}}
value={scoreCard.varianceDollars.toFormat()}
/>
</div>
</div>
);
}