From 5dce1f8db4ceea960bcb1a6dfd7b140b3aa2fcea Mon Sep 17 00:00:00 2001 From: vjohnslhm <145964798+vjohnslhm@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:37:49 +0100 Subject: [PATCH] =?UTF-8?q?Update=20Messstellen=20Icon=20:bug:=20Default?= =?UTF-8?q?=20Icon=20wird=20jetzt=20korrekt=20angezeigt=20:construction:?= =?UTF-8?q?=20Icon=20Farbe=20stimmt=20noch=20nicht=20mit=20Status=20=C3=BC?= =?UTF-8?q?berein=20DTOs=20und=20Service=20im=20Backend=20angepasst,=20dam?= =?UTF-8?q?it=20Messstellen-Status=20=C3=BCbergeben=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/map/ZaehlstelleMap.vue | 22 +++++++++++++++++-- .../dto/messstelle/MessstelleKarteDTO.ts | 2 ++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/map/ZaehlstelleMap.vue b/frontend/src/components/map/ZaehlstelleMap.vue index e4871d7..d9a520c 100644 --- a/frontend/src/components/map/ZaehlstelleMap.vue +++ b/frontend/src/components/map/ZaehlstelleMap.vue @@ -175,9 +175,14 @@ import TooltipZaehlstelleDTO from "@/domain/dto/TooltipZaehlstelleDTO"; import markerIconRed from "@/assets/marker-icon-red.png"; import markerIconDiamondViolet from "@/assets/cards-diamond-violet.png"; import markerIconDiamondRed from "@/assets/cards-diamond-red.png"; +import markerIconDiamondOrange from "@/assets/cards-diamond-orange.png"; import TooltipMessstelleDTO from "@/domain/dto/TooltipMessstelleDTO"; import AnzeigeKarteDTO from "@/domain/dto/AnzeigeKarteDTO"; import MessstelleKarteDTO from "@/domain/dto/messstelle/MessstelleKarteDTO"; +import { + MessstelleStatus, + messstelleStatusText, +} from "@/domain/enums/MessstelleStatus"; /* eslint-enable no-unused-vars */ @Component({ @@ -544,8 +549,21 @@ export default class ZaehlstelleMap extends Vue { * Setzt die Optionen bezüglich verwendetes Icon für den Messstellenmarker. */ private markerOptionsMessstelle(messstelleKarte: MessstelleKarteDTO) { - let defaultIcon = new Icon.Default(); - defaultIcon.options.iconUrl = markerIconDiamondViolet; + let defaultIcon = new Icon({ + iconUrl: markerIconDiamondViolet, + iconSize: [25, 41], + }); + + // todo: entfernen wenn gefixed + console.log(messstelleKarte.status); // Status ist auch nach Ändern in Kibana noch "Status" + + if ( + messstelleKarte.status === + messstelleStatusText.get(MessstelleStatus.IN_PLANUNG) + ) { + defaultIcon.options.iconUrl = markerIconDiamondOrange; + } + if (this.zId) { if (this.zId === messstelleKarte.id) { defaultIcon.options.iconUrl = markerIconDiamondRed; diff --git a/frontend/src/domain/dto/messstelle/MessstelleKarteDTO.ts b/frontend/src/domain/dto/messstelle/MessstelleKarteDTO.ts index 57eb485..ee76e70 100644 --- a/frontend/src/domain/dto/messstelle/MessstelleKarteDTO.ts +++ b/frontend/src/domain/dto/messstelle/MessstelleKarteDTO.ts @@ -5,4 +5,6 @@ export default interface MessstelleKarteDTO extends AnzeigeKarteDTO { mstId: string; tooltip: TooltipMessstelleDTO; + + status: string; }