-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add observers in reports list page and refactor the frontend builders
- Loading branch information
Maxime Naulleau
committed
Nov 7, 2024
1 parent
2a5c5ca
commit ef9e870
Showing
36 changed files
with
260 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...bapp/src/nomination-file/adapters/primary/components/NominationFileOverview/Observers.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { cx } from "@codegouvfr/react-dsfr/fr/cx"; | ||
import { Card } from "./Card"; | ||
import { NominationFileVM } from "../../../../core-logic/view-models/NominationFileVM"; | ||
import clsx from "clsx"; | ||
|
||
export const Observers = ({ | ||
observers, | ||
}: Pick<NominationFileVM, "observers">) => { | ||
if (!observers) return null; | ||
|
||
return ( | ||
<Card> | ||
<label className={cx("fr-h2")} id="observers"> | ||
Observants | ||
</label> | ||
<div | ||
aria-labelledby="observers" | ||
className={clsx( | ||
"whitespace-pre-line leading-10 w-full flex flex-col gap-4", | ||
)} | ||
> | ||
{observers.map(([observerName, ...observerInformation]) => ( | ||
<div key={observerName}> | ||
<div key={observerName} className={cx("fr-text--bold")}> | ||
{observerName} | ||
</div> | ||
<ObserverInformation observerInformation={observerInformation} /> | ||
</div> | ||
))} | ||
</div> | ||
</Card> | ||
); | ||
}; | ||
|
||
const ObserverInformation = ({ | ||
observerInformation, | ||
}: { | ||
observerInformation: string[]; | ||
}) => { | ||
return ( | ||
<div aria-labelledby="observers" className="whitespace-pre-line w-full"> | ||
{observerInformation.map((info) => ( | ||
<div key={info}>{info}</div> | ||
))} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.