frontend phase 15

This commit is contained in:
hamid
2026-07-10 20:28:06 +03:30
parent bc51cf59b4
commit 70cf00ce4a
151 changed files with 10711 additions and 44 deletions
@@ -0,0 +1,18 @@
import { useQuery } from '@tanstack/react-query';
import { verificationApi } from '../apis';
import { verificationKeys } from '../keys';
import { ADMIN_CASE_STALE_TIME } from '../constants';
/**
* The full admin case for one nurse — steps + documents + credentials + the identity name for cross-check.
* Keyed per `nurseVerificationId` and only enabled once one is selected (pass `null` from the queue until a
* row is opened). Invalidated on every decide / approve / reject so the case reflects the new step states.
*/
export function useVerificationCase(nurseVerificationId: number | null) {
return useQuery({
queryKey: verificationKeys.adminCase(nurseVerificationId ?? -1),
queryFn: () => verificationApi.getVerificationCase(nurseVerificationId as number),
enabled: nurseVerificationId != null,
staleTime: ADMIN_CASE_STALE_TIME,
});
}