diff --git a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx index ab3d9c53d..a15c086cd 100644 --- a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx +++ b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx @@ -80,32 +80,27 @@ export function JobsCloseExportButton({ bodyshop, jobId, disabled }) { }) ); } else { + const jobUpdateResponse = await updateJob({ + variables: { + jobId: jobId, + job: { + status: bodyshop.md_ro_statuses.default_exported || "Exported*", + date_exported: new Date(), + }, + }, + }); - - // const jobUpdateResponse = await updateJob({ - // variables: { - // jobId: jobId, - // job: { - // status: bodyshop.md_ro_statuses.default_exported || "Exported*", - // date_exported: new Date(), - // }, - // }, - // }); - - // if (!!!jobUpdateResponse.errors) { - // notification["success"]({ - // message: t("jobs.successes.exported"), - // }); - // } else { - // notification["error"]({ - // message: t("jobs.errors.exporting", { - // error: JSON.stringify(jobUpdateResponse.error), - // }), - // }); - // } - - - + if (!!!jobUpdateResponse.errors) { + notification["success"]({ + message: t("jobs.successes.exported"), + }); + } else { + notification["error"]({ + message: t("jobs.errors.exporting", { + error: JSON.stringify(jobUpdateResponse.error), + }), + }); + } } setLoading(false); @@ -116,7 +111,8 @@ export function JobsCloseExportButton({ bodyshop, jobId, disabled }) { onClick={handleQbxml} loading={loading} disabled={disabled} - type='dashed'> + type="dashed" + > {t("jobs.actions.export")} );