2025-01-23 19:41:31 +03:00
|
|
|
import { useMutation } from '@tanstack/react-query';
|
|
|
|
|
|
|
|
import { ICheckConstituentaDTO, rsformsApi } from './api';
|
|
|
|
|
|
|
|
export const useCheckConstituenta = () => {
|
|
|
|
const mutation = useMutation({
|
2025-02-05 15:55:33 +03:00
|
|
|
mutationKey: ['actions', 'check-constituenta'],
|
2025-01-23 19:41:31 +03:00
|
|
|
mutationFn: rsformsApi.checkConstituenta
|
|
|
|
});
|
|
|
|
return {
|
2025-02-12 15:12:59 +03:00
|
|
|
checkConstituenta: (data: { itemID: number; data: ICheckConstituentaDTO }) => mutation.mutateAsync(data),
|
2025-01-23 19:41:31 +03:00
|
|
|
isPending: mutation.isPending,
|
2025-01-27 15:02:00 +03:00
|
|
|
error: mutation.error
|
2025-01-23 19:41:31 +03:00
|
|
|
};
|
|
|
|
};
|