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 11:30:11 +02:00
commit f0093328d8
370 changed files with 35601 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { pikku } from "@/pikku/http"
import { useMutation, useQueryClient } from "@tanstack/react-query"
import { UpdateBackOfficeCandidateInput } from '@heygermany/functions/.pikku/http/pikku-http-wirings-map.gen.d.js'
type BackOfficeCandidatePatch = Omit<UpdateBackOfficeCandidateInput, 'candidateId'> & {
analysisIssues?: string[]
}
export const useUpdateBackOfficeCandidate = (candidateId: string) => {
const queryClient = useQueryClient()
return useMutation({
mutationFn: async (data: BackOfficeCandidatePatch) =>
await pikku().patch("/backoffice/candidate/:candidateId", { candidateId, ...data }),
onSuccess: () => {
// Invalidate and refetch the candidate data
queryClient.invalidateQueries({
queryKey: ['backoffice', 'candidate', candidateId]
})
queryClient.invalidateQueries({
queryKey: ['candidate', candidateId]
})
}
})
}