From f3cfcd9ffa9d2ba15b522508bc4db79faca93995 Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Wed, 3 Apr 2024 16:49:31 +0200 Subject: [PATCH] stepper mit leben gefuellt --- frontend/components.d.ts | 6 +- .../stepper/AuswertungStepper.vue | 85 ++++++++++--- .../stepper/JahreStepContent.vue | 61 +++++---- .../stepper/TagesTypStepContent.vue | 58 +++++++++ .../stepper/WochentagStepContent.vue | 10 -- .../stepper/ZeitintervallStepContent.vue | 117 ++++++++++++++++-- .../MessstelleAuswertungOptionsDTO.ts | 5 + frontend/src/util/DefaultObjectCreator.ts | 13 ++ frontend/src/views/AuswertungView.vue | 10 +- 9 files changed, 308 insertions(+), 57 deletions(-) create mode 100644 frontend/src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue delete mode 100644 frontend/src/components/messstelle/gesamtauswertung/stepper/WochentagStepContent.vue create mode 100644 frontend/src/types/messstelle/MessstelleAuswertungOptionsDTO.ts diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 07195806..075438b2 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -52,6 +52,7 @@ declare module '@vue/runtime-core' { HeatmapCard: typeof import('./src/components/zaehlstelle/charts/HeatmapCard.vue')['default'] ImageAssetForm: typeof import('./src/components/pdfreport/assetforms/ImageAssetForm.vue')['default'] InfoMessage: typeof import('./src/components/app/InfoMessage.vue')['default'] + JahreStepContent: typeof import('./src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue')['default'] KommentarInfo: typeof import('./src/components/zaehlstelle/KommentarInfo.vue')['default'] Loader: typeof import('./src/components/common/Loader.vue')['default'] MessquerschnittAnzahlInfo: typeof import('./src/components/messstelle/MessquerschnittAnzahlInfo.vue')['default'] @@ -80,6 +81,7 @@ declare module '@vue/runtime-core' { StepLine: typeof import('./src/components/zaehlstelle/charts/StepLine.vue')['default'] StepLineCard: typeof import('./src/components/zaehlstelle/charts/StepLineCard.vue')['default'] TagesTypRadiogroup: typeof import('./src/components/messstelle/optionsmenue/panels/TagesTypRadiogroup.vue')['default'] + TagesTypStepContent: typeof import('./src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue')['default'] TextAssetForm: typeof import('./src/components/pdfreport/assetforms/TextAssetForm.vue')['default'] TheSnackbar: typeof import('./src/components/common/TheSnackbar.vue')['default'] TooltipWithIcon: typeof import('./src/components/zaehlstelle/icons/TooltipWithIcon.vue')['default'] @@ -94,6 +96,7 @@ declare module '@vue/runtime-core' { VCardText: typeof import('vuetify/lib')['VCardText'] VCardTitle: typeof import('vuetify/lib')['VCardTitle'] VCheckbox: typeof import('vuetify/lib')['VCheckbox'] + VChip: typeof import('vuetify/lib')['VChip'] VCol: typeof import('vuetify/lib')['VCol'] VContainer: typeof import('vuetify/lib')['VContainer'] VDataTable: typeof import('vuetify/lib')['VDataTable'] @@ -147,6 +150,7 @@ declare module '@vue/runtime-core' { VToolbarTitle: typeof import('vuetify/lib')['VToolbarTitle'] VTooltip: typeof import('vuetify/lib')['VTooltip'] WetterIcon: typeof import('./src/components/zaehlstelle/icons/WetterIcon.vue')['default'] + WochentagStepContent: typeof import('@/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue')['default'] YesNoDialog: typeof import('./src/components/common/YesNoDialog.vue')['default'] ZaehlartIcon: typeof import('./src/components/zaehlstelle/icons/ZaehlartIcon.vue')['default'] ZaehldatenDiagramme: typeof import('./src/components/zaehlstelle/ZaehldatenDiagramme.vue')['default'] @@ -168,7 +172,7 @@ declare module '@vue/runtime-core' { ZeitauswahlStundeOrBlock: typeof import('./src/components/messstelle/optionsmenue/panels/ZeitauswahlStundeOrBlock.vue')['default'] ZeitIntervall: typeof import('./src/components/messstelle/optionsmenue/panels/ZeitIntervall.vue')['default'] ZeitintervallStep: typeof import('@/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue')['default'] - ZeitintervallStepContent: typeof import('@/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue')['default'] + ZeitintervallStepContent: typeof import('./src/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue')['default'] ZeitPanel: typeof import('./src/components/messstelle/optionsmenue/panels/ZeitPanel.vue')['default'] Zeitreihe: typeof import('./src/components/zaehlstelle/charts/Zeitreihe.vue')['default'] ZeitreiheCard: typeof import('./src/components/zaehlstelle/charts/ZeitreiheCard.vue')['default'] diff --git a/frontend/src/components/messstelle/gesamtauswertung/stepper/AuswertungStepper.vue b/frontend/src/components/messstelle/gesamtauswertung/stepper/AuswertungStepper.vue index e37fe639..381c8918 100644 --- a/frontend/src/components/messstelle/gesamtauswertung/stepper/AuswertungStepper.vue +++ b/frontend/src/components/messstelle/gesamtauswertung/stepper/AuswertungStepper.vue @@ -12,41 +12,39 @@ :complete="activeStep > 1" step="1" editable + :rules="[isJahresintervallSelected]" > Zeitintervalle + {{ selectedJahresintervallAsSummary }} - + Jahre + {{ selectedYearsAsSummary }} - + Wochentag + {{ selectedTagesTypAsSummary }} - + @@ -55,17 +53,74 @@ diff --git a/frontend/src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue b/frontend/src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue index 221b3a12..e02e1c8c 100644 --- a/frontend/src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue +++ b/frontend/src/components/messstelle/gesamtauswertung/stepper/JahreStepContent.vue @@ -1,32 +1,47 @@ diff --git a/frontend/src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue b/frontend/src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue new file mode 100644 index 00000000..34b4d7b7 --- /dev/null +++ b/frontend/src/components/messstelle/gesamtauswertung/stepper/TagesTypStepContent.vue @@ -0,0 +1,58 @@ + + + diff --git a/frontend/src/components/messstelle/gesamtauswertung/stepper/WochentagStepContent.vue b/frontend/src/components/messstelle/gesamtauswertung/stepper/WochentagStepContent.vue deleted file mode 100644 index 0658e68f..00000000 --- a/frontend/src/components/messstelle/gesamtauswertung/stepper/WochentagStepContent.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/frontend/src/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue b/frontend/src/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue index 0658e68f..26276d02 100644 --- a/frontend/src/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue +++ b/frontend/src/components/messstelle/gesamtauswertung/stepper/ZeitintervallStepContent.vue @@ -1,10 +1,113 @@ - + diff --git a/frontend/src/types/messstelle/MessstelleAuswertungOptionsDTO.ts b/frontend/src/types/messstelle/MessstelleAuswertungOptionsDTO.ts new file mode 100644 index 00000000..724a3b5b --- /dev/null +++ b/frontend/src/types/messstelle/MessstelleAuswertungOptionsDTO.ts @@ -0,0 +1,5 @@ +export default interface MessstelleAuswertungOptionsDTO { + jahre: Array; + tagesTyp: string; + zeitintervalle: Array; +} diff --git a/frontend/src/util/DefaultObjectCreator.ts b/frontend/src/util/DefaultObjectCreator.ts index cdd5dc59..2aecded0 100644 --- a/frontend/src/util/DefaultObjectCreator.ts +++ b/frontend/src/util/DefaultObjectCreator.ts @@ -7,6 +7,7 @@ import DetektierteFahrzeugart from "@/types/enum/DetektierteFahrzeugart"; import FahrzeugOptions from "@/types/messstelle/FahrzeugOptions"; import MessstelleOptionsDTO from "@/types/messstelle/MessstelleOptionsDTO"; import ZaehldatenIntervall from "@/types/enum/ZaehldatenIntervall"; +import MessstelleAuswertungOptionsDTO from "@/types/messstelle/MessstelleAuswertungOptionsDTO"; export default class DefaultObjectCreator { public static createDefaultZaehlstelleKarte(): ZaehlstelleKarteDTO { @@ -83,6 +84,14 @@ export default class DefaultObjectCreator { public static createDefaultMessstelleOptions(): MessstelleOptionsDTO { return { + blackPrintMode: false, + blocksumme: false, + ganglinieYAchse1MaxValue: null, + ganglinieYAchse2MaxValue: null, + spitzenstunde: false, + stundensumme: false, + tagessumme: false, + werteHundertRunden: false, fahrzeuge: this.createDefaultFahrzeugOptions(true), intervall: ZaehldatenIntervall.STUNDE_KOMPLETT, messquerschnittIds: [], @@ -92,4 +101,8 @@ export default class DefaultObjectCreator { zeitraum: [], }; } + + public static createDefaultMessstelleAuswertungOptions(): MessstelleAuswertungOptionsDTO { + return { jahre: [], tagesTyp: "", zeitintervalle: [] }; + } } diff --git a/frontend/src/views/AuswertungView.vue b/frontend/src/views/AuswertungView.vue index e1456187..7a3fef20 100644 --- a/frontend/src/views/AuswertungView.vue +++ b/frontend/src/views/AuswertungView.vue @@ -3,11 +3,13 @@ = ref(1); +const auswertungsOptions: Ref = ref( + DefaultObjectCreator.createDefaultMessstelleAuswertungOptions() +); const appBarHeight = computed(() => { return 65 / (vuetify.breakpoint.height / 100);