From 3be50b5067d71d27e059d03264bf17ae1a5d1461 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 3 Feb 2023 13:48:49 -0800 Subject: [PATCH] IO-2162 Improved UI for scheduled problem jobs. --- bodyshop_translations.babel | 42 +++++++++++++++++++ .../scheduler-calendar-wrapper.component.jsx | 28 +++++++++++-- .../schedule-job-modal.component.jsx | 7 ++-- client/src/translations/en_us/common.json | 2 + client/src/translations/es/common.json | 2 + client/src/translations/fr/common.json | 2 + 6 files changed, 77 insertions(+), 6 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 6c65bd587..57c7a23e9 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -967,6 +967,27 @@ + + severalerrorsfound + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + smartscheduling false @@ -40901,6 +40922,27 @@ + + gsr_by_ats + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + gsr_by_category false diff --git a/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx b/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx index 95f825c6e..837f5cbbe 100644 --- a/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx +++ b/client/src/components/schedule-calendar-wrapper/scheduler-calendar-wrapper.component.jsx @@ -11,7 +11,7 @@ import HeaderComponent from "./schedule-calendar-header.component"; import "./schedule-calendar.styles.scss"; import JobDetailCards from "../job-detail-cards/job-detail-cards.component"; import { selectProblemJobs } from "../../redux/application/application.selectors"; -import { Alert } from "antd"; +import { Alert, Collapse } from "antd"; import { useTranslation } from "react-i18next"; const mapStateToProps = createStructuredSelector({ @@ -53,7 +53,28 @@ export function ScheduleCalendarWrapperComponent({ return ( <> - {problemJobs && + {problemJobs && problemJobs.length > 2 ? ( + + + {t("appointments.labels.severalerrorsfound")} + + } + > + {problemJobs.map((problem) => ( + + ))} + + + ) : ( problemJobs.map((problem) => ( - ))} + )) + )} { const values = form.getFieldsValue(); - if (values.start) { - calculateScheduleLoad(values.start); - } + if (lbrHrsData) { const totalHours = lbrHrsData.jobs_by_pk.labhrs.aggregate.sum.mod_lb_hrs + @@ -197,6 +195,9 @@ export function ScheduleJobModalComponent({ prev.start !== cur.start}> {() => { const values = form.getFieldsValue(); + if (values.start) { + calculateScheduleLoad(values.start); + } return (
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index e1ace1a22..332f350fd 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -61,6 +61,7 @@ "priorappointments": "Previous Appointments", "reminder": "This is {{shopname}} reminding you about an appointment on {{date}} at {{time}}. Please let us know if you are not able to make the appointment. We look forward to seeing you soon. ", "scheduledfor": "Scheduled appointment for: ", + "severalerrorsfound": "Several jobs have issues which may prevent accurate smart scheduling. Click to expand.", "smartscheduling": "Smart Scheduling", "suggesteddates": "Suggested Dates" }, @@ -2425,6 +2426,7 @@ "export_payables": "Export Log - Payables", "export_payments": "Export Log - Payments", "export_receivables": "Export Log - Receivables", + "gsr_by_atp": "", "gsr_by_ats": "Gross Sales by ATS", "gsr_by_category": "Gross Sales by Category", "gsr_by_csr": "Gross Sales by CSR", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 7391723ee..2b7c7391b 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -61,6 +61,7 @@ "priorappointments": "Nombramientos previos", "reminder": "", "scheduledfor": "Cita programada para:", + "severalerrorsfound": "", "smartscheduling": "", "suggesteddates": "" }, @@ -2425,6 +2426,7 @@ "export_payables": "", "export_payments": "", "export_receivables": "", + "gsr_by_atp": "", "gsr_by_ats": "", "gsr_by_category": "", "gsr_by_csr": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 5d3f9b604..381fe267b 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -61,6 +61,7 @@ "priorappointments": "Rendez-vous précédents", "reminder": "", "scheduledfor": "Rendez-vous prévu pour:", + "severalerrorsfound": "", "smartscheduling": "", "suggesteddates": "" }, @@ -2425,6 +2426,7 @@ "export_payables": "", "export_payments": "", "export_receivables": "", + "gsr_by_atp": "", "gsr_by_ats": "", "gsr_by_category": "", "gsr_by_csr": "",