IO-1933 Added statistics on tech page

This commit is contained in:
swtmply
2023-04-27 22:19:32 +08:00
parent b00fdadc1b
commit d9e2ef9300
5 changed files with 219 additions and 4 deletions

View File

@@ -241,9 +241,11 @@ export default function ScoreboardTimeTickets() {
);
ret.totalEffieciencyOverPeriod =
(totalActualAndProductive.totalOverPeriod /
totalActualAndProductive.actualTotalOverPeriod) *
100;
totalActualAndProductive.actualTotalOverPeriod
? (totalActualAndProductive.totalOverPeriod /
totalActualAndProductive.actualTotalOverPeriod) *
100
: 0;
roundObject(ret);
roundObject(totals);

View File

@@ -116,7 +116,7 @@ export function ScoreboardTicketsStats({ data, bodyshop }) {
<Col span={12}>
<Statistic
title={t("scoreboard.labels.efficiencyoverperiod")}
value={`${data.totalEffieciencyOverPeriod}%`}
value={`${data.totalEffieciencyOverPeriod || 0}%`}
/>
</Col>
</Row>