Scheduling infrastructure for absolutely everyone.
fix: pass recurring count value (#3844)
Udit Takkar944f4dc43bdf
diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsxindex 6a76256174f..283f1fc015d 100644--- a/apps/web/components/booking/BookingListItem.tsx+++ b/apps/web/components/booking/BookingListItem.tsx@@ -181,18 +181,13 @@ function BookingListItem(booking: BookingItemProps) {// Calculate the booking date(s) and setup recurring event data to showlet recurringStrings: string[] = [];let recurringDates: Date[] = [];- const today = new Date();+if (booking.recurringBookings && booking.eventType.recurringEvent?.freq !== undefined) {[recurringStrings, recurringDates] = extractRecurringDates(booking.recurringBookings,user?.timeZone,i18n);- if (booking.status === BookingStatus.PENDING) {- // Only take into consideration next up instances if booking is confirmed- recurringDates = recurringDates.filter((aDate) => aDate >= today);- recurringStrings = recurringDates.map((_, key) => recurringStrings[key]);- }}const location = booking.location || "";diff --git a/apps/web/pages/success.tsx b/apps/web/pages/success.tsxindex 5b2037fe7ec..070224ac9da 100644--- a/apps/web/pages/success.tsx+++ b/apps/web/pages/success.tsx@@ -608,7 +608,11 @@ export function RecurringBookings({<>{eventType.recurringEvent?.count && (<span className="font-medium">- {getEveryFreqFor({ t, recurringEvent: eventType.recurringEvent })}+ {getEveryFreqFor({+ t,+ recurringEvent: eventType.recurringEvent,+ recurringCount: recurringBookings?.length ?? undefined,+ })}</span>)}{eventType.recurringEvent?.count &&