From 0089e50a2976d1506b8764755b8e5f33dbd715e8 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 9 Jun 2022 13:18:49 -0700 Subject: [PATCH 1/4] IO-1862 Only show remove from production when job in production on close screen. --- client/src/graphql/jobs.queries.js | 1 + client/src/pages/jobs-close/jobs-close.component.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index eba649d29..d74f706d3 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -1829,6 +1829,7 @@ export const QUERY_JOB_CLOSE_DETAILS = gql` ins_co_id dms_allocation id + inproduction ded_amt ded_status depreciation_taxes diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index 6106a013a..ac8653788 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -250,7 +250,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) { onlyFuture={!!bodyshop.cdk_dealerid} /> - {!jobRO && ( + {!jobRO && job.inproduction && ( Date: Thu, 9 Jun 2022 13:35:34 -0700 Subject: [PATCH 2/4] IO-1911 Create separate query for time tickets scoreboard. --- .../scoreboard-timetickets.component.jsx | 4 +-- client/src/graphql/timetickets.queries.js | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx index f85982359..35c8e2b8c 100644 --- a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx +++ b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx @@ -5,7 +5,7 @@ import moment from "moment"; import queryString from "query-string"; import React, { useMemo } from "react"; import { useLocation } from "react-router-dom"; -import { QUERY_TIME_TICKETS_IN_RANGE } from "../../graphql/timetickets.queries"; +import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries"; import AlertComponent from "../alert/alert.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util"; @@ -59,7 +59,7 @@ export default function ScoreboardTimeTickets() { }; }, []); - const { loading, error, data } = useQuery(QUERY_TIME_TICKETS_IN_RANGE, { + const { loading, error, data } = useQuery(QUERY_TIME_TICKETS_IN_RANGE_SB, { variables: { start: startDate.format("YYYY-MM-DD"), end: endDate.format("YYYY-MM-DD"), diff --git a/client/src/graphql/timetickets.queries.js b/client/src/graphql/timetickets.queries.js index 12d370560..0a8108571 100644 --- a/client/src/graphql/timetickets.queries.js +++ b/client/src/graphql/timetickets.queries.js @@ -26,6 +26,40 @@ export const QUERY_TICKETS_BY_JOBID = gql` `; export const QUERY_TIME_TICKETS_IN_RANGE = gql` + query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) { + timetickets( + where: { date: { _gte: $start, _lte: $end } } + order_by: { date: desc_nulls_first } + ) { + actualhrs + ciecacode + clockoff + clockon + cost_center + created_at + date + id + rate + productivehrs + memo + jobid + flat_rate + job { + id + ro_number + } + employeeid + employee { + id + employee_number + first_name + last_name + } + } + } +`; + +export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql` query QUERY_TIME_TICKETS_IN_RANGE( $start: date! $end: date! From f116e89c94eb770b8c5ca4c5b7b35794013fd45c Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 9 Jun 2022 13:57:16 -0700 Subject: [PATCH 3/4] IO-1926 Set export logs for manual items to be array of 1. --- .../bill-mark-exported-button.component.jsx | 2 +- .../jobs-admin-mark-reexport.component.jsx | 2 +- .../payable-mark-selected-exported.component.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx b/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx index 80fa1ae44..cd9d0b3e0 100644 --- a/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx +++ b/client/src/components/bill-mark-exported-button/bill-mark-exported-button.component.jsx @@ -62,7 +62,7 @@ export function BillMarkExportedButton({ bodyshopid: bodyshop.id, billid: bill.id, successful: true, - message: t("general.labels.markedexported"), + message: JSON.stringify([t("general.labels.markedexported")]), useremail: currentUser.email, }, ], diff --git a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx index 70dbf0a31..137c074aa 100644 --- a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx +++ b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx @@ -119,7 +119,7 @@ export function JobAdminMarkReexport({ bodyshopid: bodyshop.id, jobid: job.id, successful: true, - message: t("general.labels.markedexported"), + message: JSON.stringify([t("general.labels.markedexported")]), useremail: currentUser.email, }, ], diff --git a/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx b/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx index 8032e03a5..dcbc33e76 100644 --- a/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx +++ b/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx @@ -62,7 +62,7 @@ export function BillMarkSelectedExported({ bodyshopid: bodyshop.id, billid: id, successful: true, - message: t("general.labels.markedexported"), + message: JSON.stringify([t("general.labels.markedexported")]), useremail: currentUser.email, }; }), From 1f16abf303c52f98074878e28252bf5f530e91bf Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 9 Jun 2022 14:25:59 -0700 Subject: [PATCH 4/4] IO-1860 Scoreboard always show on bottom of button. --- .../job-scoreboard-add-button.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx b/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx index 4ab815d87..f72457ea9 100644 --- a/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx +++ b/client/src/components/job-scoreboard-add-button/job-scoreboard-add-button.component.jsx @@ -169,7 +169,7 @@ export default function ScoreboardAddButton({ }; return ( - +