Merged in feature/IO-2656-Job-Count-on-Scoreboard (pull request #1312)
IO-2656 Job Count on Scoreboard Jobs Approved-by: Dave Richer
This commit is contained in:
@@ -25,6 +25,8 @@ export function ScoreboardDayStats({ bodyshop, date, entries }) {
|
|||||||
return acc + value.bodyhrs;
|
return acc + value.bodyhrs;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
|
const numJobs = entries.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
title={moment(date).format("D - ddd")}
|
title={moment(date).format("D - ddd")}
|
||||||
@@ -33,17 +35,18 @@ export function ScoreboardDayStats({ bodyshop, date, entries }) {
|
|||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
valueStyle={{ color: dailyBodyTarget > bodyHrs ? "red" : "green" }}
|
valueStyle={{ color: dailyBodyTarget > bodyHrs ? "red" : "green" }}
|
||||||
label="B"
|
label="Body"
|
||||||
value={bodyHrs.toFixed(1)}
|
value={bodyHrs.toFixed(1)}
|
||||||
/>
|
/>
|
||||||
<Statistic
|
<Statistic
|
||||||
valueStyle={{ color: dailyPaintTarget > paintHrs ? "red" : "green" }}
|
valueStyle={{ color: dailyPaintTarget > paintHrs ? "red" : "green" }}
|
||||||
label="P"
|
label="Refinish"
|
||||||
value={paintHrs.toFixed(1)}
|
value={paintHrs.toFixed(1)}
|
||||||
/>
|
/>
|
||||||
<Divider style={{ margin: 0 }} />
|
<Divider style={{ margin: 0 }} />
|
||||||
|
<Statistic label="Total" value={(bodyHrs + paintHrs).toFixed(1)} />
|
||||||
<Statistic value={(bodyHrs + paintHrs).toFixed(1)} />
|
<Divider style={{ margin: 0 }} />
|
||||||
|
<Statistic label="Jobs" value={numJobs} />
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,10 +29,13 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
let ret = {
|
let ret = {
|
||||||
todayBody: 0,
|
todayBody: 0,
|
||||||
todayPaint: 0,
|
todayPaint: 0,
|
||||||
|
todayJobs: 0,
|
||||||
weeklyPaint: 0,
|
weeklyPaint: 0,
|
||||||
|
weeklyJobs: 0,
|
||||||
weeklyBody: 0,
|
weeklyBody: 0,
|
||||||
toDateBody: 0,
|
toDateBody: 0,
|
||||||
toDatePaint: 0,
|
toDatePaint: 0,
|
||||||
|
toDateJobs: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
const today = moment();
|
const today = moment();
|
||||||
@@ -40,6 +43,7 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
dateHash[today.format("YYYY-MM-DD")].forEach((d) => {
|
dateHash[today.format("YYYY-MM-DD")].forEach((d) => {
|
||||||
ret.todayBody = ret.todayBody + d.bodyhrs;
|
ret.todayBody = ret.todayBody + d.bodyhrs;
|
||||||
ret.todayPaint = ret.todayPaint + d.painthrs;
|
ret.todayPaint = ret.todayPaint + d.painthrs;
|
||||||
|
ret.todayJobs++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +53,7 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
dateHash[StartOfWeek.format("YYYY-MM-DD")].forEach((d) => {
|
dateHash[StartOfWeek.format("YYYY-MM-DD")].forEach((d) => {
|
||||||
ret.weeklyBody = ret.weeklyBody + d.bodyhrs;
|
ret.weeklyBody = ret.weeklyBody + d.bodyhrs;
|
||||||
ret.weeklyPaint = ret.weeklyPaint + d.painthrs;
|
ret.weeklyPaint = ret.weeklyPaint + d.painthrs;
|
||||||
|
ret.weeklyJobs++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
StartOfWeek = StartOfWeek.add(1, "day");
|
StartOfWeek = StartOfWeek.add(1, "day");
|
||||||
@@ -60,6 +65,7 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
dateHash[startOfMonth.format("YYYY-MM-DD")].forEach((d) => {
|
dateHash[startOfMonth.format("YYYY-MM-DD")].forEach((d) => {
|
||||||
ret.toDateBody = ret.toDateBody + d.bodyhrs;
|
ret.toDateBody = ret.toDateBody + d.bodyhrs;
|
||||||
ret.toDatePaint = ret.toDatePaint + d.painthrs;
|
ret.toDatePaint = ret.toDatePaint + d.painthrs;
|
||||||
|
ret.toDateJobs++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
startOfMonth = startOfMonth.add(1, "day");
|
startOfMonth = startOfMonth.add(1, "day");
|
||||||
@@ -87,7 +93,7 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
<Statistic
|
<Statistic
|
||||||
title={t("scoreboard.labels.dailytarget")}
|
title={t("scoreboard.labels.dailytarget")}
|
||||||
value={bodyshop.scoreboard_target.dailyBodyTarget}
|
value={bodyshop.scoreboard_target.dailyBodyTarget}
|
||||||
prefix="B"
|
prefix={t("scoreboard.labels.bodyabbrev")}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col {...statSpans}>
|
<Col {...statSpans}>
|
||||||
@@ -140,7 +146,7 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
<Col {...statSpans}>
|
<Col {...statSpans}>
|
||||||
<Statistic
|
<Statistic
|
||||||
value={bodyshop.scoreboard_target.dailyPaintTarget}
|
value={bodyshop.scoreboard_target.dailyPaintTarget}
|
||||||
prefix="P"
|
prefix={t("scoreboard.labels.refinishabbrev")}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col {...statSpans}>
|
<Col {...statSpans}>
|
||||||
@@ -181,7 +187,12 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
<Divider style={{ margin: 5 }} />
|
<Divider style={{ margin: 5 }} />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<Col {...statSpans}></Col>
|
<Col {...statSpans}>
|
||||||
|
<Statistic
|
||||||
|
value={"\u00A0"}
|
||||||
|
prefix={t("scoreboard.labels.total")}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
<Col {...statSpans}>
|
<Col {...statSpans}>
|
||||||
<Statistic
|
<Statistic
|
||||||
value={(values.todayPaint + values.todayBody).toFixed(1)}
|
value={(values.todayPaint + values.todayBody).toFixed(1)}
|
||||||
@@ -240,6 +251,29 @@ export function ScoreboardTargetsTable({ bodyshop, scoreBoardlist }) {
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Divider style={{ margin: 5 }} />
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Col {...statSpans}>
|
||||||
|
<Statistic
|
||||||
|
value={"\u00A0"}
|
||||||
|
prefix={t("scoreboard.labels.jobs")}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col {...statSpans}>
|
||||||
|
<Statistic value={values.todayJobs} />
|
||||||
|
</Col>
|
||||||
|
<Col {...statSpans} />
|
||||||
|
<Col {...statSpans}>
|
||||||
|
<Statistic value={values.weeklyJobs} />
|
||||||
|
</Col>
|
||||||
|
<Col {...statSpans} />
|
||||||
|
<Col {...statSpans} />
|
||||||
|
<Col {...statSpans}>
|
||||||
|
<Statistic value={values.toDateJobs} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -2758,6 +2758,7 @@
|
|||||||
"allemployeetimetickets": "All Employee Time Tickets",
|
"allemployeetimetickets": "All Employee Time Tickets",
|
||||||
"asoftodaytarget": "As of Today",
|
"asoftodaytarget": "As of Today",
|
||||||
"body": "Body",
|
"body": "Body",
|
||||||
|
"bodyabbrev": "B",
|
||||||
"bodycharttitle": "Body Targets vs Actual",
|
"bodycharttitle": "Body Targets vs Actual",
|
||||||
"calendarperiod": "Periods based on calendar weeks/months.",
|
"calendarperiod": "Periods based on calendar weeks/months.",
|
||||||
"combinedcharttitle": "Combined Targets vs Actual",
|
"combinedcharttitle": "Combined Targets vs Actual",
|
||||||
@@ -2774,6 +2775,7 @@
|
|||||||
"productivestatistics": "Productive Hours Statistics",
|
"productivestatistics": "Productive Hours Statistics",
|
||||||
"productivetimeticketsoverdate": "Productive Hours over Selected Dates",
|
"productivetimeticketsoverdate": "Productive Hours over Selected Dates",
|
||||||
"refinish": "Refinish",
|
"refinish": "Refinish",
|
||||||
|
"refinishabbrev": "R",
|
||||||
"refinishcharttitle": "Refinish Targets vs Actual",
|
"refinishcharttitle": "Refinish Targets vs Actual",
|
||||||
"targets": "Targets",
|
"targets": "Targets",
|
||||||
"thismonth": "This Month",
|
"thismonth": "This Month",
|
||||||
@@ -2781,6 +2783,7 @@
|
|||||||
"timetickets": "Time Tickets",
|
"timetickets": "Time Tickets",
|
||||||
"timeticketsemployee": "Time Tickets by Employee",
|
"timeticketsemployee": "Time Tickets by Employee",
|
||||||
"todateactual": "Actual (MTD)",
|
"todateactual": "Actual (MTD)",
|
||||||
|
"total": "Total",
|
||||||
"totalhrs": "Total Hours",
|
"totalhrs": "Total Hours",
|
||||||
"totaloverperiod": "Total over Selected Dates",
|
"totaloverperiod": "Total over Selected Dates",
|
||||||
"weeklyactual": "Actual (W)",
|
"weeklyactual": "Actual (W)",
|
||||||
|
|||||||
@@ -2758,6 +2758,7 @@
|
|||||||
"allemployeetimetickets": "",
|
"allemployeetimetickets": "",
|
||||||
"asoftodaytarget": "",
|
"asoftodaytarget": "",
|
||||||
"body": "",
|
"body": "",
|
||||||
|
"bodyabbrev": "",
|
||||||
"bodycharttitle": "",
|
"bodycharttitle": "",
|
||||||
"calendarperiod": "",
|
"calendarperiod": "",
|
||||||
"combinedcharttitle": "",
|
"combinedcharttitle": "",
|
||||||
@@ -2774,6 +2775,7 @@
|
|||||||
"productivestatistics": "",
|
"productivestatistics": "",
|
||||||
"productivetimeticketsoverdate": "",
|
"productivetimeticketsoverdate": "",
|
||||||
"refinish": "",
|
"refinish": "",
|
||||||
|
"refinishabbrev": "",
|
||||||
"refinishcharttitle": "",
|
"refinishcharttitle": "",
|
||||||
"targets": "",
|
"targets": "",
|
||||||
"thismonth": "",
|
"thismonth": "",
|
||||||
@@ -2781,6 +2783,7 @@
|
|||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"timeticketsemployee": "",
|
"timeticketsemployee": "",
|
||||||
"todateactual": "",
|
"todateactual": "",
|
||||||
|
"total": "",
|
||||||
"totalhrs": "",
|
"totalhrs": "",
|
||||||
"totaloverperiod": "",
|
"totaloverperiod": "",
|
||||||
"weeklyactual": "",
|
"weeklyactual": "",
|
||||||
|
|||||||
@@ -2758,6 +2758,7 @@
|
|||||||
"allemployeetimetickets": "",
|
"allemployeetimetickets": "",
|
||||||
"asoftodaytarget": "",
|
"asoftodaytarget": "",
|
||||||
"body": "",
|
"body": "",
|
||||||
|
"bodyabbrev": "",
|
||||||
"bodycharttitle": "",
|
"bodycharttitle": "",
|
||||||
"calendarperiod": "",
|
"calendarperiod": "",
|
||||||
"combinedcharttitle": "",
|
"combinedcharttitle": "",
|
||||||
@@ -2774,6 +2775,7 @@
|
|||||||
"productivestatistics": "",
|
"productivestatistics": "",
|
||||||
"productivetimeticketsoverdate": "",
|
"productivetimeticketsoverdate": "",
|
||||||
"refinish": "",
|
"refinish": "",
|
||||||
|
"refinishabbrev": "",
|
||||||
"refinishcharttitle": "",
|
"refinishcharttitle": "",
|
||||||
"targets": "",
|
"targets": "",
|
||||||
"thismonth": "",
|
"thismonth": "",
|
||||||
@@ -2781,6 +2783,7 @@
|
|||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"timeticketsemployee": "",
|
"timeticketsemployee": "",
|
||||||
"todateactual": "",
|
"todateactual": "",
|
||||||
|
"total": "",
|
||||||
"totalhrs": "",
|
"totalhrs": "",
|
||||||
"totaloverperiod": "",
|
"totaloverperiod": "",
|
||||||
"weeklyactual": "",
|
"weeklyactual": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user