From 3caf02f3f7f62a19c82a29e65d21d8126d2411e8 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 26 Feb 2021 08:45:31 -0800 Subject: [PATCH 1/8] Removed cost center from tech login. IO-699 --- client/src/redux/store.js | 7 ++++++- server/graphql-client/queries.js | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/redux/store.js b/client/src/redux/store.js index 30d325108..c60519c05 100644 --- a/client/src/redux/store.js +++ b/client/src/redux/store.js @@ -9,7 +9,11 @@ import { import rootReducer from "./root.reducer"; import rootSaga from "./root.saga"; +import * as Sentry from "@sentry/react"; +const sentryReduxEnhancer = Sentry.createReduxEnhancer({ + // Optionally pass options +}); const sagaMiddleWare = createSagaMiddleware(); const reduxSyncConfig = { @@ -32,7 +36,8 @@ const composeEnhancers = : compose; const enhancer = composeEnhancers( - applyMiddleware(...middlewares) + applyMiddleware(...middlewares), + sentryReduxEnhancer // other store enhancers if any ); diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 275c87613..c1fd19819 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -252,7 +252,6 @@ exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employee first_name employee_number id - cost_center pin } }`; From 7e25ca40b8f9922f6d6bdcb90867342a38a4f2f6 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 26 Feb 2021 14:55:16 -0800 Subject: [PATCH 2/8] Shift Clock error handling IO-699 --- bodyshop_translations.babel | 42 +++++++++++++++++++ .../shop-employees.container.jsx | 9 +++- .../time-ticket-shift-form.container.jsx | 4 -- .../time-ticket-shift.container.jsx | 14 +++++++ .../pages/shift-clock/shift-clock.page.jsx | 4 +- client/src/translations/en_us/common.json | 4 +- client/src/translations/es/common.json | 4 +- client/src/translations/fr/common.json | 4 +- 8 files changed, 74 insertions(+), 11 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index e771a1050..f3c5771b0 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -27559,6 +27559,48 @@ + + noemployeeforuser + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + noemployeeforuser_sub + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + diff --git a/client/src/components/shop-employees/shop-employees.container.jsx b/client/src/components/shop-employees/shop-employees.container.jsx index 01d5c0608..d9d57fd69 100644 --- a/client/src/components/shop-employees/shop-employees.container.jsx +++ b/client/src/components/shop-employees/shop-employees.container.jsx @@ -30,6 +30,7 @@ function ShopEmployeesContainer({ bodyshop }) { const [updateEmployee] = useMutation(UPDATE_EMPLOYEE); const [insertEmployees] = useMutation(INSERT_EMPLOYEES); const [deleteEmployee] = useMutation(DELETE_EMPLOYEE); + const handleDelete = (id) => { logImEXEvent("shop_employee_delete"); @@ -57,7 +58,13 @@ function ShopEmployeesContainer({ bodyshop }) { logImEXEvent("shop_employee_update"); updateEmployee({ - variables: { id: employeeState[0].id, employee: values }, + variables: { + id: employeeState[0].id, + employee: { + ...values, + user_email: values.user_email === "" ? null : values.user_email, + }, + }, }) .then((r) => { notification["success"]({ diff --git a/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx b/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx index 72e331867..c2180ee8a 100644 --- a/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx +++ b/client/src/components/time-ticket-shift-form/time-ticket-shift-form.container.jsx @@ -40,10 +40,6 @@ export function TimeTicektShiftContainer({ return assoc && assoc.user && assoc.user.employee && assoc.user.employee.id; }, [bodyshop, currentUser.email]); - console.log( - "🚀 ~ file: time-ticket-shift-form.container.jsx ~ line 42 ~ employeeId", - employeeId - ); const handleFinish = async (values) => { setLoading(true); diff --git a/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx b/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx index a3f27c3c1..d320a8ca9 100644 --- a/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx +++ b/client/src/components/time-ticket-shift/time-ticket-shift.container.jsx @@ -1,5 +1,7 @@ import { useQuery } from "@apollo/client"; +import { Result } from "antd"; import React, { useMemo } from "react"; +import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_ACTIVE_SHIFT_TIME_TICKETS } from "../../graphql/timetickets.queries"; @@ -28,6 +30,7 @@ export function TimeTicketShiftContainer({ currentUser, isTechConsole, }) { + const { t } = useTranslation(); const employeeId = useMemo(() => { const assoc = bodyshop.associations.filter( (a) => a.useremail === currentUser.email @@ -48,6 +51,17 @@ export function TimeTicketShiftContainer({ if (loading) return ; if (error) return ; + if (!employeeId) + return ( +
+ +
+ ); + return (
{data.timetickets.length > 0 ? ( diff --git a/client/src/pages/shift-clock/shift-clock.page.jsx b/client/src/pages/shift-clock/shift-clock.page.jsx index 15209ce06..d026da567 100644 --- a/client/src/pages/shift-clock/shift-clock.page.jsx +++ b/client/src/pages/shift-clock/shift-clock.page.jsx @@ -5,9 +5,7 @@ import TimeTicketShift from "../../components/time-ticket-shift/time-ticket-shif export default function ShiftClock() { return ( -
- -
+
); } diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 5a308a29e..0d663e616 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1691,7 +1691,9 @@ "clockingin": "Error while clocking in. {{message}}", "clockingout": "Error while clocking out. {{message}}", "creating": "Error creating time ticket. {{message}}", - "deleting": "Error deleting time ticket. {{message}}" + "deleting": "Error deleting time ticket. {{message}}", + "noemployeeforuser": "Unable to use Shift Clock", + "noemployeeforuser_sub": "An employee record has not been created for this user. Please create one before using the shift clock. " }, "fields": { "actualhrs": "Actual Hours", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 4a9bfdf49..f98d2a6a8 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1691,7 +1691,9 @@ "clockingin": "", "clockingout": "", "creating": "", - "deleting": "" + "deleting": "", + "noemployeeforuser": "", + "noemployeeforuser_sub": "" }, "fields": { "actualhrs": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 26b251e04..62a05a54b 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1691,7 +1691,9 @@ "clockingin": "", "clockingout": "", "creating": "", - "deleting": "" + "deleting": "", + "noemployeeforuser": "", + "noemployeeforuser_sub": "" }, "fields": { "actualhrs": "", From dd067378b5c2c338dc4e98ab400311991d882f9c Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 26 Feb 2021 15:01:39 -0800 Subject: [PATCH 3/8] Added subject to reminder generation IO-712 --- .../components/schedule-event/schedule-event.component.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/schedule-event/schedule-event.component.jsx b/client/src/components/schedule-event/schedule-event.component.jsx index c1fc006d9..4587e4e97 100644 --- a/client/src/components/schedule-event/schedule-event.component.jsx +++ b/client/src/components/schedule-event/schedule-event.component.jsx @@ -80,12 +80,13 @@ export function ScheduleEventComponent({ ) : null} ) : ( @@ -126,6 +128,15 @@ export function BillsListTableComponent({ )} + {record.isinhouse && ( + + )} ), }, @@ -275,7 +286,7 @@ export function BillsListTableComponent({ .map((i) => { return { line_desc: i.line_desc, - // db_price: i.actual_price, + // db_price: i.actual_price, act_price: i.actual_price, quantity: i.quantity, joblineid: i.joblineid, diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index f930432be..009597238 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -40,7 +40,7 @@ export function PartsOrderListTableComponent({ setPartsReceiveContext, }) { const responsibilityCenters = bodyshop.md_responsibility_centers; - + const Templates = TemplateList("partsorder"); const { t } = useTranslation(); const [state, setState] = useState({ sortedInfo: {}, @@ -105,7 +105,7 @@ export function PartsOrderListTableComponent({ dataIndex: "actions", key: "actions", render: (text, record) => ( - + @@ -153,7 +156,7 @@ export function BillsListPage({ linesToOrder: record.billlines.map((i) => { return { line_desc: i.line_desc, - // db_price: i.actual_price, + // db_price: i.actual_price, act_price: i.actual_price, quantity: i.quantity, joblineid: i.joblineid, @@ -167,6 +170,15 @@ export function BillsListPage({ {t("bills.actions.return")} + {record.isinhouse && ( + + )} ), }, From d90f61fabd483fda87148b497829d3b27d0814f6 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 26 Feb 2021 16:07:12 -0800 Subject: [PATCH 7/8] Add missing label. IO-720 --- bodyshop_translations.babel | 21 +++++++++++++++++++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 4 files changed, 24 insertions(+) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index f3c5771b0..13fdc4c6b 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4099,6 +4099,27 @@ + + checklist-view + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + close false diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 0d663e616..b2520ab2f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -270,6 +270,7 @@ "jobs": { "admin": "Jobs -> Admin", "available-list": "Jobs -> Available List", + "checklist-view": "Jobs -> Checklist View", "close": "Jobs -> Close", "create": "Jobs -> Create", "deliver": "Jobs -> Deliver", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index f98d2a6a8..c488ebcc7 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -270,6 +270,7 @@ "jobs": { "admin": "", "available-list": "", + "checklist-view": "", "close": "", "create": "", "deliver": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 62a05a54b..1615b838a 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -270,6 +270,7 @@ "jobs": { "admin": "", "available-list": "", + "checklist-view": "", "close": "", "create": "", "deliver": "", From 9a42e34a9e00e347623852a2e2e56754fb3f037a Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 26 Feb 2021 16:16:20 -0800 Subject: [PATCH 8/8] Resolve filtering on part status IO-716 --- client/src/components/job-detail-lines/job-lines.component.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index f1b564d36..8f5ce8a2e 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -246,6 +246,8 @@ export function JobLinesComponent({ sorter: (a, b) => alphaSort(a.status, b.status), sortOrder: state.sortedInfo.columnKey === "status" && state.sortedInfo.order, + filteredValue: state.filteredInfo.status || null, + filters: (jobLines && jobLines