devsoc-unsw / freerooms

A web application designed to aid UNSW students in finding vacant rooms.
https://freerooms.devsoc.app/
Other
18 stars 1 forks source link

fix(calendar): show bookings that go until midnight #419

Closed francojreyes closed 4 months ago

francojreyes commented 4 months ago

With the addition of the law library on Freerooms recently, there are a number of bookings that end at midnight because law students are insane. Currently these are being hidden because showMultiDayTimes prop of the calendar component was set to false, and since midnight technically means it goes to the next day, it hides these bookings.

Turning showMultiDayTimes to true creates some weird behaviour where an event is displayed on the first day that says e.g. "6PM -" and then another event on the next day that says "- 12AM". This looks really weird, so I've decided to instead change any bookings that end at 12AM to end at 11:59PM (this is just on the frontend). I've also left showMultiDayTimes as true, in case there's a booking that goes overnight to not 12AM. It still looks weird, but better that then hidden.

Also I reformatted the room page file because holy shit that file was a mess. Like, there was inconsistent indentation and random spaces everywhere.