add payments in invoice detail
This commit is contained in:
@@ -15,6 +15,7 @@ export const useConfirmCashPayment = () => {
|
||||
mutationFn: (paymentId: string) => api.confirmCashPayment(paymentId),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['payments'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['invoice'] });
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -25,6 +26,7 @@ export const useDenyCashPayment = () => {
|
||||
mutationFn: (paymentId: string) => api.denyCashPayment(paymentId),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['payments'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['invoice'] });
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -35,6 +37,7 @@ export const useVerifyOnlinePayment = () => {
|
||||
mutationFn: (token: string) => api.verifyOnlinePayment(token),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['payments'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['invoice'] });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user