From 667bc2d54d58f3c3d1b016852bce616b54a06e87 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 5 Feb 2021 18:43:26 +0100 Subject: [PATCH] fix: structure type for map --- src/app/map/components/map.component.ts | 2 +- src/app/models/structure.model.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index 01f19e751..ad2bba78c 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -159,7 +159,7 @@ export class MapComponent implements OnChanges { structure.structureName + '</h1>' + '<p>' + - structure.structureType + + structure.getLabelTypeStructure() + '</p><div>' + '<span class="ico-dot-' + cssAvailabilityClass + diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 7fee546ca..3c4569dc4 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -174,6 +174,6 @@ export class Structure { } public getLabelTypeStructure(): string { - return typeStructureEnum[this.structureType]; + return typeStructureEnum[this.structureType] ? typeStructureEnum[this.structureType] : ''; } } -- GitLab