Skip to content

Commit

Permalink
Update Messstellen Icon
Browse files Browse the repository at this point in the history
🐛 Default Icon wird jetzt korrekt angezeigt
🚧 Icon Farbe stimmt noch nicht mit Status überein
DTOs und Service im Backend angepasst, damit Messstellen-Status übergeben wird
  • Loading branch information
vjohnslhm committed Jan 16, 2024
1 parent 3d53827 commit 5dce1f8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions frontend/src/components/map/ZaehlstelleMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/domain/dto/messstelle/MessstelleKarteDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ export default interface MessstelleKarteDTO extends AnzeigeKarteDTO {
mstId: string;

tooltip: TooltipMessstelleDTO;

status: string;
}

0 comments on commit 5dce1f8

Please sign in to comment.