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

@@ -129,8 +129,8 @@ export const TeamAndSelfList = () => {
}}
icon={
<Avatar
alt={team?.name || ""}
imageSrc={getPlaceholderAvatar(team.logo, team?.name as string)}
alt={team.name || ""}
imageSrc={getPlaceholderAvatar(team.logoUrl, team.name)}
size="xs"
/>
}
@@ -122,7 +122,7 @@ export interface IResultTeamList {
id: number;
slug: string | null;
name: string | null;
logo: string | null;
logoUrl: string | null;
userId?: number;
isOrg?: boolean;
}
@@ -1195,7 +1195,7 @@ export const insightsRouter = router({
id: true,
slug: true,
name: true,
logo: true,
logoUrl: true,
},
});
const orgTeam = await ctx.insightsDb.team.findUnique({
@@ -1206,7 +1206,7 @@ export const insightsRouter = router({
id: true,
slug: true,
name: true,
logo: true,
logoUrl: true,
},
});
if (!orgTeam) {
@@ -1218,11 +1218,11 @@ export const insightsRouter = router({
id: orgTeam.id,
slug: orgTeam.slug,
name: orgTeam.name,
logo: orgTeam.logo,
logoUrl: orgTeam.logoUrl,
isOrg: true,
},
...teamsFromOrg.map(
(team: Prisma.TeamGetPayload<{ select: { id: true; slug: true; name: true; logo: true } }>) => {
(team: Prisma.TeamGetPayload<{ select: { id: true; slug: true; name: true; logoUrl: true } }>) => {
return {
...team,
};
@@ -1241,7 +1241,7 @@ export const insightsRouter = router({
select: {
id: true,
name: true,
logo: true,
logoUrl: true,
slug: true,
metadata: true,
},