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

API - Add support for event venues #1640

Closed
palisadoes opened this issue Jan 6, 2024 · 34 comments
Closed

API - Add support for event venues #1640

palisadoes opened this issue Jan 6, 2024 · 34 comments
Assignees
Labels

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Jan 6, 2024

Is your feature request related to a problem? Please describe.

We need the ability to add API functionality to assign a venue to an event. Currently you can assign geographic coordinates, but you cannot also provide one of a list of pre-defined venues (eg. "Conference Room", "Sports Field" or "Theater") This would be a useful capability to add.

Describe the solution you'd like

The aim would be for Admins to do CRU activities (no deletions, but disabling/enabling) for venues on an Org screen, and for these venues to appear as options whenever events are scheduled.

The API must be able to:

  1. determine whether the venue is already allocated during all or some part of the proposed event timeslot when the event is being created and not make it appear as an option.
    1. if there are no venues configured, or no available venues, then the returned result be meaningful and the app must not crash
  2. reject the creation of an event if the requested location is unavailable
  3. return an availability status for a selected venue for a given timeslot that could be used whenever the event timing is adjusted.

Other

  1. We will also need the ability to set the maximum capacity of the venue in terms of user checkins. This will help with events that require pre-registration
  2. Venues can often be reconfigured to have less or more seating. This means that there will need to be the ability to override the checkin limit on a per event basis.

The schema must include support for:

  1. Venue ID
  2. Venue name
  3. Venue description

This issue should be split into multiple PRs for ease of review:

  1. Venue CRUD
  2. Adding a venue to a single Event
  3. Verifying the venue isn't already used for a single event
  4. Managing event checkins for venue capacity
  5. Adding the venues to recurring events

Describe alternatives you've considered

  • N/A

Approach to be followed (optional)

  • See above

Additional context

Related issues:

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship

@wingman47
Copy link

I would like to work on this issue.

@Cioppolo14 Cioppolo14 removed the unapproved Unapproved for Pull Request label Jan 6, 2024
@palisadoes
Copy link
Contributor Author

  1. We will also need the ability to set the maximum capacity of the venue in terms of user checkins. This will help with events that require pre-registration
  2. Venues can often be reconfigured to have less or more seating. This means that there will need to be the ability to override the checkin limit on a per event basis.

@meetulr
Copy link

meetulr commented Jan 8, 2024

@wingman47 please update me on the schemas you'll be making, as I would be working on the frontend for this issue.

@wingman47
Copy link

@wingman47 please update me on the schemas you'll be making, as I would be working on the frontend for this issue.

I have done the following changes in the schemas for now -

Created a new venue schema which contains id, name, description and capacity of the venue.

Added an array of venues as objects that are available in an organisation in Organisation schema.

Added venue property as an object in event schema.

@wingman47
Copy link

wingman47 commented Jan 8, 2024

Hey @palisadoes, how to handle events that are recurring because the start and end dates can change based on whether it's a 'ONCE,' 'DAILY,' 'WEEKLY,' 'MONTHLY,' or 'YEARLY' thing. So, every time I want to check if the venue's free, I've got to recalculate the new start and end date while considering stuff like days in a month (which itself varies throughout the year), leap years etc. for every recurrances and if we add recurrance for the new event as well then it will become even more complex because we will have to calculate all the crossing of this new recurring event with other recurring events. Any suggestion to handle this situation?

@wingman47
Copy link

wingman47 commented Jan 9, 2024

@palisadoes @Cioppolo14 are there any plans to implement recurring events? because right now it can be changed through apollo only. There's no option to change it from the frontend. If there would be recurring events then it would be very difficult to manage venue availibility for multiple recurring events with same location.

@palisadoes
Copy link
Contributor Author

Please refer to this PR. We will need to implement this in the Web UI soon after merging

@meetulr
Copy link

meetulr commented Jan 10, 2024

Do we currently have a direct way of knowing the number of check-ins for an event? If not, we should add a field in the event schema that represents that, which could be incremented every time an attendee checks in.
This way we won't have to make a separate query to find the number of check-ins to check against the venue capacity.

@palisadoes
Copy link
Contributor Author

Yes, that would be useful

@wingman47
Copy link

wingman47 commented Jan 10, 2024

@palisadoes I am unassigning myself because current implementation for events have too many variables. Right now an event's start date and end date can have a difference of any number of days with any type of recurrance like 'WEEKLY', 'DAILY' etc. therefore it involves many different situations to handle venues availability. On top of that we also need to take care of start time and end time which makes the whole situation very complex to solve.
I have created venue creation and edit venue api for now. Please let me know if you want me to create PR for that.

@wingman47 wingman47 removed their assignment Jan 10, 2024
@meetulr
Copy link

meetulr commented Jan 10, 2024

Might I give it a try? It could take a couple days to understand the whole recurrence situation (I am looking into it), and then coming up with an effective strategy.

@palisadoes
Copy link
Contributor Author

@wingman47

  1. You don't need to incorporate recurring meetings.
  2. That is the job of another contributor.
  3. Make this work for a single event and let the other contributors figure out how to incorporate your changes in a recurring event.
  4. I'll reassign you

@wingman47
Copy link

