mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
wip
This commit is contained in:
@@ -158,7 +158,22 @@ export function useBulkDeleteAccounts(props) {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation(
|
||||
(ids: number[]) => apiRequest.post('accounts/bulk-delete', { ids }),
|
||||
({
|
||||
ids,
|
||||
skipUndeletable = false,
|
||||
}: {
|
||||
ids: number[];
|
||||
skipUndeletable?: boolean;
|
||||
}) =>
|
||||
apiRequest.post(
|
||||
'accounts/bulk-delete',
|
||||
{ ids },
|
||||
{
|
||||
params: skipUndeletable
|
||||
? { skip_undeletable: true }
|
||||
: undefined,
|
||||
},
|
||||
),
|
||||
{
|
||||
onSuccess: () => {
|
||||
// Common invalidate queries.
|
||||
|
||||
Reference in New Issue
Block a user