diff --git a/web/src/components/ApplicationTrackingModule.tsx b/web/src/components/ApplicationTrackingModule.tsx index 5d6ca65..1aa61ba 100644 --- a/web/src/components/ApplicationTrackingModule.tsx +++ b/web/src/components/ApplicationTrackingModule.tsx @@ -18,7 +18,7 @@ import { import { MODULE_ICONS } from './moduleIcons' import { useAuth } from '../contexts/AuthContext' import { markIntroSeen } from '../lib/profiles' -import { MODULE_COLORS } from '../lib/designTokens' +import { C, MODULE_COLORS } from '../lib/designTokens' import { useModuleChecklist } from '../lib/useModuleState' import { useApplications } from '../contexts/ApplicationsContext' import { useToast } from '../contexts/ToastContext' @@ -53,6 +53,7 @@ import { routedItem, routedTab, useRoutedTab } from '../lib/hashRoute' import { useCollegePrefs } from '../lib/useCollegePrefs' const MC = MODULE_COLORS.applications +const font = "'Outfit',sans-serif" const MODULE_NAME = 'applications' const TOUR_INTRO_KEY = 'applications-module-tour' @@ -70,12 +71,39 @@ type TabId = ApplicationsTabId const TABS: Array<{ id: TabId; label: string; icon: ReactNode }> = [ { id: 'overview', label: 'Overview', icon: MODULE_ICONS.overview }, + { id: 'application-101', label: 'Application 101', icon: MODULE_ICONS.article }, { id: 'discover', label: 'Discover', icon: MODULE_ICONS.compass }, { id: 'status', label: 'Application Status', icon: MODULE_ICONS.chart }, ...(FEATURES.aidCompare ? [{ id: 'aid-compare' as const, label: 'Aid Compare', icon: MODULE_ICONS.scale }] : []), ] const TAB_IDS = TABS.map((t) => t.id) +/* ─── overview ─── */ + +/** The list at a glance, as Financial Aid's Overview is the aid: the list's + * map and balance under a word on where this grade stands. */ +function OverviewTab({ year, aside, listLoaded, strip }: { year?: number; aside?: ReactNode; listLoaded: boolean; strip: ReactNode }) { + const intro = (year ?? 11) >= 12 + ? 'Senior year is when it all gets sent. Every school’s deadline and requirements live in Application Status; mark each one off as it goes in.' + : year === 11 + ? 'Junior year is for building the list. Find schools that fit in Discover, and aim for a mix of reaches, targets and likely schools by the end of the summer.' + : 'You’re early, and that’s an advantage. Start a list of schools you’re curious about in Discover. It will change, and that’s the point.' + return ( +
{intro}
+ {/* Before the list is in, "Your list is empty" would be a wrong answer. */} + {listLoaded ? strip :- How scholarships work, where to find ones you qualify for, and how to apply. Work through them in order. + Articles, quizzes and tasks on paying for college: how scholarships work and how to win them, the kinds of aid, the FAFSA, and net price calculators.
-Click any item to open its content
Click any item to open its content
-{subtitle} diff --git a/web/src/data/applicationDeadlines.test.ts b/web/src/data/applicationDeadlines.test.ts index 3fa24bf..6e74902 100644 --- a/web/src/data/applicationDeadlines.test.ts +++ b/web/src/data/applicationDeadlines.test.ts @@ -107,6 +107,16 @@ describe('deriveDeadlineEvents', () => { expect(events.some((e) => e.id === 'fafsa-harvard')).toBe(true) }) + it('uses the student’s own FAFSA and CSS dates for a school, as given', () => { + const events = derive([{ ...app('sc-1', 'RD', 'Alpha College'), fafsaDate: '2027-02-14', cssDate: '2026-11-20' }, app('sc-2', 'RD', 'Beta College')]) + const fafsa = events.find((e) => e.id === 'fafsa-sc-1')! + expect(fafsa.date.getTime()).toBe(new Date(2027, 1, 14).getTime()) + expect(fafsa.estimated).toBe(false) + expect(events.find((e) => e.id === 'css-sc-1')!.dateDisplay).toBe('Nov 20, 2026') + // Only the school with no date of either kind is left on the shared event. + expect(events.find((e) => e.id === 'fafsa-priority')!.details).toContainEqual({ label: 'No date on file for', value: 'Beta College' }) + }) + it('returns events sorted ascending by date', () => { const events = derive([app('ucla', 'RD'), app('harvard', 'EA')]) for (let i = 1; i < events.length; i++) { diff --git a/web/src/data/applicationDeadlines.ts b/web/src/data/applicationDeadlines.ts index 93da026..dfddf2f 100644 --- a/web/src/data/applicationDeadlines.ts +++ b/web/src/data/applicationDeadlines.ts @@ -423,9 +423,9 @@ export function deriveDeadlineEvents( const aid = [college?.meetsFullNeed && 'meets full need', college?.noLoanPolicy && 'no loans'] .filter(Boolean).join(' · ') if (aid) details.push({ label: 'Aid', value: aid }) - if (college?.financialAidDeadlines.cssProfile) { - details.push({ label: 'CSS Profile due', value: college.financialAidDeadlines.cssProfile }) - } + const cssDue = a.cssDate ? parseIsoDay(a.cssDate) : null + const cssShown = cssDue ? formatCollegeDate(cssDue) : college?.financialAidDeadlines.cssProfile + if (cssShown) details.push({ label: 'CSS Profile due', value: cssShown }) events.push({ id: appEventId(a), collegeId: a.collegeId, @@ -558,15 +558,23 @@ function deriveAidEvents( const active = apps.filter((a) => a.status !== 'withdrawn') const undated: string[] = [] const cssSchools: string[] = [] + // The student's own date as they gave it; else the school's, moved into their cycle. + const schoolDate = (own: string | undefined, onFile: string | null | undefined) => { + const mine = own ? parseIsoDay(own) : null + if (mine) return { date: mine, moved: false } + const d = parseCollegeDate(onFile) + if (!d) return null + const date = dateInCycle(d.getMonth(), d.getDate(), seniorFall) + return { date, moved: d.getFullYear() !== date.getFullYear() } + } for (const a of active) { const college = lookup(a.collegeId) const name = college?.name ?? a.name ?? 'College' const link = linkFor(a.website ?? college?.domain) - const priority = parseCollegeDate(college?.financialAidDeadlines.fafsaPriority) + const priority = schoolDate(a.fafsaDate, college?.financialAidDeadlines.fafsaPriority) if (priority) { - const date = dateInCycle(priority.getMonth(), priority.getDate(), seniorFall) - const moved = priority.getFullYear() !== date.getFullYear() + const { date, moved } = priority events.push({ ...base, id: `fafsa-${a.collegeId}`, @@ -589,13 +597,12 @@ function deriveAidEvents( undated.push(name) } - const css = parseCollegeDate(college?.financialAidDeadlines.cssProfile) + const css = schoolDate(a.cssDate, college?.financialAidDeadlines.cssProfile) // One definition of "this school wants the CSS Profile", shared with the // school's own task list: a date on file, or the task that asks for it. if (css || tasksForEntry(a).some((t) => t.id === 'css')) cssSchools.push(name) if (css) { - const date = dateInCycle(css.getMonth(), css.getDate(), seniorFall) - const moved = css.getFullYear() !== date.getFullYear() + const { date, moved } = css events.push({ ...base, id: `css-${a.collegeId}`, diff --git a/web/src/data/applicationsChecklist.ts b/web/src/data/applicationsChecklist.ts index 48f95d6..a26d16f 100644 --- a/web/src/data/applicationsChecklist.ts +++ b/web/src/data/applicationsChecklist.ts @@ -174,6 +174,13 @@ export interface ApplicationEntry { /** Whether that row's aid dates were checked by hand, so a blank CSS date * means "not asked for" rather than "not on file". Copied alongside. */ aidCurated?: boolean + /** + * The student's own FAFSA priority and CSS Profile dates for this school + * (`YYYY-MM-DD`), entered in Financial Aid where we have none on file. Each + * wins over the school's row wherever the date shows. + */ + fafsaDate?: string + cssDate?: string } export type TaskPhase = 'before' | 'submit' | 'after'