Background:
To get even closer to the MVP, we have to block times on the RTI.
Implementation:
A couple of things changed in order to be able to make a successful api call that would block time in the RTI.
First, I changed the api url for logging in. It's now the dev url because we need to store that token to be able to make a request to the rti dev api.
I added persistence to the sessions store so that the Upcoming Bookings persist. But for some reason, this caused the SkyChart to return errors if the user refreshed the page. So, I added an action to the store that checks for the date and puts it in Date format. That prevents d3-celestial from returning errors.
I changed the times that the user can select so that the tst site is "available".
Lastly, to be able to make a POST request to the rti-dev api, there has to be a start time and an end time. To get the end time, I added a function that adds 15 minutes to the selected time. Right now, most of the request body is hard coded but the times aren't. This will be changed in the future.
VISUALS
Screen recording of selection of a time that has been blocked already by the RTI (though it doesn't show because I cleared my cookies) and then selecting a different date and successfully making the request to block that
FEATURE: Block RTI sessions on
tst
siteBackground: To get even closer to the MVP, we have to block times on the RTI.
Implementation: A couple of things changed in order to be able to make a successful api call that would block time in the RTI. First, I changed the api url for logging in. It's now the dev url because we need to store that token to be able to make a request to the rti dev api. I added persistence to the
sessions
store so that theUpcoming Bookings
persist. But for some reason, this caused theSkyChart
to return errors if the user refreshed the page. So, I added an action to the store that checks for the date and puts it inDate
format. That prevents d3-celestial from returning errors. I changed the times that the user can select so that thetst
site is "available". Lastly, to be able to make a POST request to the rti-dev api, there has to be a start time and an end time. To get the end time, I added a function that adds 15 minutes to the selected time. Right now, most of the request body is hard coded but the times aren't. This will be changed in the future.VISUALS
Screen recording of selection of a time that has been blocked already by the RTI (though it doesn't show because I cleared my cookies) and then selecting a different date and successfully making the request to block that
https://github.com/LCOGT/lco-education-platform/assets/54489472/7f9e4e70-0021-4246-b4de-84aa2604a5bd