mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat (*) : add referch button.
This commit is contained in:
@@ -4,11 +4,10 @@ import { transformPagination } from 'utils';
|
||||
import useApiRequest from '../useRequest';
|
||||
import t from './types';
|
||||
|
||||
|
||||
const commonInvalidateQueries = (client) => {
|
||||
// Invalidate payment mades.
|
||||
client.invalidateQueries(t.PAYMENT_MADES);
|
||||
|
||||
|
||||
// Invalidate payment made new entries.
|
||||
client.invalidateQueries(t.PAYMENT_MADE_NEW_ENTRIES);
|
||||
client.invalidateQueries(t.PAYMENT_MADE_EDIT_PAGE);
|
||||
@@ -158,3 +157,13 @@ export function usePaymentMadeNewPageEntries(vendorId, props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export function useRefreshPaymentMades() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return {
|
||||
refresh: () => {
|
||||
queryClient.invalidateQueries(t.PAYMENT_MADES);
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user