diff --git a/apps/compliance-portal/src/components/TopBar/TopBar.tsx b/apps/compliance-portal/src/components/TopBar/TopBar.tsx index 6eadf5096..967034b5d 100644 --- a/apps/compliance-portal/src/components/TopBar/TopBar.tsx +++ b/apps/compliance-portal/src/components/TopBar/TopBar.tsx @@ -44,9 +44,7 @@ const topBarFragment = graphql` } currentTrustCenter @required(action: THROW) { themedLogoUrl - organization { - name - } + title } } `; @@ -66,7 +64,7 @@ export function TopBar({ queryKey }: TopBarProps) { const { openSignIn } = useSignInDialog(); const { currentTrustCenter } = data; - const organizationName = currentTrustCenter.organization.name; + const title = currentTrustCenter.title; const logoUrl = currentTrustCenter.themedLogoUrl ?? undefined; const slots = topBar(); @@ -81,11 +79,11 @@ export function TopBar({ queryKey }: TopBarProps) { color="neutral" radius="small" src={logoUrl} - fallback={organizationName.charAt(0) || "?"} + fallback={title.charAt(0) || "?"} className={slots.logo()} /> - {organizationName} + {title} {t("topBar.tagline")} diff --git a/apps/compliance-portal/src/pages/HomePage.tsx b/apps/compliance-portal/src/pages/HomePage.tsx index bcbe10a78..08ffa2a5b 100644 --- a/apps/compliance-portal/src/pages/HomePage.tsx +++ b/apps/compliance-portal/src/pages/HomePage.tsx @@ -34,9 +34,7 @@ import type { HomePageQuery } from "./__generated__/HomePageQuery.graphql"; export const homePageQuery = graphql` query HomePageQuery @throwOnFieldError { currentTrustCenter @required(action: THROW) { - organization { - name - } + title ...TrustCenterContactInfo_trustCenter ...ComplianceFrameworksSection_trustCenter ...SecurityCommitmentsSection_trustCenter @@ -54,12 +52,12 @@ export function HomePage({ queryRef }: HomePageProps) { const { t } = useTranslation(); const data = usePreloadedQuery(homePageQuery, queryRef); const { currentTrustCenter } = data; - const { organization } = currentTrustCenter; + const { title } = currentTrustCenter; return ( <> diff --git a/apps/console/src/hooks/graph/CompliancePageGraph.ts b/apps/console/src/hooks/graph/CompliancePageGraph.ts index 71afe1bd1..6305b3bc7 100644 --- a/apps/console/src/hooks/graph/CompliancePageGraph.ts +++ b/apps/console/src/hooks/graph/CompliancePageGraph.ts @@ -32,6 +32,7 @@ const updateCompliancePageMutation = graphql` id active searchEngineIndexing + title description websiteUrl email diff --git a/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx b/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx index 11e72c8e6..74799d152 100644 --- a/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx @@ -25,6 +25,7 @@ import { useFormWithSchema } from "#/hooks/useFormWithSchema"; const compliancePageFragment = graphql` fragment CompliancePageProfileSection_compliancePageFragment on TrustCenter { id + title description websiteUrl email @@ -34,6 +35,7 @@ const compliancePageFragment = graphql` `; const profileSchema = z.object({ + title: z.string().min(1), description: z.string().optional(), websiteUrl: z.string().optional(), email: z.string().optional(), @@ -56,6 +58,7 @@ export function CompliancePageProfileSection(props: { const { formState, handleSubmit, register } = useFormWithSchema(profileSchema, { defaultValues: { + title: compliancePage.title, description: compliancePage.description || "", websiteUrl: compliancePage.websiteUrl || "", email: compliancePage.email || "", @@ -70,6 +73,7 @@ export function CompliancePageProfileSection(props: { variables: { input: { trustCenterId: compliancePage.id, + title: data.title, description: data.description || null, websiteUrl: data.websiteUrl || null, email: data.email || null, @@ -91,6 +95,13 @@ export function CompliancePageProfileSection(props: { {formState.isSubmitting && } +