Add registration validation an more activities#2
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the school activities app by expanding available activities, implementing duplicate registration validation, and improving the user interface to show participant information. The changes focus on making the system more comprehensive and user-friendly.
- Added six new activities across sports, artistic, and intellectual categories with proper configuration
- Implemented backend validation to prevent duplicate email registrations for the same activity
- Enhanced the frontend to display participant lists for each activity with proper styling
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/app.py | Added new activity definitions and duplicate registration validation logic |
| src/static/app.js | Updated activity cards to display participant lists with proper formatting |
| src/static/styles.css | Added CSS classes for styling the participants section and list display |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request adds new activity types to the school activities app, improves the signup process by preventing duplicate registrations, and enhances the UI to display participant lists for each activity. The most important changes are grouped below by theme.
New Activities Added:
Soccer Team,Basketball Club,Art Workshop,Drama Club,Debate Team,Math Club) to theactivitiesdictionary insrc/app.py, each with descriptions, schedules, participant limits, and initial participants.Backend Improvements:
signup_for_activityfunction insrc/app.pyto prevent users from signing up multiple times for the same activity by raising an error if the email is already registered.Frontend Enhancements:
src/static/app.jsto display a list of participants for each activity card, showing either a formatted list or a message if there are no participants.Styling Updates:
src/static/styles.cssto style the participants section, including the participant list, section header, and a message for activities with no participants.