feat: toggle round robin org and team info in booker (#22956)

* feat: toggle round robin booker org and team

* chore: add changeset

* dont hide in dev
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-08-08 13:55:53 +05:30
1 parent 736f1f594c
commit d18e23378b
9 files changed
+23 -1

No files matched your search

+3 -1
View File
@@ -80,6 +80,7 @@ const BookerComponent = ({
confirmButtonDisabled,
timeZones,
eventMetaChildren,
roundRobinHideOrgAndTeam,
}: BookerProps & WrappedBookerProps) => {
const searchParams = useCompatSearchParams();
const isPlatformBookerEmbed = useIsPlatformBookerEmbed();
@@ -403,7 +404,8 @@ const BookerComponent = ({
isPlatform={isPlatform}
isPrivateLink={!!hashedLink}
locale={userLocale}
timeZones={timeZones}>
timeZones={timeZones}
roundRobinHideOrgAndTeam={roundRobinHideOrgAndTeam}>
{eventMetaChildren}
</EventMeta>
{layout !== BookerLayouts.MONTH_VIEW &&
@@ -54,6 +54,7 @@ export const EventMeta = ({
locale,
timeZones,
children,
roundRobinHideOrgAndTeam,
}: {
event?: Pick<
BookerEvent,
@@ -90,6 +91,7 @@ export const EventMeta = ({
locale?: string | null;
timeZones?: Timezone[];
children?: React.ReactNode;
roundRobinHideOrgAndTeam?: boolean;
}) => {
const { timeFormat, timezone } = useBookerTime();
const [setTimezone] = useTimePreferences((state) => [state.setTimezone]);
@@ -167,6 +169,7 @@ export const EventMeta = ({
profile={event.profile}
entity={event.entity}
isPrivateLink={isPrivateLink}
roundRobinHideOrgAndTeam={roundRobinHideOrgAndTeam}
/>
<EventTitle className={`${classNames?.eventMetaTitle} my-2`}>
{translatedTitle ?? event?.title}
@@ -140,11 +140,13 @@ export type WrappedBookerPropsForPlatform = WrappedBookerPropsMain & {
verifyCode: undefined;
customClassNames?: CustomClassNames;
timeZones?: Timezone[];
roundRobinHideOrgAndTeam?: boolean;
};
export type WrappedBookerPropsForWeb = WrappedBookerPropsMain & {
isPlatform: false;
verifyCode: UseVerifyCodeReturnType;
timeZones?: Timezone[];
roundRobinHideOrgAndTeam?: boolean;
};
export type WrappedBookerProps = WrappedBookerPropsForPlatform | WrappedBookerPropsForWeb;
@@ -18,6 +18,7 @@ export interface EventMembersProps {
profile: BookerEvent["profile"];
entity: BookerEvent["entity"];
isPrivateLink: boolean;
roundRobinHideOrgAndTeam?: boolean;
}
export const EventMembers = ({
@@ -26,6 +27,7 @@ export const EventMembers = ({
profile,
entity,
isPrivateLink,
roundRobinHideOrgAndTeam,
}: EventMembersProps) => {
const username = useBookerStore((state) => state.username);
const isDynamic = !!(username && username.indexOf("+") > -1);
@@ -40,6 +42,10 @@ export const EventMembers = ({
!users.length ||
(profile.name !== users[0].name && schedulingType === SchedulingType.COLLECTIVE);
if (schedulingType === SchedulingType.ROUND_ROBIN && roundRobinHideOrgAndTeam) {
return <div className="h-6" />;
}
const orgOrTeamAvatarItem =
isDynamic || (!profile.image && !entity.logoUrl) || !entity.teamSlug
? []