import React, { useState } from 'react'; import { useParams } from 'react-router-dom'; import { FigmaRatingScale, FigmaTextArea, FigmaNavigationButtons } from '../components/figma/FigmaQuestion'; import { FigmaMultipleChoice } from '../components/figma/FigmaMultipleChoice'; // Icon SVG Component const AuditlyIcon: React.FC = () => ( ); // Progress Bar Component for Section Headers const SectionProgressBar: React.FC<{ currentSection: number; totalSections: number }> = ({ currentSection, totalSections }) => { return (
{Array.from({ length: 7 }, (_, index) => { const isActive = index === 0; // First step is always active for section start return (
{index === 0 ? (
) : ( )}
); })}
); }; // Yes/No Choice Component const YesNoChoice: React.FC<{ question: string; value?: string; onChange: (value: string) => void; onBack?: () => void; onNext: () => void; onSkip?: () => void; currentStep?: number; totalSteps?: number; }> = ({ question, value, onChange, onBack, onNext, onSkip, currentStep, totalSteps }) => { return (
{question}
onChange('No')} className={`w-20 h-20 relative rounded-[999px] overflow-hidden cursor-pointer transition-colors ${value === 'No' ? 'bg-Neutrals-NeutralSlate800' : 'bg-Neutrals-NeutralSlate100 hover:bg-Neutrals-NeutralSlate200'}`} >
No
onChange('Yes')} className={`w-20 h-20 relative rounded-[999px] overflow-hidden cursor-pointer transition-colors ${value === 'Yes' ? 'bg-Neutrals-NeutralSlate800' : 'bg-Neutrals-NeutralSlate100 hover:bg-Neutrals-NeutralSlate200'}`} >
Yes
{onBack && ( )}
{/* Skip button */} {onSkip && (
Skip
)} {/* Progress indicators */} {currentStep && totalSteps && ( <>
{currentStep} of {totalSteps}
Leadership & Organizational Structure
)}
); }; // Section Intro Component const SectionIntro: React.FC<{ sectionNumber: string; title: string; description: string; onStart: () => void; imageUrl?: string; }> = ({ sectionNumber, title, description, onStart, imageUrl = "https://placehold.co/560x682" }) => { return (
{sectionNumber}
{title}
{description}
{title}
); }; // Step 1: Welcome & Role Information (Light) const EmployeeFormStep1: React.FC<{ onNext: (data: any) => void }> = ({ onNext }) => { const [formData, setFormData] = useState({ name: '', role: '', department: '' }); const handleSubmit = () => { onNext(formData); }; return (
Welcome to the Auditly Employee Assessment
Let's learn about your role, contribution and help us get a better understand of how you work best.
Your Role & Output
Tell us about your current role and what you work on
Your Name
*
setFormData({ ...formData, name: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="Enter your full name" />
What is your role at the company?
*
setFormData({ ...formData, role: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="e.g. Software Engineer, Marketing Manager" />
What department do you work in?
*
setFormData({ ...formData, department: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="e.g. Engineering, Sales, Marketing" />
); }; // Step 2: Personal Information const EmployeeFormStep2: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [formData, setFormData] = useState({ email: '', name: '', company: '' }); return (
Personal Information
Email
*
setFormData({ ...formData, email: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="Email@gmail.com" />
Your Name
*
setFormData({ ...formData, name: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="John Doe" />
What is the name of your Company and department?
*
setFormData({ ...formData, company: e.target.value })} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="Doe Enterprises" />
); }; // Step 3: Current Title and Department (Text Area) const EmployeeFormStep3: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ titleAndDepartment: answer })} onSkip={() => onNext({ titleAndDepartment: '' })} nextDisabled={!answer.trim()} currentStep={1} totalSteps={7} />
); }; // Step 4: Daily Tasks (Text Area) const EmployeeFormStep4: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ dailyTasks: answer })} onSkip={() => onNext({ dailyTasks: '' })} nextDisabled={!answer.trim()} currentStep={2} totalSteps={7} />
); }; // Step 5: Role Understanding Rating const EmployeeFormStep5: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ roleUnderstanding: rating })} onSkip={() => onNext({ roleUnderstanding: null })} nextDisabled={!rating} currentStep={3} totalSteps={7} />
); }; // Step 6: Work Satisfaction const EmployeeFormStep6: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ workSatisfaction: rating })} onSkip={() => onNext({ workSatisfaction: null })} nextDisabled={!rating} currentStep={4} totalSteps={7} />
); }; // Step 7: Communication Rating const EmployeeFormStep7: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ communicationRating: rating })} onSkip={() => onNext({ communicationRating: null })} nextDisabled={!rating} currentStep={5} totalSteps={7} />
); }; // Step 8: Work Style Preference const EmployeeFormStep8: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [selectedOption, setSelectedOption] = useState(''); const options = [ 'I prefer working independently', 'I enjoy collaborative teamwork', 'I like a mix of both', 'I prefer clear instructions and structure', 'I thrive with autonomy and flexibility' ]; return (

What work style best describes you?

