Skip to content

Add registration validation an more activities#2

Merged
hwulet merged 3 commits into
mainfrom
accelerate-with-copilot
Aug 7, 2025
Merged

Add registration validation an more activities#2
hwulet merged 3 commits into
mainfrom
accelerate-with-copilot

Conversation

@hwulet
Copy link
Copy Markdown
Owner

@hwulet hwulet commented Aug 7, 2025

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:

  • Added sports, artistic, and intellectual activities (Soccer Team, Basketball Club, Art Workshop, Drama Club, Debate Team, Math Club) to the activities dictionary in src/app.py, each with descriptions, schedules, participant limits, and initial participants.

Backend Improvements:

  • Updated the signup_for_activity function in src/app.py to prevent users from signing up multiple times for the same activity by raising an error if the email is already registered.

Frontend Enhancements:

  • Modified src/static/app.js to display a list of participants for each activity card, showing either a formatted list or a message if there are no participants.

Styling Updates:

  • Added new CSS classes in src/static/styles.css to style the participants section, including the participant list, section header, and a message for activities with no participants.

@hwulet hwulet requested a review from Copilot August 7, 2025 05:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comment thread src/static/app.js Outdated
Comment thread src/app.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hwulet hwulet merged commit 4a065ce into main Aug 7, 2025
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