Merge branch 'main' into fix/after-meeting-ends-migration
This commit is contained in:
commit
2b33541f88
|
@ -181,18 +181,13 @@ function BookingListItem(booking: BookingItemProps) {
|
||||||
// Calculate the booking date(s) and setup recurring event data to show
|
// Calculate the booking date(s) and setup recurring event data to show
|
||||||
let recurringStrings: string[] = [];
|
let recurringStrings: string[] = [];
|
||||||
let recurringDates: Date[] = [];
|
let recurringDates: Date[] = [];
|
||||||
const today = new Date();
|
|
||||||
if (booking.recurringBookings && booking.eventType.recurringEvent?.freq !== undefined) {
|
if (booking.recurringBookings && booking.eventType.recurringEvent?.freq !== undefined) {
|
||||||
[recurringStrings, recurringDates] = extractRecurringDates(
|
[recurringStrings, recurringDates] = extractRecurringDates(
|
||||||
booking.recurringBookings,
|
booking.recurringBookings,
|
||||||
user?.timeZone,
|
user?.timeZone,
|
||||||
i18n
|
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 || "";
|
const location = booking.location || "";
|
||||||
|
|
|
@ -608,7 +608,11 @@ export function RecurringBookings({
|
||||||
<>
|
<>
|
||||||
{eventType.recurringEvent?.count && (
|
{eventType.recurringEvent?.count && (
|
||||||
<span className="font-medium">
|
<span className="font-medium">
|
||||||
{getEveryFreqFor({ t, recurringEvent: eventType.recurringEvent })}
|
{getEveryFreqFor({
|
||||||
|
t,
|
||||||
|
recurringEvent: eventType.recurringEvent,
|
||||||
|
recurringCount: recurringBookings?.length ?? undefined,
|
||||||
|
})}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{eventType.recurringEvent?.count &&
|
{eventType.recurringEvent?.count &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user