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:
1 parent
0f1f0a29e6
commit
d6605d6dfd
7 files changed
+9
-2
No files matched your search
@@ -93,6 +93,7 @@ async function getDynamicGroupPageProps(context: GetServerSidePropsContext) {
|
|||||||
themeBasis: null,
|
themeBasis: null,
|
||||||
bookingUid: bookingUid ? `${bookingUid}` : null,
|
bookingUid: bookingUid ? `${bookingUid}` : null,
|
||||||
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
|
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
|
||||||
|
orgBannerUrl: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -182,6 +183,7 @@ async function getUserPageProps(context: GetServerSidePropsContext) {
|
|||||||
themeBasis: username,
|
themeBasis: username,
|
||||||
bookingUid: bookingUid ? `${bookingUid}` : null,
|
bookingUid: bookingUid ? `${bookingUid}` : null,
|
||||||
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
|
rescheduleUid: rescheduleUid ? `${rescheduleUid}` : null,
|
||||||
|
orgBannerUrl: eventData?.owner?.profile?.organization?.bannerUrl ?? null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export default function Type({
|
|||||||
isSEOIndexable,
|
isSEOIndexable,
|
||||||
rescheduleUid,
|
rescheduleUid,
|
||||||
eventData,
|
eventData,
|
||||||
|
orgBannerUrl,
|
||||||
}: PageProps) {
|
}: PageProps) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ export default function Type({
|
|||||||
hideBranding={isBrandingHidden}
|
hideBranding={isBrandingHidden}
|
||||||
entity={eventData.entity}
|
entity={eventData.entity}
|
||||||
durationConfig={eventData.metadata?.multipleDuration}
|
durationConfig={eventData.metadata?.multipleDuration}
|
||||||
|
orgBannerUrl={orgBannerUrl}
|
||||||
/* TODO: Currently unused, evaluate it is needed-
|
/* TODO: Currently unused, evaluate it is needed-
|
||||||
* Possible alternative approach is to have onDurationChange.
|
* Possible alternative approach is to have onDurationChange.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ const BookerComponent = ({
|
|||||||
{orgBannerUrl && (
|
{orgBannerUrl && (
|
||||||
<img
|
<img
|
||||||
loading="eager"
|
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"
|
alt="org banner"
|
||||||
src={orgBannerUrl}
|
src={orgBannerUrl}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const userSelect = Prisma.validator<Prisma.UserSelect>()({
|
|||||||
name: true,
|
name: true,
|
||||||
slug: true,
|
slug: true,
|
||||||
calVideoLogo: true,
|
calVideoLogo: true,
|
||||||
|
bannerUrl: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const organizationSelect = {
|
|||||||
name: true,
|
name: true,
|
||||||
metadata: true,
|
metadata: true,
|
||||||
calVideoLogo: true,
|
calVideoLogo: true,
|
||||||
|
bannerUrl: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum LookupTarget {
|
export enum LookupTarget {
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ export class UserRepository {
|
|||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
calVideoLogo: string | null;
|
calVideoLogo: string | null;
|
||||||
|
bannerUrl: string | null;
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
metadata: Prisma.JsonValue;
|
metadata: Prisma.JsonValue;
|
||||||
};
|
};
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import type { Team } from "@calcom/prisma/client";
|
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;
|
requestedSlug: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user