Further work to refactor job costing + qb posting. BOD-383

This commit is contained in:
Patrick Fic
2020-09-14 16:57:40 -07:00
parent eff49e3d25
commit 379c12c7bb
13 changed files with 239 additions and 96 deletions

View File

@@ -80,27 +80,32 @@ 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(),
},
},
});
if (!!!jobUpdateResponse.errors) {
notification["success"]({
message: t("jobs.successes.exported"),
});
} else {
notification["error"]({
message: t("jobs.errors.exporting", {
error: JSON.stringify(jobUpdateResponse.error),
}),
});
}
// 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),
// }),
// });
// }
}
setLoading(false);