From 0909600162682bdae951a5d1d78410f713b914c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:04:04 +0000 Subject: [PATCH 1/2] Initial plan From 98c171b99dec72451e78c2be8ddca9e7beb70b44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:13:40 +0000 Subject: [PATCH 2/2] #52 add boston campus question to application form page 2 Co-authored-by: b-at-neu <144247685+b-at-neu@users.noreply.github.com> Agent-Logs-Url: https://github.com/b-at-neu/senate-path/sessions/6ffdc0f3-4471-47f2-bd34-a002ec884032 --- app/applications/application-form.tsx | 78 +++++++++++++++++++ lib/actions/applications.ts | 4 + package-lock.json | 23 +----- .../migration.sql | 3 + prisma/schema.prisma | 2 + 5 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 prisma/migrations/20260324000000_add_boston_campus_question/migration.sql diff --git a/app/applications/application-form.tsx b/app/applications/application-form.tsx index 6b26f8e..886e0e8 100644 --- a/app/applications/application-form.tsx +++ b/app/applications/application-form.tsx @@ -75,6 +75,10 @@ const applicationSchema = z campaignBlurb: z .string() .min(50, 'Please provide a detailed response (at least 50 characters)'), + bostonCampus: z.boolean({ + error: 'Please indicate if you will be on the Boston campus', + }), + bostonCampusExplanation: z.string().optional(), }) .refine( (data) => { @@ -85,6 +89,19 @@ const applicationSchema = z message: 'Constituency must be one of the selected colleges', path: ['constituency'], }, + ) + .refine( + (data) => { + // If not on Boston campus, explanation is required + if (data.bostonCampus === false) { + return data.bostonCampusExplanation && data.bostonCampusExplanation.trim().length > 0; + } + return true; + }, + { + message: 'Please explain your situation if you will not be on the Boston campus for the entirety of your term', + path: ['bostonCampusExplanation'], + }, ); type ApplicationFormData = z.infer; @@ -133,11 +150,13 @@ export default function ApplicationForm({ diversityEquityInclusionLongAnswer: '', conflictSituationLongAnswer: '', campaignBlurb: '', + bostonCampusExplanation: '', }, }); const colleges = watch('college'); const constituency = watch('constituency'); + const bostonCampus = watch('bostonCampus'); // Auto-select constituency if only one college is selected, clear if invalid useEffect(() => { @@ -795,6 +814,65 @@ export default function ApplicationForm({

)} + +
+ +
+ + +
+ {errors.bostonCampus && ( +

+ {errors.bostonCampus.message} +

+ )} +
+ + {bostonCampus === false && ( +
+ +