Skip to content

Commit

Permalink
Fix minimum booking notice set to 0 (#7750)
Browse files Browse the repository at this point in the history
* Only use the current day

* Set min of booking notice to 0

* Set min minimumBookingNotice to 0
  • Loading branch information
joeauyeung authored Mar 25, 2023
1 parent 492858b commit 20022e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions apps/web/components/booking/SlotPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
: browsingDate?.startOf("month"),
startTime: dayjs().startOf("day"),
endTime: browsingDate?.endOf("month"),
timeZone,
duration,
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/eventtype/EventLimitsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const MinimumBookingNoticeInput = React.forwardRef<
label={t("minimum_booking_notice")}
type="number"
placeholder="0"
min={0}
className="mb-0 h-[38px] rounded-[4px] ltr:mr-2 rtl:ml-2"
/>
<input type="hidden" ref={ref} {...passThroughProps} />
Expand Down
1 change: 1 addition & 0 deletions packages/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ model EventType {
recurringEvent Json?
disableGuests Boolean @default(false)
hideCalendarNotes Boolean @default(false)
/// @zod.min(0)
minimumBookingNotice Int @default(120)
beforeEventBuffer Int @default(0)
afterEventBuffer Int @default(0)
Expand Down

1 comment on commit 20022e2

@vercel
Copy link

@vercel vercel bot commented on 20022e2 Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

inkblot – ./apps/web

inkblot-git-main-cal.vercel.app
inkblot-cal.vercel.app
inkblot.cal.com
dhe.cal.com

Please sign in to comment.