diff --git a/packages/features/ee/organizations/pages/settings/profile.tsx b/packages/features/ee/organizations/pages/settings/profile.tsx index 8a3ef50de5..c578f2606c 100644 --- a/packages/features/ee/organizations/pages/settings/profile.tsx +++ b/packages/features/ee/organizations/pages/settings/profile.tsx @@ -8,7 +8,6 @@ import { z } from "zod"; import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { md } from "@calcom/lib/markdownIt"; @@ -69,7 +68,7 @@ const OrgProfileView = () => { onSuccess: (org) => { if (org) { form.setValue("name", org.name || ""); - form.setValue("slug", org.slug || ""); + form.setValue("slug", org.slug || org.metadata?.requestedSlug || ""); form.setValue("logo", org.logo || ""); form.setValue("bio", org.bio || ""); if (org.slug === null && (org?.metadata as Prisma.JsonObject)?.requestedSlug) { @@ -89,20 +88,8 @@ const OrgProfileView = () => { !currentOrganisation.bio || !currentOrganisation.bio.replace("


", "").length; - const deleteTeamMutation = trpc.viewer.teams.delete.useMutation({ - async onSuccess() { - await utils.viewer.teams.list.invalidate(); - showToast(t("your_org_disbanded_successfully"), "success"); - router.push(`${WEBAPP_URL}/teams`); - }, - }); - if (!orgBranding) return null; - function deleteTeam() { - if (currentOrganisation?.id) deleteTeamMutation.mutate({ teamId: currentOrganisation.id }); - } - return ( @@ -168,15 +155,21 @@ const OrgProfileView = () => { )} /> -
- -
+ ( +
+ +
+ )} + />
{ }, }); + const metadata = teamMetadataSchema.parse(membership?.team.metadata); + return { user: { role: membership?.role, accepted: membership?.accepted, }, ...membership?.team, + metadata, }; };