Skip to content

Commit

Permalink
fix(front): relative url and use of interface Taxon
Browse files Browse the repository at this point in the history
- use relative path to import in frontend
- Use Taxon interface instead of TaxonBase

Reviewed-by: andriacap
  • Loading branch information
andriacap committed Dec 16, 2024
1 parent 6d73eff commit 6906ac1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/api/taxhub.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TaxonomyList, Taxon, Media, Attribut, MediaBase, ObservationFeature, Ob
})
export class TaxhubService {
private readonly URL = MainConfig.API_ENDPOINT;
taxon: any;
taxon: Taxon;
MEDIAS_TYPES_ALLOWED = ["Photo_gncitizen", "Photo_principale", "Photo"]
ATTRIBUTS_ALLOWED = "Nom_francais"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { MapService } from '../../base/map/map.service';
import { GNCFrameworkComponent } from '../../base/jsonform/framework/framework.component';
import { RefGeoService } from '../../../api/refgeo.service';
import { ControlPosition } from 'leaflet';
import { TaxhubService } from 'src/app/api/taxhub.service';
import { TaxhubService } from '../../../api/taxhub.service';

// declare let $: any;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { COMPILER_OPTIONS, Component, Input, ViewEncapsulation } from '@angular/core';
import { IFlowComponent } from '../../flow/flow';
import { MainConfig } from '../../../../../../conf/main.config';
import { TaxhubService } from 'src/app/api/taxhub.service';
import { TaxhubService } from '../../../../../api/taxhub.service';

@Component({
templateUrl: './congrats.component.html',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/synthesis/species/species.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { TaxhubService } from '../../api/taxhub.service';
import { TaxonBase } from 'src/app/programs/observations/observation.model';
import { Taxon } from '../../programs/observations/observation.model';

@Component({
selector: 'app-species',
Expand All @@ -13,7 +13,7 @@ import { TaxonBase } from 'src/app/programs/observations/observation.model';
export class SpeciesComponent implements OnInit {
title = 'fiche espèce';
specie_id: any;
taxon: TaxonBase;
taxon: Taxon;

constructor(private route: ActivatedRoute, public taxhub: TaxhubService) {
this.route.params.subscribe((params) => {
Expand Down

0 comments on commit 6906ac1

Please sign in to comment.