Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

benjlevesque
Copy link
Member

@benjlevesque benjlevesque commented Feb 21, 2025

Non traité :

  • usages de récupérerProjetAdapter dans les notifications et projections
  • usages dans les modèles de document

@benjlevesque benjlevesque force-pushed the benjlevesque/pot-540-repasser-sur-les-usages-de-consulterprojet-et-retirer-ceux branch from 65f5592 to ba0687c Compare February 21, 2025 11:21
@benjlevesque benjlevesque marked this pull request as ready for review February 21, 2025 12:22
@benjlevesque benjlevesque marked this pull request as draft February 21, 2025 12:22
@benjlevesque benjlevesque marked this pull request as ready for review February 24, 2025 13:18
Copy link
Collaborator

@VioMrqs VioMrqs left a 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 !

@@ -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>({
Copy link
Collaborator

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 ?

Copy link
Member Author

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)) {
Copy link
Collaborator

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 ?

Copy link
Member Author

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 ?

statut: projet.statut,
message: "Vous ne pouvez pas consulter le raccordement d'un projet éliminé ou abandonné",
});
await récupérerLauréatNonAbandonné(identifiantProjet.formatter());
Copy link
Collaborator

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

Copy link
Member Author

@benjlevesque benjlevesque Feb 24, 2025

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é :)

@benjlevesque benjlevesque force-pushed the benjlevesque/pot-540-repasser-sur-les-usages-de-consulterprojet-et-retirer-ceux branch from b956bd4 to 929740b Compare February 24, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants