Files
heygermany-e2e-mrg5ct1q/apps/website/components/backoffice/ExperienceVerificationCard.tsx
e2e 2c4174b44b
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled
chore: heygermany customer project
2026-07-11 11:13:08 +02:00

52 lines
1.8 KiB
TypeScript

import { DocumentVerificationCard } from './DocumentVerificationCard';
import { useUpdateCandidateExperience } from '@/hooks/backoffice/useUpdateCandidateExperience';
import { CandidateDocumentTypes, DocumentStatuses } from '@heygermany/sdk';
type ExperienceVerificationCardProps = {
candidateId: string;
experience: any;
documents?: any[];
verbose?: boolean;
};
export function ExperienceVerificationCard({ candidateId, experience, documents = [], verbose = false }: ExperienceVerificationCardProps) {
const mutationHook = useUpdateCandidateExperience(candidateId);
const verificationDocuments = documents
.map((document, index) => ({
documentId: document.documentId,
documentStatus: document.documentStatus ?? DocumentStatuses.UNVERIFIED,
label: document.fileName || `File ${index + 1}`
}));
return (
<DocumentVerificationCard
candidateId={candidateId}
documents={verificationDocuments}
category={CandidateDocumentTypes.WORK_EXPERIENCE}
aiExtractedData={{
employer: experience.aiEmployer,
position: experience.aiPosition,
department: experience.aiDepartment,
startDate: experience.aiStartDate,
endDate: experience.aiEndDate,
durationMonths: experience.aiDurationMonths,
isFullTime: experience.aiIsFullTime,
duties: experience.aiDuties
}}
finalData={{
employer: experience.employer,
position: experience.position,
department: experience.department,
startDate: experience.startDate,
endDate: experience.endDate,
durationMonths: experience.durationMonths,
isFullTime: experience.isFullTime,
duties: experience.duties
}}
mutationHook={mutationHook}
verbose={verbose}
requiredFields={[]} // Work experience: only show header when not verbose
/>
);
}