Skip to content

DAVE-662 #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions frontend/src/components/messstelle/FahrspurenAnzeige.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<span class="text-caption">
{{ textAnzahlFahrspuren }}
</span>
</template>

<script setup lang="ts">
import { isNil } from "lodash";
import { computed, ref } from "vue";

interface Props {
fahrspuren: number;
}

const props = defineProps<Props>();

const textByAnzahlFahrspuren = ref<Map<number, string>>(
new Map([
[0, "0 Fahrstreifen"],
[1, "1 Fahrstreifen"],
[2, "2 Fahrstreifen"],
[3, "3 Fahrstreifen"],
[4, "4 Fahrstreifen"],
[5, "5 Fahrstreifen"],
[6, "6 Fahrstreifen"],
[7, "7 Fahrstreifen"],
])
);

/**
* Ermittelt den Text passend zur Anzahl der Fahrspuren.
*/
const textAnzahlFahrspuren = computed<string>(() => {
let result = textByAnzahlFahrspuren.value.get(props.fahrspuren);
if (isNil(result)) {
result = "Keine Information zur Fahrstreifenanzahl vorhanden";
}
return result;
});
</script>
5 changes: 2 additions & 3 deletions frontend/src/components/messstelle/MessquerschnittInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
/>
</span>
<br />
<fahrspuren-icon
size="small"
<fahrspuren-anzeige
:fahrspuren="messquerschnitt.anzahlFahrspuren"
/>
<br />
Expand All @@ -38,7 +37,7 @@
<script setup lang="ts">
import type MessstelleInfoDTO from "@/types/messstelle/MessstelleInfoDTO";
import FahrspurenIcon from "@/components/messstelle/icons/FahrspurenIcon.vue";
import FahrspurenAnzeige from "@/components/messstelle/FahrspurenAnzeige.vue";
import FahrtrichtungIcon from "@/components/messstelle/icons/FahrtrichtungIcon.vue";
import { useAlternateRowColor } from "@/util/AlternateRowColorUtil";
Expand Down
56 changes: 0 additions & 56 deletions frontend/src/components/messstelle/icons/FahrspurenIcon.vue

This file was deleted.

Loading