Skip to content

feat(survey-page): add survey page for the events#105

Merged
marvinjameserosa merged 1 commit intodevfrom
feat/104-survey-registrants
Feb 16, 2026
Merged

feat(survey-page): add survey page for the events#105
marvinjameserosa merged 1 commit intodevfrom
feat/104-survey-registrants

Conversation

@geraldsberongoy
Copy link
Copy Markdown
Contributor

✨ What’s New?

This pull request introduces a complete implementation of a post-event survey feature, including backend logic, a new survey page, and a dynamic survey form component. The changes ensure only authenticated and registered users can submit or update survey responses, and provide a streamlined, user-friendly UI for survey participation and feedback.

Backend logic for survey submission and validation:

  • Added submitSurveyResponse server action in actions.ts to handle survey submissions, including user authentication, event and survey validation, registrant verification, duplicate response handling (update or insert), and cache revalidation for event management pages. (frontend/src/app/event/[slug]/survey/actions.tsR1-R121)

Survey page and data fetching:

  • Implemented the new survey/page.tsx route, which fetches event and user data, checks survey availability, retrieves any existing survey response, and renders the survey form or appropriate messages if the survey is unavailable. (frontend/src/app/event/[slug]/survey/page.tsxR1-R148)

Survey form UI and client logic:

  • Created a new SurveyForm component that dynamically renders questions based on the survey config, supports multiple question types (text, rating, yes/no, multiple choice), handles form state, validation, submission, editing, and displays confirmation or error states.

Type updates for survey responses:

  • Updated the SurveyResponse interface in types/survey.ts to use userId instead of attendeeEmail, aligning with the new authentication and submission logic

📷 Screenshots (IMPORTANT)

Not Registered
image

Not Logged In
image

Logged In

Case 1: First Time Survey
image
Case 2: Catch duplicate survey responses
image
image

🔗 Related Issues

Closes #104

✅ Checklist

  • Code follows project conventions.
  • Unused code, variables, and console logs have been removed.
  • Code compiles and runs without errors.
  • Build and tests succeeds locally.
  • Assigned at least one reviewer.

Copy link
Copy Markdown
Contributor

@marvinjameserosa marvinjameserosa left a comment

Choose a reason for hiding this comment

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

lgtm

@marvinjameserosa marvinjameserosa merged commit 4df890d into dev Feb 16, 2026
@marvinjameserosa marvinjameserosa deleted the feat/104-survey-registrants branch March 2, 2026 13:37
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.

2 participants