chore: hide cal branding for platform bookings (#22979)

Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: Rajiv Sahal <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-08-20 12:27:09 -03:00
1 parent f501ef3269
commit b4d804de7c
4 files changed
+14 -6

No files matched your search

+2
View File
@@ -17,6 +17,7 @@ export const getEventTypesFromDB = async (id: number) => {
darkBrandColor: true,
email: true,
timeZone: true,
isPlatformManaged: true,
};
const eventType = await prisma.eventType.findUnique({
where: {
@@ -75,6 +76,7 @@ export const getEventTypesFromDB = async (id: number) => {
hideBranding: true,
},
},
createdByOAuthClientId: true,
},
},
workflows: {
@@ -228,16 +228,20 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
? { ...previousBooking, rescheduledBy: bookingInfo.user?.name }
: previousBooking;
const isPlatformBooking = eventType.users[0]?.isPlatformManaged || eventType.team?.createdByOAuthClientId;
return {
props: {
orgSlug: currentOrgDomain,
themeBasis: eventType.team ? eventType.team.slug : eventType.users[0]?.username,
hideBranding: await shouldHideBrandingForEvent({
eventTypeId: eventType.id,
team: eventType.team,
owner: eventType.users[0] ?? null,
organizationId: session?.user?.profile?.organizationId ?? session?.user?.org?.id ?? null,
}),
hideBranding: isPlatformBooking
? true
: await shouldHideBrandingForEvent({
eventTypeId: eventType.id,
team: eventType.team,
owner: eventType.users[0] ?? null,
organizationId: session?.user?.profile?.organizationId ?? session?.user?.org?.id ?? null,
}),
profile,
eventType,
recurringBookings: await getRecurringBookings(bookingInfo.recurringEventId),
+1
View File
@@ -56,6 +56,7 @@ const user: User & { credentials: CredentialPayload[] } = {
timeFormat: 12,
travelSchedules: [],
locked: false,
isPlatformManaged: false,
};
const customInputs: CustomInputSchema[] = [];
+1
View File
@@ -10,6 +10,7 @@ export const availabilityUserSelect = {
endTime: true,
timeFormat: true,
defaultScheduleId: true,
isPlatformManaged: true,
// Relationships
schedules: {
select: {