IO-2368 Update Cache on QBD posting success
This commit is contained in:
@@ -156,6 +156,18 @@ export function JobsCloseExportButton({
|
||||
date_exported: new Date(),
|
||||
},
|
||||
},
|
||||
update(cache) {
|
||||
cache.modify({
|
||||
id: "ROOT_QUERY",
|
||||
fields: {
|
||||
jobs(existingJobs = []) {
|
||||
return existingJobs.filter(
|
||||
(jobRef) => jobRef.__ref.includes(jobId) === false
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
if (!jobUpdateResponse.errors) {
|
||||
@@ -185,7 +197,7 @@ export function JobsCloseExportButton({
|
||||
});
|
||||
}
|
||||
}
|
||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) refetch();
|
||||
//if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) refetch();
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user