IO-1415 Update cache on line delete.

This commit is contained in:
Patrick Fic
2021-10-07 15:48:29 -07:00
parent 51f3b5927b
commit bf21a073fb

View File

@@ -296,18 +296,17 @@ export function JobLinesComponent({
onClick={async () => { onClick={async () => {
await deleteJobLine({ await deleteJobLine({
variables: { joblineId: record.id }, variables: { joblineId: record.id },
// update(cache) { update(cache) {
// cache.modify({ cache.modify({
// id: cache.identify(job), fields: {
// fields: { joblines(existingJobLines, { readField }) {
// joblines(existingJobLines, { readField }) { return existingJobLines.filter(
// return existingJobLines.filter( (jlRef) => record.id !== readField("id", jlRef)
// (jlRef) => record.id !== readField("id", jlRef) );
// ); },
// }, },
// }, });
// }); },
// },
}); });
await axios.post("/job/totalsssu", { await axios.post("/job/totalsssu", {
id: job.id, id: job.id,