diff --git a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.html b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.html
index 6f16267d1c..5a7f18ac24 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.html
+++ b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.html
@@ -1,16 +1,5 @@
-
-
- {{ indicator.matIcon }}
- {{ indicator.value }}
- {{ indicator.name }}
-
-
-
-
+
+ {{ indicator.matIcon }}
+ {{ indicator.value }}
+ {{ indicator.name }}
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.scss b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.scss
index 45292ed2c3..4fe375f16b 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.scss
+++ b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.scss
@@ -5,13 +5,9 @@
justify-content: center;
row-gap: 0rem;
padding: 1rem;
- height: 9rem;
+ height: 100%;
width: auto;
min-width: 12rem;
- &__media {
- height: 100%;
- width: 100%;
- }
&__icon {
$icon-size: 2rem;
font-size: $icon-size;
@@ -34,7 +30,6 @@
.Indicator--small {
border: none;
- height: auto;
.Indicator__icon {
$icon-size: 1.5rem;
font-size: $icon-size;
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.ts b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.ts
index 8f939b580b..ee3fe6bdd5 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.ts
+++ b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.component.ts
@@ -1,14 +1,13 @@
import { Component, Input } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { Indicator } from './indicator';
-import { CommonModule } from '@angular/common';
@Component({
standalone: true,
selector: 'indicator',
templateUrl: 'indicator.component.html',
styleUrls: ['indicator.component.scss'],
- imports: [MatIconModule, CommonModule],
+ imports: [MatIconModule],
})
export class IndicatorComponent {
@Input()
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.ts b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.ts
index 20cc57e073..40b1679f2a 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.ts
+++ b/frontend/src/app/syntheseModule/taxon-sheet/indicator/indicator.ts
@@ -2,10 +2,9 @@ export interface Indicator {
name: string;
matIcon: string;
value: string | null;
- type: IndicatorRawType;
}
-type IndicatorRawType = 'number' | 'string' | 'date' | 'image';
+type IndicatorRawType = 'number' | 'string' | 'date';
export interface IndicatorDescription {
name: string;
matIcon: string;
@@ -58,6 +57,5 @@ export function computeIndicatorFromDescription(
name: indicatorDescription.name,
matIcon: indicatorDescription.matIcon,
value: value,
- type: indicatorDescription.type,
};
}
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/infos/infos.component.ts b/frontend/src/app/syntheseModule/taxon-sheet/infos/infos.component.ts
index 50bc9caef0..4c95392d61 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/infos/infos.component.ts
+++ b/frontend/src/app/syntheseModule/taxon-sheet/infos/infos.component.ts
@@ -16,14 +16,9 @@ import { TaxonomyComponent } from './taxonomy/taxonomy.component';
imports: [CommonModule, StatusComponent, TaxonomyComponent],
})
export class InfosComponent implements OnInit {
- mediaUrl: string;
taxon: Taxon | null = null;
- constructor(
- private _config: ConfigService,
- private _ds: DataFormService,
- private _tss: TaxonSheetService
- ) {}
+ constructor(private _tss: TaxonSheetService) {}
ngOnInit() {
this._tss.taxon.subscribe((taxon: Taxon | null) => {
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.html b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.html
new file mode 100644
index 0000000000..9fbf918d86
--- /dev/null
+++ b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.html
@@ -0,0 +1,5 @@
+
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.scss b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.scss
new file mode 100644
index 0000000000..2076c82bf5
--- /dev/null
+++ b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.scss
@@ -0,0 +1,5 @@
+.TaxonImage {
+ height: 100%;
+ width: auto;
+ border-radius: 0.25rem;
+}
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.ts b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.ts
new file mode 100644
index 0000000000..237a0a4ba7
--- /dev/null
+++ b/frontend/src/app/syntheseModule/taxon-sheet/infos/taxon-image/taxon-image.component.ts
@@ -0,0 +1,40 @@
+import { CommonModule } from '@angular/common';
+import { Component, Input } from '@angular/core';
+import { ConfigService } from '@geonature/services/config.service';
+import { DataFormService } from '@geonature_common/form/data-form.service';
+import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component';
+import { TaxonSheetService } from '../../taxon-sheet.service';
+
+@Component({
+ standalone: true,
+ selector: 'taxon-image',
+ templateUrl: 'taxon-image.component.html',
+ styleUrls: ['taxon-image.component.scss'],
+ imports: [CommonModule],
+})
+export class TaxonImageComponent {
+ mediaUrl: string = '';
+
+ constructor(
+ private _ds: DataFormService,
+ private _tss: TaxonSheetService,
+ private _config: ConfigService
+ ) {}
+
+ ngOnInit() {
+ this._tss.taxon.subscribe((taxon: Taxon | null) => {
+ this.mediaUrl = '';
+ if (!taxon) {
+ return;
+ }
+ this._ds.getTaxonInfo(taxon.cd_ref, ['medias', 'cd_nom']).subscribe((taxonAttrAndMedias) => {
+ const media = taxonAttrAndMedias['medias'].find(
+ (m) => m.id_type == this._config.TAXHUB.ID_TYPE_MAIN_PHOTO
+ );
+ if (media) {
+ this.mediaUrl = `${this._ds.getTaxhubAPI()}/tmedias/thumbnail/${media.id_media}?h=300&w300`;
+ }
+ });
+ });
+ }
+}
diff --git a/frontend/src/app/syntheseModule/taxon-sheet/taxon-sheet.component.html b/frontend/src/app/syntheseModule/taxon-sheet/taxon-sheet.component.html
index 7f3446eed1..37ff51e015 100644
--- a/frontend/src/app/syntheseModule/taxon-sheet/taxon-sheet.component.html
+++ b/frontend/src/app/syntheseModule/taxon-sheet/taxon-sheet.component.html
@@ -2,12 +2,11 @@
-
-
-
+
+