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