Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jojayama
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developer: Lorinc Heutchy
Closes #7
Pull Request Summary
Implemented Jotform waiver status integration end-to-end for the volunteer event-card experience.
The backend now exposes GET /api/me/waiver-status, which checks Clerk-authenticated user identity, reads/writes waiver status in MongoDB, and falls back to Jotform submissions matching by email when cache is missing/stale.
Frontend volunteer event-card views now consume this status instead of relying only on hardcoded waiver placeholders.
Modifications
route.ts
-validate required Jotform env vars
-authenticate current user via Clerk
-load app user from MongoDB
-check cached waiver status in waivers
-fetch Jotform submissions and match by normalized email when needed
-upsert waiver record and return status response
Waiver.ts
-Created new Mongoose model/collection for cached waiver status metadata (status, waiverSubmissionId, waiverLastCheckedAt, etc.).
useWaiverStatus.ts
-Added client hook to fetch /api/me/waiver-status and helper mapping logic to convert API waiver status into card status display state.
VolunteerEventsPage.tsx
-Wired volunteer event-card data to use fetched waiver status mapping.
page.tsx
-Wired calendar volunteer event cards to use fetched waiver status mapping.
Testing Considerations
I tested on my account that the waiver status is incomplete for everything and that Mongo updated the Waiver table with my information
Reviewer should verify:
-End-to-end complete path with a known account/email that exists in Jotform submissions.
-End-to-end incomplete path with a non-matching account/email.
-Mongo waivers collection updates correctly after endpoint calls.
Pull Request Checklist
Screenshots/Screencast