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

feat(admin,api): 3769 - Affectation réelle CLE Métropole #4671

Open
wants to merge 1 commit into
base: feat/affectation-cle-simulation
Choose a base branch
from

Conversation

achorein
Copy link
Collaborator

@achorein achorein commented Jan 15, 2025

@achorein achorein added the R&R label Jan 15, 2025
@achorein achorein self-assigned this Jan 15, 2025
@achorein achorein changed the title feat(admin,api) 3769 - Affectation réelle CLE Métropole feat(admin,api): 3769 - Affectation réelle CLE Métropole Jan 15, 2025
@achorein achorein force-pushed the feat/affectation-cle-simulation branch from 2b09dd1 to 19290ef Compare January 20, 2025 13:08
@achorein achorein force-pushed the feat/affectation-cle-valider branch from cbdf826 to 1fa591d Compare January 20, 2025 13:33
@achorein achorein force-pushed the feat/affectation-cle-simulation branch from 19290ef to 25fc858 Compare January 23, 2025 13:06
@achorein achorein force-pushed the feat/affectation-cle-valider branch from 1fa591d to 38c1836 Compare January 23, 2025 13:08
},
onError: (error: any) => {
capture(error);
toastr.error("Une erreur est survenue lors de l'ajout du traitement", translate(JSON.parse(error.message).message), { timeOut: 5000 });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dans apiv2.ts, on affiche un toast pour les erreurs non prévues, tu peux avoir plusieurs toast d'erreur si c'est autre chose qu'une 401, 422 ou ERR_NETWORK :

if (error instanceof FunctionalException) {
       toastr.error("Une erreur est survenue lors de l'ajout du traitement", translate(JSON.parse(error.message).message), { timeOut: 5000 });
      }

const validationCleResult = await this.validerAffectationCle.execute({
...validationCleTask.metadata!.parameters!,
dateAffectation: validationCleTask.createdAt,
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour éviter de faire grossir ce switch les case pourraient être ressorti dans des méthodes private : doAffectationCleSimulationValider.
Qu'en penses tu ?

analytics.jeunesAffected += 1;
}

this.cls.set("user", { firstName: `Affectation ${session.nom}` });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le cls est déjà setté dans AdminTaskConsumer

TaskName.AFFECTATION_CLE_SIMULATION_VALIDER,
);

console.log("status", status, "lastCompletedAt", lastCompletedAt);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger.log

}),
);

console.log(result);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

à supprimer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants