Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Hosts to Add Cohost (Re-Implemented) #2192

Merged
merged 9 commits into from May 13, 2024

Conversation

Rutvikrj26
Copy link
Contributor

@Rutvikrj26 Rutvikrj26 commented Feb 12, 2024

This Pull Request implements the feature to add cohosts for an event.

This PR is a continuation of the Cohost PR : #1925

The feature has been implemented in a similar fashion to how the author Invitation is handled currently.

Cohosts are supposed to be helper for hosts and can manage the participants(approving, rejecting participants)
To be cohost, one has to be first approved to join the event.

Worflow:

When a host opens the event page, the host will be able to see the option to invite a user as a cohost.
event-cohost-form

The person invited gets an email for cohost Invitation:
cohost-invitation-email

The person sees the invitation on the specific event's page.
cohost-request
cohost-request-accept

When the person accepts, the host gets an email that the person has accepted the cohost invitation.

The form runs the check if the user is a participant in the event and prohibits inviting a random user as the last one implemented.

@Rutvikrj26 Rutvikrj26 changed the title Rs/events/invite cohosts Allow Hosts to Add Cohost (Re-Implemented) [Work-in-Progress] Feb 12, 2024
@Rutvikrj26 Rutvikrj26 changed the title Allow Hosts to Add Cohost (Re-Implemented) [Work-in-Progress] Allow Hosts to Add Cohost (Re-Implemented) Feb 13, 2024
@Rutvikrj26
Copy link
Contributor Author

Heyy @tompollard

This is the re-implemented version for inviting cohosts, following the implementation of author invitations in projects.
I've made some design decisions as to where the invitation is sent from, where it shows up, and how the implementation allows only the host to invite, and a participant to accept.
Please review and let me know your thoughts!

Copy link
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

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

Thanks @Rutvikrj26 I prefer this to the previous implementation. I added a few comments inline.

The "invite co-hosts" button and the "outstanding co-host invitations" content are hidden away in their current location.

Is there a reason why you didn't put them at http://localhost:8000/events/ (following a similar layout to http://localhost:8000/projects/)?

physionet-django/events/models.py Outdated Show resolved Hide resolved
physionet-django/events/views.py Outdated Show resolved Hide resolved
physionet-django/notification/utility.py Show resolved Hide resolved
@Rutvikrj26
Copy link
Contributor Author

Rutvikrj26 commented Mar 27, 2024

The "invite co-hosts" button and the "outstanding co-host invitations" content are hidden away in their current location.

That is a design decision I made to abstract out the related event invitations inside.
I can have them on the general page as well. Since the events are a bit different from projects in nature, it made more sense that the person is getting any pending requests particular to that event inside the event-specific page.

@tompollard let me know your thoughts. We can change it if you feel it is better to have them on the generic events page.

@tompollard
Copy link
Member

The "invite co-hosts" button and the "outstanding co-host invitations" content are hidden away in their current location.

That is a design decision I made to abstract out the related event invitations inside.
I can have them on the general page as well. Since the events are a bit different from projects in nature, it made more sense that the person is getting any pending requests particular to that event inside the event-specific page.

Thanks for explaining. Even for projects, outstanding tasks displayed at /projects refer to a specific project, so I don't think what we are doing with events are much different? My preference is to display the requests on the /events page (in the same way as projects), making it clear which event the task relates to.

@Rutvikrj26
Copy link
Contributor Author

Rutvikrj26 commented Apr 2, 2024

My preference is to display the requests on the /events page

Hey @tompollard , thanks for adding your thoughts. I've switched the cohost invitation to show up on the event home page rather than the individual event page.

image

@bemoody
Copy link
Collaborator

bemoody commented May 13, 2024

Looks good, thanks!

@bemoody bemoody merged commit a3fc11a into MIT-LCP:dev May 13, 2024
8 checks passed
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.

None yet

3 participants