-
+ ) : (
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+ )}
);
@@ -99,7 +150,7 @@ export default function ScoreboardAddButton({
setLoading(true);
const v = job.joblines.reduce(
(acc, val) => {
- if (val.mod_lbr_ty === "LAB")
+ if (val.mod_lbr_ty !== "LAR")
acc = { ...acc, bodyhrs: acc.bodyhrs + val.mod_lb_hrs };
if (val.mod_lbr_ty === "LAR")
acc = { ...acc, painthrs: acc.painthrs + val.mod_lb_hrs };
diff --git a/client/src/graphql/scoreboard.queries.js b/client/src/graphql/scoreboard.queries.js
index 1132fd65d..e2b5794d5 100644
--- a/client/src/graphql/scoreboard.queries.js
+++ b/client/src/graphql/scoreboard.queries.js
@@ -51,3 +51,14 @@ export const UPDATE_SCOREBOARD_ENTRY = gql`
}
}
`;
+
+export const QUERY_SCOREBOARD_ENTRY = gql`
+ query QUERY_SCOREBOARD_ENTRY($jobid: uuid!) {
+ scoreboard(where: { jobid: { _eq: $jobid } }) {
+ bodyhrs
+ date
+ id
+ painthrs
+ }
+ }
+`;
From eb58274f90d01900b38b431909d5a82d27d701b7 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Tue, 28 Sep 2021 13:19:02 -0700
Subject: [PATCH 17/21] IO-1391 Scoreboard Improvements
---
.../scoreboard-chart.component.jsx | 20 +++--
.../scoreboard-display.component.jsx | 77 ++++++++++++++++++-
.../scoreboard-targets-table.util.js | 6 +-
client/src/graphql/scoreboard.queries.js | 20 +++++
4 files changed, 110 insertions(+), 13 deletions(-)
diff --git a/client/src/components/scoreboard-chart/scoreboard-chart.component.jsx b/client/src/components/scoreboard-chart/scoreboard-chart.component.jsx
index b39d70d5b..7b1fd410e 100644
--- a/client/src/components/scoreboard-chart/scoreboard-chart.component.jsx
+++ b/client/src/components/scoreboard-chart/scoreboard-chart.component.jsx
@@ -18,6 +18,11 @@ import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
import _ from "lodash";
+
+const graphProps = {
+ strokeWidth: 3,
+};
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
@@ -51,7 +56,7 @@ export function ScoreboardChart({ sbEntriesByDate, bodyshop }) {
}
const theValue = {
- date: moment(val).format("D dd"),
+ date: moment(val).format("D ddd"),
paintHrs: _.round(dayhrs.painthrs, 1),
bodyHrs: _.round(dayhrs.bodyhrs, 1),
accTargetHrs: _.round(
@@ -81,36 +86,37 @@ export function ScoreboardChart({ sbEntriesByDate, bodyshop }) {
margin={{ top: 20, right: 20, bottom: 20, left: 20 }}
>