IO-1714 Resolve monthly efficiency component.
This commit is contained in:
@@ -40,7 +40,7 @@ export default function DashboardMonthlyEmployeeEfficiency({
|
|||||||
(dayAcc, dayVal) => {
|
(dayAcc, dayVal) => {
|
||||||
return {
|
return {
|
||||||
actual: dayAcc.actual + dayVal.actualhrs,
|
actual: dayAcc.actual + dayVal.actualhrs,
|
||||||
productive: dayAcc.actual + dayVal.productivehrs,
|
productive: dayAcc.productive + dayVal.productivehrs,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{ actual: 0, productive: 0 }
|
{ actual: 0, productive: 0 }
|
||||||
@@ -50,7 +50,7 @@ export default function DashboardMonthlyEmployeeEfficiency({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const dailyEfficiency =
|
const dailyEfficiency =
|
||||||
((dailyHrs.productive - dailyHrs.actual) / dailyHrs.productive + 1) * 100;
|
((dailyHrs.productive - dailyHrs.actual) / dailyHrs.actual + 1) * 100;
|
||||||
|
|
||||||
const theValue = {
|
const theValue = {
|
||||||
date: moment(val).format("DD"),
|
date: moment(val).format("DD"),
|
||||||
@@ -69,7 +69,7 @@ export default function DashboardMonthlyEmployeeEfficiency({
|
|||||||
};
|
};
|
||||||
theValue.accEfficiency = (
|
theValue.accEfficiency = (
|
||||||
((theValue.accProductive - theValue.accActual) /
|
((theValue.accProductive - theValue.accActual) /
|
||||||
(theValue.accProductive || 1) +
|
(theValue.accActual || 1) +
|
||||||
1) *
|
1) *
|
||||||
100
|
100
|
||||||
).toFixed(1);
|
).toFixed(1);
|
||||||
|
|||||||
@@ -667,7 +667,7 @@ const formatGpPercent = (gppercent) => {
|
|||||||
//Verify that this stays in line with jobs-close-auto-allocate logic from the application.
|
//Verify that this stays in line with jobs-close-auto-allocate logic from the application.
|
||||||
const getAdditionalCostCenter = (jl, profitCenters) => {
|
const getAdditionalCostCenter = (jl, profitCenters) => {
|
||||||
if (!jl.part_type && !jl.mod_lbr_ty) {
|
if (!jl.part_type && !jl.mod_lbr_ty) {
|
||||||
const lineDesc = jl.line_desc.toLowerCase();
|
const lineDesc = jl.line_desc ? jl.line_desc.toLowerCase() : "";
|
||||||
|
|
||||||
if (lineDesc.includes("shop mat")) {
|
if (lineDesc.includes("shop mat")) {
|
||||||
return profitCenters["MASH"];
|
return profitCenters["MASH"];
|
||||||
|
|||||||
Reference in New Issue
Block a user