IO-2240 Adjusted calculation for total efficiency
This commit is contained in:
@@ -224,17 +224,18 @@ export default function ScoreboardTimeTickets() {
|
|||||||
ret2.push(r);
|
ret2.push(r);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add total efficiency of employees
|
// Add combined efficiency of employees // 454.7%
|
||||||
ret.totalEffieciencyOverPeriod = Object.keys(ret.employees)
|
ret.totalEffieciencyOverPeriod = (
|
||||||
.map((key) => {
|
(Object.keys(ret.employees).reduce(
|
||||||
return { employee_number: key, ...ret.employees[key] };
|
(acc, key) => acc + ret.employees[key].totalOverPeriod,
|
||||||
})
|
0
|
||||||
.map((e) =>
|
) /
|
||||||
((e.totalOverPeriod / (e.actualTotalOverPeriod || 0.1)) * 100).toFixed(
|
(Object.keys(ret.employees).reduce(
|
||||||
1
|
(acc, key) => acc + ret.employees[key].actualTotalOverPeriod,
|
||||||
)
|
0
|
||||||
)
|
) || 0.1)) *
|
||||||
.reduce((acc, prev) => acc + Number(prev), 0);
|
100
|
||||||
|
).toFixed(1);
|
||||||
|
|
||||||
roundObject(ret);
|
roundObject(ret);
|
||||||
roundObject(totals);
|
roundObject(totals);
|
||||||
|
|||||||
Reference in New Issue
Block a user