generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e3c513
commit f3cfcd9
Showing
9 changed files
with
308 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 38 additions & 23 deletions
61
frontend/src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
<template> | ||
<v-card | ||
color="grey lighten-1" | ||
class="mb-12" | ||
height="200px" | ||
> | ||
<v-autocomplete | ||
v-model="values" | ||
:items="jahre" | ||
outlined | ||
dense | ||
chips | ||
small-chips | ||
label="Jahre" | ||
multiple | ||
></v-autocomplete> | ||
</v-card> | ||
<v-autocomplete | ||
v-model="auswertungOptions.jahre" | ||
:items="jahre" | ||
class="mt-4" | ||
outlined | ||
dense | ||
chips | ||
small-chips | ||
label="Jahre" | ||
multiple | ||
clearable | ||
deletable-chips | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, ComputedRef } from "vue"; | ||
import KeyVal from "@/types/KeyVal"; | ||
import MessstelleAuswertungOptionsDTO from "@/types/messstelle/MessstelleAuswertungOptionsDTO"; | ||
import { computed } from "vue"; | ||
interface Props { | ||
value: MessstelleAuswertungOptionsDTO; | ||
} | ||
const jahre = computed(() => { | ||
// TODO Einschränkung der Jahre je nach Zeitintervall | ||
const years = []; | ||
for (let index = 2006; index <= new Date().getFullYear(); index++) { | ||
years.push(index); | ||
const props = defineProps<Props>(); | ||
const emits = defineEmits<{ | ||
(e: "input", v: MessstelleAuswertungOptionsDTO): void; | ||
}>(); | ||
const auswertungOptions = computed({ | ||
get: () => props.value, | ||
set: (v) => emits("input", v), | ||
}); | ||
const jahre: ComputedRef<Array<KeyVal>> = computed(() => { | ||
const result: Array<KeyVal> = []; | ||
for (let index = 2006; index < new Date().getFullYear(); index++) { | ||
result.push({ | ||
text: `${index}`, | ||
value: `${index}`, | ||
}); | ||
} | ||
return years; | ||
return result; | ||
}); | ||
</script> |
58 changes: 58 additions & 0 deletions
58
frontend/src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<v-card color="grey lighten-1"> | ||
<v-radio-group | ||
v-model="auswertungOptions.tagesTyp" | ||
class="full-width" | ||
> | ||
<v-radio | ||
:value="TagesTyp.WERKTAG_DI_MI_DO" | ||
:label="getTagesTypText(TagesTyp.WERKTAG_DI_MI_DO)" | ||
/> | ||
<v-radio | ||
:value="TagesTyp.WERKTAG_MO_FR" | ||
:label="getTagesTypText(TagesTyp.WERKTAG_MO_FR)" | ||
/> | ||
<v-radio | ||
:value="TagesTyp.SAMSTAG" | ||
:label="getTagesTypText(TagesTyp.SAMSTAG)" | ||
/> | ||
<v-radio | ||
:value="TagesTyp.SONNTAG_FEIERTAG" | ||
:label="getTagesTypText(TagesTyp.SONNTAG_FEIERTAG)" | ||
/> | ||
<v-radio | ||
:value="TagesTyp.WERKTAG_FERIEN" | ||
:label="getTagesTypText(TagesTyp.WERKTAG_FERIEN)" | ||
/> | ||
<v-radio | ||
:value="TagesTyp.MO_SO" | ||
:label="getTagesTypText(TagesTyp.MO_SO)" | ||
/> | ||
</v-radio-group> | ||
</v-card> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import TagesTyp, { tagesTypText } from "@/types/enum/TagesTyp"; | ||
import MessstelleAuswertungOptionsDTO from "@/types/messstelle/MessstelleAuswertungOptionsDTO"; | ||
import { computed } from "vue"; | ||
interface Props { | ||
value: MessstelleAuswertungOptionsDTO; | ||
} | ||
const props = defineProps<Props>(); | ||
const emits = defineEmits<{ | ||
(e: "input", v: MessstelleAuswertungOptionsDTO): void; | ||
}>(); | ||
const auswertungOptions = computed({ | ||
get: () => props.value, | ||
set: (v) => emits("input", v), | ||
}); | ||
function getTagesTypText(key: string): string | undefined { | ||
return tagesTypText.get(key); | ||
} | ||
</script> |
10 changes: 0 additions & 10 deletions
10
frontend/src/components/messstelle/gesamtauswertung/stepper/WochentagStepContent.vue
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.