@@ -211,9 +223,9 @@ function TeamPage({ team, isUnpublished, markdownStrippedBio, isValidOrgDomain }
) : (
))}
- {!showMembers.isOn && team.eventTypes.length > 0 && (
+ {!showMembers.isOn && team.eventTypes && team.eventTypes.length > 0 && (
-
+
{/* Hide "Book a team member button when team is private or hideBookATeamMember is true" */}
{!team.hideBookATeamMember && !team.isPrivate && (
@@ -263,7 +275,12 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
context.params?.orgSlug
);
const flags = await getFeatureFlagMap(prisma);
- const team = await getTeamWithMembers({ slug, orgSlug: currentOrgDomain });
+ const team = await getTeamWithMembers({
+ slug,
+ orgSlug: currentOrgDomain,
+ isTeamView: true,
+ isOrgView: isValidOrgDomain && context.resolvedUrl === "/",
+ });
const ssr = await ssrInit(context, {
noI18nPreload: isValidOrgDomain && !team?.parent,
});
@@ -308,14 +325,15 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
} as const;
}
- team.eventTypes = team.eventTypes.map((type) => ({
- ...type,
- users: type.users.map((user) => ({
- ...user,
- avatar: "/" + user.username + "/avatar.png",
- })),
- descriptionAsSafeHTML: markdownToSafeHTML(type.description),
- }));
+ team.eventTypes =
+ team.eventTypes?.map((type) => ({
+ ...type,
+ users: type.users.map((user) => ({
+ ...user,
+ avatar: "/" + user.username + "/avatar.png",
+ })),
+ descriptionAsSafeHTML: markdownToSafeHTML(type.description),
+ })) ?? null;
const safeBio = markdownToSafeHTML(team.bio) || "";
diff --git a/apps/web/public/static/locales/he/common.json b/apps/web/public/static/locales/he/common.json
index cdcb1e0f22..734d3a5bcd 100644
--- a/apps/web/public/static/locales/he/common.json
+++ b/apps/web/public/static/locales/he/common.json
@@ -243,6 +243,7 @@
"all": "כל האפליקציות",
"yours": "החשבון שלך",
"available_apps": "אפליקציות זמינות",
+ "available_apps_lower_case": "אפליקציות זמינות",
"check_email_reset_password": "בדוק/י בתיבת הדוא\"ל – שלחנו לך קישור לאיפוס הסיסמה.",
"finish": "סיום",
"organization_general_description": "ניהול הגדרות השפה ואזור הזמן של הצוות",
diff --git a/apps/web/public/static/locales/ja/common.json b/apps/web/public/static/locales/ja/common.json
index f19c158c5e..37a6660676 100644
--- a/apps/web/public/static/locales/ja/common.json
+++ b/apps/web/public/static/locales/ja/common.json
@@ -84,7 +84,7 @@
"event_awaiting_approval_recurring": "繰り返しイベントはあなたの承認待ちです",
"someone_requested_an_event": "別のユーザーがあなたのカレンダーにイベントを予定するリクエストしています。",
"someone_requested_password_reset": "別のユーザーがあなたのパスワードを変更するためのリンクをリクエストしています。",
- "password_reset_email_sent": "このメールがシステムに存在する場合は、リセットメールを受信するはずです。",
+ "password_reset_email_sent": "このメールがシステムに存在する場合は、リセットメールを受け取るはずです。",
"password_reset_instructions": "このリクエストをしていない場合は、このメールを無視しても大丈夫です。パスワードも変更されません。",
"event_awaiting_approval_subject": "承認を待っています: {{date}} の {{title}}",
"event_still_awaiting_approval": "イベントはまだあなたの承認待ちです",
@@ -255,7 +255,7 @@
"yours": "ご利用のアカウント",
"available_apps": "利用可能なアプリ",
"available_apps_lower_case": "利用できるアプリ",
- "available_apps_desc": "インストールされているアプリがありません。以下で人気アプリを確認して、さらに <1>App Store1> でご覧ください",
+ "available_apps_desc": "インストールされているアプリがありません。以下で人気アプリを確認してから <1>App Store1> でさらにご覧ください",
"fixed_host_helper": "イベントに出席する必要がある人を追加します。<1>さらに詳しく1>",
"round_robin_helper": "グループの人々は順番に交代し、イベントには1人だけが出席します。",
"check_email_reset_password": "メールをご確認ください。パスワードをリセットするためのリンクを送信しました。",
diff --git a/packages/features/ee/organizations/context/provider.ts b/packages/features/ee/organizations/context/provider.ts
index 2cee02224f..05e9f86499 100644
--- a/packages/features/ee/organizations/context/provider.ts
+++ b/packages/features/ee/organizations/context/provider.ts
@@ -10,10 +10,15 @@ import type { teamMetadataSchema } from "@calcom/prisma/zod-utils";
*/
export type OrganizationBranding =
| ({
+ /** 1 */
id: number;
+ /** Acme */
name?: string;
+ /** acme */
slug: string;
+ /** https://acme.cal.com */
fullDomain: string;
+ /** cal.com */
domainSuffix: string;
} & z.infer
)
| null
diff --git a/packages/features/ee/teams/components/MemberListItem.tsx b/packages/features/ee/teams/components/MemberListItem.tsx
index 0808d3a1f6..633b96bf09 100644
--- a/packages/features/ee/teams/components/MemberListItem.tsx
+++ b/packages/features/ee/teams/components/MemberListItem.tsx
@@ -121,7 +121,7 @@ export default function MemberListItem(props: Props) {
const bookerUrlWithoutProtocol = bookerUrl.replace(/^https?:\/\//, "");
const bookingLink = !!props.member.username && `${bookerUrlWithoutProtocol}/${props.member.username}`;
const isAdmin = props.team && ["ADMIN", "OWNER"].includes(props.team.membership?.role);
- const appList = props.member.connectedApps.map(({ logo, name, externalId }) => {
+ const appList = props.member.connectedApps?.map(({ logo, name, externalId }) => {
return logo ? (
externalId ? (
diff --git a/packages/features/ee/teams/components/TeamInviteList.tsx b/packages/features/ee/teams/components/TeamInviteList.tsx
index d225c9f1df..eafcb332cc 100644
--- a/packages/features/ee/teams/components/TeamInviteList.tsx
+++ b/packages/features/ee/teams/components/TeamInviteList.tsx
@@ -11,7 +11,6 @@ interface Props {
id?: number;
name?: string | null;
slug?: string | null;
- logo?: string | null;
bio?: string | null;
hideBranding?: boolean | undefined;
role: MembershipRole;
diff --git a/packages/features/ee/teams/components/TeamInviteListItem.tsx b/packages/features/ee/teams/components/TeamInviteListItem.tsx
index 3895c91ada..9c6ed6e727 100644
--- a/packages/features/ee/teams/components/TeamInviteListItem.tsx
+++ b/packages/features/ee/teams/components/TeamInviteListItem.tsx
@@ -1,5 +1,5 @@
import classNames from "@calcom/lib/classNames";
-import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
+import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { MembershipRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
@@ -20,7 +20,6 @@ interface Props {
id?: number;
name?: string | null;
slug?: string | null;
- logo?: string | null;
bio?: string | null;
hideBranding?: boolean | undefined;
role: MembershipRole;
@@ -66,7 +65,7 @@ export default function TeamInviteListItem(props: Props) {
diff --git a/packages/features/ee/teams/lib/getUserAdminTeams.ts b/packages/features/ee/teams/lib/getUserAdminTeams.ts
index 532518ef4e..bb9d1c2367 100644
--- a/packages/features/ee/teams/lib/getUserAdminTeams.ts
+++ b/packages/features/ee/teams/lib/getUserAdminTeams.ts
@@ -82,7 +82,7 @@ const getUserAdminTeams = async ({
name: user.name || "me",
logo: user?.avatar === "" ? null : user?.avatar,
isUser: true,
- credentials: includeCredentials ? [] : user.credentials,
+ credentials: includeCredentials ? user.credentials : [],
parent: null,
};
teams.unshift(userObject);
diff --git a/packages/features/ee/teams/pages/team-members-view.tsx b/packages/features/ee/teams/pages/team-members-view.tsx
index fae7208cb5..ca73614763 100644
--- a/packages/features/ee/teams/pages/team-members-view.tsx
+++ b/packages/features/ee/teams/pages/team-members-view.tsx
@@ -149,7 +149,6 @@ const MembersView = () => {
{
id: team.id,
accepted: team.membership.accepted || false,
- logo: team.logo,
name: team.name,
slug: team.slug,
role: team.membership.role,
diff --git a/packages/features/ee/teams/pages/team-profile-view.tsx b/packages/features/ee/teams/pages/team-profile-view.tsx
index 369ee5686a..abe7a33efb 100644
--- a/packages/features/ee/teams/pages/team-profile-view.tsx
+++ b/packages/features/ee/teams/pages/team-profile-view.tsx
@@ -94,7 +94,6 @@ const ProfileView = () => {
if (team) {
form.setValue("name", team.name || "");
form.setValue("slug", team.slug || "");
- form.setValue("logo", team.logo || "");
form.setValue("bio", team.bio || "");
if (team.slug === null && (team?.metadata as Prisma.JsonObject)?.requestedSlug) {
form.setValue("slug", ((team?.metadata as Prisma.JsonObject)?.requestedSlug as string) || "");
@@ -165,7 +164,6 @@ const ProfileView = () => {
handleSubmit={(values) => {
if (team) {
const variables = {
- logo: values.logo,
name: values.name,
slug: values.slug,
bio: values.bio,
diff --git a/packages/features/ee/workflows/pages/workflow.tsx b/packages/features/ee/workflows/pages/workflow.tsx
index 2ddee3143d..15774f4d65 100644
--- a/packages/features/ee/workflows/pages/workflow.tsx
+++ b/packages/features/ee/workflows/pages/workflow.tsx
@@ -269,7 +269,7 @@ function WorkflowPage() {
CTA={
!readOnly && (
-
diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts
index 02f532866a..3bc778935b 100644
--- a/packages/lib/constants.ts
+++ b/packages/lib/constants.ts
@@ -6,6 +6,7 @@ export const CALCOM_ENV = process.env.CALCOM_ENV || process.env.NODE_ENV;
export const IS_PRODUCTION = CALCOM_ENV === "production";
export const IS_PRODUCTION_BUILD = process.env.NODE_ENV === "production";
+/** https://app.cal.com */
export const WEBAPP_URL =
process.env.NEXT_PUBLIC_WEBAPP_URL ||
VERCEL_URL ||
diff --git a/packages/lib/server/queries/teams/index.ts b/packages/lib/server/queries/teams/index.ts
index 61c3639564..a4102dff4d 100644
--- a/packages/lib/server/queries/teams/index.ts
+++ b/packages/lib/server/queries/teams/index.ts
@@ -15,19 +15,16 @@ export async function getTeamWithMembers(args: {
slug?: string;
userId?: number;
orgSlug?: string | null;
+ isTeamView?: boolean;
+ isOrgView?: boolean;
}) {
- const { id, slug, userId, orgSlug } = args;
+ const { id, slug, userId, orgSlug, isTeamView, isOrgView } = args;
const userSelect = Prisma.validator
()({
username: true,
email: true,
name: true,
id: true,
bio: true,
- destinationCalendar: {
- select: {
- externalId: true,
- },
- },
teams: {
select: {
team: {
@@ -37,7 +34,6 @@ export async function getTeamWithMembers(args: {
},
},
},
- selectedCalendars: true,
credentials: {
select: {
app: {
@@ -58,7 +54,6 @@ export async function getTeamWithMembers(args: {
id: true,
name: true,
slug: true,
- logo: true,
bio: true,
hideBranding: true,
hideBookATeamMember: true,
@@ -136,8 +131,9 @@ export async function getTeamWithMembers(args: {
// This should improve performance saving already app data found.
const appDataMap = new Map();
const members = team.members.map((obj) => {
+ const { credentials, ...restUser } = obj.user;
return {
- ...obj.user,
+ ...restUser,
role: obj.role,
accepted: obj.accepted,
disableImpersonation: obj.disableImpersonation,
@@ -145,24 +141,26 @@ export async function getTeamWithMembers(args: {
? obj.user.teams.filter((obj) => obj.team.slug !== orgSlug).map((obj) => obj.team.slug)
: null,
avatar: `${WEBAPP_URL}/${obj.user.username}/avatar.png`,
- connectedApps: obj?.user?.credentials?.map((cred) => {
- const appSlug = cred.app?.slug;
- let appData = appDataMap.get(appSlug);
+ connectedApps: !isTeamView
+ ? credentials?.map((cred) => {
+ const appSlug = cred.app?.slug;
+ let appData = appDataMap.get(appSlug);
- if (!appData) {
- appData = getAppFromSlug(appSlug);
- appDataMap.set(appSlug, appData);
- }
+ if (!appData) {
+ appData = getAppFromSlug(appSlug);
+ appDataMap.set(appSlug, appData);
+ }
- const isCalendar = cred?.app?.categories?.includes("calendar") ?? false;
- const externalId = isCalendar ? cred.destinationCalendars?.[0]?.externalId : null;
- return {
- name: appData?.name ?? null,
- logo: appData?.logo ?? null,
- app: cred.app,
- externalId: externalId ?? null,
- };
- }),
+ const isCalendar = cred?.app?.categories?.includes("calendar") ?? false;
+ const externalId = isCalendar ? cred.destinationCalendars?.[0]?.externalId : null;
+ return {
+ name: appData?.name ?? null,
+ logo: appData?.logo ?? null,
+ app: cred.app,
+ externalId: externalId ?? null,
+ };
+ })
+ : null,
};
});
@@ -182,7 +180,7 @@ export async function getTeamWithMembers(args: {
token.expires > new Date(new Date().setHours(24))
),
metadata: teamMetadataSchema.parse(team.metadata),
- eventTypes,
+ eventTypes: !isOrgView ? eventTypes : null,
members,
};
}
diff --git a/packages/ui/components/unpublished-entity/UnpublishedEntity.tsx b/packages/ui/components/unpublished-entity/UnpublishedEntity.tsx
index 09789431d6..716be808e6 100644
--- a/packages/ui/components/unpublished-entity/UnpublishedEntity.tsx
+++ b/packages/ui/components/unpublished-entity/UnpublishedEntity.tsx
@@ -22,8 +22,13 @@ export function UnpublishedEntity(props: UnpublishedEntityProps) {
}
headline={t("team_is_unpublished", {
team: props.name,
+ defaultValue: `${props.name} is unpublished`,
+ })}
+ description={t(`${props.orgSlug ? "org" : "team"}_is_unpublished_description`, {
+ defaultValue: `This ${
+ props.orgSlug ? "organization" : "team"
+ } link is currently not available. Please contact the organization owner or ask them to publish it.`,
})}
- description={t(`${props.orgSlug ? "org" : "team"}_is_unpublished_description`)}
/>
);