chore: Remove all avatar/logo references (#14532)

* chore: Remove all avatar/logo references

* Updated user profile to only use avatarUrl

* fix: minor style issue

* chore: Remove redundant includeTeamLogo

* fix: Use right avatar default in event type list

* fix: placeholder avatar team profile, target

* chore: Add logoUrl/avatarUrl to JWT

* fix: Bunch of org avatar issues, fix members list

* Fix logoUrl on org pages

* More type fixes

* Hopefully final type fixes

* Another round of type fixes

* fix: UserForm ts

* fix: Handle as return types, not input types

* fix: Remove profile and add avatarUrl

* fix: notFound as const

* fix: Seeder avatarUrl params

* revert: Migration changes for easier recovery

* fix: Add explicit type to builder as avatar is now set

* Add logoUrl to unpublished entity

* Avatar test out of scope here

* fix: Use the new avatarUrl after save

* chore: Removed getOrgAvatarUrl/getTeamAvatarUrl

* fix: Update sidebar image immediately after change

* Unable to safe unnamed user, so default

* fix: Unpublished page, add organization test

* Add more tests
This commit is contained in:
Alex van Andel authored and GitHub committed 2024-04-18 21:54:16 -07:00
1 parent 5695ba7c13
commit d25c043046
73 files changed
+644 -770

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ export const getBrand = async (orgId: number | null) => {
id: orgId,
},
select: {
logo: true,
logoUrl: true,
name: true,
slug: true,
metadata: true,
+2 -5
View File
@@ -11,7 +11,6 @@ import {
unlockedManagedEventTypeProps,
} from "@calcom/prisma/zod-utils";
import { WEBAPP_URL } from "../../../constants";
import { getBookerBaseUrlSync } from "../../../getBookerUrl/client";
import { getTeam, getOrg } from "../../repository/team";
import { UserRepository } from "../../repository/user";
@@ -23,7 +22,6 @@ export async function getTeamWithMembers(args: {
slug?: string;
userId?: number;
orgSlug?: string | null;
includeTeamLogo?: boolean;
isTeamView?: boolean;
currentOrg?: Pick<Team, "id"> | null;
/**
@@ -31,7 +29,7 @@ export async function getTeamWithMembers(args: {
*/
isOrgView?: boolean;
}) {
const { id, slug, currentOrg: _currentOrg, userId, orgSlug, isTeamView, isOrgView, includeTeamLogo } = args;
const { id, slug, currentOrg: _currentOrg, userId, orgSlug, isTeamView, isOrgView } = args;
// This should improve performance saving already app data found.
const appDataMap = new Map();
@@ -87,7 +85,6 @@ export async function getTeamWithMembers(args: {
name: true,
slug: true,
isOrganization: true,
...(!!includeTeamLogo ? { logo: true } : {}),
logoUrl: true,
bio: true,
hideBranding: true,
@@ -101,6 +98,7 @@ export async function getTeamWithMembers(args: {
name: true,
isPrivate: true,
isOrganization: true,
logoUrl: true,
metadata: true,
},
},
@@ -183,7 +181,6 @@ export async function getTeamWithMembers(args: {
.filter((membership) => membership.team.id !== teamOrOrg.id)
.map((membership) => membership.team.slug)
: null,
avatar: `${WEBAPP_URL}/${m.user.username}/avatar.png`,
bookerUrl: getBookerBaseUrlSync(profile?.organization?.slug || ""),
connectedApps: !isTeamView
? credentials?.map((cred) => {
@@ -40,6 +40,7 @@ const organizationSelect = {
slug: true,
name: true,
metadata: true,
logoUrl: true,
calVideoLogo: true,
bannerUrl: true,
};
-1
View File
@@ -30,7 +30,6 @@ const userSelect = Prisma.validator<Prisma.UserSelect>()({
email: true,
emailVerified: true,
bio: true,
avatar: true,
avatarUrl: true,
timeZone: true,
startTime: true,