fix: booking limits#12172
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 251 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 11/02/2023 11:41:01pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 4d8ef80 Started: 11/02/2023 11:36:29pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Teams - NonOrg Non admin team members cannot create team in org
Retry 1 • Initial Attempt |
0% (0)0 / 203 runsfailed over last 7 days |
30.05% (61)61 / 203 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
19.93% (60)60 / 301 runsfailed over last 7 days |
77.08% (232)232 / 301 runsflaked over last 7 days |
| { | ||
| dateFrom: reqBody.start, | ||
| dateTo: reqBody.end, | ||
| dateFrom: dayjs(reqBody.start).tz(reqBody.timeZone).format(), |
There was a problem hiding this comment.
reqBody.start is in system timezone. We need to have it in the correct timezone, needs to be the same as when we call that function for calculating available slots
| z.number().int(), | ||
| ]); | ||
|
|
||
| export const stringToDayjs = z.string().transform((val) => dayjs(val)); |
There was a problem hiding this comment.
string was in correct timezone but dayjs(val) returned the result in system timezone
exception
left a comment
There was a problem hiding this comment.
Looks ok to me, works as intended locally following PR description.
@CarinaWolli tests are failing |
Co-authored-by: CarinaWolli <wollencarina@gmail.com>

What does this PR do?
Fixes availability with booking limits when booking falls on a different day in UTC.
Fixes the following example:
Availability (Australia/Brisbane):

Create event type with booking limit 1 per day
Book any day at 16:00 (Australia/Brisbane)
Check availability:
Before: Availability on that day + next day partially blocked
After: Full day of the day of the booking is shown as unavailable, next day is not effected