IO-1415 Update cache on line delete.
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user