diff --git a/client/src/components/contract-cars/contract-cars.component.jsx b/client/src/components/contract-cars/contract-cars.component.jsx index c66ff9faa..541d6d7c3 100644 --- a/client/src/components/contract-cars/contract-cars.component.jsx +++ b/client/src/components/contract-cars/contract-cars.component.jsx @@ -59,6 +59,14 @@ export default function ContractsCarsComponent({ sortOrder: state.sortedInfo.columnKey === "model" && state.sortedInfo.order, }, + { + title: t("courtesycars.fields.color"), + dataIndex: "color", + key: "color", + sorter: (a, b) => alphaSort(a.color, b.color), + sortOrder: + state.sortedInfo.columnKey === "color" && state.sortedInfo.order, + }, { title: t("courtesycars.fields.plate"), dataIndex: "plate", @@ -93,6 +101,9 @@ export default function ContractsCarsComponent({ (cc.model || "") .toLowerCase() .includes(state.search.toLowerCase()) || + (cc.color || "") + .toLowerCase() + .includes(state.search.toLowerCase()) || (cc.plate || "").toLowerCase().includes(state.search.toLowerCase()) ); diff --git a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx index 6fb221e7d..d1c5c3528 100644 --- a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx +++ b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx @@ -101,24 +101,25 @@ export function TechClockOffButton({ message: t("timetickets.successes.clockedout"), }); } + if (!isShiftTicket) { + const job_update_result = await updateJobStatus({ + variables: { + jobId: jobId, + status: status, + }, + }); - const job_update_result = await updateJobStatus({ - variables: { - jobId: jobId, - status: status, - }, - }); - - if (!!job_update_result.errors) { - notification["error"]({ - message: t("jobs.errors.updating", { - message: JSON.stringify(result.errors), - }), - }); - } else { - notification["success"]({ - message: t("jobs.successes.updated"), - }); + if (!!job_update_result.errors) { + notification["error"]({ + message: t("jobs.errors.updating", { + message: JSON.stringify(result.errors), + }), + }); + } else { + notification["success"]({ + message: t("jobs.successes.updated"), + }); + } } setLoading(false); if (completedCallback) completedCallback(); @@ -217,7 +218,6 @@ export function TechClockOffButton({ ) : null} -