diff --git a/packages/reva-admin-react/src/components/organism-summary/OrganismSummary.tsx b/packages/reva-admin-react/src/components/organism-summary/OrganismSummary.tsx
index ce02befce..746dea79a 100644
--- a/packages/reva-admin-react/src/components/organism-summary/OrganismSummary.tsx
+++ b/packages/reva-admin-react/src/components/organism-summary/OrganismSummary.tsx
@@ -1,10 +1,15 @@
import { format } from "date-fns";
+import { Badge } from "@codegouvfr/react-dsfr/Badge";
import { GrayCard } from "@/components/card/gray-card/GrayCard";
import { Info } from "./Info";
+import {
+ OrganismSummaryLegalInformationDocumentsDecisionProps,
+ OrganismSummaryLegalInformationDocumentsDecisions,
+} from "./OrganismSummaryLegalInformationDocumentsDecisions";
+import { StatutValidationInformationsJuridiquesMaisonMereAap } from "@/graphql/generated/graphql";
import { CompanyPreview } from "../company-preview";
export type Typology =
- | "generaliste"
| "expertBranche"
| "expertFiliere"
| "expertBrancheEtFiliere";
@@ -15,27 +20,12 @@ const getTypologyLabel = (typology: Typology) => {
return "Expert branche";
case "expertFiliere":
return "Expert filière";
- case "generaliste":
- return "Généraliste";
case "expertBrancheEtFiliere":
return "Expert branche et filière";
}
};
-export const OrganismSummary = ({
- companyName,
- accountFirstname,
- accountLastname,
- accountEmail,
- accountPhoneNumber,
- companyWebsite,
- companyQualiopiCertificateExpiresAt,
- companySiret,
- companyLegalStatus,
- companyTypology,
- ccns,
- domaines,
-}: {
+export interface OrganismSummaryProps {
companyName: string;
accountFirstname: string;
accountLastname: string;
@@ -47,32 +37,69 @@ export const OrganismSummary = ({
companyLegalStatus: string;
companyTypology: Typology;
ccns?: string[];
- domaines?: string[];
-}) => (
+ createdAt?: Date;
+ companyManagerFirstname?: string;
+ companyManagerLastname?: string;
+ legalInformationDocumentsDecisions: OrganismSummaryLegalInformationDocumentsDecisionProps[];
+ statutValidationInformationsJuridiquesMaisonMereAAP: StatutValidationInformationsJuridiquesMaisonMereAap;
+}
+
+export const OrganismSummary = ({
+ companyName,
+ accountFirstname,
+ accountLastname,
+ accountEmail,
+ accountPhoneNumber,
+ companyWebsite,
+ companySiret,
+ companyLegalStatus,
+ companyTypology,
+ ccns,
+ createdAt,
+ companyManagerFirstname,
+ companyManagerLastname,
+ legalInformationDocumentsDecisions,
+ statutValidationInformationsJuridiquesMaisonMereAAP,
+}: OrganismSummaryProps) => (
<>
{companyName}
-
-
- Informations générales
-
-
- {accountFirstname} {accountLastname}
-
-
- {accountEmail}
-
-
- {accountPhoneNumber}
-
-
- {companyWebsite || "Non spécifié"}
-
-
- {format(companyQualiopiCertificateExpiresAt, "dd/MM/yyyy")}
-
-
-
-
+
+ {statutValidationInformationsJuridiquesMaisonMereAAP === "A_JOUR" && (
+ À jour
+ )}
+ {statutValidationInformationsJuridiquesMaisonMereAAP ===
+ "A_METTRE_A_JOUR" && (
+ Demande de précisions
+ )}
+
+
+ {createdAt && (
+ - Inscription envoyée le {format(createdAt, "dd/MM/yyyy")}
+ )}
+ {legalInformationDocumentsDecisions.length > 0 && (
+ -
+ {legalInformationDocumentsDecisions[0].decision == "VALIDE"
+ ? "Mise à jour validée le "
+ : "Demande de précision envoyée le "}
+ {format(
+ legalInformationDocumentsDecisions[0].decisionTakenAt,
+ "dd/MM/yyyy",
+ )}
+
+ )}
+
+ {!!legalInformationDocumentsDecisions.length && (
+
+ )}
+
-
+
Typologie
{getTypologyLabel(companyTypology)}
- {!!domaines?.length && (
-
-
- {domaines?.map((d) => (
- -
- {d}
-
- ))}
-
-
- )}
{!!ccns?.length && (
diff --git a/packages/reva-admin-react/src/components/organism-summary/OrganismSummaryNewLegal.tsx b/packages/reva-admin-react/src/components/organism-summary/OrganismSummaryNewLegal.tsx
deleted file mode 100644
index 746dea79a..000000000
--- a/packages/reva-admin-react/src/components/organism-summary/OrganismSummaryNewLegal.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-import { format } from "date-fns";
-import { Badge } from "@codegouvfr/react-dsfr/Badge";
-import { GrayCard } from "@/components/card/gray-card/GrayCard";
-import { Info } from "./Info";
-import {
- OrganismSummaryLegalInformationDocumentsDecisionProps,
- OrganismSummaryLegalInformationDocumentsDecisions,
-} from "./OrganismSummaryLegalInformationDocumentsDecisions";
-import { StatutValidationInformationsJuridiquesMaisonMereAap } from "@/graphql/generated/graphql";
-import { CompanyPreview } from "../company-preview";
-
-export type Typology =
- | "expertBranche"
- | "expertFiliere"
- | "expertBrancheEtFiliere";
-
-const getTypologyLabel = (typology: Typology) => {
- switch (typology) {
- case "expertBranche":
- return "Expert branche";
- case "expertFiliere":
- return "Expert filière";
- case "expertBrancheEtFiliere":
- return "Expert branche et filière";
- }
-};
-
-export interface OrganismSummaryProps {
- companyName: string;
- accountFirstname: string;
- accountLastname: string;
- accountEmail: string;
- accountPhoneNumber: string;
- companyWebsite?: string | null;
- companyQualiopiCertificateExpiresAt: Date;
- companySiret: string;
- companyLegalStatus: string;
- companyTypology: Typology;
- ccns?: string[];
- createdAt?: Date;
- companyManagerFirstname?: string;
- companyManagerLastname?: string;
- legalInformationDocumentsDecisions: OrganismSummaryLegalInformationDocumentsDecisionProps[];
- statutValidationInformationsJuridiquesMaisonMereAAP: StatutValidationInformationsJuridiquesMaisonMereAap;
-}
-
-export const OrganismSummary = ({
- companyName,
- accountFirstname,
- accountLastname,
- accountEmail,
- accountPhoneNumber,
- companyWebsite,
- companySiret,
- companyLegalStatus,
- companyTypology,
- ccns,
- createdAt,
- companyManagerFirstname,
- companyManagerLastname,
- legalInformationDocumentsDecisions,
- statutValidationInformationsJuridiquesMaisonMereAAP,
-}: OrganismSummaryProps) => (
- <>
- {companyName}
-
- {statutValidationInformationsJuridiquesMaisonMereAAP === "A_JOUR" && (
- À jour
- )}
- {statutValidationInformationsJuridiquesMaisonMereAAP ===
- "A_METTRE_A_JOUR" && (
- Demande de précisions
- )}
-
-
- {createdAt && (
- - Inscription envoyée le {format(createdAt, "dd/MM/yyyy")}
- )}
- {legalInformationDocumentsDecisions.length > 0 && (
- -
- {legalInformationDocumentsDecisions[0].decision == "VALIDE"
- ? "Mise à jour validée le "
- : "Demande de précision envoyée le "}
- {format(
- legalInformationDocumentsDecisions[0].decisionTakenAt,
- "dd/MM/yyyy",
- )}
-
- )}
-
- {!!legalInformationDocumentsDecisions.length && (
-
- )}
-
-
-
-
- Typologie
-
-
{getTypologyLabel(companyTypology)}
- {!!ccns?.length && (
-
-
- {ccns?.map((c) => (
- -
- {c}
-
- ))}
-
-
- )}
-
-
-
- >
-);