Skip to content

Conversation

gnclmorais
Copy link
Contributor

@gnclmorais gnclmorais commented Dec 31, 2023

As an organiser, I’ve ran into situations where I believe an invite or two has been edited by another organiser, but I don’t have a way to know. I’ve also had a student or two telling me they’ve received the attendance email, but their names are not on the list.

Hopefully, this PR will help with it. Now, whenever an organiser adds/removes a person from a workshop, we record their ID so we can connect that editing with their action. This is not the most exact method, but it saves us from recording every single change or creating a table just for this.

organiser page new changes page
image image

Bonus: this PR also addresses a few other things I found:

  • the fancy error screen we have was not allowing the better_errors gem to work its magic
  • a user’s Invitation page was not showing the RSVP buttons
  • an organiser should be able to manually RSVP someone without the need for a tutorial, for the cases of an extra student showing up

@gnclmorais gnclmorais force-pushed the record-overrides-with-id branch 4 times, most recently from 9fb64a0 to 43dec15 Compare December 31, 2023 15:00
Comparing with the right class will make sure the button that should
be there will actually appear.
Students need a tutorial for this, but it makes no sense if an
organiser is manually adding a person.
This will allow us to record the ID of the last organiser that
overrode a WorkshopInvite. I gave it a thought about this and
tried a few different approaches, but this seemed the best compromise.

I’ve looked into keeping track of every change through a few
gems, but this would only grow the DB without much advantage,
I believe. I don’t think we need (at the moment, at least) a
detailed record of all the changes.

At its core, I’m just interested in knowing if a WorkshopInvitation
has been “tampered with”. This should help us with that.
@gnclmorais gnclmorais force-pushed the record-overrides-with-id branch from 86a71cf to 6563a13 Compare January 1, 2024 13:11
@matyikriszta matyikriszta self-requested a review January 2, 2024 18:21
@gnclmorais gnclmorais force-pushed the record-overrides-with-id branch from 6563a13 to 4b42153 Compare January 4, 2024 06:49
Now the admin page of a workshop will display a different icon and
message if an invite has been manually edited by an organiser.
This action no longer triggers an error, so let’s update the test.
@gnclmorais gnclmorais force-pushed the record-overrides-with-id branch from 4b42153 to 4bfb17e Compare January 4, 2024 08:37
Copy link
Contributor

@matyikriszta matyikriszta left a comment

Choose a reason for hiding this comment

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

@gnclmorais code looks good overall, noticed two small typos. Going to check the changes out and test locally before I approve.

Copy link
Contributor

@matyikriszta matyikriszta left a comment

Choose a reason for hiding this comment

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

@gnclmorais I've reviewed this locally and all looks good! Once those two typos are fixed this is good to ship 🚢

@gnclmorais
Copy link
Contributor Author

Thanks for fixing the typos! Sorry it took me a while to get back to this…

@gnclmorais gnclmorais merged commit d6b6330 into codebar:master Jan 30, 2024
@gnclmorais gnclmorais deleted the record-overrides-with-id branch January 30, 2024 20:09
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