diff --git a/src/components/dashboard/ProfilePage.tsx b/src/components/dashboard/ProfilePage.tsx index 5119183..b7224fb 100644 --- a/src/components/dashboard/ProfilePage.tsx +++ b/src/components/dashboard/ProfilePage.tsx @@ -581,7 +581,9 @@ export default function ProfilePage(props: Props) { ? "jobseeker" : props.roleKey === "COMPANY" ? "companies" - : props.roleKey.toLowerCase().replace(/_/g, "-") + "s"; + : props.roleKey === "CATERING_SERVICES" + ? "catering-services" + : props.roleKey.toLowerCase().replace(/_/g, "-") + "s"; // Statuses during which the guided wizard (rather than free-form tabs) // should be shown: first-time setup, or the admin sent it back for fixes. @@ -1277,7 +1279,9 @@ export default function ProfilePage(props: Props) { ? 'jobseeker' : props.roleKey === 'COMPANY' ? 'companies' - : props.roleKey.toLowerCase().replace(/_/g, '-') + 's'; + : props.roleKey === 'CATERING_SERVICES' + ? 'catering-services' + : props.roleKey.toLowerCase().replace(/_/g, '-') + 's'; try { const result = await uploadDocument(rolePrefix, file, doc.key); const url = result?.url ?? result?.file_url ?? result?.path ?? String(result); diff --git a/src/components/dashboard/RoleWizard.tsx b/src/components/dashboard/RoleWizard.tsx index 58eea28..eadfce3 100644 --- a/src/components/dashboard/RoleWizard.tsx +++ b/src/components/dashboard/RoleWizard.tsx @@ -62,8 +62,11 @@ export default function RoleWizard(props: Props) { return step.fields.filter(fieldRequired).every((f) => String(portfolioForm()[f.id] ?? "").trim().length > 0); } if (step.type === "review") return true; - // basic - return step.fields.filter(fieldRequired).every((f) => String(form()[f.id] ?? "").trim().length > 0); + // basic — file fields are tracked in docUrls, not form + return step.fields.filter(fieldRequired).every((f) => { + if (f.type === "file") return Boolean(docUrls()[f.id]); + return String(form()[f.id] ?? "").trim().length > 0; + }); }; const canAdvance = createMemo(() => stepIsComplete(currentStep())); @@ -108,7 +111,7 @@ export default function RoleWizard(props: Props) { }); if (status === 200 || status === 201) { setSubmitSuccess(true); - props.onSubmitted("PENDING"); + setTimeout(() => props.onSubmitted("PENDING"), 2500); } } catch (err: any) { setSubmitMsg(err?.message || "Submission failed. Please try again."); @@ -178,7 +181,7 @@ export default function RoleWizard(props: Props) {
{(field) => ( -
+