From fe07fd018e8ac3487980324f43ef9faa228c248f Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:54:31 -0500 Subject: [PATCH 01/14] Updated RSVP before and After Status --- app/logic/participants.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/app/logic/participants.py b/app/logic/participants.py index b0933a959..dd81a4a52 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -53,13 +53,28 @@ def addBnumberAsParticipant(bnumber, eventId): userStatus = "already signed in" else: + # If the event has already started, record as an EventParticipant (attendance). + # If the event is in the future, create an EventRsvp so RSVP lists remain consistent + # with templates that expect RSVP objects (which have `rsvpTime`). userStatus = "success" - # We are not using addPersonToEvent to do this because - # that function checks if the event is in the past, but - # someone could start signing people up via the kiosk - # before an event has started - totalHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) - EventParticipant.create (user=kioskUser, event=event, hoursEarned=totalHours) + if event.isPastStart: + totalHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) + EventParticipant.create(user=kioskUser, event=event, hoursEarned=totalHours) + else: + # create RSVP if one doesn't already exist + if not checkUserRsvp(kioskUser, event): + currentRsvp = getEventRsvpCountsForTerm(event.term) + waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else False + EventRsvp.create(user=kioskUser, event=event, rsvpWaitlist=waitlist) + targetList = "the waitlist" if waitlist else "the RSVP list" + try: + if g.current_user.username == kioskUser.username: + createRsvpLog(event.id, f"{kioskUser.fullName} joined {targetList}.") + else: + createRsvpLog(event.id, f"Added {kioskUser.fullName} to {targetList}.") + except Exception: + # logging should not break kiosk flow + pass return kioskUser, userStatus From 1a5fecca6785654350aae4f26ac0588a91dc2cd6 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:40:00 -0500 Subject: [PATCH 02/14] re-implemented the attended status for the non-rsvp events --- app/logic/participants.py | 82 +++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/app/logic/participants.py b/app/logic/participants.py index dd81a4a52..f896259aa 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -53,28 +53,30 @@ def addBnumberAsParticipant(bnumber, eventId): userStatus = "already signed in" else: - # If the event has already started, record as an EventParticipant (attendance). - # If the event is in the future, create an EventRsvp so RSVP lists remain consistent - # with templates that expect RSVP objects (which have `rsvpTime`). + # Non-RSVP and RSVP event handling userStatus = "success" - if event.isPastStart: + if event.isRsvpRequired: + # RSVP event: standard logic (RSVP before event, attend after) + if event.isPastStart: + totalHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) + EventParticipant.create(user=kioskUser, event=event, hoursEarned=totalHours) + else: + if not checkUserRsvp(kioskUser, event): + currentRsvp = getEventRsvpCountsForTerm(event.term) + waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else False + EventRsvp.create(user=kioskUser, event=event, rsvpWaitlist=waitlist) + targetList = "the waitlist" if waitlist else "the RSVP list" + try: + if g.current_user.username == kioskUser.username: + createRsvpLog(event.id, f"{kioskUser.fullName} joined {targetList}.") + else: + createRsvpLog(event.id, f"Added {kioskUser.fullName} to {targetList}.") + except Exception: + pass + else: + # Non-RSVP event: scanner entry ALWAYS marks as attended regardless of timing totalHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) EventParticipant.create(user=kioskUser, event=event, hoursEarned=totalHours) - else: - # create RSVP if one doesn't already exist - if not checkUserRsvp(kioskUser, event): - currentRsvp = getEventRsvpCountsForTerm(event.term) - waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else False - EventRsvp.create(user=kioskUser, event=event, rsvpWaitlist=waitlist) - targetList = "the waitlist" if waitlist else "the RSVP list" - try: - if g.current_user.username == kioskUser.username: - createRsvpLog(event.id, f"{kioskUser.fullName} joined {targetList}.") - else: - createRsvpLog(event.id, f"Added {kioskUser.fullName} to {targetList}.") - except Exception: - # logging should not break kiosk flow - pass return kioskUser, userStatus @@ -95,22 +97,34 @@ def addPersonToEvent(user, event): try: volunteerExists = checkUserVolunteer(user, event) rsvpExists = checkUserRsvp(user, event) - if event.isPastStart: - if not volunteerExists: - # We duplicate these two lines in addBnumberAsParticipant - eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) - EventParticipant.create(user = user, event = event, hoursEarned = eventHours) + + if event.isRsvpRequired: + # RSVP event logic + if event.isPastStart: + if not volunteerExists: + eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) + EventParticipant.create(user = user, event = event, hoursEarned = eventHours) + else: + if not rsvpExists: + currentRsvp = getEventRsvpCountsForTerm(event.term) + waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else 0 + EventRsvp.create(user = user, event = event, rsvpWaitlist = waitlist) + targetList = "the waitlist" if waitlist else "the RSVP list" + if g.current_user.username == user.username: + createRsvpLog(event.id, f"{user.fullName} joined {targetList}.") + else: + createRsvpLog(event.id, f"Added {user.fullName} to {targetList}.") else: - if not rsvpExists: - currentRsvp = getEventRsvpCountsForTerm(event.term) - waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else 0 - EventRsvp.create(user = user, event = event, rsvpWaitlist = waitlist) - - targetList = "the waitlist" if waitlist else "the RSVP list" - if g.current_user.username == user.username: - createRsvpLog(event.id, f"{user.fullName} joined {targetList}.") - else: - createRsvpLog(event.id, f"Added {user.fullName} to {targetList}.") + # Non-RSVP event logic + if event.isPastStart: + # After event: create EventParticipant (attended) + if not volunteerExists: + eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) + EventParticipant.create(user = user, event = event, hoursEarned = eventHours) + else: + # Before event: create EventRsvp (invited status) + if not rsvpExists: + EventRsvp.create(user = user, event = event, rsvpWaitlist = False) if volunteerExists or rsvpExists: return "already in" From 1137e06cc302e835c41404323297ead668f4dd21 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:32:50 -0400 Subject: [PATCH 03/14] Added Invited status into checkedbox javascript to allow for filtered removal --- app/static/js/volunteerDetails.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/static/js/volunteerDetails.js b/app/static/js/volunteerDetails.js index 1b6192a23..1b5aafdf7 100644 --- a/app/static/js/volunteerDetails.js +++ b/app/static/js/volunteerDetails.js @@ -28,6 +28,7 @@ $(document).ready(function () { const status = data[3].toLowerCase(); if (status === 'attended' && !$('#attendedSelect').is(':checked')) return false; if (status === 'rsvp' && !$('#rsvpSelect').is(':checked')) return false; + if (status === 'invited' && !$('#invitedSelect').is(':checked')) return false; if (status === 'waitlist' && !$('#waitlistSelect').is(':checked')) return false; return true; }); From ea0d70181b6f84886da51b62516ed4c46b2de443 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:11:09 -0400 Subject: [PATCH 04/14] Add @propriety for RSVP and changed conditional to allow invited status under reservation status --- app/models/eventRsvp.py | 4 ++++ app/templates/events/manageVolunteers.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/eventRsvp.py b/app/models/eventRsvp.py index 8afdd47c2..d492a0e4c 100644 --- a/app/models/eventRsvp.py +++ b/app/models/eventRsvp.py @@ -9,6 +9,10 @@ class EventRsvp(baseModel): rsvpTime = DateTimeField(default=datetime.now) rsvpWaitlist = BooleanField(default=False) + @property + def rsvp(self): + # EventRsvp always represents an RSVP record, including invited participants. + return True class Meta: indexes = ( (('user', 'event'), True), ) diff --git a/app/templates/events/manageVolunteers.html b/app/templates/events/manageVolunteers.html index aa66235fe..86d95f9c1 100644 --- a/app/templates/events/manageVolunteers.html +++ b/app/templates/events/manageVolunteers.html @@ -239,7 +239,7 @@

@@ -275,7 +275,7 @@

{{participant.user.email}} {{participant.user.phoneNumber}} - {{ 'Waitlist' if participant.rsvpWaitlist else 'RSVP' }} + {{ 'Waitlist' if participant.rsvpWaitlist else ('RSVP' if event.isRsvpRequired else 'Invited') }} Date: Tue, 31 Mar 2026 15:28:02 -0400 Subject: [PATCH 05/14] Added Conditional to allow accordion title of RSVP and Waitlist to change to Invited and Waitlist for non-rsvp events --- app/templates/events/manageVolunteers.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/templates/events/manageVolunteers.html b/app/templates/events/manageVolunteers.html index 86d95f9c1..6b6c98aae 100644 --- a/app/templates/events/manageVolunteers.html +++ b/app/templates/events/manageVolunteers.html @@ -239,7 +239,11 @@

From 7d89e1d1156d110a5ca36d94664951892fd1b031 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:47:55 -0400 Subject: [PATCH 06/14] updated allLogs section to include invited user to create logs for both them and rsvp individuals --- app/controllers/admin/routes.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/routes.py b/app/controllers/admin/routes.py index 8d24ffdf6..a37ef8a30 100644 --- a/app/controllers/admin/routes.py +++ b/app/controllers/admin/routes.py @@ -195,7 +195,30 @@ def createEvent(templateid, programid): def rsvpLogDisplay(eventId): event = Event.get_by_id(eventId) if g.current_user.isCeltsAdmin or (g.current_user.isCeltsStudentStaff and g.current_user.isProgramManagerFor(event.program)): - allLogs = EventRsvpLog.select(EventRsvpLog, User).join(User, on=(EventRsvpLog.createdBy == User.username)).where(EventRsvpLog.event_id == eventId).order_by(EventRsvpLog.createdOn.desc()) + # Existing RSVP-specific log entries + event_logs = list(EventRsvpLog.select(EventRsvpLog, User) + .join(User, on=(EventRsvpLog.createdBy == User.username)) + .where(EventRsvpLog.event_id == eventId)) + + # Include invited users from EventRsvp so the log display reflects invitations too + invited_rsvps = EventRsvp.select(EventRsvp, User).join(User).where(EventRsvp.event == eventId) + + from collections import namedtuple + LogEntry = namedtuple('LogEntry', ['createdOn', 'createdBy', 'rsvpLogContent']) + + allLogs = [] + allLogs.extend(event_logs) + + for rsvp in invited_rsvps: + # Provide an explicit invitation action for EventRsvp records + allLogs.append(LogEntry( + createdOn=rsvp.rsvpTime, + createdBy=rsvp.user, + rsvpLogContent=f"Invited {rsvp.user.fullName} to event" + )) + + allLogs.sort(key=lambda entry: entry.createdOn, reverse=True) + return render_template("/events/rsvpLog.html", event = event, allLogs = allLogs) From 5ad6ee539d213979b120c6c511256a817c299b1c Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Thu, 2 Apr 2026 15:56:36 -0400 Subject: [PATCH 07/14] refined the way that the event message is passed rather than having two seperate options --- app/controllers/admin/routes.py | 18 ++++++++++-------- app/logic/participants.py | 5 ++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/controllers/admin/routes.py b/app/controllers/admin/routes.py index a37ef8a30..cf0437924 100644 --- a/app/controllers/admin/routes.py +++ b/app/controllers/admin/routes.py @@ -33,7 +33,7 @@ from app.logic.certification import getCertRequirements, updateCertRequirements from app.logic.utils import selectSurroundingTerms, getFilesFromRequest, getRedirectTarget, setRedirectTarget from app.logic.events import attemptSaveMultipleOfferings, cancelEvent, deleteEvent, attemptSaveEvent, preprocessEventData, getRepeatingEventsData, deleteEventAndAllFollowing, deleteAllEventsInSeries, getBonnerEvents,addEventView, getEventRsvpCount, copyRsvpToNewEvent, getCountdownToEvent, calculateNewSeriesId, inviteCohortsToEvent, updateEventCohorts -from app.logic.participants import getParticipationStatusForTrainings, checkUserRsvp +from app.logic.participants import getParticipationStatusForTrainings, checkUserRsvp, getTargetList from app.logic.minor import getMinorInterest from app.logic.fileHandler import FileHandler from app.logic.bonner import getBonnerCohorts, makeBonnerXls, rsvpForBonnerCohort, addBonnerCohortToRsvpLog @@ -209,13 +209,15 @@ def rsvpLogDisplay(eventId): allLogs = [] allLogs.extend(event_logs) - for rsvp in invited_rsvps: - # Provide an explicit invitation action for EventRsvp records - allLogs.append(LogEntry( - createdOn=rsvp.rsvpTime, - createdBy=rsvp.user, - rsvpLogContent=f"Invited {rsvp.user.fullName} to event" - )) + # Only add invitation logs for non-RSVP events, as for RSVP events, EventRsvp represents RSVPs, not invitations + if not event.isRsvpRequired: + for rsvp in invited_rsvps: + # Provide an explicit invitation action for EventRsvp records + allLogs.append(LogEntry( + createdOn=rsvp.rsvpTime, + createdBy=rsvp.user, + rsvpLogContent=f"Invited {rsvp.user.fullName} to {getTargetList(event)}" + )) allLogs.sort(key=lambda entry: entry.createdOn, reverse=True) diff --git a/app/logic/participants.py b/app/logic/participants.py index f896259aa..ebf131882 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -65,7 +65,7 @@ def addBnumberAsParticipant(bnumber, eventId): currentRsvp = getEventRsvpCountsForTerm(event.term) waitlist = currentRsvp[event.id] >= event.rsvpLimit if event.rsvpLimit is not None else False EventRsvp.create(user=kioskUser, event=event, rsvpWaitlist=waitlist) - targetList = "the waitlist" if waitlist else "the RSVP list" + targetList = getTargetList(event, waitlist) try: if g.current_user.username == kioskUser.username: createRsvpLog(event.id, f"{kioskUser.fullName} joined {targetList}.") @@ -86,6 +86,9 @@ def checkUserRsvp(user, event): def checkUserVolunteer(user, event): return EventParticipant.select().where(EventParticipant.user == user, EventParticipant.event == event).exists() +def getTargetList(event, waitlist=False): + return "the waitlist" if waitlist else "the Invited list" if not event.isRsvpRequired else "the RSVP list" + def addPersonToEvent(user, event): """ Add a user to an event. From afe5827116308ebc45df43133b1576b7ec51e999 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Mon, 6 Apr 2026 15:11:03 -0400 Subject: [PATCH 08/14] Updated Verbage of logs back to original verbage --- app/controllers/admin/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/routes.py b/app/controllers/admin/routes.py index cf0437924..36b217456 100644 --- a/app/controllers/admin/routes.py +++ b/app/controllers/admin/routes.py @@ -216,7 +216,7 @@ def rsvpLogDisplay(eventId): allLogs.append(LogEntry( createdOn=rsvp.rsvpTime, createdBy=rsvp.user, - rsvpLogContent=f"Invited {rsvp.user.fullName} to {getTargetList(event)}" + rsvpLogContent=f"Added {rsvp.user.fullName} to {getTargetList(event)}" )) allLogs.sort(key=lambda entry: entry.createdOn, reverse=True) From e4438dd7a70f0e77930f76b71d54a51e6d071190 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:18:21 -0400 Subject: [PATCH 09/14] Changed ordering of table conditionals to prioritize the identification of attended participants and changed rsvp and waitlist user to filter out those who are attended --- app/controllers/admin/volunteers.py | 5 +++-- app/templates/events/volunteerDetails.html | 13 +++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/controllers/admin/volunteers.py b/app/controllers/admin/volunteers.py index cf730ea73..1c2fd0c75 100644 --- a/app/controllers/admin/volunteers.py +++ b/app/controllers/admin/volunteers.py @@ -113,9 +113,10 @@ def volunteerDetailsPage(eventID): .where(EventParticipant.event==event)) - waitlistUser = list(set([obj for obj in eventRsvpData if obj.rsvpWaitlist])) - rsvpUser = list(set([obj for obj in eventRsvpData if not obj.rsvpWaitlist ])) attendedUser = list(set([obj for obj in eventParticipantData if not obj.rsvpWaitlist])) + attendedUserIds = {obj.user.id for obj in attendedUser} + waitlistUser = [obj for obj in eventRsvpData if obj.rsvpWaitlist and obj.user.id not in attendedUserIds] + rsvpUser = [obj for obj in eventRsvpData if not obj.rsvpWaitlist and obj.user.id not in attendedUserIds] return render_template("/events/volunteerDetails.html", waitlistUser = waitlistUser, diff --git a/app/templates/events/volunteerDetails.html b/app/templates/events/volunteerDetails.html index 060a98c8f..460417a10 100644 --- a/app/templates/events/volunteerDetails.html +++ b/app/templates/events/volunteerDetails.html @@ -60,16 +60,13 @@

