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