diff --git a/frontend/src/app/(portal)/reviewer/applicants/page.tsx b/frontend/src/app/(portal)/reviewer/applicants/page.tsx index 36cdfb5..6e71ee2 100644 --- a/frontend/src/app/(portal)/reviewer/applicants/page.tsx +++ b/frontend/src/app/(portal)/reviewer/applicants/page.tsx @@ -9,21 +9,21 @@ const REVIEWER_ACTOR = { nuid: '002199001', role: 'chief' as const } export default async function ApplicantsPage() { const applications = await getApplications( {}, - { actor: REVIEWER_ACTOR, next: { revalidate: 30 } } + { actor: REVIEWER_ACTOR, cache: 'no-store' } ) - const uniqueNUIDs = [...new Set(applications.map((a) => a.applicant_nuid))] + const uniqueNUIDs = [...new Set(applications.map((a) => a.user_nuid))] const applicantList = await Promise.all( uniqueNUIDs.map((nuid) => getApplicant(nuid)) ) const byNUID = Object.fromEntries(applicantList.map((a) => [a.nuid, a])) const rows: ApplicantApplication[] = applications.map((app) => { - const person = byNUID[app.applicant_nuid] + const person = byNUID[app.user_nuid] return { id: app.id, - fullName: person?.full_name ?? app.applicant_nuid, - nuid: app.applicant_nuid, + fullName: person?.full_name ?? app.user_nuid, + nuid: app.user_nuid, email: person?.email ?? '', major: person?.major ?? null, graduationYear: person?.graduation_year ?? null, diff --git a/frontend/src/lib/api/applications.ts b/frontend/src/lib/api/applications.ts index 8a30827..38f4208 100644 --- a/frontend/src/lib/api/applications.ts +++ b/frontend/src/lib/api/applications.ts @@ -21,7 +21,7 @@ export function getApplication( } export function createApplication( - body: { applicant_nuid: string; cycle_id: string; role: Role }, + body: { user_nuid: string; cycle_id: string; role: Role }, opts?: FetchOptions ): Promise { return apiFetch('/applications', { ...opts, method: 'POST', body }) diff --git a/frontend/src/lib/api/types.ts b/frontend/src/lib/api/types.ts index 99465f9..1f9e963 100644 --- a/frontend/src/lib/api/types.ts +++ b/frontend/src/lib/api/types.ts @@ -84,7 +84,7 @@ export interface Applicant { export interface Application { id: string cycle_id: string - applicant_nuid: string + user_nuid: string role: Role stage: ApplicationStage availability: Record | null