mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: bulk transcations delete
This commit is contained in:
@@ -150,6 +150,25 @@ export function useDeletePaymentReceive(props) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes multiple payments received in bulk.
|
||||
*/
|
||||
export function useBulkDeletePaymentReceives(props) {
|
||||
const queryClient = useQueryClient();
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
(ids: number[]) => apiRequest.post('payments-received/bulk-delete', { ids }),
|
||||
{
|
||||
onSuccess: () => {
|
||||
// Common invalidate queries.
|
||||
commonInvalidateQueries(queryClient);
|
||||
},
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve specific payment receive.
|
||||
* @param {number} id - Payment receive.
|
||||
|
||||
Reference in New Issue
Block a user