isaacphysics / isaac-app

Isaac Physics historic front-end project, based on Angular JS
https://isaacphysics.org
MIT License
5 stars 1 forks source link

WAITING LIST ONLY event availability totals should only include confirmed bookings #1026

Closed sacummins closed 5 years ago

sacummins commented 5 years ago

Background

Currently for all events, the placesAvailable (and therefore the full / available state) is calculated as follows placesAvailable = numberOfPlaces - (|ConfirmedBookings| + |WaitingListBookings|).

This is to correctly manage events that allow automatic confirmation emails (i.e. where a user can book on an event without a manual approval). If we didn't do this, then people on the waitinglist may not be able to secure a place in the event of a cancelled confirmed booking. I.e. a place would free up and a new applicant would take it before the waiting list people.

New Behaviour

Events with the status of WAITING_LIST_ONLY should calculate the number of places available differently. These events should only include confirmed bookings in this calculation as not all people on the waiting list will complete the prerequisites required.

Also the button for joining the waiting list should have the text changed to read 'Apply' rather than 'join waiting list'