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: add route to tabs synthese info #3169

Merged

Conversation

andriacap
Copy link
Contributor

  • Manage dynamic tabs displayed (using tabs object with path and label)
  • Add route 'occurrence/:id_synthese/:tab'
  • Add manage event when modal is closed (go back to module 'synthese')
  • Apply lint frontend
  • Add "TODO" --> delete openInfoModal in syntheseListComponent because using routerLink to openModal

Concernant le TODO, pour moi on peut tout simplement supprimer la method "openInfoModal" vu qu'on utilise dans les devs proposés une manière plus classique à savoir l'utilisation du routerLink.

[Refs_Issue] : #3155

Reviewed-by: andriacap

- Manage dynamic tabs displayed (using tabs object with path and label)
- Add route 'occurrence/:id_synthese/:tab'
- Add manage event when modal is closed (go back to module 'synthese')
- Apply lint frontend
- Add "TODO" --> delete openInfoModal in syntheseListComponent because
using routerLink to openModal

Reviewed-by: andriacap
@TheoLechemia
Copy link
Member

TheoLechemia commented Aug 30, 2024

Comme le routing occurrence/:id_synthese/:tab est associé à SyntheseComponent, l'ouverture et la fermeture de la modale entraine le rechargement du composant synthese en arrière plan, et donc relance tous les appel AJAX... (/synthese_for_web_app est même appelé deux foix - on voit deux fois le toaster "les 100 dernières obs" s'afficher)

En faisant pointer la route occurrence/:id_synthese/:tab vers SyntheseInfoObsComponent, on devrait pouvoir résoudre ça.
Un exemple ici :
https://stackblitz.com/edit/routable-modals?file=src%2Fapp%2Fphoto-detail%2Fphoto-detail.component.ts

@@ -151,6 +153,8 @@ export class SyntheseListComponent implements OnInit, OnChanges, AfterContentChe
link.remove();
}

// TODO: cette method peut être supprimé car redondante avec celle appelée dans syntheseComponent https://github.com/PnX-SI/GeoNature/blob/a6a9c05acfa8a0a2f7aecbb70e6deacdb250b2c4/frontend/src/app/syntheseModule/synthese.component.ts#L222
// car le composant est monté via la route /occurence/:id_synthese/:tab
Copy link
Member

Choose a reason for hiding this comment

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

A supprimer oui

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.76%. Comparing base (87c12e9) to head (c101813).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3169   +/-   ##
========================================
  Coverage    81.76%   81.76%           
========================================
  Files           86       86           
  Lines         6976     6976           
========================================
  Hits          5704     5704           
  Misses        1272     1272           
Flag Coverage Δ
pytest 81.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacquesfize jacquesfize merged commit d7f8b6a into PnX-SI:develop Oct 7, 2024
7 checks passed
@edelclaux
Copy link
Contributor

T'as testé ça ?
Il me semble qu'il y avait un genre de clignotement, pas désirable

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.

4 participants