({params})
| 17 | import {decodePathParam, profileApplicantPath, safeLocalPath} from "../../RouteUtils"; |
| 18 | |
| 19 | export async function loader({params}) { |
| 20 | const programs = await getPrograms(); |
| 21 | const paramsApplicantId = decodePathParam(params?.applicantId); |
| 22 | if (!paramsApplicantId) { |
| 23 | const displayName = await getDisplayName(); |
| 24 | const metadata = await getMetadata(displayName); |
| 25 | return {programs, applicantIds: metadata?.ApplicantIDs ?? []}; |
| 26 | } |
| 27 | const programId = decodePathParam(params.programId); |
| 28 | const recordsDict = programId ? await getRecordByRecordIDs([`${paramsApplicantId}|${programId}`]) : null; |
| 29 | return {programs, recordsDict, applicantIds: [paramsApplicantId]}; |
| 30 | } |
| 31 | |
| 32 | function createRecordRequestBody(formData) { |
| 33 | const applicantId = formData.get('ApplicantID'); |
nothing calls this directly
no test coverage detected