diff --git a/frontend/src/app/GN2CommonModule/form/data-form.service.ts b/frontend/src/app/GN2CommonModule/form/data-form.service.ts index 1549cfce68..a748a2a7a0 100644 --- a/frontend/src/app/GN2CommonModule/form/data-form.service.ts +++ b/frontend/src/app/GN2CommonModule/form/data-form.service.ts @@ -633,5 +633,13 @@ export class DataFormService { ${idNomenclatureLifeStage}` ) } + + /* A partir d'un id synthese, retourne si l'observation match avec les différents + critère d'un profil + */ + getProfileConsistancyData(idSynthese) { + return this._http.get(`${AppConfig.API_ENDPOINT}/gn_profiles/consistancy_data/${idSynthese}`) + + } } diff --git a/frontend/src/app/GN2CommonModule/map/geojson/geojson.component.ts b/frontend/src/app/GN2CommonModule/map/geojson/geojson.component.ts index 6c0333b585..31c89e0aa3 100644 --- a/frontend/src/app/GN2CommonModule/map/geojson/geojson.component.ts +++ b/frontend/src/app/GN2CommonModule/map/geojson/geojson.component.ts @@ -36,7 +36,7 @@ export class GeojsonComponent implements OnInit, OnChanges { /** Observable pour retourner les données geojson passées au composant */ public currentGeoJson$: Observable = this.geojsonCharged.asObservable(); - constructor(public mapservice: MapService) {} + constructor(public mapservice: MapService) { } ngOnInit() { this.map = this.mapservice.map; @@ -52,12 +52,12 @@ export class GeojsonComponent implements OnInit, OnChanges { return; } - let bounds = curLayerGroup.getBounds(); + const bounds = curLayerGroup.getBounds(); if (!Object.keys(bounds).length) { return; } - map.fitBounds(curLayerGroup.getBounds()); + map.fitBounds(bounds); }, 200); } @@ -72,7 +72,9 @@ export class GeojsonComponent implements OnInit, OnChanges { this.mapservice.layerGroup = new L.FeatureGroup(); this.mapservice.map.addLayer(this.mapservice.layerGroup); this.mapservice.layerGroup.addLayer(this.currentGeojson); + if (zoom) { + this.zoom(this.mapservice.layerGroup); } } diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html index 6c40d25bfb..81133acbeb 100644 --- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html +++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html @@ -21,23 +21,6 @@
Information sur l'observation
- - {{results|json}} - {{ selectedObsTaxonDetail?.nom_vern }} - @@ -435,7 +418,92 @@
Médias -

Profil

+
+
+

Profil du taxon

+ + + + + + + + + + + + + + + + + + + +
Altitude minimale valide {{profile?.properties?.altitude_min}}
Altitude maximale valide {{profile?.properties?.altitude_max}}
Première observation valide {{profile?.properties?.first_valid_data | date:'dd/MM/yyyy'}}
Dernière observation valide {{profile?.properties?.last_valid_data | date:'dd/MM/yyyy'}}
+ +

Cohérence de la donnée

+ + + + + + + + + + + + + + + + + + + + + +
Dans l'aire d'observation valide + check + + close +
Cohérence phénologique + check + + close +
Dans la fourchette altitudinale valide + check + + close +
Score {{profileDataChecks?.score}}
+
+
+
Aire de répartition des observations valides
+ + + + +
+
Aire de répartition des observations valides
@@ -456,15 +524,6 @@
Aire de répartition des observations valides
-
Aire de répartition des observations valides
- - - - - {{phenology|json}} diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.ts b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.ts index 777c3c40de..82907ea5a8 100644 --- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.ts +++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.ts @@ -9,6 +9,7 @@ import { MediaService } from '@geonature_common/service/media.service'; import { finalize } from 'rxjs/operators'; import { Color, BaseChartDirective } from "ng2-charts"; import { ChartDataSets, ChartOptions, ChartType } from 'chart.js'; +import { AppConfig } from "@geonature_config/app.config" @@ -31,8 +32,10 @@ export class SyntheseInfoObsComponent implements OnInit, AfterViewInit { public validationHistory: Array; public selectedObsTaxonDetail: any; @ViewChild(BaseChartDirective) myChart: BaseChartDirective; + public APP_CONFIG = AppConfig; public selectedGeom; public chartType = 'line'; + public profileDataChecks: any; public results: ChartDataSets[] = [ @@ -218,7 +221,7 @@ export class SyntheseInfoObsComponent implements OnInit, AfterViewInit { this.results[3].data.push(this.phenology[i].calculated_altitude_max) this.lineChartLabels.push(this.phenology[i].period) } - this.myChart.chart.update(); + //this.myChart.chart.update(); // [ // { data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A' }, // { data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B' }, @@ -227,6 +230,10 @@ export class SyntheseInfoObsComponent implements OnInit, AfterViewInit { }); }); }); + + this._gnDataService.getProfileConsistancyData(this.idSynthese).subscribe(dataChecks => { + this.profileDataChecks = dataChecks; + }) } formatMailContent(email) {