Skip to content

Commit 9ad401d

Browse files
committed
feat(admin):show explicit message when jury date is yet to be defined
1 parent 9e22a26 commit 9ad401d

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

packages/reva-admin-react/src/app/(aap)/candidacies/[candidacyId]/jury-aap/_components/DateDeJuryTab.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
import { format } from "date-fns";
22
import { useJuryAAP } from "./jury-aap.hook";
3+
import Alert from "@codegouvfr/react-dsfr/Alert";
34

45
export const DateDeJuryTab = () => {
56
const { candidacy } = useJuryAAP();
67
const jury = candidacy?.jury;
8+
9+
if (!jury || !jury.dateOfSession) {
10+
return (
11+
<Alert
12+
description={
13+
<div className="ml-2 mt-3 mb-4">
14+
<h6>En attente de la date de jury</h6>
15+
<dd>
16+
Le certificateur vous communiquera la date du jury de votre
17+
candidat.
18+
</dd>
19+
</div>
20+
}
21+
severity="info"
22+
small
23+
/>
24+
);
25+
}
26+
727
return (
828
<div className="flex flex-col gap-8">
929
<div>

packages/reva-admin-react/src/app/(aap)/candidacies/[candidacyId]/jury-aap/_components/ResultatTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ const juryResultNotice: {
3333
export const ResultatTab = () => {
3434
const { candidacy } = useJuryAAP();
3535
const jury = candidacy?.jury;
36-
const hasResult = jury?.result !== null;
36+
const hasResult = jury?.result !== null && jury !== null;
3737

3838
if (!hasResult) {
3939
return (
4040
<Alert
4141
description={
42-
<div className="pl-2">
42+
<div className="pl-2 mt-3 mb-4">
4343
<h6>En attente du résultat</h6>
4444
<dd>
4545
Le certificateur vous communiquera le résultat de votre candidat.

0 commit comments

Comments
 (0)