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

[Signalement] Enregistrement de l'identifiant BAN #3345

Merged
merged 15 commits into from
Dec 2, 2024

Conversation

emilschn
Copy link
Collaborator

@emilschn emilschn commented Nov 26, 2024

Ticket

#3322

Description

Afin de mieux s'interfacer avec d'autres SI, on enregistre l'identifiant retourné par la BAN qui correspond à un regroupement entre le code INSEE de la commune, un code pour la voie, et le numéro sur la voie.

Changements apportés

  • Ajout d'une commande qui permet de parcourir les signalements sans ID BAN, interroger la BAN et récupérer l'identifiant si le score de fiabilité est assez haut
  • Enregistrement de l'identifiant
    • lors de la création d'un signalement
    • lors de l'édition de l'adresse de l'occupant

Pré-requis

npm run watch
make composer
make execute-migration name=Version20241125151642 direction=up

Tests

  • Jouer la commande make console app="init-id-ban"
  • Vérifier que les identifiants de BAN ont été remplis sur les signalements
  • Créer un signalement et vérifier que l'identifiant BAN est bien enregistré, ainsi que la géolocalisation
  • Editer un signalement et vérifier que l'identifiant BAN est ajouté ou modifié, ainsi que la géolocalisation

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 et proposition dans le code.

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

@emilschn emilschn force-pushed the feature/3322-command-init-ban-id branch from 5f3b25f to 1c2f1cb Compare November 28, 2024 09:18
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.

Une petite remarque sur le paramètre limite

@@ -88,7 +88,7 @@ export function attacheAutocompleteAddressEvent (inputAdresse) {
addressGroup.innerHTML = ''
selectionIndex = -1
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

linter js...

const buttonElement = document.getElementById('tabpanel-'+currentHash)
const tabElement = document.getElementById('tabpanel-'+currentHash+'-panel');
if(buttonElement && tabElement){
const currentHash = window.location.hash !== '' ? window.location.hash.substring(1) : ''
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

linter js...

@emilschn emilschn force-pushed the feature/3322-command-init-ban-id branch from 98b41a9 to 4efef2a Compare November 29, 2024 09:58
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.

Test KO : La géoloc et toujours enregistré sur CP+Commune au lieu de l'adresse complète.

J'ai commenté selon ma vision mais il y'a sûrement d'autre manière de faire.

@emilschn emilschn force-pushed the feature/3322-command-init-ban-id branch from a8dc92b to 5fbbf4e Compare December 2, 2024 08:29
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

Copy link

sonarqubecloud bot commented Dec 2, 2024

@numew numew merged commit 3d5e893 into develop Dec 2, 2024
3 checks passed
@emilschn emilschn deleted the feature/3322-command-init-ban-id branch December 3, 2024 09:09
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