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 minimum booking notice set to 0 #7750
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -133,10 +133,7 @@ export const SlotPicker = ({ | |||
eventTypeId: eventType.id, | |||
eventTypeSlug: eventType.slug, | |||
usernameList: users, | |||
startTime: | |||
browsingDate === undefined || browsingDate.get("month") === dayjs.tz(undefined, timeZone).get("month") | |||
? dayjs.tz(undefined, timeZone).subtract(2, "days").startOf("day") |
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.
This was the cause of the "bookings can't be made in the past" error. For example, if it is March 15th 3 pm, when looking for slots the start date would be March 13th 3 pm. This fails the isOutOfBounds
check. Why was there a reason we started slots 2 days in the past?
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.
@roae may have more context of this
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.
I'm really not sure why that is done that way, I kept it because of that, I guess, it subtracts that time for utc- time zones.
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.
browsingDate === undefined || browsingDate.get("month") === dayjs.tz(undefined, timeZone).get("month") | ||
? dayjs.tz(undefined, timeZone).subtract(2, "days").startOf("day") | ||
: browsingDate?.startOf("month"), | ||
startTime: dayjs().startOf("day"), |
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.
We can just use the current day and determine the availability from that. It wouldn't fail the isOutofBounds
check since it compares it to new Date()
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 Eight Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
Current Playwright Test Results Summary✅ 66 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 03/20/2023 05:44:44pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: bcb0a8c Started: 03/20/2023 05:36:38pm UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Event Types tests user can add multiple organizer address
Retry 1 • Initial Attempt |
7.78% (20)20 / 257 runsfailed over last 7 days |
33.46% (86)86 / 257 runsflaked over last 7 days |
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.
Tested and worked 🙏🏽
What does this PR do?
This PR, solves the "Booking out of bounds" error when minimum notice was set to 0
Fixes # (issue)
Environment: Staging(main branch) / Production
Type of change
How should this be tested?
Checklist