-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ Réduire les utilisations de ConsulterProjet #2764
base: main
Are you sure you want to change the base?
♻️ Réduire les utilisations de ConsulterProjet #2764
Conversation
65f5592
to
ba0687c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool PR, quelques retours pour bien vérifier !
.../app/laureats/[identifiant]/garanties-financieres/actuelles:enregistrer-attestation/page.tsx
Show resolved
Hide resolved
...ions/ssr/src/app/laureats/[identifiant]/garanties-financieres/actuelles:enregistrer/page.tsx
Show resolved
Hide resolved
@@ -25,20 +25,13 @@ export const metadata: Metadata = { | |||
export default async function Page({ params: { identifiant } }: IdentifiantParameter) { | |||
return PageWithErrorHandling(async () => { | |||
const identifiantProjet = decodeParameter(identifiant); | |||
|
|||
const candidature = await mediator.send<Candidature.ConsulterProjetQuery>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On fait ça pour vérifier que la candidature existe j'imagine, est ce qu'il faut garder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pour les 2 précédents je suis d'accord, pour celui-là il y a déjà un notFound
dans la page, je pense que ca suffit ?
}); | ||
|
||
if (Option.isNone(candidature)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On fait ça pour vérifier que la candidature existe j'imagine, est ce qu'il faut garder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il y a déjà un notFound
, ca devrait suffire ?
...plications/ssr/src/app/laureats/[identifiant]/garanties-financieres/depot:soumettre/page.tsx
Show resolved
Hide resolved
packages/applications/ssr/src/app/laureats/[identifiant]/garanties-financieres/page.tsx
Show resolved
Hide resolved
statut: projet.statut, | ||
message: "Vous ne pouvez pas consulter le raccordement d'un projet éliminé ou abandonné", | ||
}); | ||
await récupérerLauréatNonAbandonné(identifiantProjet.formatter()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour tes cas d'usage, le message d'erreur sera moins clair. Après pas très grave IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effectivement. Mais pour moi il faut sortir du paradigme projet; un éliminé et un lauréat sont 2 choses différentes dans Potentiel. C'est normal d'avoir "non trouvé" si on cherche un lauréat avec un ID d'éliminé je trouve
Après à nous de faire en sorte qu'il n'y ait pas moyen d'atterrir sur une page spécifique à un lauréat avec un ID d'éliminé :)
b956bd4
to
929740b
Compare
Non traité :
récupérerProjetAdapter
dans les notifications et projections