UoaWDCC / uasc-web

Project with the University of Auckland Snowsports Club Website & Booking System. Established in 2023.
https://uasc.co.nz
6 stars 2 forks source link

Backend endpoint for admins to make bookings available #381

Closed bcho892 closed 5 months ago

bcho892 commented 5 months ago

Have wrote tests to confirm this indeed adds bookings, and changes availability on update. (Changes from #133 have been bought into this to get booking slot ids)

[!IMPORTANT] If this is merged we should agree on using the firestore Timestamp for communicating dates for consistency. Otherwise a discussion should be started on what type of data structure to use for dates. (Affects #289).

Sets availability of already existing slots with the new constants defined in server\src\business-layer\utils\BookingConstants.ts.

Invalid inputs (start and end date) lead to nothing being changed.   As a side task, also created AdminController (this is where the main logic is) and moved all admin scoped ones into there (no changes to frontend need to be made per this ticket) nvm clown moment

Returns an array of booking_slot_ids and dates (timestamps) that were modified.

github-actions[bot] commented 5 months ago

Visit the preview URL for this PR (updated for commit cc3f79f):

https://uasc-ceebc--pr381-349-backend-let-admi-4gkqxten.web.app

(expires Mon, 10 Jun 2024 07:57:17 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 36296ceaed1d43e92e7d5e81a72a7bd987560bfa