- Progress

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-09 16:32:26 -04:00
parent 15c9529885
commit 6b9269eb2d
8 changed files with 29 additions and 145 deletions

View File

@@ -154,12 +154,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
);
}
window.dispatchEvent(
new CustomEvent("taskUpdated", {
detail: { message: "A task has been created or edited." }
})
);
notification["success"]({
message: t("tasks.successes.updated")
});
@@ -179,6 +173,15 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
bodyshopid: bodyshop.id
}
]
},
update(cache, { data }) {
cache.modify({
fields: {
tasks(cached) {
return [...data?.insert_tasks?.returning, ...cached];
}
}
});
}
});
@@ -222,12 +225,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
console.error(`Something went wrong sending email to Assigned party on Task edit. ${e.message || ""}`)
);
window.dispatchEvent(
new CustomEvent("taskUpdated", {
detail: { message: "A task has been created or edited." }
})
);
notification["success"]({
message: t("tasks.successes.created")
});