File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export const getEventTypesFromDB = async (id: number) => {
1717 darkBrandColor : true ,
1818 email : true ,
1919 timeZone : true ,
20+ isPlatformManaged : true ,
2021 } ;
2122 const eventType = await prisma . eventType . findUnique ( {
2223 where : {
@@ -75,6 +76,7 @@ export const getEventTypesFromDB = async (id: number) => {
7576 hideBranding : true ,
7677 } ,
7778 } ,
79+ createdByOAuthClientId : true ,
7880 } ,
7981 } ,
8082 workflows : {
Original file line number Diff line number Diff line change @@ -228,16 +228,20 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
228228 ? { ...previousBooking , rescheduledBy : bookingInfo . user ?. name }
229229 : previousBooking ;
230230
231+ const isPlatformBooking = eventType . users [ 0 ] ?. isPlatformManaged || eventType . team ?. createdByOAuthClientId ;
232+
231233 return {
232234 props : {
233235 orgSlug : currentOrgDomain ,
234236 themeBasis : eventType . team ? eventType . team . slug : eventType . users [ 0 ] ?. username ,
235- hideBranding : await shouldHideBrandingForEvent ( {
236- eventTypeId : eventType . id ,
237- team : eventType . team ,
238- owner : eventType . users [ 0 ] ?? null ,
239- organizationId : session ?. user ?. profile ?. organizationId ?? session ?. user ?. org ?. id ?? null ,
240- } ) ,
237+ hideBranding : isPlatformBooking
238+ ? true
239+ : await shouldHideBrandingForEvent ( {
240+ eventTypeId : eventType . id ,
241+ team : eventType . team ,
242+ owner : eventType . users [ 0 ] ?? null ,
243+ organizationId : session ?. user ?. profile ?. organizationId ?? session ?. user ?. org ?. id ?? null ,
244+ } ) ,
241245 profile,
242246 eventType,
243247 recurringBookings : await getRecurringBookings ( bookingInfo . recurringEventId ) ,
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ const user: User & { credentials: CredentialPayload[] } = {
5656 timeFormat : 12 ,
5757 travelSchedules : [ ] ,
5858 locked : false ,
59+ isPlatformManaged : false ,
5960} ;
6061
6162const customInputs : CustomInputSchema [ ] = [ ] ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export const availabilityUserSelect = {
1010 endTime : true ,
1111 timeFormat : true ,
1212 defaultScheduleId : true ,
13+ isPlatformManaged : true ,
1314 // Relationships
1415 schedules : {
1516 select : {
You can’t perform that action at this time.
0 commit comments