Gestion des géométries (création/edition pour site et groupe de site)#68
Gestion des géométries (création/edition pour site et groupe de site)#68andriacap wants to merge 27 commits intodev-suivi-eolienfrom
Conversation
In the site entry part
- Get all information from loading component to build breadcrumb information - Fix call twice siteService (delete the one with snake_case) - Use logic from observable and snapshot url to satisfy all case to access to route (by component, directly by url etc) Reviewed-by: andriacap
Need dev to the two other branches Try to add logic into map-list-component Check if it is the best way to manage map Reviewed-by: andriac
Subscription to initConfig useless Reviewed-by: andricap
Merge work from branch breadcrumb branhc and resolve problem with other feature like problem initialization of sites groups (resolver) Reviewed-by: andriacap
Back component as it was Reviewed-by: andriacap
Put back alert to create geometry if geometry_type precise in config (json) Reviewed-by: andricap
Create into formService an observable and subscribe into mapListComponent to load and connect the form with geometry info Reviewed-by: andriacap
- Change the name of form Object for homogeneity - Fix problem to load config of siteService in sitesComponents Reviewed-by: andriacap
Reviewed-by: andriacap
Alternative to the "resolver" in order to load config and necessary items to display site properties and data table Reviewed-by: andriacap
- description when delete object - change selectedObject on component site - remove duplicate "bEdit" - add "ngIf=!bEdit" on site component (to prevent display datatable on edition) - fix upper case letter in variable Reviewed-by: andriacap
- change the way to load config on visit-component (=site/:id) - fix problem on mergeMap that doesn't complete (wrong observable called) Reviewed-by: andriacap
- keep trying to send geometry to "objForm" object (FormGroup) Reviewed-by: andriacap
Reviewed-by: andriacap
Fix request DELETE in backend for site and change the way to get_sites_group_by_id by using the custom query get_or_404 Reviewed-by: andriacap
When trying to add siteGroup's site child data no pass between the form component and the component of sites-groups . Creation of resolver to load information of siteGroup selected in order to updateBreadCrumb but also to specify the siteGroup Parent. Reviewed-by: andriac
Create new method in form component to redirect to the good url according the fact we delete site. Reviewed-by: andriac
Specific properties were not loaded , add check specific schema to load if specific properties exist Reviewed-by: andriac
Add page not found in order to manage into monitoring module Reviewed-by: andriac
Reviewed-by:andriac
Display types_site label into data-table component and properties-component Reviewed-by: andriac
mvergez
left a comment
There was a problem hiding this comment.
Merci beaucoup pour tous ces développements !!!!
Peu de corrections à faire je pense, quelques remarques de choses à faire plus tard.
| # TODO : A enlever une fois que le post_data contiendra geometry et type depuis le front | ||
| if object_type == "site": | ||
| if object_type == "site" and not 'geometry' in post_data: | ||
| post_data["geometry"] = {"type": "Point", "coordinates": [2.5, 50]} |
There was a problem hiding this comment.
C'est pour tester le "coordinates": [2.5, 50] ?
| import { IBreadCrumb } from "../../interfaces/object"; | ||
|
|
||
| export const breadCrumbElementBase: IBreadCrumb = { | ||
| "description":"Liste des groupes de site", |
There was a problem hiding this comment.
Je rajouterai un "s" à site car un groupe est composé souvent de plusieurs sites. Ou alors un "(s)"
| }) | ||
| ); | ||
| }), | ||
| mergeMap((frmCtrl) => { |
There was a problem hiding this comment.
Comme vu ensemble, peut-être mettre un switchMap pour récupérer la dernière valeur de l'observable... ça ne règle pas le souci du form qui se met à jour plusieurs fois mais ça peut temporiser pour préserver le backend
|
No newline at end of file |
||
|
|
||
|
|
||
| :host ::ng-deep .hide-draw-form .leaflet-top.leaflet-left { |
There was a problem hiding this comment.
Faire gaffe que ça casse pas la map sur d'autres vues mais normalement ça devrait le faire
| displayMap: boolean = true; | ||
| constructor() {} | ||
| siteSiteGroup: SiteSiteGroup | null = null; | ||
| apiService: ApiGeomService; |
There was a problem hiding this comment.
Besoin de tout ça ?
Mais peut-être que cette partie là est en cours ? C'est lié à la modification de la géométrie ?
| objForm: FormGroup; | ||
| objectType: IobjObs<ISite>; | ||
| objParent: any; | ||
| breadCrumbElemnt: IBreadCrumb = { label: 'Groupe de site', description: '' }; |
There was a problem hiding this comment.
typo ici.
A voir si ce n'est pas généralisables via héritage de composants par exemple, mais à voir plus tard
| breadCrumbElementBase: IBreadCrumb = breadCrumbElementBase; | ||
| // siteGroupEmpty={ | ||
| // "comments" :'', | ||
| // sites_group_code: string; |
There was a problem hiding this comment.
Retirer les commentaires de ce fichier s'ils ne sont pas utilisés
| import { IPaginated } from '../interfaces/page'; | ||
| import { IobjObs } from '../interfaces/objObs'; | ||
| import { map } from 'rxjs/operators'; | ||
| const LIMIT = 10; |
There was a problem hiding this comment.
Utiliser plutôt le fichier constants/api (https://github.com/naturalsolutions/gn_module_monitoring/blob/52f359ee158bf66b2b51d4eca45eb9876a38860c/frontend/app/constants/api.ts).
Ce const est défini dans d'autres fichiers, il faudrait le remplacer partout
| }) | ||
| ) | ||
| .subscribe(({data, objectObs}) => { | ||
| console.log(data); |
| import { IBreadCrumb } from "../../interfaces/object"; | ||
| import { breadCrumbElementBase } from "../breadcrumbs/breadcrumbs.component"; | ||
|
|
||
| const LIMIT = 10; |
There was a problem hiding this comment.
Utiliser le constants/api.ts plutôt (https://github.com/naturalsolutions/gn_module_monitoring/blob/52f359ee158bf66b2b51d4eca45eb9876a38860c/frontend/app/constants/api.ts)
geometry_typedans le fichier de configsite.jsonDu travail issu des autres PR (feat/display datatable , chainInput et breadcrumb) a été ré-utilisé pour rendre plus cohérent les tests de l'implémentation de cette fonctionnalité de gestion de géométries