diff --git a/client/src/components/alert/alert.component.test.jsx b/client/src/components/alert/alert.component.test.jsx index a34644a4b..4fcef958e 100644 --- a/client/src/components/alert/alert.component.test.jsx +++ b/client/src/components/alert/alert.component.test.jsx @@ -4,27 +4,27 @@ import AlertComponent from "./alert.component"; describe("AlertComponent", () => { it("renders with default props", () => { - render(); + render(); expect(screen.getByText("Default Alert")).toBeInTheDocument(); expect(screen.getByRole("alert")).toHaveClass("ant-alert"); }); it("applies type prop correctly", () => { - render(); + render(); const alert = screen.getByRole("alert"); expect(screen.getByText("Success Alert")).toBeInTheDocument(); expect(alert).toHaveClass("ant-alert-success"); }); it("displays description when provided", () => { - render(); + render(); expect(screen.getByText("Error Alert")).toBeInTheDocument(); expect(screen.getByText("Something went wrong")).toBeInTheDocument(); expect(screen.getByRole("alert")).toHaveClass("ant-alert-error"); }); it("is closable and shows icon when props are set", () => { - render(); + render(); expect(screen.getByText("Warning Alert")).toBeInTheDocument(); expect(screen.getByRole("button", { name: /close/i })).toBeInTheDocument(); // Close button }); diff --git a/client/src/components/audit-trail-list/audit-trail-list.container.jsx b/client/src/components/audit-trail-list/audit-trail-list.container.jsx index eb60fd512..2ee71b97c 100644 --- a/client/src/components/audit-trail-list/audit-trail-list.container.jsx +++ b/client/src/components/audit-trail-list/audit-trail-list.container.jsx @@ -17,7 +17,7 @@ export default function AuditTrailListContainer({ recordId }) { return (
{error ? ( - + ) : ( diff --git a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx index bb51a4fff..3fa676862 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx @@ -148,7 +148,7 @@ export function BillDetailEditcontainer({ insertAuditTrail, bodyshop }) { setUpdateLoading(false); }; - if (error) return ; + if (error) return ; if (!search.billid) return <>; //
{t("bills.labels.noneselected")}
; const exported = data?.bills_by_pk && data.bills_by_pk.exported; diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index b275800a5..e754aa129 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -421,7 +421,7 @@ export function BillFormComponent({ /> {form.getFieldValue("is_credit_memo") ? ( - + ) : null}
); diff --git a/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx b/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx index 6b727a76d..1d4c4f293 100644 --- a/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx +++ b/client/src/components/bills-vendors-list/bills-vendors-list.component.jsx @@ -67,7 +67,7 @@ export default function BillsVendorsList() { setState({ ...state, search: e.target.value }); }; - if (error) return ; + if (error) return ; const dataSource = state.search ? data.vendors.filter( diff --git a/client/src/components/card-payment-modal/card-payment-modal.component.jsx b/client/src/components/card-payment-modal/card-payment-modal.component.jsx index cf40c9c50..0f280bdec 100644 --- a/client/src/components/card-payment-modal/card-payment-modal.component.jsx +++ b/client/src/components/card-payment-modal/card-payment-modal.component.jsx @@ -51,10 +51,11 @@ const CardPaymentModalComponent = ({ const { t } = useTranslation(); const notification = useNotification(); - const [, { data, refetch, queryLoading }] = useLazyQuery(QUERY_RO_AND_OWNER_BY_JOB_PKS, { - variables: { jobids: [context.jobid] }, - skip: !context?.jobid - }); + const [executeQuery, { data, loading: queryLoading }] = useLazyQuery(QUERY_RO_AND_OWNER_BY_JOB_PKS); + + const refetch = (variables) => { + return executeQuery({ variables }); + }; const collectIPayFields = () => { const iPayFields = document.querySelectorAll(".ipayfield"); diff --git a/client/src/components/chat-conversation/chat-conversation.component.jsx b/client/src/components/chat-conversation/chat-conversation.component.jsx index c43443812..c72282cec 100644 --- a/client/src/components/chat-conversation/chat-conversation.component.jsx +++ b/client/src/components/chat-conversation/chat-conversation.component.jsx @@ -27,7 +27,7 @@ export function ChatConversationComponent({ if (conversation?.archived) return null; if (loading) return ; - if (error) return ; + if (error) return ; return (
{loading && } - {error && } + {error && } {selectedMedia.filter((s) => s.isSelected).length >= 10 ? (
{t("messaging.labels.maxtenimages")}
) : null} diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index 95513e09c..0e04bf217 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -51,21 +51,29 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh // Query for unread count when chat is not visible and socket is not connected. // (Once socket connects, we stop this query; we keep the last known value in state.) - useQuery(UNREAD_CONVERSATION_COUNT, { + const { data: unreadData, error: unreadError } = useQuery(UNREAD_CONVERSATION_COUNT, { fetchPolicy: "network-only", nextFetchPolicy: "network-only", skip: chatVisible || socket?.connected, - pollInterval: socket?.connected ? 0 : 60 * 1000, - onCompleted: (result) => { - const nextCount = result?.messages_aggregate?.aggregate?.count; - if (typeof nextCount === "number") setUnreadAggregateCount(nextCount); - }, - onError: (err) => { - // Keep last known count; do not force badge to zero on transient failures - console.warn("UNREAD_CONVERSATION_COUNT failed:", err?.message || err); - } + pollInterval: socket?.connected ? 0 : 60 * 1000 }); + // Handle unread count updates in useEffect + useEffect(() => { + if (unreadData) { + const nextCount = unreadData?.messages_aggregate?.aggregate?.count; + if (typeof nextCount === "number") setUnreadAggregateCount(nextCount); + } + }, [unreadData]); + + // Handle unread count errors in useEffect + useEffect(() => { + if (unreadError) { + // Keep last known count; do not force badge to zero on transient failures + console.warn("UNREAD_CONVERSATION_COUNT failed:", unreadError?.message || unreadError); + } + }, [unreadError]); + // Socket connection status -> polling strategy for CONVERSATION_LIST_QUERY useEffect(() => { const handleSocketStatus = () => { diff --git a/client/src/components/chat-send-message/chat-send-message.component.jsx b/client/src/components/chat-send-message/chat-send-message.component.jsx index 370e3ed47..b0ced2028 100644 --- a/client/src/components/chat-send-message/chat-send-message.component.jsx +++ b/client/src/components/chat-send-message/chat-send-message.component.jsx @@ -74,7 +74,7 @@ function ChatSendMessageComponent({ conversation, bodyshop, sendMessage, isSendi } - message={t("messaging.errors.no_consent")} + title={t("messaging.errors.no_consent")} type="error" /> diff --git a/client/src/components/contract-cars/contract-cars.container.jsx b/client/src/components/contract-cars/contract-cars.container.jsx index 21d91c058..1aeb0a983 100644 --- a/client/src/components/contract-cars/contract-cars.container.jsx +++ b/client/src/components/contract-cars/contract-cars.container.jsx @@ -24,7 +24,7 @@ export default function ContractCarsContainer({ selectedCarState, form }) { }); }; - if (error) return ; + if (error) return ; return ( ; + if (error) return ; return ( form.submit()} type="primary" loading={loading}> {t("general.labels.search")} - {error && } + {error && } ; - if (error) return ; + if (error) return ; return ( diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 1fbfe41cb..a6e5ca4e9 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -156,7 +156,7 @@ export function DashboardGridComponent({ currentUser }) { ); if (loading || dashboardLoading) return ; - if (error || dashboardError) return ; + if (error || dashboardError) return ; const handleLayoutChange = async (layout, layouts) => { logImEXEvent("dashboard_change_layout"); diff --git a/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx b/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx index 7aed761ba..3ed0aaedd 100644 --- a/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx +++ b/client/src/components/dms-allocations-summary/dms-allocations-summary.component.jsx @@ -112,7 +112,7 @@ export function DmsAllocationsSummary({ mode, socket, bodyshop, jobId, title, on } > {bodyshop.pbs_configuration?.disablebillwip && ( - + )}
{bodyshop.pbs_configuration?.disablebillwip && ( - + )} - {error && } + {error && } diff --git a/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx b/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx index f64cd2216..edd62746d 100644 --- a/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx +++ b/client/src/components/dms-cdk-makes/dms-cdk-makes.component.jsx @@ -56,7 +56,7 @@ export function DmsCdkVehicles({ form, job }) { setOpen(false); }} > - {error && } + {error && }
(
@@ -201,7 +201,7 @@ export default function RRCustomerSelector({
@@ -234,7 +234,7 @@ export default function RRCustomerSelector({
diff --git a/client/src/components/document-editor/document-editor.container.jsx b/client/src/components/document-editor/document-editor.container.jsx index ed2736d09..5e03c262f 100644 --- a/client/src/components/document-editor/document-editor.container.jsx +++ b/client/src/components/document-editor/document-editor.container.jsx @@ -51,7 +51,7 @@ export function DocumentEditorContainer({ setBodyshop }) { }, [dataShop, setBodyshop]); if (loadingShop) return ; - if (errorShop) return ; + if (errorShop) return ; if (isLocalMedia) { if (imageUrl && filename && jobid) { @@ -66,7 +66,7 @@ export function DocumentEditorContainer({ setBodyshop }) { } if (loadingDoc) return ; - if (errorDoc) return ; + if (errorDoc) return ; if (!dataDoc || !dataDoc.documents_by_pk) return ; return ( diff --git a/client/src/components/email-documents/email-documents.component.jsx b/client/src/components/email-documents/email-documents.component.jsx index 8ce2427fc..5318d8d5b 100644 --- a/client/src/components/email-documents/email-documents.component.jsx +++ b/client/src/components/email-documents/email-documents.component.jsx @@ -45,7 +45,7 @@ export function EmailDocumentsComponent({ emailConfig, form, selectedMediaState, return (
{loading && } - {error && } + {error && } {selectedMedia.filter((s) => s.isSelected).length >= 10 ? (
{t("messaging.labels.maxtenimages")}
) : null} diff --git a/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx b/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx index 2be5ea4b2..4d1f939bb 100644 --- a/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx +++ b/client/src/components/employee-team-search-select/employee-team-search-select.component.jsx @@ -9,7 +9,7 @@ import AlertComponent from "../alert/alert.component"; const EmployeeTeamSearchSelect = ({ ...props }) => { const { loading, error, data } = useQuery(QUERY_TEAMS); - if (error) return ; + if (error) return ; return ( - - - ) : ( - - ) - } - /> + + + {emailValue ? ( +
- - - - - - - - - + + + + + + + + + + + + + + + + {InstanceRenderManager({ + rome: ( + + {/* */} + + + ) + })} + + + + + ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_bills && + warnings.find((w) => w.key === "bills") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_bills") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_cm && + warnings.find((w) => w.key === "cm") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_cm") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_profit && + warnings.find((w) => w.key === "profit") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_profit") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_ar && + warnings.find((w) => w.key === "ar") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_ar") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_sublet && + warnings.find((w) => w.key === "sublet") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_sublet") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_ppd && + warnings.find((w) => w.key === "ppd") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_ppd") + }) + ); + } + return Promise.resolve(); + } + }), + () => ({ + validator(_, value) { + if ( + !PasswordCheck({ bodyshop, value }) && + bodyshop.md_ro_guard.enforce_labor && + warnings.find((w) => w.key === "labor") + ) { + return Promise.reject( + t("jobs.labels.ro_guard.enforce_validation", { + message: t("jobs.labels.ro_guard.enforce_labor") + }) + ); + } + return Promise.resolve(); + } + }) + ]} + > + } type="password" placeholder="Password" disabled={jobRO} /> + + + ) + }, + { + key: "job-performance", + label: t("jobs.labels.performance"), + children: ( + + + - - {InstanceRenderManager({ - rome: ( - - {/* */} - - - ) - })} - - - - - ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_bills && - warnings.find((w) => w.key === "bills") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_bills") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_cm && - warnings.find((w) => w.key === "cm") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_cm") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_profit && - warnings.find((w) => w.key === "profit") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_profit") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_ar && - warnings.find((w) => w.key === "ar") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_ar") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_sublet && - warnings.find((w) => w.key === "sublet") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_sublet") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_ppd && - warnings.find((w) => w.key === "ppd") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_ppd") - }) - ); - } - return Promise.resolve(); - } - }), - () => ({ - validator(_, value) { - if ( - !PasswordCheck({ bodyshop, value }) && - bodyshop.md_ro_guard.enforce_labor && - warnings.find((w) => w.key === "labor") - ) { - return Promise.reject( - t("jobs.labels.ro_guard.enforce_validation", { - message: t("jobs.labels.ro_guard.enforce_labor") - }) - ); - } - return Promise.resolve(); - } - }) - ]} - > - } type="password" placeholder="Password" disabled={jobRO} /> - - - - - - - - - - - + ) + } + ]} + /> ); } diff --git a/client/src/components/job-close-ro-guard/job-close-ro-guard.ppd.jsx b/client/src/components/job-close-ro-guard/job-close-ro-guard.ppd.jsx index 2120ed928..b4ad9b6a8 100644 --- a/client/src/components/job-close-ro-guard/job-close-ro-guard.ppd.jsx +++ b/client/src/components/job-close-ro-guard/job-close-ro-guard.ppd.jsx @@ -70,7 +70,7 @@ export function JobCloseRGuardPpd({ job, warningCallback }) {
{linesWithPPD.length > 0 && ( - + )} ); diff --git a/client/src/components/job-close-ro-guard/job-close-ro-guard.profit.jsx b/client/src/components/job-close-ro-guard/job-close-ro-guard.profit.jsx index def9be44a..cad175e59 100644 --- a/client/src/components/job-close-ro-guard/job-close-ro-guard.profit.jsx +++ b/client/src/components/job-close-ro-guard/job-close-ro-guard.profit.jsx @@ -54,7 +54,7 @@ export function JobCloseRoGuardProfit({ job, bodyshop, warningCallback }) { {enforceProfitPassword && ( - + )} ); diff --git a/client/src/components/job-close-ro-guard/job-close-ro-guard.sublet.jsx b/client/src/components/job-close-ro-guard/job-close-ro-guard.sublet.jsx index 5857b126a..2cfed2a88 100644 --- a/client/src/components/job-close-ro-guard/job-close-ro-guard.sublet.jsx +++ b/client/src/components/job-close-ro-guard/job-close-ro-guard.sublet.jsx @@ -64,7 +64,7 @@ export function JobCloseRGuardSublet({ job, warningCallback }) {
{subletsNotDone.length > 0 && ( - + )} ); diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx index a32a5db3d..97be24a21 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx @@ -95,7 +95,7 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext, insertAuditTra return ( {loading ? : null} - {error ? : null} + {error ? : null} {data ? ( {data.date_last_contacted} @@ -28,7 +28,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_open", - children: ( + content: ( <> {data.date_open} @@ -41,7 +41,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_estimated", - children: ( + content: ( <> {data.date_estimated} @@ -54,7 +54,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_scheduled", - children: ( + content: ( <> {data.date_scheduled} @@ -67,7 +67,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "scheduled_in", - children: ( + content: ( <> {data.scheduled_in} @@ -80,7 +80,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "actual_in", - children: ( + content: ( <> {data.actual_in} @@ -93,7 +93,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_repairstarted", - children: ( + content: ( <> {data.date_repairstarted} @@ -106,7 +106,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "scheduled_completion", - children: ( + content: ( <> {data.scheduled_completion} @@ -119,7 +119,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "actual_completion", - children: ( + content: ( <> {data.actual_completion} @@ -132,7 +132,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "scheduled_delivery", - children: ( + content: ( <> {data.scheduled_delivery} @@ -145,7 +145,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "actual_delivery", - children: ( + content: ( <> {data.actual_delivery} @@ -158,7 +158,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_invoiced", - children: ( + content: ( <> {data.date_invoiced} @@ -171,7 +171,7 @@ export default function JobDetailCardsDatesComponent({ loading, data }) { ? [ { key: "date_exported", - children: ( + content: ( <> {data.date_exported} diff --git a/client/src/components/job-detail-lines/job-lines-expander.component.jsx b/client/src/components/job-detail-lines/job-lines-expander.component.jsx index 136e5e8c0..dcd97a7d1 100644 --- a/client/src/components/job-detail-lines/job-lines-expander.component.jsx +++ b/client/src/components/job-detail-lines/job-lines-expander.component.jsx @@ -36,7 +36,7 @@ export function JobLinesExpander({ jobline, jobid, bodyshop, technician }) { }); if (loading) return ; - if (error) return ; + if (error) return ; return ( diff --git a/client/src/components/job-detail-lines/jobs-lines-expander-simple.component.jsx b/client/src/components/job-detail-lines/jobs-lines-expander-simple.component.jsx index 882572bc1..a13b4f7d7 100644 --- a/client/src/components/job-detail-lines/jobs-lines-expander-simple.component.jsx +++ b/client/src/components/job-detail-lines/jobs-lines-expander-simple.component.jsx @@ -28,7 +28,7 @@ export function JobLinesExpanderSimple({ jobline, jobid, technician }) { }); if (loading) return ; - if (error) return ; + if (error) return ; return ( diff --git a/client/src/components/job-profile-data-warning/job-profile-data-warning.component.jsx b/client/src/components/job-profile-data-warning/job-profile-data-warning.component.jsx index a32d01e8e..a9ee2e09f 100644 --- a/client/src/components/job-profile-data-warning/job-profile-data-warning.component.jsx +++ b/client/src/components/job-profile-data-warning/job-profile-data-warning.component.jsx @@ -11,6 +11,6 @@ export default function JobProfileDataWarning({ job }) { Object.keys(job.materials).length === 0; if (missingProfileInfo && InstanceRenderManager({ rome: true })) - return ; + return ; return null; } diff --git a/client/src/components/job-reconciliation-modal/job-reconciliation.modal.container.jsx b/client/src/components/job-reconciliation-modal/job-reconciliation.modal.container.jsx index 3dce6b47b..b55e30aaf 100644 --- a/client/src/components/job-reconciliation-modal/job-reconciliation.modal.container.jsx +++ b/client/src/components/job-reconciliation-modal/job-reconciliation.modal.container.jsx @@ -47,7 +47,7 @@ function JobReconciliationModalContainer({ reconciliationModal, toggleModalVisib className="imex-reconciliation-modal" > {loading && } - {error && } + {error && } {data && } ); diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx index 2f241f5af..151c85405 100644 --- a/client/src/components/job-search-select/job-search-select.component.jsx +++ b/client/src/components/job-search-select/job-search-select.component.jsx @@ -95,8 +95,8 @@ const JobSearchSelect = ( : null} - {error ? : null} - {idError ? : null} + {error ? : null} + {idError ? : null} ); }; diff --git a/client/src/components/job-totals-table/job-totals-table.component.jsx b/client/src/components/job-totals-table/job-totals-table.component.jsx index ebe0d3ac5..ecc8a48a8 100644 --- a/client/src/components/job-totals-table/job-totals-table.component.jsx +++ b/client/src/components/job-totals-table/job-totals-table.component.jsx @@ -65,23 +65,29 @@ export function JobsTotalsTableComponent({ jobRO, currentUser, job }) { - - -
-
-                          {JSON.stringify(
-                            {
-                              CIECA: job.cieca_ttl?.data,
-                              CIECASTL: job.cieca_stl?.data,
-                              ImEXCalc: job.job_totals
-                            },
-                            null,
-                            2
-                          )}
-                        
-
-
-
+ +
+                              {JSON.stringify(
+                                {
+                                  CIECA: job.cieca_ttl?.data,
+                                  CIECASTL: job.cieca_stl?.data,
+                                  ImEXCalc: job.job_totals
+                                },
+                                null,
+                                2
+                              )}
+                            
+ + ) + } + ]} + />
)} diff --git a/client/src/components/jobs-available-table/jobs-available-table.component.jsx b/client/src/components/jobs-available-table/jobs-available-table.component.jsx index f42f8dc55..d5b23235d 100644 --- a/client/src/components/jobs-available-table/jobs-available-table.component.jsx +++ b/client/src/components/jobs-available-table/jobs-available-table.component.jsx @@ -148,7 +148,7 @@ export function JobsAvailableComponent({ bodyshop, loading, data, refetch, addJo )} - {isClosed && } + {isClosed && } ); } diff --git a/client/src/components/jobs-available-table/jobs-available-table.container.jsx b/client/src/components/jobs-available-table/jobs-available-table.container.jsx index d7142cd4a..91e63ba83 100644 --- a/client/src/components/jobs-available-table/jobs-available-table.container.jsx +++ b/client/src/components/jobs-available-table/jobs-available-table.container.jsx @@ -382,7 +382,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail if (availableJobId && clm_no) addJobAsSupp({ id: availableJobId, clm_no: clm_no }); }, [addJobAsSupp, availableJobId, clm_no]); - if (error) return ; + if (error) return ; return ( diff --git a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx index 9e009e66e..ccd887d8f 100644 --- a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx +++ b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx @@ -41,282 +41,306 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { return (
- - - - - - - - - - - - - - - - - - - - - - - {t("jobs.fields.ins_ct_ln")} - - - } - name="ins_ct_ln" - > - - - - - - PhoneItemFormatterValidation(getFieldValue, "ins_ph1")]} - > - - - - - - - - - - - - - - - - {t("jobs.fields.est_ct_fn")} - - - } - name="est_ct_fn" - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {InstanceRenderManager({ - imex: - })} - - - - - - - - - - - {bodyshop.region_config.toLowerCase().startsWith("ca") && ( - - - - )} - - - - - - - - - - - - - - {InstanceRenderManager({ - imex: ( + - - + + - - + + - - + + + + + + + + + + + + + + {t("jobs.fields.ins_ct_ln")} + + + } + name="ins_ct_ln" + > + + + + + + PhoneItemFormatterValidation(getFieldValue, "ins_ph1")]} + > + + + + + + + + + + + + + + + + {t("jobs.fields.est_ct_fn")} + + + } + name="est_ct_fn" + > + + + + + + + + + + + + + + + + + + + + + + ) - })} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { - // - // - // - // - // - // - } - - - - - - - - - + }, + { + key: "claim", + label: t("menus.jobsdetail.claimdetail"), + forceRender: true, + children: ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) + }, + { + key: "financial", + label: t("menus.jobsdetail.financials"), + forceRender: true, + children: ( + <> + + {InstanceRenderManager({ + imex: + })} + + + + + + + + + + + {bodyshop.region_config.toLowerCase().startsWith("ca") && ( + + + + )} + + + + + + + + + + + + + + {InstanceRenderManager({ + imex: ( + + + + + + + + + + + + ) + })} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + // + // + // + // + // + // + } + + + + + + + + + ) + } + ]} + /> {InstanceRenderManager({ rome: ( diff --git a/client/src/components/jobs-create-owner-info/jobs-create-owner-info.container.jsx b/client/src/components/jobs-create-owner-info/jobs-create-owner-info.container.jsx index fe7ebf7c9..36b5f6a77 100644 --- a/client/src/components/jobs-create-owner-info/jobs-create-owner-info.container.jsx +++ b/client/src/components/jobs-create-owner-info/jobs-create-owner-info.container.jsx @@ -14,6 +14,6 @@ export default function JobsCreateOwnerContainer() { nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; return ; } diff --git a/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.container.jsx b/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.container.jsx index dc4f2701d..3ed08d199 100644 --- a/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.container.jsx +++ b/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.container.jsx @@ -14,7 +14,7 @@ export default function JobsCreateVehicleInfoContainer({ form }) { nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; return ; } diff --git a/client/src/components/jobs-detail-labor/jobs-detail-labor.container.jsx b/client/src/components/jobs-detail-labor/jobs-detail-labor.container.jsx index bc9075835..9b816319c 100644 --- a/client/src/components/jobs-detail-labor/jobs-detail-labor.container.jsx +++ b/client/src/components/jobs-detail-labor/jobs-detail-labor.container.jsx @@ -11,7 +11,7 @@ export default function JobsDetailLaborContainer({ jobId, techConsole, job }) { nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; return ( - {billsQuery.error ? : null} + {billsQuery.error ? : null}
diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.labor.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.labor.component.jsx index 4ac724b7d..dd4f0b087 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.labor.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.labor.component.jsx @@ -13,595 +13,605 @@ export function JobsDetailRatesLabor({ jobRO, expanded, form }) { const { t } = useTranslation(); return ( - - - - - - - - - - - {() => { - return ( - - + + + + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + + + + {() => { + return ( + + + + ); + }} - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + + + + + + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + + + + {() => { + return ( + + + + ); + }} - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - + - ); - }} - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + ) + } + ]} + /> ); } diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.materials.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.materials.component.jsx index b49245903..740f808c8 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.materials.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.materials.component.jsx @@ -13,152 +13,162 @@ export function JobsDetailRatesMaterials({ jobRO, expanded, form }) { const { t } = useTranslation(); return ( - - - - - - - - - - - - - - - - - {() => { - return ( - - + + + + - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - + + - ); - }} - - - - - - - - - - - - - - - - - - - + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + ) + } + ]} + /> ); } diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.other.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.other.component.jsx index e8ba91998..a38e9ad9a 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.other.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.other.component.jsx @@ -10,83 +10,93 @@ export function JobsDetailRatesOther({ expanded }) { const { t } = useTranslation(); return ( - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + ) + } + ]} + /> ); } diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx index ef83b7bfc..43bdfd95e 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx @@ -14,1004 +14,1110 @@ export function JobsDetailRatesParts({ jobRO, expanded, form }) { const { t } = useTranslation(); return ( - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {() => { - return ( - - - - ); - }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {InstanceRenderManager({ imex: true, rome: false }) ? ( + - - - - - - {" "} + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {() => { + return ( + + + + ); + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {InstanceRenderManager({ imex: true, rome: false }) ? ( + <> + + + + + + {" "} + + ) : null} + + + + {InstanceRenderManager({ imex: true, rome: false }) ? ( + + + + ) : null} + + + + - ) : null} - - - - {InstanceRenderManager({ imex: true, rome: false }) ? ( - - - - ) : null} - - - - - - + ) + } + ]} + /> ); } diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx index 2a1b289e0..026eb8510 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx @@ -47,11 +47,17 @@ export function JobsDetailRatesTaxes({ jobRO, expanded, bodyshop }) { ); } return ( - - - {formItems} - - + ); } diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx index 5281e50ae..e8c879ddb 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx @@ -48,7 +48,7 @@ export function JobsDocumentsContainer({ }); if (loading) return ; - if (error) return ; + if (error) return ; if (Imgproxy.treatment === "on") { return ( diff --git a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.container.jsx b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.container.jsx index 9191b262c..7b6db9c87 100644 --- a/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.container.jsx +++ b/client/src/components/jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.container.jsx @@ -21,7 +21,7 @@ export default function JobsDocumentsImgproxyContainer({ jobId, billId, document }); if (loading) return ; - if (error) return ; + if (error) return ; return ( {optimized && ( - + )} {loading ? : null} - {error ? : null} + {error ? : null} ; + if (error) return ; const jobs = data ? searchText === "" diff --git a/client/src/components/jobs-notes/jobs-notes.container.jsx b/client/src/components/jobs-notes/jobs-notes.container.jsx index c58d905b7..e80d7fc53 100644 --- a/client/src/components/jobs-notes/jobs-notes.container.jsx +++ b/client/src/components/jobs-notes/jobs-notes.container.jsx @@ -53,7 +53,7 @@ export function JobNotesContainer({ jobId, insertAuditTrail }) { }; //if (loading) return ; - if (error) return ; + if (error) return ; return ( ; + if (error) return ; const jobs = data ? searchText === "" diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx index 706c09764..ca796f81d 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx @@ -264,7 +264,7 @@ export function LaborAllocationsTable({ )} {showWarning && Math.abs(summary.difference.toFixed(1)) !== 0 && ( - + )} ); diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx index c1330ec87..046f669e0 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx @@ -304,7 +304,7 @@ export function PayrollLaborAllocationsTable({ )} {showWarning && summary.difference !== 0 && ( - + )} ); diff --git a/client/src/components/notification-center/notification-center.component.jsx b/client/src/components/notification-center/notification-center.component.jsx index d5c3c7d2f..67fb7119d 100644 --- a/client/src/components/notification-center/notification-center.component.jsx +++ b/client/src/components/notification-center/notification-center.component.jsx @@ -113,7 +113,7 @@ const NotificationCenterComponent = forwardRef( {!isEmployee ? (
- +
) : ( { setIsDirty(false); }; - if (error) return ; + if (error) return ; if (loading) return ; const columns = [ @@ -201,7 +201,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => { > {!isEmployee && (
- +
)}
diff --git a/client/src/components/owner-find-modal/owner-find-modal.container.jsx b/client/src/components/owner-find-modal/owner-find-modal.container.jsx index b00c70ed6..580466c82 100644 --- a/client/src/components/owner-find-modal/owner-find-modal.container.jsx +++ b/client/src/components/owner-find-modal/owner-find-modal.container.jsx @@ -45,7 +45,7 @@ export default function OwnerFindModalContainer({ {...modalProps} > {loading ? : null} - {error ? : null} + {error ? : null} {owner ? ( <> { {idLoading || loading ? : null} - {error ? : null} - {idError ? : null} + {error ? : null} + {idError ? : null} ); }; diff --git a/client/src/components/owners-list/owners-list.container.jsx b/client/src/components/owners-list/owners-list.container.jsx index 45cd0c4f0..51778e350 100644 --- a/client/src/components/owners-list/owners-list.container.jsx +++ b/client/src/components/owners-list/owners-list.container.jsx @@ -24,7 +24,7 @@ export default function OwnersListContainer() { } }); - if (error) return ; + if (error) return ; return ( - {error ? : null} + {error ? : null}
{loading ? ( diff --git a/client/src/components/parts-queue-card/parts-queue-card.component.jsx b/client/src/components/parts-queue-card/parts-queue-card.component.jsx index 85b351017..6ad18d930 100644 --- a/client/src/components/parts-queue-card/parts-queue-card.component.jsx +++ b/client/src/components/parts-queue-card/parts-queue-card.component.jsx @@ -50,7 +50,7 @@ export default function PartsQueueDetailCard() { return ( {loading ? : null} - {error ? : null} + {error ? : null} {data ? ( ; + if (error) return ; const jobs = data ? searchText === "" diff --git a/client/src/components/parts-shop-info/parts-shop-info.container.jsx b/client/src/components/parts-shop-info/parts-shop-info.container.jsx index 0614050d9..2c9247e1e 100644 --- a/client/src/components/parts-shop-info/parts-shop-info.container.jsx +++ b/client/src/components/parts-shop-info/parts-shop-info.container.jsx @@ -45,7 +45,7 @@ export default function PartsShopInfoContainer() { if (data) form.resetFields(); }, [form, data]); - if (error) return ; + if (error) return ; if (loading) return ; return ( diff --git a/client/src/components/payment-form/payment-form.totalpayments.component.jsx b/client/src/components/payment-form/payment-form.totalpayments.component.jsx index 94dae676b..2ec381f93 100644 --- a/client/src/components/payment-form/payment-form.totalpayments.component.jsx +++ b/client/src/components/payment-form/payment-form.totalpayments.component.jsx @@ -17,7 +17,7 @@ export default function PaymentFormTotalPayments({ jobid }) { }); if (loading) return ; - if (error) return ; + if (error) return ; if (!data) return <>; const totalPayments = data.jobs_by_pk.payments.reduce((acc, val) => { diff --git a/client/src/components/phonebook-form/phonebook-form.container.jsx b/client/src/components/phonebook-form/phonebook-form.container.jsx index cc4a3b0e5..579f0d5d5 100644 --- a/client/src/components/phonebook-form/phonebook-form.container.jsx +++ b/client/src/components/phonebook-form/phonebook-form.container.jsx @@ -132,7 +132,7 @@ function PhonebookFormContainer({ refetch, bodyshop }) { }, [data, form, phonebookentry]); if (loading) return ; - if (error) return ; + if (error) return ; return ( {loading && } - {error && } + {error && } {!loading && data && (
diff --git a/client/src/components/production-list-table/production-list-table.component.jsx b/client/src/components/production-list-table/production-list-table.component.jsx index 4be08366c..9910db5aa 100644 --- a/client/src/components/production-list-table/production-list-table.component.jsx +++ b/client/src/components/production-list-table/production-list-table.component.jsx @@ -219,7 +219,7 @@ export function ProductionListTable({ loading, data, refetch, bodyshop, technici {hasUnsavedChanges && ( {t("general.messages.unsavedchanges")} ; + if (error) return ; return ( {React.cloneElement(children, restProps)}
; - return noauth || ; + return noauth || ; } export function HasRbacAccess({ authLevel, bodyshop, requiredAuthLevel, action }) { 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 2ef82040f..f6a402d44 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 @@ -80,40 +80,46 @@ export function ScheduleCalendarWrapperComponent({ {HasFeatureAccess({ featureName: "smartscheduling", bodyshop }) && problemJobs && (problemJobs.length > 2 ? ( - - {t("appointments.labels.severalerrorsfound")} - } - > - - {problemJobs.map((problem) => ( - ]} - values={{ - ro_number: problem.ro_number, - code: problem.code - }} + + {t("appointments.labels.severalerrorsfound")} + + ), + children: ( + + {problemJobs.map((problem) => ( + ]} + values={{ + ro_number: problem.ro_number, + code: problem.code + }} + /> + } /> - } - /> - ))} - - - + ))} + + ) + } + ]} + /> ) : ( {problemJobs.map((problem) => ( ]} diff --git a/client/src/components/schedule-calendar/schedule-calendar.container.jsx b/client/src/components/schedule-calendar/schedule-calendar.container.jsx index cc7bc5fa3..f4497b305 100644 --- a/client/src/components/schedule-calendar/schedule-calendar.container.jsx +++ b/client/src/components/schedule-calendar/schedule-calendar.container.jsx @@ -42,7 +42,7 @@ export function ScheduleCalendarContainer({ calculateScheduleLoad }) { }, [data, range, calculateScheduleLoad]); if (loading) return ; - if (error) return ; + if (error) return ; let normalizedData = [ ...data.appointments.map((e) => { //Required because Hasura returns a string instead of a date object. diff --git a/client/src/components/schedule-existing-appointments-list/schedule-existing-appointments-list.component.jsx b/client/src/components/schedule-existing-appointments-list/schedule-existing-appointments-list.component.jsx index 77ec4bb80..19eba193c 100644 --- a/client/src/components/schedule-existing-appointments-list/schedule-existing-appointments-list.component.jsx +++ b/client/src/components/schedule-existing-appointments-list/schedule-existing-appointments-list.component.jsx @@ -7,7 +7,7 @@ import { DateTimeFormatter } from "../../utils/DateFormatter"; export default function ScheduleExistingAppointmentsList({ existingAppointments }) { const { t } = useTranslation(); if (existingAppointments.loading) return ; - if (existingAppointments.error) return ; + if (existingAppointments.error) return ; return (
diff --git a/client/src/components/schedule-production-list/schedule-production-list.component.jsx b/client/src/components/schedule-production-list/schedule-production-list.component.jsx index 08dc9bc9c..854317255 100644 --- a/client/src/components/schedule-production-list/schedule-production-list.component.jsx +++ b/client/src/components/schedule-production-list/schedule-production-list.component.jsx @@ -19,7 +19,7 @@ export default function ScheduleProductionList() {
e.stopPropagation()} className="jobs-in-production-table"> {loading ? : null} - {error ? : null} + {error ? : null} {data ? (
diff --git a/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx b/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx index 90e698f7b..ba618ae13 100644 --- a/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx +++ b/client/src/components/scoreboard-jobs-list/scoreboard-jobs-list.component.jsx @@ -119,7 +119,7 @@ export default function ScoreboardJobsList() { })) } > - {error && } + {error && } diff --git a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx index ef5cc0b4a..3b024b82a 100644 --- a/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx +++ b/client/src/components/scoreboard-timetickets-stats/scoreboard-timetickets.component.jsx @@ -293,7 +293,7 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) { }; }, [fixedPeriods, data, bodyshop]); - if (error) return ; + if (error) return ; if (loading) return ; return ( diff --git a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx index 97fc13321..439be97e3 100644 --- a/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx +++ b/client/src/components/scoreboard-timetickets/scoreboard-timetickets.component.jsx @@ -219,7 +219,7 @@ export default function ScoreboardTimeTickets() { }; }, [fixedPeriods, data, startDate, endDate]); - if (error) return ; + if (error) return ; if (loading) return ; return ( diff --git a/client/src/components/shop-csi-config/shop-csi-config.component.jsx b/client/src/components/shop-csi-config/shop-csi-config.component.jsx index ecb78de1c..cf8ad7fd8 100644 --- a/client/src/components/shop-csi-config/shop-csi-config.component.jsx +++ b/client/src/components/shop-csi-config/shop-csi-config.component.jsx @@ -19,7 +19,7 @@ export default function ShopCsiConfig() { const { t } = useTranslation(); if (loading) return ; - if (error) return ; + if (error) return ; return (
diff --git a/client/src/components/shop-employees/shop-employees-form.component.jsx b/client/src/components/shop-employees/shop-employees-form.component.jsx index d8b4fe8d8..340b1a4d7 100644 --- a/client/src/components/shop-employees/shop-employees-form.component.jsx +++ b/client/src/components/shop-employees/shop-employees-form.component.jsx @@ -113,7 +113,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) { }; if (!search.employeeId) return null; - if (error) return ; + if (error) return ; const columns = [ { diff --git a/client/src/components/shop-employees/shop-employees.container.jsx b/client/src/components/shop-employees/shop-employees.container.jsx index dc5303f04..8e51dc4c3 100644 --- a/client/src/components/shop-employees/shop-employees.container.jsx +++ b/client/src/components/shop-employees/shop-employees.container.jsx @@ -15,7 +15,7 @@ function ShopEmployeesContainer() { nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; return (
diff --git a/client/src/components/shop-info/shop-info.container.jsx b/client/src/components/shop-info/shop-info.container.jsx index a820dce69..e4252eab5 100644 --- a/client/src/components/shop-info/shop-info.container.jsx +++ b/client/src/components/shop-info/shop-info.container.jsx @@ -68,7 +68,7 @@ export default function ShopInfoContainer() { preserveHiddenFormData(); }, [data, form, preserveHiddenFormData]); - if (error) return ; + if (error) return ; if (loading) return ; return ( @@ -183,7 +182,6 @@ export default function ShopInfoPartsScan({ form }) { label={t("bodyshop.fields.md_parts_scan.mark_critical")} name={[field.name, "mark_critical"]} valuePropName="checked" - initialValue={true} labelCol={{ span: 14 }} wrapperCol={{ span: 10 }} > @@ -242,7 +240,14 @@ export default function ShopInfoPartsScan({ form }) { diff --git a/client/src/components/simplified-parts-jobs-list/simplified-parts-jobs-list.container.jsx b/client/src/components/simplified-parts-jobs-list/simplified-parts-jobs-list.container.jsx index 1585e8467..bba8ce4c1 100644 --- a/client/src/components/simplified-parts-jobs-list/simplified-parts-jobs-list.container.jsx +++ b/client/src/components/simplified-parts-jobs-list/simplified-parts-jobs-list.container.jsx @@ -32,7 +32,7 @@ export function SimplifiedPartsJobsListContainer() { } }); - if (error) return ; + if (error) return ; return ( ; + if (error) return ; return ( ; - if (error) return ; + if (error) return ; return (
diff --git a/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx b/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx index c7e98af68..29d3fc765 100644 --- a/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx +++ b/client/src/components/tech-job-statistics/tech-job-statistics.component.jsx @@ -69,7 +69,7 @@ const TechJobStatistics = ({ technician }) => { }, [data]); if (loading) return ; - if (error) return ; + if (error) return ; return ( diff --git a/client/src/components/tech-login/tech-login.component.jsx b/client/src/components/tech-login/tech-login.component.jsx index 4a2df0772..3014c2a38 100644 --- a/client/src/components/tech-login/tech-login.component.jsx +++ b/client/src/components/tech-login/tech-login.component.jsx @@ -73,7 +73,7 @@ export function TechLogin({ technician, loginError, loginLoading, techLoginStart {t("general.actions.login")} - {loginError ? : null} + {loginError ? : null}
); } diff --git a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx index a9c5e3391..c3fc3c10f 100644 --- a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx +++ b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx @@ -71,7 +71,7 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) { return ( {loading ? : null} - {error ? : null} + {error ? : null} {data ? ( window.history.back()} diff --git a/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx b/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx index dfba5a133..1893457f2 100644 --- a/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx +++ b/client/src/components/tech-lookup-jobs-list/tech-lookup-jobs-list.component.jsx @@ -40,7 +40,7 @@ export function TechLookupJobsList({ bodyshop }) { const history = useNavigate(); const [searchText, setSearchText] = useState(""); - if (error) return ; + if (error) return ; const jobs = data ? searchText === "" 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 4f713425a..0b8c7959e 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 @@ -38,7 +38,7 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is }); if (loading) return ; - if (error) return ; + if (error) return ; if (!employeeId && !technician?.id) return ( diff --git a/client/src/components/time-ticket-task-modal/time-ticket-task-modal.component.jsx b/client/src/components/time-ticket-task-modal/time-ticket-task-modal.component.jsx index ca34b35b7..276b852fe 100644 --- a/client/src/components/time-ticket-task-modal/time-ticket-task-modal.component.jsx +++ b/client/src/components/time-ticket-task-modal/time-ticket-task-modal.component.jsx @@ -122,7 +122,7 @@ export function TimeTicketTaskModalComponent({ bodyshop, form, loading, complete ))}
- + ); }} @@ -131,7 +131,7 @@ export function TimeTicketTaskModalComponent({ bodyshop, form, loading, complete {unassignedHours > 0 && ( @@ -141,7 +141,7 @@ export function TimeTicketTaskModalComponent({ bodyshop, form, loading, complete {bodyshop?.md_tasks_presets?.use_approvals && ( - + )}
diff --git a/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx b/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx index a8564da3b..07e02cf95 100644 --- a/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx +++ b/client/src/components/tt-approvals-list/tt-approvals-list.container.jsx @@ -32,7 +32,7 @@ export function TimeTicketsContainer() { } }); - if (error) return ; + if (error) return ; return ( - {passwordReset.error ? : null} + {passwordReset.error ? : null} diff --git a/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx b/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx index bf678ad35..cb2c27ee1 100644 --- a/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx +++ b/client/src/components/user-validate-pw-reset/user-validate-pw-reset.component.jsx @@ -122,7 +122,7 @@ export function UserValidatePwReset({ passwordReset, validatePasswordReset, oobC > } type="password" placeholder={t("general.labels.password")} /> - {passwordReset.error ? : null} + {passwordReset.error ? : null} diff --git a/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx b/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx index 90083b960..ccc183082 100644 --- a/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx +++ b/client/src/components/vehicle-search-select/vehicle-search-select.component.jsx @@ -81,8 +81,8 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => { : null} {idLoading || loading ? : null} - {error ? : null} - {idError ? : null} + {error ? : null} + {idError ? : null} ); }; diff --git a/client/src/components/vehicles-list/vehicles-list.container.jsx b/client/src/components/vehicles-list/vehicles-list.container.jsx index ba8f9c29b..7546c5741 100644 --- a/client/src/components/vehicles-list/vehicles-list.container.jsx +++ b/client/src/components/vehicles-list/vehicles-list.container.jsx @@ -34,7 +34,7 @@ export function VehiclesListContainer({ isPartsEntry }) { nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; return ( ; - if (error) return ; + if (error) return ; return (
; + if (error) return ; return ( { - if (graphQLErrors) { - graphQLErrors.forEach(({ message, locations, path }) => { +const errorLink = onError(({ error, operation, forward }) => { + if (error?.graphQLErrors) { + error.graphQLErrors.forEach(({ message, locations, path }) => { console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`); }); } - if (networkError) console.log(`[Network error]: ${JSON.stringify(networkError)}`); + if (error?.networkError) console.log(`[Network error]: ${JSON.stringify(error.networkError)}`); console.log(operation.getContext()); return forward(operation); }); diff --git a/client/src/pages/accounting-payables/accounting-payables.container.jsx b/client/src/pages/accounting-payables/accounting-payables.container.jsx index a095fc799..928466b85 100644 --- a/client/src/pages/accounting-payables/accounting-payables.container.jsx +++ b/client/src/pages/accounting-payables/accounting-payables.container.jsx @@ -52,7 +52,7 @@ export function AccountingPayablesContainer({ bodyshop, setBreadcrumbs, setSelec nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; const noPath = !partnerVersion?.qbpath && !(bodyshop && (bodyshopHasDmsKey(bodyshop) || bodyshop?.accountingconfig?.qbo)); @@ -68,7 +68,7 @@ export function AccountingPayablesContainer({ bodyshop, setBreadcrumbs, setSelec } > - {noPath && } + {noPath && } diff --git a/client/src/pages/accounting-payments/accounting-payments.container.jsx b/client/src/pages/accounting-payments/accounting-payments.container.jsx index 0cf739f53..c2428d9c8 100644 --- a/client/src/pages/accounting-payments/accounting-payments.container.jsx +++ b/client/src/pages/accounting-payments/accounting-payments.container.jsx @@ -52,7 +52,7 @@ export function AccountingPaymentsContainer({ bodyshop, setBreadcrumbs, setSelec nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; const noPath = !partnerVersion?.qbpath && !(bodyshop && (bodyshopHasDmsKey(bodyshop) || bodyshop?.accountingconfig?.qbo)); @@ -68,7 +68,7 @@ export function AccountingPaymentsContainer({ bodyshop, setBreadcrumbs, setSelec } > - {noPath && } + {noPath && } diff --git a/client/src/pages/accounting-receivables/accounting-receivables.container.jsx b/client/src/pages/accounting-receivables/accounting-receivables.container.jsx index 05ae32cef..0e0ae28d4 100644 --- a/client/src/pages/accounting-receivables/accounting-receivables.container.jsx +++ b/client/src/pages/accounting-receivables/accounting-receivables.container.jsx @@ -55,7 +55,7 @@ export function AccountingReceivablesContainer({ bodyshop, setBreadcrumbs, setSe nextFetchPolicy: "network-only" }); - if (error) return ; + if (error) return ; const noPath = !partnerVersion?.qbpath && !(bodyshop && (bodyshopHasDmsKey(bodyshop) || bodyshop?.accountingconfig?.qbo)); @@ -71,7 +71,7 @@ export function AccountingReceivablesContainer({ bodyshop, setBreadcrumbs, setSe } > - {noPath && } + {noPath && } diff --git a/client/src/pages/bills/bills.page.container.jsx b/client/src/pages/bills/bills.page.container.jsx index f4a7a1859..9aba8b0cc 100644 --- a/client/src/pages/bills/bills.page.container.jsx +++ b/client/src/pages/bills/bills.page.container.jsx @@ -147,7 +147,7 @@ export function BillsPageContainer({ setBreadcrumbs, setSelectedHeader }) { } }, [location.search]); - if (error) return ; + if (error) return ; return ( ; + if (error) return ; if (loading) return ; if (!data.cccontracts_by_pk) return ; diff --git a/client/src/pages/contracts/contracts.page.container.jsx b/client/src/pages/contracts/contracts.page.container.jsx index b6a73d9b1..a8336a4ad 100644 --- a/client/src/pages/contracts/contracts.page.container.jsx +++ b/client/src/pages/contracts/contracts.page.container.jsx @@ -56,7 +56,7 @@ export function ContractsPageContainer({ setBreadcrumbs, setSelectedHeader }) { ]); }, [setBreadcrumbs, t, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( ; - if (error) return ; + if (error) return ; if (!data.courtesycars_by_pk) return ; diff --git a/client/src/pages/courtesy-cars/courtesy-cars.page.container.jsx b/client/src/pages/courtesy-cars/courtesy-cars.page.container.jsx index 2e9b7f0b0..1f5ed6dc1 100644 --- a/client/src/pages/courtesy-cars/courtesy-cars.page.container.jsx +++ b/client/src/pages/courtesy-cars/courtesy-cars.page.container.jsx @@ -34,7 +34,7 @@ export function CourtesyCarsPageContainer({ setBreadcrumbs, setSelectedHeader }) setBreadcrumbs([{ link: "/manage/courtesycars", label: t("titles.bc.courtesycars") }]); }, [setBreadcrumbs, t, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( - {submitting.error ? : null} + {submitting.error ? : null} {submitting.submitted ? ( ; - if (error) return ; + if (error) return ; if (!jobId || !bodyshopHasDmsKey(bodyshop) || !data?.jobs_by_pk) return ; @@ -428,7 +428,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse return (
- + diff --git a/client/src/pages/export-logs/export-logs.page.component.jsx b/client/src/pages/export-logs/export-logs.page.component.jsx index 7c86bd922..65be0a17d 100644 --- a/client/src/pages/export-logs/export-logs.page.component.jsx +++ b/client/src/pages/export-logs/export-logs.page.component.jsx @@ -57,7 +57,7 @@ export function ExportLogsPageComponent() { const { t } = useTranslation(); - if (error) return ; + if (error) return ; const handleTableChange = (pagination, filters, sorter) => { searchParams.page = pagination.current; diff --git a/client/src/pages/jobs-admin/jobs-admin.page.jsx b/client/src/pages/jobs-admin/jobs-admin.page.jsx index 9b548ae25..163b7e61a 100644 --- a/client/src/pages/jobs-admin/jobs-admin.page.jsx +++ b/client/src/pages/jobs-admin/jobs-admin.page.jsx @@ -76,7 +76,7 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader }) { }, [setBreadcrumbs, t, jobId, data, setSelectedHeader]); if (loading) return ; - if (error) return ; + if (error) return ; if (!data.jobs_by_pk) return ; if (!data.jobs_by_pk.job_totals) return } />; diff --git a/client/src/pages/jobs-all/jobs-all.container.jsx b/client/src/pages/jobs-all/jobs-all.container.jsx index a1e59460d..be6469aeb 100644 --- a/client/src/pages/jobs-all/jobs-all.container.jsx +++ b/client/src/pages/jobs-all/jobs-all.container.jsx @@ -54,7 +54,7 @@ export function AllJobs({ setBreadcrumbs, setSelectedHeader }) { setBreadcrumbs([{ link: "/manage/jobs/all", label: t("titles.bc.jobs-all") }]); }, [t, setBreadcrumbs, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( {t("general.actions.download")} } - message={t("general.messages.partnernotrunning", { + title={t("general.messages.partnernotrunning", { app: InstanceRenderManager({ imex: "$t(titles.imexonline)", rome: "$t(titles.romeonline)" diff --git a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx index fd1301494..616c72b7e 100644 --- a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx +++ b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx @@ -55,7 +55,7 @@ export function JobsChecklistViewContainer({ setBreadcrumbs, setSelectedHeader } }, [t, setBreadcrumbs, jobId, data, setSelectedHeader]); if (loading) return ; - if (error) return ; + if (error) return ; //The Form is the actual config to use. diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index cfeba5584..225fdcc68 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -221,12 +221,12 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set - {!job.actual_in && job.scheduled_in && } + {!job.actual_in && job.scheduled_in && } {!job.actual_completion && job.scheduled_completion && ( - + )} {!job.actual_delivery && job.scheduled_delivery && ( - + )} @@ -486,7 +486,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set title={t("jobs.labels.total_cust_payable")} value={(job.job_totals ? Dinero(job.job_totals.totals.custPayable) : Dinero()).toFormat()} /> - + ; - if (error) return ; + if (error) return ; if (!data.jobs_by_pk) return ; if (!data.jobs_by_pk.job_totals) diff --git a/client/src/pages/jobs-create/jobs-create.component.jsx b/client/src/pages/jobs-create/jobs-create.component.jsx index 5acde3bbe..d760aa0cc 100644 --- a/client/src/pages/jobs-create/jobs-create.component.jsx +++ b/client/src/pages/jobs-create/jobs-create.component.jsx @@ -48,7 +48,6 @@ export default function JobsCreateComponent({ form }) { setPageIndex(pageIndex - 1); console.log("Previous"); }; - const { Step } = Steps; const ProgressButtons = ({ top }) => { return ( @@ -97,32 +96,31 @@ export default function JobsCreateComponent({ form }) { } > {top && ( - - {steps.map((item, idx) => ( - { - setPageIndex(idx); - form - .validateFields() - .then(() => { - if (steps[pageIndex].validation) { - setErrorMessage(null); - setPageIndex(idx); - } else { - setErrorMessage(steps[pageIndex].error); - } - }) - .catch((error) => console.log("error", error)); - }} - /> - ))} - + ({ + key: item.title, + title: item.title, + style: { + cursor: "pointer", + fontWeight: idx === pageIndex && "bolder" + }, + onClick: () => { + setPageIndex(idx); + form + .validateFields() + .then(() => { + if (steps[pageIndex].validation) { + setErrorMessage(null); + setPageIndex(idx); + } else { + setErrorMessage(steps[pageIndex].error); + } + }) + .catch((error) => console.log("error", error)); + } + }))} + /> )} ); @@ -151,7 +149,7 @@ export default function JobsCreateComponent({ form }) { {errorMessage ? (
- +
) : null} diff --git a/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx b/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx index 6f28d4a7d..389c92113 100644 --- a/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx +++ b/client/src/pages/jobs-deliver/jobs-delivery.page.container.jsx @@ -58,9 +58,9 @@ export function JobsDeliverContainer({ bodyshop, setBreadcrumbs, setSelectedHead }, [t, setBreadcrumbs, jobId, data, setSelectedHeader]); if (loading) return ; - if (error) return ; + if (error) return ; if (data && !data.bodyshops_by_pk.deliverchecklist) - return ; + return ; return ( ; - if (error) return ; + if (error) return ; if (!data.jobs_by_pk) return ; return data.jobs_by_pk ? ( @@ -97,7 +97,7 @@ function JobsDetailPageContainer({ setBreadcrumbs, addRecentItem, setSelectedHea
) : ( - + ); } diff --git a/client/src/pages/jobs-intake/jobs-intake.page.container.jsx b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx index cc96438bf..ea378e49d 100644 --- a/client/src/pages/jobs-intake/jobs-intake.page.container.jsx +++ b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx @@ -59,10 +59,10 @@ export function JobsIntakeContainer({ bodyshop, setBreadcrumbs, setSelectedHeade }, [t, setBreadcrumbs, jobId, data, setSelectedHeader]); if (loading) return ; - if (error) return ; + if (error) return ; if (data && !data.bodyshops_by_pk.intakechecklist) - return ; + return ; return ( ; - if (error) return ; + if (error) return ; return ; } diff --git a/client/src/pages/owners-detail/owners-detail.page.container.jsx b/client/src/pages/owners-detail/owners-detail.page.container.jsx index 431e06bd1..1c43558c4 100644 --- a/client/src/pages/owners-detail/owners-detail.page.container.jsx +++ b/client/src/pages/owners-detail/owners-detail.page.container.jsx @@ -56,7 +56,7 @@ export function OwnersDetailContainer({ setBreadcrumbs, addRecentItem, setSelect }, [setBreadcrumbs, t, data, ownerId, addRecentItem, setSelectedHeader]); if (loading) return ; - if (error) return ; + if (error) return ; if (!data.owners_by_pk) return ; return ( diff --git a/client/src/pages/payments-all/payments-all.container.page.jsx b/client/src/pages/payments-all/payments-all.container.page.jsx index 61105bed7..7ca941710 100644 --- a/client/src/pages/payments-all/payments-all.container.page.jsx +++ b/client/src/pages/payments-all/payments-all.container.page.jsx @@ -52,7 +52,7 @@ export function AllJobs({ setBreadcrumbs, setSelectedHeader }) { setBreadcrumbs([{ link: "/manage/payments", label: t("titles.bc.payments-all") }]); }, [t, setBreadcrumbs, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( ; + if (error) return ; const handleTableChange = (pagination, filters, sorter) => { searchParams.page = pagination.current; diff --git a/client/src/pages/shop-csi/shop-csi.container.page.jsx b/client/src/pages/shop-csi/shop-csi.container.page.jsx index abc6e51b4..43e38dfb2 100644 --- a/client/src/pages/shop-csi/shop-csi.container.page.jsx +++ b/client/src/pages/shop-csi/shop-csi.container.page.jsx @@ -49,7 +49,7 @@ export function ShopCsiContainer({ bodyshop, setBreadcrumbs, setSelectedHeader } ]); }, [t, setBreadcrumbs, bodyshop.shopname, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( ; - if (error) return ; + if (error) return ; if (!data.jobs_by_pk) return ; return data.jobs_by_pk ? ( @@ -96,7 +96,7 @@ function SimplifiedPartsJobsDetailContainer({ setBreadcrumbs, addRecentItem, set ) : ( - + ); } diff --git a/client/src/pages/simplified-parts/simplified-parts.page.container.jsx b/client/src/pages/simplified-parts/simplified-parts.page.container.jsx index b76323e10..6ee8bb0c1 100644 --- a/client/src/pages/simplified-parts/simplified-parts.page.container.jsx +++ b/client/src/pages/simplified-parts/simplified-parts.page.container.jsx @@ -27,7 +27,7 @@ function SimplifiedPartsPageContainer({ setBodyshop }) { }, [data, setBodyshop]); if (loading) return ; - if (error) return ; + if (error) return ; return ; } diff --git a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx index 5cc1f308d..fee680727 100644 --- a/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx +++ b/client/src/pages/tech-assigned-prod-jobs/tech-assigned-prod-jobs.component.jsx @@ -44,7 +44,7 @@ export function TechAssignedProdJobs({ setTimeTicketTaskContext, technician, bod const { t } = useTranslation(); const history = useNavigate(); const [searchText, setSearchText] = useState(""); - if (error) return ; + if (error) return ; const jobs = data ? searchText === "" diff --git a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx index 8eeb1a142..0e7ee2c06 100644 --- a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx +++ b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx @@ -44,7 +44,7 @@ export function TechDispatchedParts({ technician, bodyshop }) { const { t } = useTranslation(); const history = useNavigate(); - if (error) return ; + if (error) return ; const parts_dispatch = data?.parts_dispatch; diff --git a/client/src/pages/tech/tech.page.container.jsx b/client/src/pages/tech/tech.page.container.jsx index c026e9270..f740e71c2 100644 --- a/client/src/pages/tech/tech.page.container.jsx +++ b/client/src/pages/tech/tech.page.container.jsx @@ -30,7 +30,7 @@ export function TechPageContainer({ bodyshop, setBodyshop }) { }, [data, setBodyshop]); if (loading || !bodyshop) return ; - if (error) return ; + if (error) return ; return ; } diff --git a/client/src/pages/temporary-docs/temporary-docs.component.jsx b/client/src/pages/temporary-docs/temporary-docs.component.jsx index 13b985a8c..da675d0b1 100644 --- a/client/src/pages/temporary-docs/temporary-docs.component.jsx +++ b/client/src/pages/temporary-docs/temporary-docs.component.jsx @@ -34,7 +34,7 @@ export function TemporaryDocsComponent({ bodyshop }) { }); if (loading) return ; - if (error) return ; + if (error) return ; if (bodyshop.uselocalmediaserver) { return ; diff --git a/client/src/pages/time-tickets/time-tickets.container.jsx b/client/src/pages/time-tickets/time-tickets.container.jsx index 619cb8159..53afef8f9 100644 --- a/client/src/pages/time-tickets/time-tickets.container.jsx +++ b/client/src/pages/time-tickets/time-tickets.container.jsx @@ -71,7 +71,7 @@ export function TimeTicketsContainer({ bodyshop, setBreadcrumbs, setSelectedHead ]); }, [t, setBreadcrumbs, setSelectedHeader]); - if (error) return ; + if (error) return ; return ( ; - if (error) return ; + if (error) return ; if (!data.vehicles_by_pk) return ; return ; }