From 9ddcb1f27db478f378b056bdb0030462efdf2e63 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Wed, 20 Jul 2022 15:07:37 -0700
Subject: [PATCH] IO-1985 add Est to actie and ready jobs screens.
---
bodyshop_translations.babel | 21 +++++++++++++++
.../jobs-list/jobs-list.component.jsx | 26 +++++++++++++++++++
.../jobs-ready-list.component.jsx | 26 +++++++++++++++++++
client/src/graphql/jobs.queries.js | 2 ++
client/src/translations/en_us/common.json | 1 +
client/src/translations/es/common.json | 1 +
client/src/translations/fr/common.json | 1 +
7 files changed, 78 insertions(+)
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 98c5c1288..0ab4e1f61 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -27406,6 +27406,27 @@
+
+ estimator
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
existing_jobs
false
diff --git a/client/src/components/jobs-list/jobs-list.component.jsx b/client/src/components/jobs-list/jobs-list.component.jsx
index 3c2553462..82620dd63 100644
--- a/client/src/components/jobs-list/jobs-list.component.jsx
+++ b/client/src/components/jobs-list/jobs-list.component.jsx
@@ -264,6 +264,32 @@ export function JobsList({ bodyshop }) {
{record.clm_total}
),
},
+ {
+ title: t("jobs.labels.estimator"),
+ dataIndex: "jobs.labels.estimator",
+ key: "jobs.labels.estimator",
+ ellipsis: true,
+ responsive: ["xl"],
+ filterSearch: true,
+ filters:
+ (jobs &&
+ jobs
+ .map((j) => `${j.est_ct_fn || ""} ${j.est_ct_ln || ""}`.trim())
+ .filter(onlyUnique)
+ .map((s) => {
+ return {
+ text: s || "N/A",
+ value: [s],
+ };
+ })) ||
+ [],
+ onFilter: (value, record) =>
+ value.includes(
+ `${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim()
+ ),
+ render: (text, record) =>
+ `${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim(),
+ },
{
title: t("jobs.fields.comment"),
dataIndex: "comment",
diff --git a/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx b/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx
index e1a598562..47fd2fc15 100644
--- a/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx
+++ b/client/src/components/jobs-ready-list/jobs-ready-list.component.jsx
@@ -276,6 +276,32 @@ export function JobsReadyList({ bodyshop }) {
{record.clm_total}
),
},
+ {
+ title: t("jobs.labels.estimator"),
+ dataIndex: "jobs.labels.estimator",
+ key: "jobs.labels.estimator",
+ ellipsis: true,
+ responsive: ["xl"],
+ filterSearch: true,
+ filters:
+ (jobs &&
+ jobs
+ .map((j) => `${j.est_ct_fn || ""} ${j.est_ct_ln || ""}`.trim())
+ .filter(onlyUnique)
+ .map((s) => {
+ return {
+ text: s || "N/A",
+ value: [s],
+ };
+ })) ||
+ [],
+ onFilter: (value, record) =>
+ value.includes(
+ `${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim()
+ ),
+ render: (text, record) =>
+ `${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim(),
+ },
{
title: t("jobs.fields.comment"),
dataIndex: "comment",
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index e5dcbda9c..f902c19a0 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -40,6 +40,8 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
updated_at
ded_amt
suspended
+ est_ct_fn
+ est_ct_ln
}
}
`;
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index e0406f16c..b4748b540 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1616,6 +1616,7 @@
"duplicateconfirm": "Are you sure you want to duplicate this job? Some elements of this job will not be duplicated.",
"employeeassignments": "Employee Assignments",
"estimatelines": "Estimate Lines",
+ "estimator": "Estimator",
"existing_jobs": "Existing Jobs",
"federal_tax_amt": "Federal Taxes",
"gpdollars": "$ G.P.",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 1d2a79972..63d161450 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1616,6 +1616,7 @@
"duplicateconfirm": "",
"employeeassignments": "",
"estimatelines": "",
+ "estimator": "",
"existing_jobs": "Empleos existentes",
"federal_tax_amt": "",
"gpdollars": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 39b59c5ba..eeef96c19 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1616,6 +1616,7 @@
"duplicateconfirm": "",
"employeeassignments": "",
"estimatelines": "",
+ "estimator": "",
"existing_jobs": "Emplois existants",
"federal_tax_amt": "",
"gpdollars": "",