Replace portal title with entity name

Store a short entity name instead of the full home
heading so orgs can brand portals for sub-entities.
Restore hero i18n composition and keep the English
document title composed from the entity name.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-21 19:06:55 +02:00
parent 0fe814cfe4
commit 0d832508c9
46 changed files with 148 additions and 97 deletions

View File

@@ -32,7 +32,7 @@ const updateCompliancePageMutation = graphql`
id
active
searchEngineIndexing
title
entityName
description
websiteUrl
email

View File

@@ -25,7 +25,7 @@ import { useFormWithSchema } from "#/hooks/useFormWithSchema";
const compliancePageFragment = graphql`
fragment CompliancePageProfileSection_compliancePageFragment on CompliancePortal {
id
title
entityName
description
websiteUrl
email
@@ -35,7 +35,7 @@ const compliancePageFragment = graphql`
`;
const profileSchema = z.object({
title: z.string().min(1),
entityName: z.string().min(1),
description: z.string().optional(),
websiteUrl: z.string().optional(),
email: z.string().optional(),
@@ -58,7 +58,7 @@ export function CompliancePageProfileSection(props: {
const { formState, handleSubmit, register } = useFormWithSchema(profileSchema, {
defaultValues: {
title: compliancePage.title,
entityName: compliancePage.entityName,
description: compliancePage.description || "",
websiteUrl: compliancePage.websiteUrl || "",
email: compliancePage.email || "",
@@ -73,7 +73,7 @@ export function CompliancePageProfileSection(props: {
variables: {
input: {
compliancePortalId: compliancePage.id,
title: data.title,
entityName: data.entityName,
description: data.description || null,
websiteUrl: data.websiteUrl || null,
email: data.email || null,
@@ -96,11 +96,11 @@ export function CompliancePageProfileSection(props: {
</div>
<Card padded className="space-y-4">
<Field
{...register("title")}
{...register("entityName")}
readOnly={readOnly}
name="title"
label={__("Title")}
placeholder={__("Compliance at Acme.")}
name="entityName"
label={__("Entity name")}
placeholder={__("Acme")}
/>
<div>
<Label>{__("Description")}</Label>