{options.map((option, index) => ( ))}
onNext({ workStyle: selectedOption })} onSkip={() => onNext({ workStyle: '' })} nextDisabled={!selectedOption} currentStep={6} totalSteps={7} />
); }; // Step 9: Section Intro - Output & Accountability const EmployeeFormStep9: React.FC<{ onNext: () => void }> = ({ onNext }) => { return ( ); }; // Step 10: Weekly Output Rating const EmployeeFormStep10: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ weeklyOutput: rating })} onSkip={() => onNext({ weeklyOutput: null })} nextDisabled={!rating} currentStep={1} totalSteps={7} />
); }; // Step 11: Top Deliverables const EmployeeFormStep11: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ topDeliverables: answer })} onSkip={() => onNext({ topDeliverables: '' })} nextDisabled={!answer.trim()} currentStep={2} totalSteps={7} />
); }; // Step 12: Measurable Results const EmployeeFormStep12: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ measurableResults: answer })} onSkip={() => onNext({ measurableResults: '' })} nextDisabled={!answer.trim()} currentStep={3} totalSteps={7} />
); }; // Step 13: Weekly KPIs const EmployeeFormStep13: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return ( onNext({ hasKPIs: answer })} onSkip={() => onNext({ hasKPIs: '' })} currentStep={4} totalSteps={7} /> ); }; // Step 14: KPI Details const EmployeeFormStep14: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ kpiDetails: answer })} onSkip={() => onNext({ kpiDetails: '' })} currentStep={5} totalSteps={7} />
); }; // Step 15: Reporting Structure const EmployeeFormStep15: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ reportingStructure: answer })} onSkip={() => onNext({ reportingStructure: '' })} currentStep={6} totalSteps={7} />
); }; // Step 16: Section Intro - Team & Collaboration const EmployeeFormStep16: React.FC<{ onNext: () => void }> = ({ onNext }) => { return ( ); }; // Step 17: Work Closest With const EmployeeFormStep17: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ workClosestWith: answer })} onSkip={() => onNext({ workClosestWith: '' })} currentStep={1} totalSteps={7} />
); }; // Step 18: Collaboration Issues const EmployeeFormStep18: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ collaborationIssues: answer })} onSkip={() => onNext({ collaborationIssues: '' })} currentStep={2} totalSteps={7} />
); }; // Step 19: Team Communication Rating const EmployeeFormStep19: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ teamCommunication: rating })} onSkip={() => onNext({ teamCommunication: null })} nextDisabled={!rating} currentStep={3} totalSteps={7} />
); }; // Step 20: Team Support const EmployeeFormStep20: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ teamSupport: answer })} onSkip={() => onNext({ teamSupport: '' })} currentStep={4} totalSteps={7} />
); }; // Step 21: Tools and Resources Section const EmployeeFormStep21: React.FC<{ onNext: () => void }> = ({ onNext }) => { return ( ); }; // Step 22: Current Tools const EmployeeFormStep22: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ currentTools: answer })} onSkip={() => onNext({ currentTools: '' })} currentStep={1} totalSteps={7} />
); }; // Step 23: Tool Effectiveness const EmployeeFormStep23: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ toolEffectiveness: rating })} onSkip={() => onNext({ toolEffectiveness: null })} nextDisabled={!rating} currentStep={2} totalSteps={7} />
); }; // Step 24: Missing Tools const EmployeeFormStep24: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ missingTools: answer })} onSkip={() => onNext({ missingTools: '' })} currentStep={3} totalSteps={7} />
); }; // Step 25: Skills & Development Section const EmployeeFormStep25: React.FC<{ onNext: () => void }> = ({ onNext }) => { return ( ); }; // Step 26: Key Skills const EmployeeFormStep26: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ keySkills: answer })} onSkip={() => onNext({ keySkills: '' })} currentStep={1} totalSteps={7} />
); }; // Step 27: Skill Development const EmployeeFormStep27: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ skillDevelopment: answer })} onSkip={() => onNext({ skillDevelopment: '' })} currentStep={2} totalSteps={7} />
); }; // Step 28: Training Opportunities const EmployeeFormStep28: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return ( onNext({ awareOfTraining: answer })} onSkip={() => onNext({ awareOfTraining: '' })} currentStep={3} totalSteps={7} /> ); }; // Step 29: Career Goals const EmployeeFormStep29: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ careerGoals: answer })} onSkip={() => onNext({ careerGoals: '' })} currentStep={4} totalSteps={7} />
); }; // Step 30: Feedback & Improvement Section const EmployeeFormStep30: React.FC<{ onNext: () => void }> = ({ onNext }) => { return ( ); }; // Step 31: Company Improvements const EmployeeFormStep31: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ companyImprovements: answer })} onSkip={() => onNext({ companyImprovements: '' })} currentStep={1} totalSteps={7} />
); }; // Step 32: Job Satisfaction const EmployeeFormStep32: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [rating, setRating] = useState(); return (
onNext({ jobSatisfaction: rating })} onSkip={() => onNext({ jobSatisfaction: null })} nextDisabled={!rating} currentStep={2} totalSteps={7} />
); }; // Step 33: Additional Feedback const EmployeeFormStep33: React.FC<{ onNext: (data: any) => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = useState(''); return (
onNext({ additionalFeedback: answer })} onSkip={() => onNext({ additionalFeedback: '' })} currentStep={3} totalSteps={7} />
); }; // Step 35: Leadership & Organizational Structure - Magic Wand Question const EmployeeFormStep35: React.FC<{ onNext: () => void; onBack: () => void }> = ({ onNext, onBack }) => { const [answer, setAnswer] = React.useState(''); return (
If you had a magic wand, what would you change about how we operate?