freeCodeCamp / chapter

A self-hosted event management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
1.92k stars 360 forks source link

Add capacity indication on event page #2380

Closed gikf closed 1 year ago

gikf commented 1 year ago

Discuss your ideas or share your views:

Capacity of the event is not indicated in any way on the public event page (/events/{id}). That seems to be something that would be useful on the event page.

atosh502 commented 1 year ago

Hi @gikf, in addition to the event capacity, does it make sense to show the remaining seats (or the total attendees already confirmed) for the event? And then we can show a ratio of total attending / capacity and the users would know if they'll be added to the waitlist.

gikf commented 1 year ago

@atosh502 Sounds reasonable, feel free to play around with how that could be displayed.

atosh502 commented 1 year ago

Thanks, I just wanted to leave some ideas for how this could be done. Currently, on the public event page /events/{id} the data returned by the event query includes all the information we need to show the total capacity, total attendees or remaining seats for the events.

query event($eventId: Int!) {
    event(id: $eventId) {
      id
      name
      ...
      capacity
      ...
      event_users {
        attendance {
          name
        }
        user {
          id
          name
          image_url
        }
      }
    }
  }

And because this is a good first issue I think it's a great starting point for someone new to the codebase. I'll wait for a while and do it if no one picks this up :)

hound77 commented 1 year ago

@atosh502 I want to work on this issue. can you help me where I will have to make changes as I am new to this code base and open source.

atosh502 commented 1 year ago

@hound77 yes, you can start looking at the event detail page: client/src/pages/events/[eventId].tsx page and add the capacity indication below the starting and ending dates.