{{ participant.user.firstName }} {{ participant {% set seen = [] %} {% set combinedParticipants = attended + rsvp + waitlist %} {% for p in combinedParticipants | unique %} - {% if p in rsvp and not event.isRsvpRequired %} + {% if p in attended %} + {{createTable(p, 'attended') if type == 'table' else createCard(p, 'attended') }} + {% elif p in rsvp and not event.isRsvpRequired %} {{createTable(p, 'invited') if type == 'table' else createCard(p, 'invited') }} - {% endif %} - {% if p in rsvp and event.isRsvpRequired %} + {% elif p in rsvp and event.isRsvpRequired %} {{createTable(p, 'rsvp') if type == 'table' else createCard(p, 'rsvp') }} - {% endif %} - {% if p in attended%} - {{createTable(p, 'attended') if type == 'table' else createCard(p, 'attended') }} - {% endif %} - {% if p in waitlist %} + {% elif p in waitlist %} {{createTable(p, 'waitlisted') if type == 'table' else createCard(p, 'waitlisted') }} {% endif %} {% endfor %} From cc523f805d09e1b9000095f893d9cfa748e2ebeb Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Thu, 9 Apr 2026 08:49:01 -0400 Subject: [PATCH 10/14] Added Marked message --- app/logic/participants.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/logic/participants.py b/app/logic/participants.py index ebf131882..2c6b68749 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -107,6 +107,10 @@ def addPersonToEvent(user, event): if not volunteerExists: eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) EventParticipant.create(user = user, event = event, hoursEarned = eventHours) + # try: + createRsvpLog(event.id, f"Marked {user.fullName} as attended.") + except Exception: + pass else: if not rsvpExists: currentRsvp = getEventRsvpCountsForTerm(event.term) @@ -124,6 +128,10 @@ def addPersonToEvent(user, event): if not volunteerExists: eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) EventParticipant.create(user = user, event = event, hoursEarned = eventHours) + try: + createRsvpLog(event.id, f"Marked {user.fullName} as attended.") + except Exception: + pass else: # Before event: create EventRsvp (invited status) if not rsvpExists: From 7a026e4c14d552a8d9690c203be87a9787bed2b1 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Thu, 9 Apr 2026 08:49:41 -0400 Subject: [PATCH 11/14] fixed format --- app/logic/participants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/logic/participants.py b/app/logic/participants.py index 2c6b68749..8531dcae9 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -107,7 +107,7 @@ def addPersonToEvent(user, event): if not volunteerExists: eventHours = getEventLengthInHours(event.timeStart, event.timeEnd, event.startDate) EventParticipant.create(user = user, event = event, hoursEarned = eventHours) - # try: + try: createRsvpLog(event.id, f"Marked {user.fullName} as attended.") except Exception: pass From 519291f526d9d05fded110e2ba24bc64d2bd4e31 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Mon, 13 Apr 2026 13:42:50 -0400 Subject: [PATCH 12/14] Added ability to created attended Logs after check boxing attended --- app/logic/volunteers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/logic/volunteers.py b/app/logic/volunteers.py index eb40b4df7..31f9d7060 100644 --- a/app/logic/volunteers.py +++ b/app/logic/volunteers.py @@ -6,7 +6,7 @@ from app.models.backgroundCheck import BackgroundCheck from app.models.programManager import ProgramManager from datetime import datetime, date -from app.logic.createLogs import createActivityLog +from app.logic.createLogs import createActivityLog, createRsvpLog def getEventLengthInHours(startTime, endTime, eventDate): """ @@ -46,6 +46,10 @@ def updateEventParticipants(participantData): .execute()) else: EventParticipant.create(user=userObject, event=event, hoursEarned=hoursEarned) + try: + createRsvpLog(event.id, f"Marked {userObject.fullName} as attended.") + except Exception: + pass else: ((EventParticipant.delete() .where(EventParticipant.user==userObject.username, EventParticipant.event==event.id)) From 01aff6cfaf5fc23de426c93e3fae2120e1387d57 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Wed, 15 Apr 2026 15:57:23 -0400 Subject: [PATCH 13/14] removed old version of html status selector --- app/templates/events/volunteerDetails.html | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/app/templates/events/volunteerDetails.html b/app/templates/events/volunteerDetails.html index e5e6e3fa6..54a57e620 100644 --- a/app/templates/events/volunteerDetails.html +++ b/app/templates/events/volunteerDetails.html @@ -59,7 +59,6 @@

{{ participant.user.firstName }} {{ participant {% macro printParticipants(type, attended, rsvp, waitlist) %} {% set seen = [] %} {% set combinedParticipants = attended + rsvp + waitlist %} -<<<<<<< HEAD {% for p in combinedParticipants | unique %} {% if p in attended %} {{createTable(p, 'attended') if type == 'table' else createCard(p, 'attended') }} @@ -70,28 +69,7 @@

{{ participant.user.firstName }} {{ participant {% elif p in waitlist %} {{createTable(p, 'waitlisted') if type == 'table' else createCard(p, 'waitlisted') }} {% endif %} -======= - {% for p in combinedParticipants %} - {% set username = p.user.username %} - {% if username not in seen %} - {% set _ = seen.append(username) %} - {% set status = none %} - {% if p in attended %} - {% set status = 'attended'%} - {% elif p in rsvp %} - {% set status = 'rsvp'%} - {% elif p in waitlist %} - {% set status = 'waitlist'%} - {% endif %} - {% if status %} - {% if type == 'card' %} - {{ createCard(p, status) }} - {% elif type == 'table' %} - {{ createTable(p, status) }} - {% endif %} - {% endif %} - {% endif %} ->>>>>>> 00969230e5d6ad117348383fe467c68ae96700f3 + {% endfor %} {% endmacro %} From 73d22ff0acb0966b89fb5af6fdf05d004d73b7b5 Mon Sep 17 00:00:00 2001 From: Ariana Meatchem <146577403+Meatchema@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:58:45 -0400 Subject: [PATCH 14/14] implemented a test for getTargetList condition function --- tests/code/test_participants.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/code/test_participants.py b/tests/code/test_participants.py index 31c615bf9..3ff11ca64 100644 --- a/tests/code/test_participants.py +++ b/tests/code/test_participants.py @@ -13,7 +13,7 @@ from app.models.program import Program from app.models.eventParticipant import EventParticipant from app.logic.volunteers import getEventLengthInHours, updateEventParticipants -from app.logic.participants import unattendedRequiredEvents, addBnumberAsParticipant, getEventParticipants, trainedParticipants, getParticipationStatusForTrainings, checkUserRsvp, checkUserVolunteer, addPersonToEvent, sortParticipantsByStatus +from app.logic.participants import getTargetList, unattendedRequiredEvents, addBnumberAsParticipant, getEventParticipants, trainedParticipants, getParticipationStatusForTrainings, checkUserRsvp, checkUserVolunteer, addPersonToEvent, sortParticipantsByStatus from app.models.eventRsvp import EventRsvp @@ -144,6 +144,28 @@ def test_addPersonToEvent(): transaction.rollback() +@pytest.mark.integration +def test_getTargetList(): + with mainDB.atomic() as transaction: + current_term = Term.get(Term.isCurrentTerm == True) + + # Test case 1: waitlist=True should always return "the waitlist" + event_rsvp = Event.create(term=current_term, program=9, isRsvpRequired=True) + assert getTargetList(event_rsvp, waitlist=True) == "the waitlist" + + event_invited = Event.create(term=current_term, program=9, isRsvpRequired=False) + assert getTargetList(event_invited, waitlist=True) == "the waitlist" + + # Test case 2: waitlist=False and isRsvpRequired=False should return "the Invited list" + assert event_invited.isRsvpRequired == False # Ensure the event has RSVP not required + assert getTargetList(event_invited, waitlist=False) == "the Invited list" + + # Test case 3: waitlist=False and isRsvpRequired=True should return "the RSVP list" + assert event_rsvp.isRsvpRequired == True # Ensure the event has RSVP required + assert getTargetList(event_rsvp, waitlist=False) == "the RSVP list" + + transaction.rollback() + @pytest.mark.integration def test_updateEventParticipants(): with mainDB.atomic() as transaction: