From 1814952dbf015d2d1781b196c9518b1890807e4e Mon Sep 17 00:00:00 2001 From: Katsuhiko Takahashi <207565286+kt-devoss@users.noreply.github.com> Date: Mon, 12 Jan 2026 01:33:05 +0000 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B4=BB=E5=8B=95=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=83=99=E3=83=BC=E3=82=B9=E3=81=AB=E6=96=B0=E3=81=97?= =?UTF-8?q?=E3=81=84=E8=AA=B2=E5=A4=96=E6=B4=BB=E5=8B=95=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=80=81=E3=82=B5=E3=82=A4=E3=83=B3=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E6=99=82=E3=81=AB=E9=87=8D=E8=A4=87=E3=82=92?= =?UTF-8?q?=E3=83=81=20=E3=82=A7=E3=83=83=E3=82=AF=E3=81=99=E3=82=8B?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/app.py b/src/app.py index 4ebb1d9..efd075c 100644 --- a/src/app.py +++ b/src/app.py @@ -38,6 +38,48 @@ "schedule": "Mondays, Wednesdays, Fridays, 2:00 PM - 3:00 PM", "max_participants": 30, "participants": ["john@mergington.edu", "olivia@mergington.edu"] + }, + + # Sports-related (2 more) + "Soccer Team": { + "description": "Competitive soccer team for students of all skill levels", + "schedule": "Mondays and Thursdays, 4:00 PM - 6:00 PM", + "max_participants": 25, + "participants": ["liam@mergington.edu", "noah@mergington.edu"] + }, + "Basketball Club": { + "description": "Pickup games and skills training for basketball enthusiasts", + "schedule": "Wednesdays, 5:00 PM - 7:00 PM", + "max_participants": 18, + "participants": ["lucas@mergington.edu", "mason@mergington.edu"] + }, + + # Artistic (2 more) + "Art Club": { + "description": "Explore drawing, painting, and mixed media projects", + "schedule": "Tuesdays, 3:30 PM - 5:00 PM", + "max_participants": 20, + "participants": ["ava@mergington.edu"] + }, + "Drama Club": { + "description": "Acting, play production, and stagecraft", + "schedule": "Thursdays, 4:00 PM - 6:00 PM", + "max_participants": 25, + "participants": ["isabella@mergington.edu"] + }, + + # Intellectual (2 more) + "Math Club": { + "description": "Problem solving, competitions, and math enrichment", + "schedule": "Wednesdays, 3:30 PM - 4:30 PM", + "max_participants": 20, + "participants": ["ethan@mergington.edu"] + }, + "Science Olympiad": { + "description": "Prepare for science competitions and run experiments", + "schedule": "Fridays, 3:30 PM - 5:00 PM", + "max_participants": 22, + "participants": ["mia@mergington.edu"] } } @@ -63,5 +105,9 @@ def signup_for_activity(activity_name: str, email: str): activity = activities[activity_name] # Add student + # Check if already signed up + if email in activity["participants"]: + raise HTTPException(status_code=400, detail="Student already signed up for this activity") + activity["participants"].append(email) return {"message": f"Signed up {email} for {activity_name}"} From 2635ac9b08ca838d1fa0c7956a95154ca8eca7d0 Mon Sep 17 00:00:00 2001 From: Katsuhiko Takahashi <207565286+kt-devoss@users.noreply.github.com> Date: Mon, 12 Jan 2026 01:53:23 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B4=BB=E5=8B=95=E3=82=AB=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AB=E5=8F=82=E5=8A=A0=E8=80=85=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/static/app.js | 4 ++++ src/static/styles.css | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/static/app.js b/src/static/app.js index dcc1e38..f1b29c5 100644 --- a/src/static/app.js +++ b/src/static/app.js @@ -25,6 +25,10 @@ document.addEventListener("DOMContentLoaded", () => {

${details.description}

Schedule: ${details.schedule}

Availability: ${spotsLeft} spots left

+

Participants:

+ `; activitiesList.appendChild(activityCard); diff --git a/src/static/styles.css b/src/static/styles.css index a533b32..523bc97 100644 --- a/src/static/styles.css +++ b/src/static/styles.css @@ -74,6 +74,17 @@ section h3 { margin-bottom: 8px; } +.activity-card ul { + list-style-type: disc; + padding-left: 20px; + margin-top: 10px; + color: #555; +} + +.activity-card li { + margin-bottom: 5px; +} + .form-group { margin-bottom: 15px; } From 63dd3f5d78cbc3dc87ee0f8046b6ae9a4446356a Mon Sep 17 00:00:00 2001 From: Katsuhiko Takahashi <207565286+kt-devoss@users.noreply.github.com> Date: Mon, 12 Jan 2026 03:03:47 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=E6=B4=BB=E5=8B=95=E3=81=8B=E3=82=89?= =?UTF-8?q?=E3=81=AE=E5=8F=82=E5=8A=A0=E8=80=85=E3=81=AE=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E8=A7=A3=E9=99=A4=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.py | 18 ++++++++++++++++++ src/static/app.js | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index efd075c..25b0cee 100644 --- a/src/app.py +++ b/src/app.py @@ -111,3 +111,21 @@ def signup_for_activity(activity_name: str, email: str): activity["participants"].append(email) return {"message": f"Signed up {email} for {activity_name}"} + + +@app.delete("/activities/{activity_name}/participants/{email}") +def unregister_from_activity(activity_name: str, email: str): + """Unregister a student from an activity""" + # Validate activity exists + if activity_name not in activities: + raise HTTPException(status_code=404, detail="Activity not found") + + # Get the specific activity + activity = activities[activity_name] + + # Check if student is signed up + if email not in activity["participants"]: + raise HTTPException(status_code=400, detail="Student not signed up for this activity") + + activity["participants"].remove(email) + return {"message": f"Unregistered {email} from {activity_name}"} diff --git a/src/static/app.js b/src/static/app.js index f1b29c5..d97c49d 100644 --- a/src/static/app.js +++ b/src/static/app.js @@ -26,8 +26,8 @@ document.addEventListener("DOMContentLoaded", () => {

Schedule: ${details.schedule}

Availability: ${spotsLeft} spots left

Participants:

-