diff --git a/web/src/components/SchoolApplicationPage.tsx b/web/src/components/SchoolApplicationPage.tsx index f076a50..4d7cad5 100644 --- a/web/src/components/SchoolApplicationPage.tsx +++ b/web/src/components/SchoolApplicationPage.tsx @@ -18,9 +18,10 @@ import { useEffect, useRef, useState } from 'react' import { C, MODULE_COLORS } from '../lib/designTokens' import { Bar, CollegeLogo, SecLabel } from './moduleUI' import JourneyStepper from './JourneyStepper' -import { TASK_PHASES, tasksForEntry, isSharedTask } from '../data/applicationTasks' +import { TASK_PHASES, tasksForEntry, isSharedTask, suggestedWaiverDue, WAIVER_LEAD_DAYS } from '../data/applicationTasks' import { DEADLINE_TYPE_LABEL, DEADLINE_TYPE_MEANING, daysLabel, urgencyColor, type DeadlineEvent } from '../data/applicationDeadlines' import NetPriceFact from './NetPriceFact' +import { toIsoDay } from '../lib/personalDeadlines' import { APP_STATUS_META, CATEGORY_META, @@ -60,10 +61,13 @@ const plausibleDay = (v: string) => { return /^\d{4}-\d{2}-\d{2}$/.test(v) && year >= 2000 && year <= 2100 } -function TaskDueInput({ due, label, hint, onCommit }: { +function TaskDueInput({ due, label, hint, suggested, onCommit }: { due?: string label: string hint: string + /** A sensible date to open on, as `YYYY-MM-DD`. The student still has to + * save it — nothing is written until they do. */ + suggested?: string onCommit: (due: string | undefined) => void }) { // null = not editing: show the saved value. @@ -97,7 +101,7 @@ function TaskDueInput({ due, label, hint, onCommit }: { return (