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:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -349,6 +349,7 @@ export class UserRepository {
|
||||
id: number;
|
||||
name: string;
|
||||
calVideoLogo: string | null;
|
||||
bannerUrl: string | null;
|
||||
slug: string | null;
|
||||
metadata: Prisma.JsonValue;
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user