diff --git a/src/components/CampaignPortal/CampaignPortal.css b/src/components/CampaignPortal/CampaignPortal.css index 0453488..bffc9f8 100644 --- a/src/components/CampaignPortal/CampaignPortal.css +++ b/src/components/CampaignPortal/CampaignPortal.css @@ -2,6 +2,14 @@ width: 30%; } +.MailRow{ + background-color: white; +} + +.ContactRow{ + width: 100%; +} + .DatesLeftHeader{ width: 30%; } diff --git a/src/components/CampaignPortal/CampaignPortal.jsx b/src/components/CampaignPortal/CampaignPortal.jsx index fde6d41..9d31ac1 100644 --- a/src/components/CampaignPortal/CampaignPortal.jsx +++ b/src/components/CampaignPortal/CampaignPortal.jsx @@ -106,7 +106,44 @@ function CampaignPortal({ - + @@ -13,6 +13,11 @@ function Contacts({email}) { ); + + const primaryReferents = referents?.filter((referent) => referent.role === "PRIMARY"); + const secondaryReferents = referents?.filter((referent) => referent.role === "SECONDARY"); + + console.log(primaryReferents) return (
@@ -27,23 +32,41 @@ function Contacts({email}) { onClick={() => { window.location.assign(`mailto:${email}`); }} > {D.functionalBox} - {email} + {email} {D.cpos} - ChloƩ Dupont - - - 01 01 01 01 01 + {primaryReferents.map((primaryReferent) => { + return ( + + +
+ {primaryReferent.firstName || primaryReferent.lastName ? + `${primaryReferent.firstName ?? ""} ${primaryReferent.lastName ?? ""}` + : "-" + } +
+
+ {primaryReferent.phoneNumber ?? "-"} +
+ + + ) + })} - + {/* {D.deputyCpos} - Thierry Fabres + + {secondaryReferent.firstName || secondaryReferent.lastName ? + `${secondaryReferent.firstName ?? ""} ${secondaryReferent.lastName ?? ""}` + : "-" + } + - 02 01 01 01 01 - + {secondaryReferent && secondaryReferent.phoneNumber } + */}