diff --git a/frontend/cypress/e2e/synthese-spec.js b/frontend/cypress/e2e/synthese-spec.js
index c598f4d83c..d4909d94e5 100644
--- a/frontend/cypress/e2e/synthese-spec.js
+++ b/frontend/cypress/e2e/synthese-spec.js
@@ -142,7 +142,14 @@ describe('Tests gn_synthese', () => {
cy.get('[data-qa="synthese-obs-detail-ca"]').invoke('text').should('not.equal', '');
// vérification de la présence de l'onglet taxonomie
cy.get('.mat-mdc-tab').contains('Taxonomie').click({ force: true });
- cy.get('[data-qa="synthese-obs-detail-taxo-familly"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-classe"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-ordre"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-famille"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-cd_nom"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-lb_nom"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-cd_ref"]').invoke('text').should('not.equal', '');
+ cy.get('[data-qa="taxonomy-detail-taxo-nom_cite"]').invoke('text').should('not.equal', '');
+
// vérification de la présence de l'onglet zonage
cy.get('.mat-mdc-tab').contains('Zonage').click({ force: true });
cy.get('[data-qa="synthese-obs-detail-area"]');
diff --git a/frontend/src/app/GN2CommonModule/form/taxonomy/taxonomy.component.ts b/frontend/src/app/GN2CommonModule/form/taxonomy/taxonomy.component.ts
index dc3ca24f40..8343a497dd 100644
--- a/frontend/src/app/GN2CommonModule/form/taxonomy/taxonomy.component.ts
+++ b/frontend/src/app/GN2CommonModule/form/taxonomy/taxonomy.component.ts
@@ -37,6 +37,7 @@ export interface Taxon {
phylum?: string;
status?: any[];
synonymes?: any[];
+ attributs?: any[];
}
/**
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 876dfde2c8..6afe82e81d 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
@@ -389,90 +389,7 @@
-
-
-
- Groupe taxonomique
- |
- {{ selectedObsTaxonDetail?.classe }} |
-
-
-
- Ordre
- |
- {{ selectedObsTaxonDetail?.ordre }} |
-
-
-
- Famille
- |
-
- {{ selectedObsTaxonDetail?.famille }}
- |
-
-
-
- Attribut(s) Taxonomique(s) locaux
-
-
-
- {{ attr?.bib_attribut?.label_attribut }}
- |
- {{ attr.valeur_attribut }} |
-
-
-
- Statuts
-
-
-
- {{ status.value.display }} |
-
-
-
-
- -
-
-
-
- ({{ text.value.lb_adm_tr }} - {{ text.value.cd_sig }})
-
-
- Voir / Télécharger
- launch
-
-
- -
-
-
- {{ value.value.code_statut }}
-
- {{ value.value.label_statut }}
- {{ value.value.rq_statut }}
-
-
-
- |
-
-
-
- Aucun
+
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 fa7c775bed..7b209be376 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
@@ -12,6 +12,11 @@ import { ModuleService } from '@geonature/services/module.service';
import { ConfigService } from '@geonature/services/config.service';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
+import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component';
+
+export interface ObservedTaxon extends Taxon {
+ nom_cite?: string;
+}
@Component({
selector: 'pnx-synthese-info-obs',
@@ -31,7 +36,7 @@ export class SyntheseInfoObsComponent implements OnInit, OnChanges {
public selectedObs: any;
public validationHistory: Array = [];
- public selectedObsTaxonDetail: any;
+ public selectedObsTaxonDetail: ObservedTaxon;
@ViewChild('tabGroup') tabGroup;
public selectedGeom;
// public chartType = 'line';
@@ -197,11 +202,11 @@ export class SyntheseInfoObsComponent implements OnInit, OnChanges {
if (this.selectedObs['unique_id_sinp']) {
this.loadValidationHistory(this.selectedObs['unique_id_sinp']);
}
- let cdNom = this.selectedObs['cd_nom'];
- let areasStatus = this.selectedObs['areas'].map((area) => area.id_area);
+ const cdNom = this.selectedObs['cd_nom'];
+ const areasStatus = this.selectedObs['areas'].map((area) => area.id_area);
const taxhubFields = ['attributs', 'attributs.bib_attribut.label_attribut', 'status'];
this._gnDataService.getTaxonInfo(cdNom, taxhubFields, areasStatus).subscribe((taxInfo) => {
- this.selectedObsTaxonDetail = taxInfo;
+ this.selectedObsTaxonDetail = { ...taxInfo, nom_cite: this.selectedObs.nom_cite };
// filter attributs
this.selectedObsTaxonDetail.attributs = taxInfo['attributs'].filter((v) =>
this.config.SYNTHESE.ID_ATTRIBUT_TAXHUB.includes(v.id_attribut)
@@ -224,6 +229,7 @@ export class SyntheseInfoObsComponent implements OnInit, OnChanges {
this.filterTabs();
this.selectedTab = this.selectedTab ? this.selectedTab : this.defaultTab;
this.selectTab(this.selectedTab);
+ console.log(this.selectedObs);
});
this._gnDataService.getProfileConsistancyData(this.idSynthese).subscribe((dataChecks) => {
diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.html b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.html
index d3350df06b..961ca67628 100644
--- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.html
+++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.html
@@ -1,46 +1,49 @@
Classification
-
+
-
- Groupe taxonomique |
- {{ taxon?.classe }} |
-
-
- Ordre |
- {{ taxon?.ordre }} |
-
-
- Famille |
+
+
+ {{ information.label }}
+ |
- {{ taxon?.famille }}
+ {{ taxon[information.field] }}
|
+ Aucune
-
-
+
+
+ {{ attr.label_attribut }}
+ |
+ {{ attr.valeur_attribut }} |
+
+
+
Aucun
+
Statuts
0; else noStatus"
>
-
+
{{ status.value.display }} |
diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.scss b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.scss
index 2ad0c2cd00..d0fb0b4d70 100644
--- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.scss
+++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.scss
@@ -17,7 +17,7 @@
}
&__value {
width: 100%;
- padding-left: 1rem;
+ padding-left: 3rem;
}
}
}
diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.ts b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.ts
index 52a5bc2c12..f472c1ee08 100644
--- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.ts
+++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.ts
@@ -1,7 +1,10 @@
import { Component, Input, OnInit } from '@angular/core';
-import { GN2CommonModule } from '@geonature_common/GN2Common.module';
-import { CommonModule } from '@angular/common';
-import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component';
+import { ObservedTaxon } from '../synthese-info-obs.component';
+
+interface TaxonInformation {
+ label: string;
+ field: keyof ObservedTaxon;
+}
@Component({
selector: 'pnx-synthese-taxonomy',
@@ -10,6 +13,49 @@ import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component';
})
export class TaxonomyComponent {
@Input()
- taxon: Taxon | null = null;
+ taxon: ObservedTaxon | null = null;
+
+ @Input()
+ hideLocalAttributesOnEmpty: boolean = false;
+
constructor() {}
+
+ readonly INFORMATIONS: Array = [
+ {
+ label: 'Groupe taxonomique',
+ field: 'classe',
+ },
+ {
+ label: 'Ordre',
+ field: 'ordre',
+ },
+ {
+ label: 'Famille',
+ field: 'famille',
+ },
+ {
+ label: 'lb nom',
+ field: 'lb_nom',
+ },
+ {
+ label: 'cd nom',
+ field: 'cd_nom',
+ },
+ {
+ label: 'cd ref',
+ field: 'cd_ref',
+ },
+ {
+ label: 'Nom valide',
+ field: 'nom_valide',
+ },
+ {
+ label: 'Nom cite',
+ field: 'nom_cite',
+ },
+ ];
+
+ get informationsFiltered() {
+ return this.INFORMATIONS.filter((information) => this.taxon[information.field]);
+ }
}
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/tab-taxonomy/tab-taxonomy.component.html b/frontend/src/app/syntheseModule/taxon-sheet/tab-taxonomy/tab-taxonomy.component.html
index 94da0dd149..b699bd38a0 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/tab-taxonomy/tab-taxonomy.component.html
+++ b/frontend/src/app/syntheseModule/taxon-sheet/tab-taxonomy/tab-taxonomy.component.html
@@ -1,3 +1,6 @@