feat: Improving Booking Visibility at Month-End (#22770)

* remove first weeks and add last

* fix added last week

* prefetch availability of next month

* don't switch month

* On hover show month

* only show new UI in monthly view

* show month tooldtip only when needed

* show month on first day of month

* remove isFirstDayOfNextMonth

* fix prefetching next month

* fix datePicker tests

* preventMonthSwitching in monthly view

* add tests

* code clean up

* code clean up

* code clena up for ooo days

* push first day of month

* remove bg color for the month badge

* fix text colour

* remove not needed

* use object param

* revert: use object param

* use object param

* fix DatePicker tests

---------

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Sean Brydon <[email protected]>
Co-authored-by: Eunjae Lee <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-07-30 16:20:16 +00:00
1 parent 63df3d9c14
commit 7fef683abf
8 files changed
+278 -41

No files matched your search

@@ -206,7 +206,10 @@ export const BookerPlatformWrapper = (
!!bookerLayout.extraDays &&
dayjs(date).month() !== dayjs(date).add(bookerLayout.extraDays, "day").month()) ||
(bookerLayout.layout === BookerLayouts.COLUMN_VIEW &&
dayjs(date).month() !== dayjs(date).add(bookerLayout.columnViewExtraDays.current, "day").month());
dayjs(date).month() !== dayjs(date).add(bookerLayout.columnViewExtraDays.current, "day").month()) ||
(bookerLayout.layout === BookerLayouts.MONTH_VIEW &&
(!dayjs(date).isValid() || dayjs().isSame(dayjs(month), "month")) &&
dayjs().isAfter(dayjs(month).startOf("month").add(2, "week")));
const monthCount =
((bookerLayout.layout !== BookerLayouts.WEEK_VIEW && bookerState === "selecting_time") ||
@@ -413,7 +416,7 @@ export const BookerPlatformWrapper = (
[props.selectedDate]
);
useEffect(() => {
setSelectedDate(selectedDateProp, true);
setSelectedDate({ date: selectedDateProp, omitUpdatingParams: true });
}, [selectedDateProp]);
useEffect(() => {
@@ -421,7 +424,7 @@ export const BookerPlatformWrapper = (
return () => {
slots.handleRemoveSlot();
setBookerState("loading");
setSelectedDate(null);
setSelectedDate({ date: null });
setSelectedTimeslot(null);
setSelectedDuration(null);
setOrg(null);
@@ -77,6 +77,7 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => {
const [bookerState, _] = useBookerStore((state) => [state.state, state.setState], shallow);
const [dayCount] = useBookerStore((state) => [state.dayCount, state.setDayCount], shallow);
const [month] = useBookerStore((state) => [state.month, state.setMonth], shallow);
const { data: session } = useSession();
const routerQuery = useRouterQuery();
@@ -126,7 +127,10 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => {
!!bookerLayout.extraDays &&
dayjs(date).month() !== dayjs(date).add(bookerLayout.extraDays, "day").month()) ||
(bookerLayout.layout === BookerLayouts.COLUMN_VIEW &&
dayjs(date).month() !== dayjs(date).add(bookerLayout.columnViewExtraDays.current, "day").month());
dayjs(date).month() !== dayjs(date).add(bookerLayout.columnViewExtraDays.current, "day").month()) ||
(bookerLayout.layout === BookerLayouts.MONTH_VIEW &&
(!dayjs(date).isValid() || dayjs().isSame(dayjs(month), "month")) &&
dayjs().isAfter(dayjs(month).startOf("month").add(2, "week")));
const monthCount =
((bookerLayout.layout !== BookerLayouts.WEEK_VIEW && bookerState === "selecting_time") ||