IO-2368 Update Cache on QBD posting success

This commit is contained in:
Allan Carr
2023-09-06 16:23:58 -07:00
parent 8f04c5a12c
commit 7a1984d037
6 changed files with 74 additions and 2 deletions

View File

@@ -150,6 +150,18 @@ export function PaymentExportButton({
exportedat: new Date(),
},
},
update(cache) {
cache.modify({
id: "ROOT_QUERY",
fields: {
payments(existingJobs = []) {
return existingJobs.filter(
(paymentRef) => paymentRef.__ref.includes(paymentId) === false
);
},
},
});
},
});
if (!!!paymentUpdateResponse.errors) {
notification.open({