-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix reservation unit state #1025
Conversation
00885de
to
1f925f1
Compare
5a1e9c2
to
8b60498
Compare
6312e44
to
1d6c5ac
Compare
337da60
to
529d093
Compare
c1d874f
to
b03313d
Compare
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.
LGTM 👍
b03313d
to
87cca1f
Compare
07d74be
to
f6273e4
Compare
- "asInt" is misleading, since it's desired effect is to ensure that the return value consists of numbers (like "0" instead of "free") - but we are still returning a string and not anything typed number (like "asInt" would suggest). - "reservationUnitIsReservable" differentiates it from the reservability for a single slot (= a result of an isSlotReservable() operation, whereas this is isReservationUnitReservable).
- remove as much logic as possible from quick reservation and calendar controls - move over some utility functions from quick reservation to utils.ts, even if they aren't in use elsewhere
fe24721
to
cf4ee48
Compare
apps/ui/components/reservation-unit/ReservationInfoContainer.tsx
Outdated
Show resolved
Hide resolved
const initialFieldValues = { | ||
date: | ||
searchDate && searchUIDate && isValidDate(searchUIDate) | ||
? searchDate | ||
: toUIDate(new Date(todaysTimeSpans[0]?.startDatetime ?? "")), |
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.
Date format? here it's in UI.
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.
It's supposed to be in UI format in the form/state.. searchDate
is in UI format too..
cf4ee48
to
fb2af51
Compare
🛠️ Changelog
🧪 Test plan
🎫 Tickets