wingman47 commented Jan 10, 2024

@wingman47

  1. You don't need to incorporate recurring meetings.
  2. That is the job of another contributor.
  3. Make this work for a single event and let the other contributors figure out how to incorporate your changes in a recurring event.
  4. I'll reassign you

Ok, I will complete it for single events. Thank you.

@meetulr
Copy link

meetulr commented Jan 11, 2024

Screenshot (10)
@wingman47 let me know when you're done with these.

Also, I think it'd be better if you keep pushing the incremental changes to your fork, so that I can add it as a remote and work with it on the frontend on the go. What do you think?

@wingman47
Copy link

Screenshot (10) @wingman47 let me know when you're done with these.

Also, I think it'd be better if you keep pushing the incremental changes to your fork, so that I can add it as a remote and work with it on the frontend on the go. What do you think?

Will let you know. For now, I have pushed my changes to event-venue branch.

@meetulr
Copy link

meetulr commented Jan 13, 2024

@palisadoes Are we going to have images for venues?

@meetulr
Copy link

meetulr commented Jan 13, 2024

@wingman47 You've restricted the mutations to (role: ADMIN).
SUPERADMINs should be able to do anything, right?

Could you clarify who would have access?
I'm under the impression that SUPERADMINs and the current organization's ADMINs (not just any admin) should be allowed.

Let me know if I'm wrong😅.
Thanks.

@wingman47
Copy link

@wingman47 You've restricted the mutations to (role: ADMIN). SUPERADMINs should be able to do anything, right?

Could you clarify who would have access? I'm under the impression that SUPERADMINs and the current organization's ADMINs (not just any admin) should be allowed.

Let me know if I'm wrong😅. Thanks.

My bad. You are correct. I have fixed it now. Thanks👍

@palisadoes
Copy link
Contributor Author

palisadoes commented Jan 13, 2024

@wingman47

  1. Adding support for a single venue image would be useful
  2. Venues will often have addresses, so we should add that to the schema for venues.
  3. The aim is for venues to be relatively short list that are input by Admins to make event management easier. The aim is not to support an infinite number of venues as defined by the addresses of every building in the world

Open a PR when ready.

@wingman47
Copy link

@wingman47

  1. Adding support for a single venue image would be useful
  2. Venues will often have addresses, so we should add that to the schema for venues

Open a PR when ready.

Will add both of them to the schema. I was writing tests for the new features I have added as of now.

@palisadoes
Copy link
Contributor Author

See the updated comment about venues being a limited list

@palisadoes
Copy link
Contributor Author

An event's venue must be optional

@wingman47
Copy link

wingman47 commented Jan 13, 2024

See the updated comment about venues being a limited list

The maximum venues allowed in an organization should be defined by us (like 5 -6 venues) or will it be editable by the admin of the organization?

@palisadoes
Copy link
Contributor Author

Admins will be able to add as many venues as they want. It's unlikely that there will be large numbers.

@wingman47
Copy link

Admins will be able to add as many venues as they want. It's unlikely that there will be large numbers.

As of now, only admins of an organisation can create a new venue and a user can only select the venues added by the admins when creating an event.
Should I open the ability to create a new venue for normal users of an organisation as well?

@palisadoes
Copy link
Contributor Author

Admins will be able to add as many venues as they want. It's unlikely that there will be large numbers.

As of now, only admins of an organisation can create a new venue and a user can only select the venues added by the admins when creating an event. Should I open the ability to create a new venue for normal users of an organisation as well?

No. Then there could be be infinite entries.

@meetulr
Copy link

meetulr commented Jan 22, 2024

@wingman47 are the queries done yet? Specifically the one that, given event start and end dates, start and end times, returns an array of available venues.

@wingman47
Copy link

@wingman47 are the queries done yet? Specifically the one that, given event start and end dates, start and end times, returns an array of available venues.

I will push it by tonight.

@meetulr
Copy link

meetulr commented Jan 27, 2024

Do we currently have a direct way of knowing the number of check-ins for an event? If not, we should add a field in the event schema that represents that, which could be incremented every time an attendee checks in. This way we won't have to make a separate query to find the number of check-ins to check against the venue capacity.

@wingman47 please add this.

@wingman47
Copy link

Do we currently have a direct way of knowing the number of check-ins for an event? If not, we should add a field in the event schema that represents that, which could be incremented every time an attendee checks in. This way we won't have to make a separate query to find the number of check-ins to check against the venue capacity.

@wingman47 please add this.

I have pushed the changes.

@palisadoes
Copy link
Contributor Author

@meetulr @wingman47

An event check-in count is not necessary. Check-in counts will be tracked here:

Please revert. You will be duplicating efforts. Talk to the person assigned this issue instead.

@wingman47
Copy link

@meetulr @wingman47

An event check-in count is not necessary. Check-in counts will be tracked here:

Please revert. You will be duplicating efforts. Talk to the person assigned this issue instead.

Ok, I will revert the checkIn part. Should I keep the declination of any new request in addEventAttendee after the event's venue capacity is reached?

@palisadoes
Copy link
Contributor Author

Yes, thanks

Copy link

github-actions bot commented Feb 8, 2024

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants