Skip to content

Commit

Permalink
feat(organizations): add ai_description type
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonestla committed Jul 17, 2024
1 parent 82197c1 commit 2b98f64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export default function OrganizationHeader({ data }: { data: Organization }) {
<Text className="fr-m-0" size="sm">
{getLangFieldValue(locale)(data?.description)}
</Text>
{!data?.description && data?.ia_description && (
{!data?.description && data?.ai_description && (
<>
<Text className="fr-m-0" size="sm">
{getLangFieldValue(locale)(data?.ia_description)}
{getLangFieldValue(locale)(data?.ai_description?.description)}
</Text>
<Text className="fr-mt-1w" size="sm" style={{ textAlign: "right" }}>
<i>{intl.formatMessage({ id: "organizations.header.description.ia-generated-label" })}</i>{" "}
Expand Down
7 changes: 6 additions & 1 deletion client/src/types/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export type OrganizationAgreementsData = {
years: number[],
label: string,
}
export type OrganizationIaDescription = {
creation_date: string,
model: string,
description: LangField
}

export type Organization = {
_id: string;
Expand All @@ -81,7 +86,7 @@ export type Organization = {
creationYear?: number;
acronym: LangField;
description: LangField;
ia_description?: LangField;
ai_description?: OrganizationIaDescription;
externalIds: ExternalIdsData[];
kind: string[];
nature?: string;
Expand Down

0 comments on commit 2b98f64

Please sign in to comment.