feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -129,8 +129,8 @@ export function JobsAvailableComponent({ bodyshop, loading, data, refetch, addJo
|
||||
<Button
|
||||
onClick={() => {
|
||||
deleteJob({ variables: { id: record.id } }).then(() => {
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.deleted")
|
||||
notification.success({
|
||||
title: t("jobs.successes.deleted")
|
||||
});
|
||||
refetch();
|
||||
});
|
||||
@@ -182,16 +182,16 @@ export function JobsAvailableComponent({ bodyshop, loading, data, refetch, addJo
|
||||
onClick={() => {
|
||||
deleteAllAvailableJobs()
|
||||
.then((r) => {
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.all_deleted", {
|
||||
notification.success({
|
||||
title: t("jobs.successes.all_deleted", {
|
||||
count: r.data.delete_available_jobs.affected_rows
|
||||
})
|
||||
});
|
||||
refetch();
|
||||
})
|
||||
.catch((r) => {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.deleted") + " " + r.message
|
||||
notification.error({
|
||||
title: t("jobs.errors.deleted") + " " + r.message
|
||||
});
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -103,8 +103,8 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
if (!(estData && estData.est_data)) {
|
||||
//We don't have the right data. Error!
|
||||
setInsertLoading(false);
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.creating", { error: "No job data present." })
|
||||
notification.error({
|
||||
title: t("jobs.errors.creating", { error: "No job data present." })
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -184,8 +184,8 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
id: r.data.insert_jobs.returning[0].id
|
||||
});
|
||||
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.created"),
|
||||
notification.success({
|
||||
title: t("jobs.successes.created"),
|
||||
onClick: () => {
|
||||
history(`/manage/jobs/${r.data.insert_jobs.returning[0].id}`);
|
||||
}
|
||||
@@ -208,8 +208,8 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||
} catch (r) {
|
||||
//error while inserting
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.creating", { error: r.message })
|
||||
notification.error({
|
||||
title: t("jobs.errors.creating", { error: r.message })
|
||||
});
|
||||
refetch().catch((err) => {
|
||||
console.error(`Something went wrong in jobs available table container - ${err.message || ""}`);
|
||||
@@ -231,8 +231,8 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
if (!(estData && estData.est_data)) {
|
||||
//We don't have the right data. Error!
|
||||
setInsertLoading(false);
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.creating", { error: "No job data present." })
|
||||
notification.error({
|
||||
title: t("jobs.errors.creating", { error: "No job data present." })
|
||||
});
|
||||
} else {
|
||||
//create upsert job
|
||||
@@ -289,8 +289,8 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
|
||||
if (updateResult.errors) {
|
||||
//error while inserting
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.creating", {
|
||||
notification.error({
|
||||
title: t("jobs.errors.creating", {
|
||||
error: JSON.stringify(updateResult.errors)
|
||||
})
|
||||
});
|
||||
@@ -304,14 +304,14 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
});
|
||||
|
||||
if (newTotals.status !== 200) {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.totalscalc")
|
||||
notification.error({
|
||||
title: t("jobs.errors.totalscalc")
|
||||
});
|
||||
setInsertLoading(false);
|
||||
return;
|
||||
}
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.supplemented"),
|
||||
notification.success({
|
||||
title: t("jobs.successes.supplemented"),
|
||||
onClick: () => {
|
||||
history(`/manage/jobs/${updateResult.data.update_jobs.returning[0].id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user