// components/DirectorStep.tsx "use client"; import type { DirectorInput, Section69 } from "@/lib/wizard-types"; const SA_PROVINCES = [ "Eastern Cape", "Free State", "Gauteng", "KwaZulu-Natal", "Limpopo", "Mpumalanga", "Northern Cape", "North West", "Western Cape", ]; function ProvinceSelect({ value, onChange }: { value: string; onChange: (v: string) => void }) { return ( ); } function Section69Questions({ section69, onUpdate }: { section69: Section69; onUpdate: (s: Section69) => void }) { const qs: { key: keyof Section69; label: string }[] = [ { key: "q1_probation", label: "Are you a person who has been placed under probation by a court in terms of section 162, or in terms of section 47 of the Close Corporations Act, 1984?" }, { key: "q2_court_prohibited", label: "Has a court prohibited you to be a director, or declared you to be delinquent in terms of section 162?" }, { key: "q3_unrehabilitated_insolvent", label: "Are you an unrehabilitated insolvent?" }, { key: "q4_public_regulation", label: "Are you prohibited in terms of any public regulation to be a director of the company?" }, { key: "q5_removed_from_office", label: "Were you removed from an office of trust, on grounds of misconduct involving dishonesty?" }, { key: "q6_convicted_offence", label: "Were you convicted and imprisoned without the option of a fine, or fined more than the prescribed amount, for theft, fraud, forgery, perjury or an offence?" }, ]; return (
{qs.map((q) => { const val = section69[q.key]; return (
{q.label}
{[true, false].map((opt) => { const active = val === opt; return ( ); })}
); })}
); } const INPUT_CLS = "w-full bg-surface border border-border rounded px-3 py-2 text-sm text-fg placeholder-muted focus:outline-none focus:border-accent transition-colors"; const LABEL_CLS = "text-xs font-semibold text-muted mb-1 block"; interface Props { director: DirectorInput; index: number; onUpdate: (patch: Partial) => void; } export default function DirectorStep({ director: d, index, onUpdate }: Props) { const updateS69 = (s: Section69) => onUpdate({ section69: s }); return (

Director {index + 1}

{/* Name + ID */}
onUpdate({ first_names: e.target.value })} />
onUpdate({ surname: e.target.value })} />
onUpdate({ id_no: e.target.value })} />
onUpdate({ date_of_birth: e.target.value })} />
{/* Residential address */}

Residential address

onUpdate({ residential_address_line_1: e.target.value })} />
onUpdate({ residential_address_line_2: e.target.value })} />
onUpdate({ residential_town_city: e.target.value })} />
onUpdate({ residential_province: v })} />
onUpdate({ residential_postal_code: e.target.value })} />
{/* Postal address */}

Postal address

onUpdate({ postal_address_line_1: e.target.value })} />
onUpdate({ postal_address_line_2: e.target.value })} />
onUpdate({ postal_town_city: e.target.value })} />
onUpdate({ postal_province: v })} />
onUpdate({ postal_postal_code: e.target.value })} />
{/* Contact */}
onUpdate({ cell_phone: e.target.value })} />
onUpdate({ email: e.target.value })} />
{/* Section 69 */}

Section 69 — Companies Act 71 of 2008

{/* ID document upload */}

File will be saved as ID - {d.first_names || "FirstName"} {d.surname || "Surname"}.<ext>.

onUpdate({ id_file: e.target.files?.[0] || null } as Partial)} className="block w-full text-sm text-fg file:mr-3 file:py-1.5 file:px-3 file:rounded file:border file:border-border file:bg-surface-warm file:text-fg file:text-xs file:font-semibold file:cursor-pointer hover:file:bg-accent/10" /> {(d as DirectorInput & { id_file?: File | null }).id_file && (

✓ Selected: {(d as DirectorInput & { id_file?: File | null }).id_file?.name}

)}
); }