diff --git a/backend/geonature/core/gn_profiles/routes.py b/backend/geonature/core/gn_profiles/routes.py index 55af49f574..930402fd40 100644 --- a/backend/geonature/core/gn_profiles/routes.py +++ b/backend/geonature/core/gn_profiles/routes.py @@ -16,7 +16,6 @@ VmValidProfiles, VConsistancyData, ) -from geonature.core.taxonomie.models import Taxref, VMTaxrefListForautocomplete from geonature.utils.env import DB routes = Blueprint("gn_profiles", __name__, cli_group="profiles") @@ -249,7 +248,7 @@ def get_observation_score(): { "type": "life_stage", "value": f""" - Le taxon n'a jamais été observé à cette periode et à cette altitude ({altitude_min}-{altitude_max}m) + Le taxon n'a jamais été observé à cette periode et à cette altitude ({altitude_min}-{altitude_max}m) pour le stade de vie {life_stage_value.label_default}""", } ) diff --git a/backend/geonature/core/gn_synthese/utils/query_select_sqla.py b/backend/geonature/core/gn_synthese/utils/query_select_sqla.py index 45b53c70a1..24b5f8365b 100644 --- a/backend/geonature/core/gn_synthese/utils/query_select_sqla.py +++ b/backend/geonature/core/gn_synthese/utils/query_select_sqla.py @@ -18,7 +18,6 @@ from geoalchemy2.shape import from_shape from geonature.utils.env import DB -from geonature.core.taxonomie.models import TaxrefLR from geonature.core.gn_synthese.models import ( CorObserverSynthese, CorAreaSynthese, @@ -194,14 +193,6 @@ def filter_taxonomy(self): Taxref.id_habitat.in_(self.filters.pop("taxonomy_id_hab")) ) - if "taxonomy_lr" in self.filters: - sub_query_lr = select([TaxrefLR.cd_nom]).where( - TaxrefLR.id_categorie_france.in_(self.filters.pop("taxonomy_lr")) - ) - # TODO est-ce qu'il faut pas filtrer sur le cd_ ref ? - # quid des protection définit à rang superieur de la saisie ? - self.query = self.query.where(self.model.cd_nom.in_(sub_query_lr)) - aliased_cor_taxon_attr = {} for colname, value in self.filters.items(): if colname.startswith("taxhub_attribut"): diff --git a/backend/geonature/core/taxonomie/models.py b/backend/geonature/core/taxonomie/models.py deleted file mode 100644 index da93689e76..0000000000 --- a/backend/geonature/core/taxonomie/models.py +++ /dev/null @@ -1,53 +0,0 @@ -from utils_flask_sqla.serializers import serializable - -from geonature.utils.env import DB - -from apptax.taxonomie.models import ( - TaxrefProtectionArticles, - Taxref, - CorTaxonAttribut, - VMTaxrefListForautocomplete, - BibListes, -) - - -@serializable -class TaxrefProtectionEspeces(DB.Model): - __tablename__ = "taxref_protection_especes" - __table_args__ = {"schema": "taxonomie"} - cd_nom = DB.Column(DB.Unicode, primary_key=True) - cd_protection = DB.Column(DB.Unicode, primary_key=True) - nom_cite = DB.Column(DB.Unicode) - syn_cite = DB.Column(DB.Unicode) - nom_francais_cite = DB.Column(DB.Unicode) - precisions = DB.Column(DB.Unicode) - cd_nom_cite = DB.Column(DB.Unicode, primary_key=True) - - -class TaxrefLR(DB.Model): - __tablename__ = "taxref_liste_rouge_fr" - __table_args__ = {"schema": "taxonomie"} - id_lr = DB.Column(DB.Integer, primary_key=True) - ordre_statut = DB.Column(DB.Integer) - vide = DB.Column(DB.Unicode) - cd_nom = DB.Column(DB.Integer) - cd_ref = DB.Column(DB.Integer) - nomcite = DB.Column(DB.Unicode) - nom_scientifique = DB.Column(DB.Unicode) - auteur = DB.Column(DB.Unicode) - nom_vernaculaire = DB.Column(DB.Unicode) - nom_commun = DB.Column(DB.Unicode) - rang = DB.Column(DB.Unicode) - famille = DB.Column(DB.Unicode) - endemisme = DB.Column(DB.Unicode) - population = DB.Column(DB.Unicode) - commentaire = DB.Column(DB.Unicode) - id_categorie_france = DB.Column(DB.Unicode) - criteres_france = DB.Column(DB.Unicode) - liste_rouge = DB.Column(DB.Unicode) - fiche_espece = DB.Column(DB.Unicode) - tendance = DB.Column(DB.Unicode) - liste_rouge_source = DB.Column(DB.Unicode) - annee_publication = DB.Column(DB.Unicode) - categorie_lr_europe = DB.Column(DB.Unicode) - categorie_lr_mondiale = DB.Column(DB.Unicode) diff --git a/backend/geonature/tests/test_gn_profiles.py b/backend/geonature/tests/test_gn_profiles.py index 88668e3b74..f4e4134781 100644 --- a/backend/geonature/tests/test_gn_profiles.py +++ b/backend/geonature/tests/test_gn_profiles.py @@ -19,7 +19,7 @@ VSyntheseForProfiles, ) from geonature.core.gn_synthese.models import Synthese -from geonature.core.taxonomie.models import Taxref +from apptax.taxonomie.models import Taxref from .fixtures import * diff --git a/frontend/src/app/GN2CommonModule/form/data-form.service.ts b/frontend/src/app/GN2CommonModule/form/data-form.service.ts index 1404be6325..31095a25ff 100644 --- a/frontend/src/app/GN2CommonModule/form/data-form.service.ts +++ b/frontend/src/app/GN2CommonModule/form/data-form.service.ts @@ -236,10 +236,6 @@ export class DataFormService { return this._http.get(`${AppConfig.API_TAXHUB}/bibattributs/`); } - getTaxonomyLR() { - return this._http.get(`${AppConfig.API_TAXHUB}/taxref/bib_lr`); - } - getTaxonomyHabitat() { return this._http.get(`${AppConfig.API_TAXHUB}/taxref/bib_habitats`); } diff --git a/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form-store.service.ts b/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form-store.service.ts index 709a24c979..10cbf2872a 100644 --- a/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form-store.service.ts +++ b/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form-store.service.ts @@ -17,7 +17,6 @@ export class TaxonAdvancedStoreService { public taxonTreeState: any; public taxhubAttributes: any; public formBuilded: boolean; - public taxonomyLR: Array; public taxonomyHab: Array; public taxonomyGroup2Inpn: Array; public redListsValues: any = {}; @@ -73,11 +72,7 @@ export class TaxonAdvancedStoreService { }); this.formBuilded = true; }); - // Load LR, habitat and group2inpn - this._dataService.getTaxonomyLR().subscribe((data) => { - this.taxonomyLR = data; - }); - + // Load habitat and group2inpn this._dataService.getTaxonomyHabitat().subscribe((data) => { this.taxonomyHab = data; }); diff --git a/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form.component.html b/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form.component.html index 48069bdd37..53e3910204 100644 --- a/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form.component.html +++ b/frontend/src/app/GN2CommonModule/form/synthese-form/advanced-form/synthese-advanced-form.component.html @@ -165,18 +165,6 @@
Listes rouges
Attributs TaxRef
-
- - -
- class="modal-body" *ngIf="idSynthese && alertOpen" > diff --git a/frontend/src/app/syntheseModule/services/store.service.ts b/frontend/src/app/syntheseModule/services/store.service.ts deleted file mode 100644 index 7530cdc8a7..0000000000 --- a/frontend/src/app/syntheseModule/services/store.service.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class SyntheseStoreService { - public idSyntheseList: Array; - constructor() {} -}