Repository navigation
Refresh All RSVPs after submitting and skip the unauthorized list fetch - #110
Open
NathanLe2247 wants to merge 1 commit into
Open
NathanLe2247 wants to merge 1 commit into
NathanLe2247 wants to merge 1 commit into
Conversation
After a user submitted or updated their RSVP, only the "Your RSVP" card refreshed, so the All RSVPs list stayed stale until the page was reopened. Now the list is refetched after a successful submit for users who can see it. The page-change effect also ran on first render for every user. Users without event management permission got a "Failed to fetch RSVPs" toast, and managers fetched page 1 twice. It now only fetches when the list is shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
Two bugs on the event Attendance page (EventAttendance.tsx):
submitRsvprefetched only your own RSVP (/rsvp) for the "Your RSVP" card and never reloaded the list (/rsvps). You had to leave the page and come back to see your entry.refreshList()on first render for everyone./rsvpsrequires@Security("events"), so other users got a "Failed to fetch RSVPs" toast every time they opened an event. Managers fetched page 1 twice, sinceload()already fetches it.Fix
refreshList()when the list is shown (showRsvps).refreshList()in the page-change effect whenshowRsvpsis true. On first render it is still false, soload()is the only fetch; page changes work as before.The list is sorted by
updatedAtdescending, so a new or updated RSVP appears at the top of page 1.Verified
./nx build ppluipasses.master; none are new.🤖 Generated with Claude Code