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

[Auto-affectation] Mettre en place un simulateur #3611

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

numew
Copy link
Collaborator

@numew numew commented Jan 24, 2025

Ticket

#3590

Description

Mise en place d'un outil permettant de simuler le traitement d'auto affectation

  • Ajout d'un bouton "Simulateur" sur la page "Règles d'affectation"
  • Page d'index des territoire ayant des règles d'affectation pour ouvrir le simulateur sur ce territoire
  • Page du simulateur pour un territoire. Affiche par défaut les 10 derniers signalement (nombre paramétrable via l'url ex : limit=100, il est aussi possible de recherche un signalement particulier sur le territoire via l'url ex : uuid=blabla)

Tests

  • S'assurer que la version simulée n'enregistre rien en base et n'a pas d'impact sur la version classique

@numew numew requested review from hmeneuvrier, emilschn and sfinx13 and removed request for hmeneuvrier January 24, 2025 14:22
@hmeneuvrier hmeneuvrier force-pushed the bugfix/3582-auto-affectation-partners-prefiltered-perimeter-geo branch from 44eb599 to 007eeaa Compare January 24, 2025 15:49
@numew numew force-pushed the feature/3590-auto-assigner-simulator branch from cf74b76 to 9255254 Compare January 27, 2025 09:37
}
$signalements = $signalementRepository->findBy($criteria, ['createdAt' => 'DESC'], $limit);
foreach ($signalements as $signalement) {
$autoAssigner->assign($signalement, true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Je trouve bizarre d'utiliser les deux méthodes.
Ici, j'utiliserais simplement la méthode get (qu'il faut modifier en conséquence)
Et la méthode assign appelle la méthode get en interne ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, j'ai adapté le code

@hmeneuvrier hmeneuvrier force-pushed the bugfix/3582-auto-affectation-partners-prefiltered-perimeter-geo branch from 007eeaa to 4c2cf65 Compare January 27, 2025 15:33
@numew numew force-pushed the feature/3590-auto-assigner-simulator branch from 9255254 to d85c9e1 Compare January 28, 2025 10:15
Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

pas testé, quelques commentaires

@hmeneuvrier hmeneuvrier force-pushed the bugfix/3582-auto-affectation-partners-prefiltered-perimeter-geo branch from d6e299d to 095db40 Compare January 28, 2025 16:25
@numew numew force-pushed the feature/3590-auto-assigner-simulator branch from d85c9e1 to 9040e9f Compare January 28, 2025 16:30
@numew numew changed the base branch from bugfix/3582-auto-affectation-partners-prefiltered-perimeter-geo to develop January 29, 2025 11:50
$signalements = $signalementRepository->findBy($criteria, ['createdAt' => 'DESC'], $limit);
foreach ($signalements as $signalement) {
$assignablePartners = $autoAssigner->assign($signalement, true);
dump($assignablePartners);
Copy link
Collaborator

Choose a reason for hiding this comment

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

tiens... un dump ! :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Corrigé, merci

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

tests OK

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

OK lecture et tests

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

Relecture et tests OK

@hmeneuvrier hmeneuvrier merged commit 13ce4f9 into develop Jan 31, 2025
4 checks passed
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.

3 participants