Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/web/lib/booking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ export const getEventTypesFromDB = async (id: number) => {
darkBrandColor: true,
email: true,
timeZone: true,
profiles: {
select: {
organization: {
select: {
isPlatform: true,
},
},
},
},
};
const eventType = await prisma.eventType.findUnique({
where: {
Expand Down Expand Up @@ -70,9 +79,11 @@ export const getEventTypesFromDB = async (id: number) => {
slug: true,
name: true,
hideBranding: true,
isPlatform: true,
parent: {
select: {
hideBranding: true,
isPlatform: true,
},
},
},
Expand Down
14 changes: 13 additions & 1 deletion apps/web/modules/bookings/views/bookings-single-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,18 @@ export default function Success(props: PageProps) {
return isRecurringBooking ? t("meeting_is_scheduled_recurring") : t("meeting_is_scheduled");
})();

const isPlatformBooking = Boolean(
eventType.team?.isPlatform ||
eventType.team?.parent?.isPlatform ||
(Array.isArray(eventType.users) &&
eventType.users.some(
(u: any) => Array.isArray(u.profiles) && u.profiles.some((p: any) => p.organization?.isPlatform)
)) ||
(eventType.owner &&
Array.isArray((eventType.owner as any).profiles) &&
(eventType.owner as any).profiles.some((p: any) => p.organization?.isPlatform))
);

return (
<div className={isEmbed ? "" : "h-screen"} data-testid="success-page">
{!isEmbed && !isFeedbackMode && (
Expand Down Expand Up @@ -969,7 +981,7 @@ export default function Success(props: PageProps) {
</>
)}

{session === null && !(userIsOwner || props.hideBranding) && (
{session === null && !(userIsOwner || props.hideBranding) && !isPlatformBooking && (
<>
<hr className="border-subtle mt-8" />
<div className="text-default pt-8 text-center text-xs">
Expand Down
Loading