-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gestion des géométries (création/edition pour site et groupe de site) #68
base: dev-suivi-eolien
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci beaucoup pour tous ces développements !!!!
Peu de corrections à faire je pense, quelques remarques de choses à faire plus tard.
@@ -127,7 +127,7 @@ def create_or_update_object_api_sites_sites_group(module_code, object_type, id=N | |||
else: | |||
module = {"id_module": "generic"} | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
||
|
||
:host ::ng-deep .hide-draw-form .leaflet-top.leaflet-left { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besoin de tout ça ?
Mais peut-être que cette partie là est en cours ? C'est lié à la modification de la géométrie ?
@@ -35,6 +37,10 @@ export class MonitoringSitesComponent extends MonitoringGeomComponent implements | |||
objForm: FormGroup; | |||
objectType: IobjObs<ISite>; | |||
objParent: any; | |||
breadCrumbElemnt: IBreadCrumb = { label: 'Groupe de site', description: '' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo ici.
A voir si ce n'est pas généralisables via héritage de composants par exemple, mais à voir plus tard
@@ -33,6 +36,7 @@ export class MonitoringSitesGroupsComponent | |||
objectType: IobjObs<ISitesGroup>; | |||
objForm: FormGroup; | |||
objInitForm: Object = {}; | |||
breadCrumbElementBase: IBreadCrumb = breadCrumbElementBase; | |||
// siteGroupEmpty={ | |||
// "comments" :'', | |||
// sites_group_code: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console.log à supprimer
@@ -15,6 +15,8 @@ import { | |||
} from "../../services/api-geom.service"; | |||
import { ObjectService } from "../../services/object.service"; | |||
import { IobjObs } from "../../interfaces/objObs"; | |||
import { IBreadCrumb } from "../../interfaces/object"; | |||
import { breadCrumbElementBase } from "../breadcrumbs/breadcrumbs.component"; | |||
|
|||
const LIMIT = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utiliser le constants/api.ts plutôt (https://github.com/naturalsolutions/gn_module_monitoring/blob/52f359ee158bf66b2b51d4eca45eb9876a38860c/frontend/app/constants/api.ts)
geometry_type
dans le fichier de configsite.json
Du 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