File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
frontend/src/app/syntheseModule/taxon-sheet Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11import { Injectable } from '@angular/core' ;
2+ import { ConfigService } from '@geonature/services/config.service' ;
23import { DataFormService } from '@geonature_common/form/data-form.service' ;
34import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component' ;
45import { BehaviorSubject } from 'rxjs' ;
@@ -7,7 +8,10 @@ import { BehaviorSubject } from 'rxjs';
78export class TaxonSheetService {
89 taxon : BehaviorSubject < Taxon | null > = new BehaviorSubject < Taxon | null > ( null ) ;
910
10- constructor ( private _ds : DataFormService ) { }
11+ constructor (
12+ private _ds : DataFormService ,
13+ public config : ConfigService
14+ ) { }
1115
1216 updateTaxonByCdRef ( cd_ref : number ) {
1317 const taxon = this . taxon . getValue ( ) ;
@@ -16,6 +20,9 @@ export class TaxonSheetService {
1620 }
1721 const taxhubFields = [ 'attributs' , 'attributs.bib_attribut.label_attribut' , 'status' ] ;
1822 this . _ds . getTaxonInfo ( cd_ref , taxhubFields ) . subscribe ( ( taxon ) => {
23+ taxon [ 'attributs' ] = taxon [ 'attributs' ] . filter ( ( v ) => {
24+ return this . config . SYNTHESE . ID_ATTRIBUT_TAXHUB . includes ( v . id_attribut ) ;
25+ } ) ;
1926 this . taxon . next ( taxon ) ;
2027 } ) ;
2128 }
You can’t perform that action at this time.
0 commit comments