Skip to content

Fe application wiring - #48

Merged
natphua merged 6 commits into
mainfrom
FE-application-wiring
Nov 4, 2026
Merged

natphua merged 6 commits into
mainfrom
FE-application-wiring

Conversation

@jeremiahlongino

@jeremiahlongino jeremiahlongino commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes

@Echandler123 and I worked on connecting Steps 1 - 3 to the Application Form Shell that was an earlier ticket. After the personal info step, no other usage of the NEXT button makes a POST request (for now obviously since no Step 4 and 5) and only PATCHES that user's created id. With this we created API functionality to help with creating an applicant and updating their info as well as having a payload for each of the first 3 steps of the application.

Related Issue

Closes #32

Files Added:

  • application-state.ts: Tests the application form state and API payload functions.
  • application-state.test.ts: Defines the application form state and builds payloads for saving applicant information to the backend.
  • application-api.ts: API functions for the volunteer application form.

Files Changed:

  • ApplicationFormShell.tsx: Added Steps 1 - 3 into the main application shell that saves a created user's draft version of the volunteering application.
  • proxy.ts: Needed to make functionality to connect fully from the newly created routes to the proof of residence url

How to test

Open npm run dev THEN in a separate terminal run "npx prisma studio"

  • Go to /apply and fill in personal identifying info

    • Test if able to create without filling in required fields
    • Test if able to have required fields but no proof of residence
    • Pressing 'Next' button should be a successful POST
  • After pressing Next fill out steps 2 and 3

    • Test minor view of Onboarding step
  • The cool part is now testing that once you back and forth you should have saved values

    • Now for every change there should be only PATCH requests sent and no POST ones for duplicate entries
    • Use Network throttling in Inspect element and set it to like 3G to test multiple clicks in a short span of time

Throughout all of these steps keep check of the Applicant table to make sure DRAFT is consistent of any entries you create as well as that info is being parsed correctly, proofOfResidence is a URL or file, that every PATCH request is complete and that on reloading the prisma studio the info is updated for the applicant.

Screenshots

image image
image image
image image
image

Estimated Hours Spent

5

Checklist before requesting a review

  • Satisfies all Deliverables
  • Tested thoroughly
  • No unused dependencies
  • Requested review from Natalie

jeremiahlongino and others added 5 commits November 3, 2026 19:30
Created application-api with unique return types for createApplicant and updateApplicant.

Added body === null check for further hardening.

Started changes for ApplicationFormShell
Application Form Shell has correct functionality from no throttling and setting Network to 3G, where after submitting a POST request to create an applicant, no other changes made will do a POST but rather PATCH and update the info.

Steps 4 and 5 greyed out still.

Updated application-api with hardening and corrections for patching based on the user's id.
Updated proxy.ts to be updated for the proof of residence url.
@natphua
natphua marked this pull request as ready for review November 4, 2026 21:02

@natphua natphua left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job guys!

Nice work on being thorough with your testing, especially since this ticket requires piecing a lot of components together. Your code is also clean and easy to read 😁

Congrats on finishing this sprint and keep up the good work 🥳

@natphua
natphua merged commit fccd423 into main Nov 4, 2026
2 checks passed
@natphua
natphua deleted the FE-application-wiring branch November 4, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FE: Application Form Wiring

3 participants