From f948107826292f5414e0833d53f0656e2104ea82 Mon Sep 17 00:00:00 2001 From: Maxime Vergez Date: Mon, 17 Apr 2023 14:35:27 +0200 Subject: [PATCH] fix: following rebase Fix imports, double declarations... --- backend/gn_module_monitoring/routes/site.py | 7 ------- .../monitoring-sites-create.component.ts | 2 +- .../monitoring-sitesgroups-create.component.ts | 3 ++- .../monitoring-visits/monitoring-visits.component.ts | 5 ++++- frontend/app/components/select-btn/select-btn.component.ts | 4 +++- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/backend/gn_module_monitoring/routes/site.py b/backend/gn_module_monitoring/routes/site.py index 00481f2be..77f123146 100644 --- a/backend/gn_module_monitoring/routes/site.py +++ b/backend/gn_module_monitoring/routes/site.py @@ -95,13 +95,6 @@ def get_site_by_id(id_base_site): schema = MonitoringSitesSchema() return schema.dump(site) -@blueprint.route("/sites/", methods=["GET"]) -def get_site_by_id(id_base_site): - site = TMonitoringSites.query.get_or_404(id_base_site) - schema = MonitoringSitesSchema() - return schema.dump(site) - - @blueprint.route("/sites/geometries", methods=["GET"]) def get_all_site_geometries(): params = MultiDict(request.args) diff --git a/frontend/app/components/monitoring-sites-create/monitoring-sites-create.component.ts b/frontend/app/components/monitoring-sites-create/monitoring-sites-create.component.ts index 33741d789..ea83a7eb4 100644 --- a/frontend/app/components/monitoring-sites-create/monitoring-sites-create.component.ts +++ b/frontend/app/components/monitoring-sites-create/monitoring-sites-create.component.ts @@ -34,7 +34,7 @@ export class MonitoringSitesCreateComponent implements OnInit { constructor( private _formService: FormService, private _formBuilder: FormBuilder, - private siteService: SitesService, + public siteService: SitesService, private route: ActivatedRoute, private _objService: ObjectService ) {} diff --git a/frontend/app/components/monitoring-sitesgroups-create/monitoring-sitesgroups-create.component.ts b/frontend/app/components/monitoring-sitesgroups-create/monitoring-sitesgroups-create.component.ts index 3e6b774cc..7ff9a6791 100644 --- a/frontend/app/components/monitoring-sitesgroups-create/monitoring-sitesgroups-create.component.ts +++ b/frontend/app/components/monitoring-sitesgroups-create/monitoring-sitesgroups-create.component.ts @@ -5,6 +5,7 @@ import { ActivatedRoute } from '@angular/router'; import { endPoints } from '../../enum/endpoints'; import { ISitesGroup } from '../../interfaces/geom'; import { FormService } from '../../services/form.service'; +import { SitesGroupService } from '../../services/api-geom.service'; @Component({ selector: 'monitoring-sitesgroups-create', @@ -18,7 +19,7 @@ export class MonitoringSitesGroupsCreateComponent implements OnInit { constructor( private _formService: FormService, private _formBuilder: FormBuilder, - private route: ActivatedRoute + public sitesGroupService: SitesGroupService ) {} ngOnInit() { diff --git a/frontend/app/components/monitoring-visits/monitoring-visits.component.ts b/frontend/app/components/monitoring-visits/monitoring-visits.component.ts index a0d7a25ae..b9a98545e 100644 --- a/frontend/app/components/monitoring-visits/monitoring-visits.component.ts +++ b/frontend/app/components/monitoring-visits/monitoring-visits.component.ts @@ -13,6 +13,8 @@ import { GeoJSONService } from '../../services/geojson.service'; import { ObjectService } from '../../services/object.service'; import { JsonData } from '../../types/jsondata'; import { SelectObject } from '../../interfaces/object'; +import { Module } from '../../interfaces/module'; +import { ConfigService } from '../../services/config.service'; @Component({ selector: 'monitoring-visits', @@ -38,7 +40,8 @@ export class MonitoringVisitsComponent extends MonitoringGeomComponent implement public geojsonService: GeoJSONService, private router: Router, private _Activatedroute: ActivatedRoute, - private _formBuilder: FormBuilder + private _formBuilder: FormBuilder, + private _configService: ConfigService ) { super(); this.getAllItemsCallback = this.getVisits; diff --git a/frontend/app/components/select-btn/select-btn.component.ts b/frontend/app/components/select-btn/select-btn.component.ts index e5f572948..5644d7b08 100644 --- a/frontend/app/components/select-btn/select-btn.component.ts +++ b/frontend/app/components/select-btn/select-btn.component.ts @@ -54,6 +54,8 @@ export class SelectButtonComponent { } displayFn(value: SelectObject) { - return value.label; + if (value) { + return value.label; + } } }