chore: heygermany customer project
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled

This commit is contained in:
e2e
2026-07-11 10:06:51 +02:00
commit 373b42a994
398 changed files with 38262 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { pikku } from "@/pikku/http"
import type { DB } from '@heygermany/sdk'
import { useMutation, useQueryClient } from "@tanstack/react-query"
type UpdateDocumentVerificationInput = {
documentId: string
documentStatus: DB.DocumentStatus
}
export const useUpdateDocumentVerification = (candidateId: string) => {
const queryClient = useQueryClient()
return useMutation({
mutationFn: async ({ documentId, documentStatus }: UpdateDocumentVerificationInput) =>
await pikku().patch("/backoffice/candidate/:candidateId/document/:documentId", {
candidateId,
documentId,
documentStatus
}),
onSuccess: () => {
// Invalidate and refetch the candidate data
queryClient.invalidateQueries({
queryKey: ['backoffice', 'candidate', candidateId]
})
}
})
}