New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use availableDates from itemsAPI with NewRequestingDayPicker #10848
Conversation
Size Change: +228 B (+0.02%) Total Size: 958 kB
ℹ️ View Unchanged
|
onChange={e => setChosenDate(e.target.value)} | ||
/> | ||
) : ( | ||
<>Error: Available dates could not be found.</> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case there is an error in the itemsAPI when it fetches the opening times from the contentAPI, the itemsAPI returns an empty list of dates for that item, rather than than failing the entire request.
This means there is a small, yet non-null possibility that the list of available dates will be empty for one/all of the work's items. I'm choosing to wait for the last step to surface this error because it doesn't mean the item is not requestable, we just couldn't get the dates.
Is this the right way to go? and if it is, how can we make it look better? eg. add the library or digital email address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a designer or can we figure it out on a call tomorrow maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy requested from @jcateswellcome in Slack https://wellcome.slack.com/archives/C3TQSF63C/p1715246147417789
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this wellcomecollection/content-api#126 (review) what's rendering the Error when the toggle is on ? (Just to visualise the new calendar!)
@rcantin-w regarding the "Any item requests you make will appear here.", yes. I can see them when running locally:
|
Who is this for?
User requesting items from closed stores to view in the reading room
What is it doing for them?
Same as before, except the dates are coming from the itemsAPI if the offsiteRequesting toggle is on
NOTE: there's a bug on the itemsAPI whereby the 1st available date is not correct. Fix coming right up
PLEASE see comment in
NewCalendarSelect