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

[BO - Liste signalement][Back] Gestion liste et filtre existants signalements sous format JSON #2408

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

sfinx13
Copy link
Collaborator

@sfinx13 sfinx13 commented Apr 2, 2024

Ticket

#2117

Description

Sur la base des données et filtres existants, la nouvelle route doit fournir la liste au format JSON triable et filtrable selon les specs
https://github.com/MTES-MCT/histologe/wiki/liste-signalements

Changements apportés

  • Nouvelle route qui fournit la liste de signalement au format JSON
  • Nouveau DTO qui permet de gérer les filtres
  • Légère adaptation du SearchFilter prise en charge du nouveau DTO
  • Filtre prise en charge dans cette PR
Champ PR Lien
Territoire http://localhost:8080/bo/list/signalements/?page=1&territory=13
Recherche http://localhost:8080/bo/list/signalements/?page=1&searchTerms=2022
Statut http://localhost:8080/bo/list/signalements/?page=1&status=ferme
Commune / EPCI http://localhost:8080/bo/list/signalements/?page=1&commune=gex
http://localhost:8080/bo/list/signalements/?page=1&commune=13002
Etiquettes http://localhost:8080/bo/list/signalements/?page=1&etiquettes[]=1&etiquettes[]=7
Date de dépôt http://localhost:8080/bo/list/signalements/?page=1&dateDepotDebut=2023-03-01&dateDepotFin=2023-04-01
Procédure estimée N/A
Partenaires affectés http://localhost:8080/bo/list/signalements/?page=1&partenaires[]=21
http://localhost:8080/bo/list/signalements/?page=1&partenaires[]=AUCUN
Statut de la visite http://localhost:8080/bo/list/signalements/?page=1&visiteStatus=Planifi%C3%A9e
Type de dernier suivi N/A
Date du dernier suivi N/A
Statut de l'affectation N/A
Criticité http://localhost:8080/bo/list/signalements/?page=1&criticiteScoreMin=5&criticiteScoreMax=6
Déclarant http://localhost:8080/bo/list/signalements/?page=1&typeDeclarant=locataire
Nature du parc http://localhost:8080/bo/list/signalements/?page=1&natureParc=public
Allocataire http://localhost:8080/bo/list/signalements/?page=1&allocataire=caf
Enfants de - 6 ans http://localhost:8080/bo/list/signalements/?page=1&enfantsM6=0
Situation N/A

Tests de non regression

  • La liste actuelle doit continuer de fonctionner
  • La carto et les pop doivent continuer de fonctionner

Tests

@sfinx13 sfinx13 changed the base branch from main to develop April 2, 2024 11:52
@sfinx13 sfinx13 changed the title [BO - Liste signalement][Back] Gestion affichage et liste sur la base de filtre existant [BO - Liste signalement][Back] Gestion liste et filtre existants signalements sous format JSON Apr 2, 2024
@sfinx13 sfinx13 marked this pull request as ready for review April 2, 2024 12:08
@sfinx13 sfinx13 marked this pull request as draft April 3, 2024 06:36
@sfinx13 sfinx13 marked this pull request as ready for review April 3, 2024 07:30
@sfinx13 sfinx13 force-pushed the feature/2117-refonte-liste-signalement branch from b3a2adb to d470e3f Compare April 3, 2024 09:06
@sfinx13 sfinx13 force-pushed the feature/2117-refonte-liste-signalement branch from d470e3f to 80d0873 Compare April 3, 2024 09:13
@sfinx13 sfinx13 marked this pull request as draft April 4, 2024 10:41
@sfinx13 sfinx13 marked this pull request as ready for review April 4, 2024 10:41
@hmeneuvrier
Copy link
Collaborator

Tests OK

Copy link
Collaborator

@numew numew left a comment

Choose a reason for hiding this comment

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

Quelques remarques/questions, mais ca fonctionne, test ok

config/services.yaml Outdated Show resolved Hide resolved
private readonly ?string $typeDeclarant = null,
#[Assert\Choice(['privee', 'public'])]
private readonly ?string $natureParc = null,
#[Assert\Choice(['caf', 'msa', 'non'])]
Copy link
Collaborator

@numew numew Apr 4, 2024

Choose a reason for hiding this comment

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

Il manque pas un choix "oui" ?
C'est top de valider les données par contre pour l'instant les erreur ne sont pas gérés (ici si j'envoie oui j'ai une exception qui est levé)

Copy link
Collaborator Author

@sfinx13 sfinx13 Apr 4, 2024

Choose a reason for hiding this comment

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

Bien qu'il ne soit pas spécifié, je suis d'accord de l'ajouter vu qu'il en existe en base (données historiques)
Pour les exceptions, vu l'usage qui se fera uniquement dans le BO via des listes, on peut s'en tenir au comportement par défaut (erreur 404)
EDIT
Je pourrais creuser plus tard pour la gestion des erreurs mais c'est pas bloquant pour la PR

Copy link
Collaborator Author

@sfinx13 sfinx13 Apr 4, 2024

Choose a reason for hiding this comment

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

@mathildepoulpux on a des signalements qui ont pour valeur oui pour allocataire. Ok pour ajouter la valeur dans le filtre ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oui on peut !

src/Dto/Request/Signalement/SignalementSearchQuery.php Outdated Show resolved Hide resolved
src/Service/Signalement/SearchFilter.php Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
28 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.2% Duplication on New Code

See analysis details on SonarCloud

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.

Re-relecture et re-tests OK

Copy link
Collaborator

@numew numew left a comment

Choose a reason for hiding this comment

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

Ok

@numew numew merged commit aa95965 into develop Apr 5, 2024
3 checks passed
@hmeneuvrier hmeneuvrier deleted the feature/2117-refonte-liste-signalement branch April 11, 2024 13:16
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.

None yet

4 participants