feat: display org banner on personal event types (#14101)

* feat: display org banner on personal event types

* chore: add banner url

* fix: type error
This commit is contained in:
Udit Takkar
2024-03-19 14:20:40 +00:00
committed by GitHub
parent 0f1f0a29e6
commit d6605d6dfd
7 changed files with 9 additions and 2 deletions
@@ -93,6 +93,7 @@ async function getDynamicGroupPageProps(context: GetServerSidePropsContext) {
themeBasis: null,
bookingUid: bookingUid ? `${bookingUid}` : null,
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
orgBannerUrl: null,
},
};
}
@@ -182,6 +183,7 @@ async function getUserPageProps(context: GetServerSidePropsContext) {
themeBasis: username,
bookingUid: bookingUid ? `${bookingUid}` : null,
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
orgBannerUrl: eventData?.owner?.profile?.organization?.bannerUrl ?? null,
},
};
}
@@ -28,6 +28,7 @@ export default function Type({
isSEOIndexable,
rescheduleUid,
eventData,
orgBannerUrl,
}: PageProps) {
const searchParams = useSearchParams();
@@ -50,6 +51,7 @@ export default function Type({
hideBranding={isBrandingHidden}
entity={eventData.entity}
durationConfig={eventData.metadata?.multipleDuration}
orgBannerUrl={orgBannerUrl}
/* TODO: Currently unused, evaluate it is needed-
* Possible alternative approach is to have onDurationChange.
*/
+1 -1
View File
@@ -342,7 +342,7 @@ const BookerComponent = ({
{orgBannerUrl && (
<img
loading="eager"
className="-mb-9 h-40 max-h-40 rounded-tl-md sm:max-h-24"
className="-mb-9 h-28 max-h-28 rounded-tl-md sm:max-h-24"
alt="org banner"
src={orgBannerUrl}
/>
@@ -41,6 +41,7 @@ const userSelect = Prisma.validator<Prisma.UserSelect>()({
name: true,
slug: true,
calVideoLogo: true,
bannerUrl: true,
},
},
});
@@ -41,6 +41,7 @@ const organizationSelect = {
name: true,
metadata: true,
calVideoLogo: true,
bannerUrl: true,
};
export enum LookupTarget {
+1
View File
@@ -349,6 +349,7 @@ export class UserRepository {
id: number;
name: string;
calVideoLogo: string | null;
bannerUrl: string | null;
slug: string | null;
metadata: Prisma.JsonValue;
};
+1 -1
View File
@@ -1,6 +1,6 @@
import type { Team } from "@calcom/prisma/client";
type OrganizationWithRequestedSlug = Pick<Team, "name" | "id" | "slug" | "calVideoLogo"> & {
type OrganizationWithRequestedSlug = Pick<Team, "name" | "id" | "slug" | "calVideoLogo", "bannerUrl"> & {
requestedSlug: string | null;
};