fix:#15 linted format and typ fix

This commit is contained in:
masterelmar
2023-11-20 11:50:46 +01:00
parent e8e7c6149a
commit ab25df81c1
13 changed files with 219 additions and 137 deletions

View File

@@ -1,4 +1,3 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Ref, computed, ref } from "vue"; import { Ref, computed, ref } from "vue";
import moduleStore from "../store/moduleStore"; import moduleStore from "../store/moduleStore";
@@ -11,14 +10,14 @@ const tableData = computed(() =>
store.getAllModules().map((module) => { store.getAllModules().map((module) => {
return { return {
Course: module.course, Course: module.course,
Module: module.userDefinedName Module: module.userDefinedName,
}; };
}), }),
); );
const previewOn: Ref<boolean> = computed(() => { const previewOn: Ref<boolean> = computed(() => {
return moduleStore().modules.size > 0; return moduleStore().modules.size > 0;
}) });
const columns = ref([ const columns = ref([
{ field: "Course", header: "Course" }, { field: "Course", header: "Course" },
@@ -39,13 +38,13 @@ window.addEventListener("resize", updateMobile);
id="calendar-dialog" id="calendar-dialog"
ref="calendar" ref="calendar"
:visible="dialogVisible && previewOn" :visible="dialogVisible && previewOn"
@update:visible="dialogVisible = $event" :maximizable="!mobilePage"
:maximizable=!mobilePage :draggable="false"
:draggable=false
header="Kalendervorschau" header="Kalendervorschau"
class="w-full lg:w-30rem lg:h-auto m-0 lg:m-2" class="w-full lg:w-30rem lg:h-auto m-0 lg:m-2"
position="bottomright" position="bottomright"
> @update:visible="dialogVisible = $event"
>
Hier könnte Ihre Werbung stehen! Hier könnte Ihre Werbung stehen!
<DataTable <DataTable
@@ -65,20 +64,19 @@ window.addEventListener("resize", updateMobile);
{{ data[field] }} {{ data[field] }}
</template> </template>
</Column> </Column>
</DataTable> </DataTable>
</Dialog> </Dialog>
<SpeedDial <SpeedDial
:style="{ position: 'fixed', bottom: '2rem', right: '2rem' }"
v-if="previewOn && !dialogVisible" v-if="previewOn && !dialogVisible"
> :style="{ position: 'fixed', bottom: '2rem', right: '2rem' }"
>
<template #button> <template #button>
<Button <Button
icon="pi pi-calendar" icon="pi pi-calendar"
label="Preview" label="Preview"
class="p-button-rounded p-button-primary" class="p-button-rounded p-button-primary"
@click="dialogVisible = true" @click="dialogVisible = true"
/> />
</template> </template>
</SpeedDial> </SpeedDial>
</template> </template>

View File

@@ -1,141 +1,216 @@
<script lang="ts" setup> <script lang="ts" setup></script>
</script>
<template> <template>
<div class="flex align-items-center justify-content-center flex-column"> <div class="flex align-items-center justify-content-center flex-column">
<div class="flex align-items-center justify-content-center h-4rem m-2"> <div class="flex align-items-center justify-content-center h-4rem m-2">
<h1>{{$t('faqView.headline')}}</h1> <h1>{{ $t("faqView.headline") }}</h1>
</div> </div>
<div class="flex flex-column col-7"> <div class="flex flex-column col-7">
<div class="grid my-2"> <div class="grid my-2">
<div class="col"> <div class="col">
{{$t('faqView.firstQuestion')}} {{ $t("faqView.firstQuestion") }}
</div> </div>
<div class="col"> <div class="col">
{{$t('faqView.firstAnswer')}} {{ $t("faqView.firstAnswer") }}
</div> </div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.secondQuestion')}}</div> <div class="col">{{ $t("faqView.secondQuestion") }}</div>
<div class="col"> <div class="col">
{{$t('faqView.secondAnswer')}} {{ $t("faqView.secondAnswer") }}
</div> </div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.thirdQuestion')}}</div> <div class="col">{{ $t("faqView.thirdQuestion") }}</div>
<div class="col"> <div class="col">
<Accordion> <Accordion>
<AccordionTab :header="$t('faqView.thirdAnswer.tabTitle')"> <AccordionTab :header="$t('faqView.thirdAnswer.tabTitle')">
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.google.first')}}</li> <li>{{ $t("faqView.thirdAnswer.google.first") }}</li>
<li> <li>
{{$t('faqView.thirdAnswer.google.second')}} {{ $t("faqView.thirdAnswer.google.second") }}
</li> </li>
<li> <li>
{{$t('faqView.thirdAnswer.google.third')}} {{ $t("faqView.thirdAnswer.google.third") }}
</li> </li>
</ol> </ol>
</AccordionTab> </AccordionTab>
<AccordionTab :header="$t('faqView.thirdAnswer.microsoft_outlook.title')"> <AccordionTab
<p>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.title')}}</p> :header="$t('faqView.thirdAnswer.microsoft_outlook.title')"
>
<p>
{{
$t("faqView.thirdAnswer.microsoft_outlook.outlook_2010.title")
}}
</p>
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.first')}}</li> <li>
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.second')}}</li> {{
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.third')}}</li> $t(
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.fourth')}}</li> "faqView.thirdAnswer.microsoft_outlook.outlook_2010.first",
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2010.fifth')}}</li> )
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.second",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.third",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.fourth",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.fifth",
)
}}
</li>
</ol> </ol>
<p>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.title')}}</p> <p>
{{
$t("faqView.thirdAnswer.microsoft_outlook.outlook_2007.title")
}}
</p>
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.first')}}</li> <li>
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.second')}}</li> {{
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.third')}}</li> $t(
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.fourth')}}</li> "faqView.thirdAnswer.microsoft_outlook.outlook_2007.first",
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.fifth')}}</li> )
<li>{{$t('faqView.thirdAnswer.microsoft_outlook.outlook_2007.sixth')}}</li> }}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.second",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.third",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.fourth",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.fifth",
)
}}
</li>
<li>
{{
$t(
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.sixth",
)
}}
</li>
</ol> </ol>
</AccordionTab> </AccordionTab>
<AccordionTab :header="$t('faqView.thirdAnswer.apple_osx.title')"> <AccordionTab :header="$t('faqView.thirdAnswer.apple_osx.title')">
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.apple_osx.first')}}</li> <li>{{ $t("faqView.thirdAnswer.apple_osx.first") }}</li>
<li>{{$t('faqView.thirdAnswer.apple_osx.second')}}</li> <li>{{ $t("faqView.thirdAnswer.apple_osx.second") }}</li>
<li>{{$t('faqView.thirdAnswer.apple_osx.third')}}</li> <li>{{ $t("faqView.thirdAnswer.apple_osx.third") }}</li>
<li>{{$t('faqView.thirdAnswer.apple_osx.fourth')}}</li> <li>{{ $t("faqView.thirdAnswer.apple_osx.fourth") }}</li>
</ol> </ol>
</AccordionTab> </AccordionTab>
<AccordionTab :header="$t('faqView.thirdAnswer.thunderbird.title')"> <AccordionTab :header="$t('faqView.thirdAnswer.thunderbird.title')">
<ol> <ol>
<li>{{ $t('faqView.thirdAnswer.thunderbird.one') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.one") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.two') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.two") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.three') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.three") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.four') }} </li> <li>{{ $t("faqView.thirdAnswer.thunderbird.four") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.five') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.five") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.six') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.six") }}</li>
<li>{{ $t('faqView.thirdAnswer.thunderbird.seven') }}</li> <li>{{ $t("faqView.thirdAnswer.thunderbird.seven") }}</li>
</ol> </ol>
</AccordionTab> </AccordionTab>
<AccordionTab :header="$t('faqView.thirdAnswer.iphone.title')"> <AccordionTab :header="$t('faqView.thirdAnswer.iphone.title')">
<p>{{$t('faqView.thirdAnswer.iphone.description')}}</p> <p>{{ $t("faqView.thirdAnswer.iphone.description") }}</p>
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.iphone.one')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.one") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.two')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.two") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.three')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.three") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.four')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.four") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.five')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.five") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.six')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.six") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.seven')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.seven") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.eight')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.eight") }}</li>
<li>{{$t('faqView.thirdAnswer.iphone.nine')}}</li> <li>{{ $t("faqView.thirdAnswer.iphone.nine") }}</li>
</ol> </ol>
</AccordionTab> </AccordionTab>
<AccordionTab header="Android"> <AccordionTab header="Android">
<p>{{$t('faqView.thirdAnswer.android.description')}}</p> <p>{{ $t("faqView.thirdAnswer.android.description") }}</p>
</AccordionTab> </AccordionTab>
<AccordionTab header="Windows Phone"> <AccordionTab header="Windows Phone">
<p>{{$t('faqView.thirdAnswer.windows_phone.description')}}</p> <p>{{ $t("faqView.thirdAnswer.windows_phone.description") }}</p>
<ol> <ol>
<li>{{$t('faqView.thirdAnswer.windows_phone.one')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.one") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.two')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.two") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.three')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.three") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.four')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.four") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.five')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.five") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.six')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.six") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.seven')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.seven") }}</li>
<li>{{$t('faqView.thirdAnswer.windows_phone.eight')}}</li> <li>{{ $t("faqView.thirdAnswer.windows_phone.eight") }}</li>
</ol> </ol>
</AccordionTab> </AccordionTab>
</Accordion> </Accordion>
</div> </div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.fourthQuestion')}}</div> <div class="col">{{ $t("faqView.fourthQuestion") }}</div>
<div class="col">{{$t('faqView.fourthAnswer')}}</div> <div class="col">{{ $t("faqView.fourthAnswer") }}</div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.fifthQuestion')}}</div> <div class="col">{{ $t("faqView.fifthQuestion") }}</div>
<div class="col">{{$t('faqView.fifthAnswer')}}</div> <div class="col">{{ $t("faqView.fifthAnswer") }}</div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col my-2">{{$t('faqView.sixthQuestion')}}</div> <div class="col my-2">{{ $t("faqView.sixthQuestion") }}</div>
<div class="col">{{$t('faqView.sixthAnswer')}}</div> <div class="col">{{ $t("faqView.sixthAnswer") }}</div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.seventhQuestion')}}</div> <div class="col">{{ $t("faqView.seventhQuestion") }}</div>
<div class="col">{{$t('faqView.seventhAnswer')}}</div> <div class="col">{{ $t("faqView.seventhAnswer") }}</div>
</div> </div>
<div class="grid my-2"> <div class="grid my-2">
<div class="col">{{$t('faqView.eighthQuestion')}}</div> <div class="col">{{ $t("faqView.eighthQuestion") }}</div>
<div class="col">{{$t('faqView.eighthAnswer')}}</div> <div class="col">{{ $t("faqView.eighthAnswer") }}</div>
</div> </div>
<p> <p>
{{$t('faqView.notFound')}}<br /> {{ $t("faqView.notFound") }}<br />
<a href="/imprint">{{$t('faqView.contact')}}</a> <a href="/imprint">{{ $t("faqView.contact") }}</a>
</p> </p>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {inject} from "vue"; import { inject } from "vue";
import {Module} from "../model/module.ts"; import { Module } from "../model/module.ts";
import {Event} from "../model/event.ts"; import { Event } from "../model/event.ts";
import moment from "moment-timezone"; import moment from "moment-timezone";
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -14,10 +14,10 @@ function formatTimestamp(timestampString: string): string {
const timestamp = moment(timestampString); const timestamp = moment(timestampString);
// Die Zeitzone auf "Europe/Berlin" setzen // Die Zeitzone auf "Europe/Berlin" setzen
const berlinTime = timestamp.tz('Europe/Berlin'); const berlinTime = timestamp.tz("Europe/Berlin");
// Das gewünschte Format für die Ausgabe festlegen // Das gewünschte Format für die Ausgabe festlegen
return berlinTime.format('DD.MM.YYYY HH:mm'); return berlinTime.format("DD.MM.YYYY HH:mm");
} }
function sortModuleEventsByStart(events: Event[]) { function sortModuleEventsByStart(events: Event[]) {
@@ -43,8 +43,14 @@ function sortModuleEventsByStart(events: Event[]) {
<tr> <tr>
<td> <td>
<div class="card"> <div class="card">
<DataTable :value="sortModuleEventsByStart(module.events)" table-style="min-width: 50rem"> <DataTable
<Column field="day" :header="$t('moduleInformation.day')"></Column> :value="sortModuleEventsByStart(module.events)"
table-style="min-width: 50rem"
>
<Column
field="day"
:header="$t('moduleInformation.day')"
></Column>
<Column field="start" :header="$t('moduleInformation.start')"> <Column field="start" :header="$t('moduleInformation.start')">
<template #body="slotProps"> <template #body="slotProps">
{{ formatTimestamp(slotProps.data.start) }} {{ formatTimestamp(slotProps.data.start) }}
@@ -52,12 +58,21 @@ function sortModuleEventsByStart(events: Event[]) {
</Column> </Column>
<Column field="end" :header="$t('moduleInformation.end')"> <Column field="end" :header="$t('moduleInformation.end')">
<template #body="slotProps"> <template #body="slotProps">
{{formatTimestamp( slotProps.data.end) }} {{ formatTimestamp(slotProps.data.end) }}
</template> </template>
</Column> </Column>
<Column field="rooms" :header="$t('moduleInformation.room')"></Column> <Column
<Column field="eventType" :header="$t('moduleInformation.type')"></Column> field="rooms"
<Column field="week" :header="$t('moduleInformation.week')"></Column> :header="$t('moduleInformation.room')"
></Column>
<Column
field="eventType"
:header="$t('moduleInformation.type')"
></Column>
<Column
field="week"
:header="$t('moduleInformation.week')"
></Column>
</DataTable> </DataTable>
</div> </div>
</td> </td>

View File

@@ -19,7 +19,7 @@ const modulesWithSelection: Ref<ModuleWithSelection[]> = ref(
props.modules.map((propModule) => { props.modules.map((propModule) => {
return { return {
module: propModule, module: propModule,
selected: store.hasModule(propModule) selected: store.hasModule(propModule),
}; };
}), }),
); );

View File

@@ -68,6 +68,4 @@ const placeholders = computed(() => [
</Dialog> </Dialog>
</template> </template>
<style scoped> <style scoped></style>
</style>

View File

@@ -125,5 +125,4 @@ async function finalStep() {
</div> </div>
</template> </template>
<style scoped> <style scoped></style>
</style>

View File

@@ -158,5 +158,4 @@ async function finalStep() {
</div> </div>
</template> </template>
<style scoped> <style scoped></style>
</style>

View File

@@ -132,13 +132,13 @@
}, },
"thunderbird": { "thunderbird": {
"title": "Thunderbird", "title": "Thunderbird",
"one" : "Erstelle deinen Kalender und kopiere den Link.", "one": "Erstelle deinen Kalender und kopiere den Link.",
"two" : "Im Menü “Termine und Aufgaben” den Punkt “Kalender” wählen. ", "two": "Im Menü “Termine und Aufgaben” den Punkt “Kalender” wählen. ",
"three" : "Links siehst du die Kalenderübersicht. In diesem Bereich über die rechte Maustaste klicken und im darauf erscheinenden Kontextmenü “Neuer Kalender” anklicken.", "three": "Links siehst du die Kalenderübersicht. In diesem Bereich über die rechte Maustaste klicken und im darauf erscheinenden Kontextmenü “Neuer Kalender” anklicken.",
"four" : "Du hast die Wahl zwischen “Auf meinem Computer” und “Im Netzwerk”. Bitte letzteres wählen und “Fortsetzen” klicken.", "four": "Du hast die Wahl zwischen “Auf meinem Computer” und “Im Netzwerk”. Bitte letzteres wählen und “Fortsetzen” klicken.",
"five" : "Im folgenden Fenster lässt du das “Format” wie es ist (“iCalender”).", "five": "Im folgenden Fenster lässt du das “Format” wie es ist (“iCalender”).",
"six" : "Unter \"Adresse\" den kopierten Kalenderlink einfügen.", "six": "Unter \"Adresse\" den kopierten Kalenderlink einfügen.",
"seven" : "Anschließend kannst du noch einen Namen vergeben und weitere Einstellungen nach Belieben vornehmen." "seven": "Anschließend kannst du noch einen Namen vergeben und weitere Einstellungen nach Belieben vornehmen."
}, },
"iphone": { "iphone": {
"title": "iPhone", "title": "iPhone",

View File

@@ -13,8 +13,10 @@ const moduleStore = defineStore("moduleStore", {
this.modules.delete(module.uuid); this.modules.delete(module.uuid);
}, },
hasModule(module: Module): boolean { hasModule(module: Module): boolean {
return this.modules.has(module.uuid) && return (
(this.modules.get(module.uuid)?.isEqual(module) ?? false); this.modules.has(module.uuid) &&
(this.modules.get(module.uuid)?.isEqual(module) ?? false)
);
}, },
removeAllModules() { removeAllModules() {
this.modules.clear(); this.modules.clear();

View File

@@ -1,18 +1,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import {defineAsyncComponent, ref, Ref} from "vue"; import { defineAsyncComponent, ref, Ref } from "vue";
import {Module} from "../model/module.ts"; import { Module } from "../model/module.ts";
import {fetchAllModules} from "../api/fetchCourse.ts"; import { fetchAllModules } from "../api/fetchCourse.ts";
import moduleStore from "../store/moduleStore.ts"; import moduleStore from "../store/moduleStore.ts";
import {MultiSelectAllChangeEvent} from "primevue/multiselect";
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
import { useDialog } from "primevue/usedialog"; import { useDialog } from "primevue/usedialog";
import router from "../router"; import router from "../router";
import {fetchModule} from "../api/fetchModule.ts"; import { fetchModule } from "../api/fetchModule.ts";
import {useDialog} from "primevue/usedialog";
import {useI18n} from "vue-i18n";
const dialog = useDialog(); const dialog = useDialog();
const { t } = useI18n({ useScope: "global" });
const fetchedModules = async () => { const fetchedModules = async () => {
return await fetchAllModules(); return await fetchAllModules();
@@ -32,7 +28,7 @@ const filters = ref({
prof: { prof: {
value: null, value: null,
matchMode: FilterMatchMode.CONTAINS, matchMode: FilterMatchMode.CONTAINS,
} },
}); });
//const selectedModules: Ref<Module[]> = ref([] as Module[]); //const selectedModules: Ref<Module[]> = ref([] as Module[]);
@@ -148,19 +144,15 @@ function itemsLabelWithNumber(selectedModules: Module[]): string {
:show-gridlines="true" :show-gridlines="true"
:striped-rows="true" :striped-rows="true"
class="w-10" class="w-10"
> >
<Column selection-mode="multiple"> </Column>
<Column
selection-mode="multiple"
>
</Column>
<Column <Column
field="course" field="course"
header="Course" header="Course"
:show-clear-button="false" :show-clear-button="false"
:show-filter-menu="false" :show-filter-menu="false"
> >
<template #filter="{ filterModel, filterCallback }"> <template #filter="{ filterModel, filterCallback }">
<InputText <InputText
v-model="filterModel.value" v-model="filterModel.value"
@@ -175,7 +167,7 @@ function itemsLabelWithNumber(selectedModules: Module[]): string {
header="Name" header="Name"
:show-clear-button="false" :show-clear-button="false"
:show-filter-menu="false" :show-filter-menu="false"
> >
<template #filter="{ filterModel, filterCallback }"> <template #filter="{ filterModel, filterCallback }">
<InputText <InputText
v-model="filterModel.value" v-model="filterModel.value"
@@ -190,7 +182,7 @@ function itemsLabelWithNumber(selectedModules: Module[]): string {
header="Professor" header="Professor"
:show-clear-button="false" :show-clear-button="false"
:show-filter-menu="false" :show-filter-menu="false"
> >
<template #filter="{ filterModel, filterCallback }"> <template #filter="{ filterModel, filterCallback }">
<InputText <InputText
v-model="filterModel.value" v-model="filterModel.value"
@@ -212,14 +204,11 @@ function itemsLabelWithNumber(selectedModules: Module[]): string {
@click.stop="showInfo(slotProps.data)" @click.stop="showInfo(slotProps.data)"
></Button> ></Button>
</template> </template>
</Column> </Column>
<template #footer> <template #footer>
<div class="py-2 px-3"> <div class="py-2 px-3">
<b>{{ store ? store.countModules() : 0 }}</b> <b>{{ store ? store.countModules() : 0 }}</b>
item{{ item{{ (store ? store.countModules() : 0) !== 1 ? "s" : "" }}
(store ? store.countModules() : 0) !== 1 ? "s" : ""
}}
selected. selected.
</div> </div>
</template> </template>
@@ -274,8 +263,7 @@ function itemsLabelWithNumber(selectedModules: Module[]): string {
</div> </div>
</template> </template>
</MultiSelect> </MultiSelect>
--> --></div>
</div>
<div class="flex align-items-center justify-content-center h-4rem m-2"> <div class="flex align-items-center justify-content-center h-4rem m-2">
<Button @click="nextStep()">{{ <Button @click="nextStep()">{{
$t("additionalModules.nextStep") $t("additionalModules.nextStep")

View File

@@ -12,7 +12,7 @@ const { t } = useI18n({ useScope: "global" });
const toast = useToast(); const toast = useToast();
const token: Ref<string> = ref(""); const token: Ref<string> = ref("");
const modules: Ref<Module[]> = ref(moduleStore().modules); const modules: Ref<Map<string, Module>> = ref(moduleStore().modules);
function extractToken(token: string): string { function extractToken(token: string): string {
const tokenRegex = /^[a-z0-9]{15}$/; const tokenRegex = /^[a-z0-9]{15}$/;
@@ -50,7 +50,7 @@ function loadCalendar(): void {
data.forEach((module) => { data.forEach((module) => {
moduleStore().addModule(module); moduleStore().addModule(module);
}); });
modules.value = data; modules.value = moduleStore().modules;
}); });
router.push("/edit-additional-modules"); router.push("/edit-additional-modules");
@@ -77,12 +77,20 @@ function loadCalendar(): void {
<div <div
class="flex align-items-center justify-content-center border-round m-2" class="flex align-items-center justify-content-center border-round m-2"
> >
<InputText v-model="token" type="text" autofocus @keyup.enter="loadCalendar" /> <InputText
v-model="token"
type="text"
autofocus
@keyup.enter="loadCalendar"
/>
</div> </div>
<div <div
class="flex align-items-center justify-content-center border-round m-2" class="flex align-items-center justify-content-center border-round m-2"
> >
<Button :label="$t('editCalendarView.loadCalendar')" @click="loadCalendar" /> <Button
:label="$t('editCalendarView.loadCalendar')"
@click="loadCalendar"
/>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -3,7 +3,7 @@
<template> <template>
<div class="flex align-items-center justify-content-center flex-column"> <div class="flex align-items-center justify-content-center flex-column">
<div class="flex align-items-center justify-content-center h-4rem mt-2"> <div class="flex align-items-center justify-content-center h-4rem mt-2">
<h3 class="text-4xl">{{$t("imprint")}}</h3> <h3 class="text-4xl">{{ $t("imprint") }}</h3>
</div> </div>
<div class="flex flex-column col-7"> <div class="flex flex-column col-7">
<p>nach dem Telemediengesetz (TMG) der Bundesrepublik Deutschland.</p> <p>nach dem Telemediengesetz (TMG) der Bundesrepublik Deutschland.</p>

View File

@@ -3,7 +3,7 @@
<template> <template>
<div class="flex align-items-center justify-content-center flex-column"> <div class="flex align-items-center justify-content-center flex-column">
<div class="flex align-items-center justify-content-center h-4rem mt-2"> <div class="flex align-items-center justify-content-center h-4rem mt-2">
<h3 class="text-4xl">{{$t("privacy")}}</h3> <h3 class="text-4xl">{{ $t("privacy") }}</h3>
</div> </div>
<div class="flex flex-column col-7"> <div class="flex flex-column col-7">
<h1>Datenschutzerklärung</h1> <h1>Datenschutzerklärung</h1>