rpiambulance / website

RPI Ambulance's website—a work in progress
http://rpiambulance.com/
3 stars 13 forks source link

Add duty supervisor to database and website (and support for /whoson) #124

Closed tceluzza closed 2 years ago

tceluzza commented 2 years ago

This adds a dutysup row to the crews table and the default_crews table in the database. It also adjusts the Modify Schedule and Edit Default Schedule pages on the website to show a column for Duty Supervisor.

Since js/controllers/NightCrewsCtrl.js and js/controllers/ModifyScheduleCtrl.js both used the same loadCrews() function to display the crew, the DS was appearing on the Night Crews page, I added a second function loadCrewsNoDS that removes the DS column from the Night Crews Page. Alternatively, it could be removed when being displayed, leaving it in the array, which would only require one function. Let me know if you think that'd be better!

tceluzza commented 2 years ago

I think I've fixed everything - uses one one loadCrews function, doesn't check duty sups when checking if a D-T/CC-T is on, and allows a member to be set as both duty sup and another position in the Modify Schedule page on the website.