Merge pull request #105 from HTWK-Leipzig/92-frontend-changes

92 frontend changes
This commit is contained in:
masterElmar
2023-12-07 23:33:56 +01:00
committed by GitHub
18 changed files with 371 additions and 237 deletions

View File

@@ -3,15 +3,25 @@ import MenuBar from "./components/MenuBar.vue";
import {RouteRecordName, RouterView} from "vue-router"; import {RouteRecordName, RouterView} from "vue-router";
import CalendarPreview from "./components/CalendarPreview.vue"; import CalendarPreview from "./components/CalendarPreview.vue";
import moduleStore from "./store/moduleStore.ts"; import moduleStore from "./store/moduleStore.ts";
import { provide, ref } from "vue";
const disabledPages = ["room-finder", "faq", "imprint", "privacy-policy", "edit", "edit-calendar"]; const disabledPages = ["room-finder", "faq", "imprint", "privacy-policy", "edit", "edit-calendar"];
const store = moduleStore(); const store = moduleStore();
const mobilePage = ref(true);
provide("mobilePage", mobilePage);
const isDisabled = (routeName: RouteRecordName | null | undefined) => { const isDisabled = (routeName: RouteRecordName | null | undefined) => {
return !disabledPages.includes(routeName as string) && store.modules.size > 0 return !disabledPages.includes(routeName as string) && store.modules.size > 0
}; };
const updateMobile = () => {
mobilePage.value = window.innerWidth <= 992;
};
updateMobile();
window.addEventListener("resize", updateMobile);
</script> </script>
<template> <template>

View File

@@ -80,9 +80,9 @@ const actions = computed(() => [
<template> <template>
<div class="flex flex-column"> <div class="flex flex-column mt-8">
<div class="flex align-items-center justify-content-center h-4rem m-2"> <div class="flex align-items-center justify-content-center m-2">
<h2> <h2 class="text-base md:text-2xl">
{{ getLink() }} {{ getLink() }}
</h2> </h2>
</div> </div>

View File

@@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Ref, computed, ref } from "vue"; import { Ref, computed, inject, ref } from "vue";
import moduleStore from "../store/moduleStore"; import moduleStore from "../store/moduleStore";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
const dialogVisible: Ref<boolean> = ref(false); const dialogVisible: Ref<boolean> = ref(false);
const mobilePage = ref(true); const mobilePage = inject("mobilePage") as Ref<boolean>;
const { t } = useI18n({ useScope: "global" }); const { t } = useI18n({ useScope: "global" });
const store = moduleStore(); const store = moduleStore();
@@ -26,13 +26,6 @@ const columns = computed(() => [
{ field: "Module", header: t("calendarPreview.module") }, { field: "Module", header: t("calendarPreview.module") },
]); ]);
const updateMobile = () => {
mobilePage.value = window.innerWidth <= 992;
};
updateMobile();
window.addEventListener("resize", updateMobile);
</script> </script>
<template> <template>
@@ -77,6 +70,7 @@ window.addEventListener("resize", updateMobile);
icon="pi pi-calendar" icon="pi pi-calendar"
:label="$t('calendarPreview.preview')" :label="$t('calendarPreview.preview')"
class="p-button-rounded p-button-primary" class="p-button-rounded p-button-primary"
raised
@click="dialogVisible = true" @click="dialogVisible = true"
/> />
</template> </template>

View File

@@ -2,7 +2,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 m-2"> <div class="flex align-items-center justify-content-center m-2">
<h1>{{ $t("faqView.headline") }}</h1> <h1>{{ $t("faqView.headline") }}</h1>
</div> </div>
@@ -216,4 +216,13 @@
</div> </div>
</template> </template>
<style scoped></style> <style scoped>
.grid > .col {
flex-basis: 15rem;
}
.grid > .col:first-child {
font-weight: bold;
}
</style>

View File

@@ -1,12 +1,16 @@
<script lang="ts" setup> <script lang="ts" setup>
import { inject } from "vue"; import { Ref, 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";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const dialogRef = inject("dialogRef") as any; const dialogRef = inject("dialogRef") as any;
const module = dialogRef.value.data.module as Module; const module = dialogRef.value.data.module as Module;
const mobilePage = inject("mobilePage") as Ref<boolean>;
// formats 2023-10-26 11:45:00.000Z to DD-MM-YYYY HH:MM // formats 2023-10-26 11:45:00.000Z to DD-MM-YYYY HH:MM
function formatTimestamp(timestampString: string): string { function formatTimestamp(timestampString: string): string {
@@ -25,6 +29,12 @@ function sortModuleEventsByStart(events: Event[]) {
return a.start.localeCompare(b.start); return a.start.localeCompare(b.start);
}); });
} }
function formatWeekday(weekday: string) {
const template = "moduleInformation.weekday." + weekday;
const translation = t(template);
return translation !== template ? translation : weekday;
}
</script> </script>
<template> <template>
@@ -44,8 +54,10 @@ function sortModuleEventsByStart(events: Event[]) {
<td> <td>
<div class="card"> <div class="card">
<DataTable <DataTable
v-if="!mobilePage"
:value="sortModuleEventsByStart(module.events)" :value="sortModuleEventsByStart(module.events)"
table-style="min-width: 50rem" table-style="min-width: 50rem"
:size="mobilePage ? 'small' : 'large'"
> >
<Column <Column
field="day" field="day"
@@ -74,6 +86,56 @@ function sortModuleEventsByStart(events: Event[]) {
:header="$t('moduleInformation.week')" :header="$t('moduleInformation.week')"
></Column> ></Column>
</DataTable> </DataTable>
<DataView
v-else
:value="sortModuleEventsByStart(module.events)"
:data-key="module.name"
layout="grid"
>
<template #grid="slotProps">
<div class="col-12 sm:col-6 p-1">
<Card class="border-2 surface-border border-round surface-card">
<template #title>
<Badge
:value="slotProps.data.eventType"
:severity="slotProps.data.eventType === 'V' ? 'success' : 'warning'"
class="flex-shrink-0 flex-grow-0"
/>
</template>
<template #content>
<div class="flex flex-row gap-4 flex-wrap">
<div class="flex flex-column">
<div class="mr-2">{{ formatWeekday(slotProps.data.day) }}</div>
<div class="mr-2">{{ $t("moduleInformation.nthWeek", {count: slotProps.data.week}) }}</div>
</div>
<div class="flex flex-column">
<table>
<tr>
<td class="mr-2">
<b>{{ $t("moduleInformation.start") }}:</b>
</td>
<td>{{ formatTimestamp(slotProps.data.start) }}</td>
</tr>
<tr>
<td class="mr-2">
<b>{{ $t("moduleInformation.end") }}:</b>
</td>
<td>{{ formatTimestamp(slotProps.data.end) }}</td>
</tr>
<tr>
<td class="mr-2">
<b>{{ $t("moduleInformation.room") }}:</b>
</td>
<td>{{ slotProps.data.rooms }}</td>
</tr>
</table>
</div>
</div>
</template>
</Card>
</div>
</template>
</DataView>
</div> </div>
</td> </td>
</tr> </tr>

View File

@@ -10,9 +10,14 @@ const props = defineProps({
type: Array as PropType<Module[]>, type: Array as PropType<Module[]>,
required: true, required: true,
}, },
selectedCourse: {
type: String as PropType<string>,
required: true,
},
}); });
const modules : ComputedRef<Module[]> = computed(() => props.modules); const modules : ComputedRef<Module[]> = computed(() => props.modules);
const selectedCourse : ComputedRef<string> = computed(() => props.selectedCourse);
store.modules.clear(); store.modules.clear();
@@ -54,22 +59,22 @@ function nextStep() {
:value="modules" :value="modules"
data-key="uuid" data-key="uuid"
:class=" :class="
[modules.length === 0? [selectedCourse === ''?
['opacity-0', 'pointer-events-none'] : ['opacity-0', 'pointer-events-none'] :
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out'] ['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
, ,
'w-full']" 'w-full']"
> >
<template #header> <template #header>
<div class="flex justify-content-between align-items-center flex-wrap"> <div class="flex justify-content-between align-items-center flex-wrap md:mx-4">
<h3> <h3>
{{ $t("moduleSelection.modules") }} - {{ $t("moduleSelection.modules") }} -
{{ store.countModules() }} {{ store.countModules() }}
</h3> </h3>
<div class="flex flex-1 align-items-center justify-content-end white-space-nowrap"> <div class="flex align-items-center justify-content-end white-space-nowrap">
{{ allSelected ? $t('moduleSelection.deselectAll') : $t('moduleSelection.selectAll')}} <p>{{ allSelected ? $t('moduleSelection.deselectAll') : $t('moduleSelection.selectAll')}}</p>
<InputSwitch <InputSwitch
class="mx-4" class="mx-2"
:disabled="modules.length === 0" :disabled="modules.length === 0"
:model-value="allSelected" :model-value="allSelected"
@update:model-value="toggleAllModules()" @update:model-value="toggleAllModules()"
@@ -84,7 +89,7 @@ function nextStep() {
</template> </template>
<template #list="slotProps"> <template #list="slotProps">
<div class="col-12"> <div class="col-12">
<div class="flex flex-column sm:flex-row justify-content-between align-items-center flex-1 column-gap-4 mx-2"> <div class="flex flex-column sm:flex-row justify-content-between align-items-center flex-1 column-gap-4 mx-2 md:mx-4">
<p class="text-lg flex-1 align-self-stretch">{{ slotProps.data.name }}</p> <p class="text-lg flex-1 align-self-stretch">{{ slotProps.data.name }}</p>
<ToggleButton <ToggleButton
class="w-9rem align-self-end my-2" class="w-9rem align-self-end my-2"

View File

@@ -32,7 +32,7 @@ const placeholders = computed(() => [
<template> <template>
<Button <Button
icon="pi pi-info" icon="pi pi-info"
class="m-2 small-button" class="m-2 small-button flex-shrink-0"
severity="help" severity="help"
rounded rounded
outlined outlined
@@ -42,6 +42,7 @@ const placeholders = computed(() => [
/> />
<Dialog <Dialog
v-model:visible="helpVisible" v-model:visible="helpVisible"
class="w-full md:w-auto"
:header="$t('moduleTemplateDialog.moduleConfiguration')" :header="$t('moduleTemplateDialog.moduleConfiguration')"
> >
<p> <p>

View File

@@ -3,7 +3,7 @@ import moduleStore from "../store/moduleStore.ts";
import { createIndividualFeed } from "../api/createFeed.ts"; import { createIndividualFeed } from "../api/createFeed.ts";
import router from "../router"; import router from "../router";
import tokenStore from "../store/tokenStore.ts"; import tokenStore from "../store/tokenStore.ts";
import { computed, ref } from "vue"; import { Ref, computed, inject, ref } from "vue";
import ModuleTemplateDialog from "./ModuleTemplateDialog.vue"; import ModuleTemplateDialog from "./ModuleTemplateDialog.vue";
import { onlyWhitespace } from "../helpers/strings.ts"; import { onlyWhitespace } from "../helpers/strings.ts";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@@ -18,6 +18,7 @@ const tableData = ref(
}; };
}), }),
); );
const mobilePage = inject("mobilePage") as Ref<boolean>;
const columns = computed(() => [ const columns = computed(() => [
{ field: "Course", header: t("moduleInformation.course") }, { field: "Course", header: t("moduleInformation.course") },
@@ -33,23 +34,25 @@ async function finalStep() {
</script> </script>
<template> <template>
<div class="flex flex-column"> <div class="flex flex-column align-items-center mb-7">
<div class="flex align-items-center justify-content-center h-4rem m-2"> <div class="flex align-items-center justify-content-center m-2 gap-2">
<h3>{{ $t("renameModules.subTitle") }}</h3> <h3>{{ $t("renameModules.subTitle") }}</h3>
<ModuleTemplateDialog /> <ModuleTemplateDialog class=""/>
</div> </div>
<div class="card flex align-items-center justify-content-center m-2"> <div class="w-full lg:w-8 flex flex-column">
<div class="card flex align-items-center justify-content-center my-2">
<DataTable <DataTable
:value="tableData" :value="tableData"
edit-mode="cell" edit-mode="cell"
table-class="editable-cells-table" table-class="editable-cells-table"
responsive-layout="scroll" responsive-layout="scroll"
:size="mobilePage ? 'small' : 'large'"
class="w-full"
> >
<template #header> <template #header>
<div class="flex align-items-center justify-content-end"> <div class="flex align-items-center justify-content-end flex-wrap gap-2 px-2">
{{ $t("renameModules.enableAllNotifications") }} {{ $t("renameModules.enableAllNotifications") }}
<InputSwitch <InputSwitch
class="mx-4"
:model-value=" :model-value="
tableData.reduce( tableData.reduce(
(acc, curr) => acc && curr.Module.reminder, (acc, curr) => acc && curr.Module.reminder,
@@ -80,7 +83,7 @@ async function finalStep() {
</template> </template>
<template v-else-if="field === 'Reminder'"> <template v-else-if="field === 'Reminder'">
<Button <Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'" icon="pi pi-bell"
:severity="data.Module.reminder ? 'warning' : 'secondary'" :severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded rounded
outlined outlined
@@ -103,7 +106,7 @@ async function finalStep() {
</template> </template>
<template v-else-if="field === 'Reminder'"> <template v-else-if="field === 'Reminder'">
<Button <Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'" icon="pi pi-bell"
:severity="data.Module.reminder ? 'warning' : 'secondary'" :severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded rounded
outlined outlined
@@ -119,8 +122,13 @@ async function finalStep() {
</DataTable> </DataTable>
</div> </div>
<div class="flex align-items-center justify-content-center h-4rem m-2"> <Button
<Button @click="finalStep()">{{ $t("renameModules.nextStep") }}</Button> :disabled="store.isEmpty()"
class="col-12 md:col-4 mb-3 align-self-end"
@click="finalStep()"
icon="pi pi-save"
:label="$t('renameModules.nextStep')"
/>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, Ref, ref } from "vue"; import { computed, inject, Ref, ref } from "vue";
import { Module } from "../../model/module.ts"; import { Module } from "../../model/module.ts";
import moduleStore from "../../store/moduleStore"; import moduleStore from "../../store/moduleStore";
import { fetchAllModules } from "../../api/fetchCourse.ts"; import { fetchAllModules } from "../../api/fetchCourse.ts";
@@ -25,6 +25,7 @@ const tableData = computed(() =>
}; };
}), }),
); );
const mobilePage = inject("mobilePage") as Ref<boolean>;
const columns = computed(() => [ const columns = computed(() => [
{ field: "Course", header: t("moduleInformation.course") }, { field: "Course", header: t("moduleInformation.course") },
@@ -82,20 +83,22 @@ async function deleteFeed() {
</script> </script>
<template> <template>
<div class="flex flex-column card-container lg:mx-8 mt-2"> <div class="flex flex-column align-items-center mb-7">
<div class="flex align-items-center justify-content-center h-4rem m-2"> <div class="flex align-items-center justify-content-center m-2 gap-2">
<h3>{{ $t("renameModules.subTitle") }}</h3> <h3>{{ $t("renameModules.subTitle") }}</h3>
<ModuleTemplateDialog /> <ModuleTemplateDialog />
</div> </div>
<div class="w-full lg:w-8 flex flex-column">
<div <div
class="card flex align-items-center justify-content-center border-round m-2" class="card flex align-items-center justify-content-center my-2"
> >
<DataTable <DataTable
:value="tableData" :value="tableData"
edit-mode="cell" edit-mode="cell"
table-class="editable-cells-table" table-class="editable-cells-table"
responsive-layout="scroll" responsive-layout="scroll"
class="w-full lg:w-8" :size="mobilePage ? 'small' : 'large'"
class="w-full"
> >
<template #header> <template #header>
<div class="flex align-items-center justify-content-end"> <div class="flex align-items-center justify-content-end">
@@ -132,7 +135,7 @@ async function deleteFeed() {
</template> </template>
<template v-else-if="field === 'Reminder'"> <template v-else-if="field === 'Reminder'">
<Button <Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'" icon="pi pi-bell"
:severity="data.Module.reminder ? 'warning' : 'secondary'" :severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded rounded
outlined outlined
@@ -155,7 +158,7 @@ async function deleteFeed() {
</template> </template>
<template v-else-if="field === 'Reminder'"> <template v-else-if="field === 'Reminder'">
<Button <Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'" icon="pi pi-bell"
:severity="data.Module.reminder ? 'warning' : 'secondary'" :severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded rounded
outlined outlined
@@ -193,6 +196,7 @@ async function deleteFeed() {
</DataTable> </DataTable>
</div> </div>
</div> </div>
</div>
<div class="card flex justify-content-center"> <div class="card flex justify-content-center">
<Dialog v-model:visible="visible" modal header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }"> <Dialog v-model:visible="visible" modal header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }">
<template #header> <template #header>

View File

@@ -44,13 +44,23 @@
"end": "Ende", "end": "Ende",
"room": "Raum", "room": "Raum",
"type": "Art", "type": "Art",
"week": "Woche" "week": "Woche",
"nthWeek": "{count}. Woche",
"weekday": {
"Montag": "Montag",
"Dienstag": "Dienstag",
"Mittwoch": "Mittwoch",
"Donnerstag": "Donnerstag",
"Freitag": "Freitag",
"Samstag": "Samstag",
"Sonntag": "Sonntag"
}
}, },
"editCalendarView": { "editCalendarView": {
"error": "Fehler", "error": "Fehler",
"invalidToken": "Ungültiger Token", "invalidToken": "Ungültiger Token",
"headline": "Bearbeite deinen HTWKalender", "headline": "Bearbeite deinen HTWKalender",
"subTitle": "Füge deinen Link oder Token ein um den Kalender zu bearbeiten", "subTitle": "Füge deinen Link oder Token ein, um den Kalender zu bearbeiten.",
"loadCalendar": "Kalender laden", "loadCalendar": "Kalender laden",
"noCalendarFound": "Keinen Kalender gefunden", "noCalendarFound": "Keinen Kalender gefunden",
"save": "Speichern", "save": "Speichern",

View File

@@ -44,7 +44,17 @@
"end": "end", "end": "end",
"room": "room", "room": "room",
"type": "type", "type": "type",
"week": "week" "week": "week",
"nthWeek": "week {count}",
"weekday": {
"Montag": "monday",
"Dienstag": "tuesday",
"Mittwoch": "wednesday",
"Donnerstag": "thursday",
"Freitag": "friday",
"Samstag": "saturday",
"Sonntag": "sunday"
}
}, },
"editCalendarView": { "editCalendarView": {
"error": "error", "error": "error",

View File

@@ -2,6 +2,7 @@ import { createApp } from "vue";
import "./style.css"; import "./style.css";
import App from "./App.vue"; import App from "./App.vue";
import PrimeVue from "primevue/config"; import PrimeVue from "primevue/config";
import Badge from "primevue/badge";
import Button from "primevue/button"; import Button from "primevue/button";
import Dropdown from "primevue/dropdown"; import Dropdown from "primevue/dropdown";
import Menu from "primevue/menu"; import Menu from "primevue/menu";
@@ -43,6 +44,7 @@ app.use(pinia);
app.use(DialogService); app.use(DialogService);
i18n.setup(); i18n.setup();
app.use(i18n.vueI18n); app.use(i18n.vueI18n);
app.component("Badge", Badge);
app.component("Button", Button); app.component("Button", Button);
app.component("Menu", Menu); app.component("Menu", Menu);
app.component("Menubar", Menubar); app.component("Menubar", Menubar);

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineAsyncComponent, ref, Ref} from "vue"; import { defineAsyncComponent, inject, 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";
@@ -22,6 +22,7 @@ if (store.isEmpty()) {
router.replace("/"); router.replace("/");
} }
const mobilePage = inject("mobilePage") as Ref<boolean>;
const modules: Ref<Module[]> = ref([]); const modules: Ref<Module[]> = ref([]);
const filters = ref({ const filters = ref({
course: { course: {
@@ -58,13 +59,14 @@ async function showInfo(module: Module) {
module = data; module = data;
}); });
dialog.open(ModuleInformation, { dialog.open(ModuleInformation, {
class: "w-full m-0",
props: { props: {
style: { style: {
width: "50vw", width: "80vw",
}, },
breakpoints: { breakpoints: {
"960px": "75vw", "992px": "100vw",
"640px": "90vw", "640px": "100vw",
}, },
modal: true, modal: true,
}, },
@@ -85,7 +87,7 @@ function unselectModule(event: DataTableRowUnselectEvent) {
</script> </script>
<template> <template>
<div class="flex flex-column align-items-center w-full"> <div class="flex flex-column align-items-center w-full mb-7">
<div class="flex align-items-center justify-content-center m-2"> <div class="flex align-items-center justify-content-center m-2">
<h3> <h3>
{{ $t("additionalModules.subTitle") }} {{ $t("additionalModules.subTitle") }}
@@ -94,6 +96,7 @@ function unselectModule(event: DataTableRowUnselectEvent) {
<div class="m-2 lg:w-10 w-full"> <div class="m-2 lg:w-10 w-full">
<DynamicDialog /> <DynamicDialog />
<DataTable <DataTable
id="dt-responsive-table"
v-model:filters="filters" v-model:filters="filters"
:selection="store.getAllModules()" :selection="store.getAllModules()"
:value="modules" :value="modules"
@@ -116,6 +119,7 @@ function unselectModule(event: DataTableRowUnselectEvent) {
:show-gridlines="true" :show-gridlines="true"
:striped-rows="true" :striped-rows="true"
:select-all="false" :select-all="false"
:size="mobilePage ? 'small' : 'large'"
@row-select="selectModule" @row-select="selectModule"
@row-unselect="unselectModule" @row-unselect="unselectModule"
> >
@@ -187,7 +191,7 @@ function unselectModule(event: DataTableRowUnselectEvent) {
<Button <Button
:disabled="store.isEmpty()" :disabled="store.isEmpty()"
@click="nextStep()" @click="nextStep()"
class="md:col-4 justify-content-center mb-3 align-self-end" class="col-12 md:col-4 mb-3 align-self-end"
icon="pi pi-arrow-right" icon="pi pi-arrow-right"
:label="$t('additionalModules.nextStep')" :label="$t('additionalModules.nextStep')"
/> />

View File

@@ -54,7 +54,7 @@ async function getModules() {
<template> <template>
<div <div
class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0" class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
:class="{'md:mt-8': modules.length === 0}" :class="{'md:mt-8': selectedCourse.name === ''}"
> >
<div class="flex align-items-center justify-content-center gap-2 mx-2"> <div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl"> <h3 class="text-4xl">
@@ -95,6 +95,7 @@ async function getModules() {
</div> </div>
<ModuleSelection <ModuleSelection
:modules="modules" :modules="modules"
:selected-course="selectedCourse.name"
class="lg:w-8" class="lg:w-8"
/> />
</div> </div>

View File

@@ -66,7 +66,7 @@ function loadCalendar(): void {
</script> </script>
<template> <template>
<div class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out md:mt-8"> <div class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out md:mt-8 mb-7">
<div class="flex align-items-center justify-content-center gap-2 mx-2"> <div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl"> <h3 class="text-4xl">
{{ $t("editCalendarView.headline") }} {{ $t("editCalendarView.headline") }}

View File

@@ -2,8 +2,8 @@
<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 mt-2">
<h3 class="text-4xl">{{ $t("imprint") }}</h3> <h1>{{ $t("imprint") }}</h1>
</div> </div>
<div class="flex flex-column md:col-7"> <div class="flex flex-column md:col-7">
<p>nach dem Telemediengesetz (TMG) der Bundesrepublik Deutschland.</p> <p>nach dem Telemediengesetz (TMG) der Bundesrepublik Deutschland.</p>

View File

@@ -2,8 +2,8 @@
<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 mt-2">
<h3 class="text-4xl">{{ $t("privacy") }}</h3> <h1>{{ $t("privacy") }}</h1>
</div> </div>
<div class="flex flex-column md:col-7"> <div class="flex flex-column md:col-7">
<h1>Datenschutzerklärung</h1> <h1>Datenschutzerklärung</h1>

View File

@@ -19,26 +19,31 @@ rooms().then(
</script> </script>
<template> <template>
<div class="flex flex-column"> <div
<div class="flex align-items-center justify-content-center h-4rem m-2"> class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
<h3 class="text-4xl">{{ $t("roomFinderPage.headline") }}</h3> :class="{'md:mt-8': selectedRoom.name === ''}"
>
<div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl">
{{ $t("roomFinderPage.headline") }}
</h3>
<i <i
class="pi pi-search vertical-align-baseline ml-3" class="pi pi-search"
style="font-size: 2rem" style="font-size: 2rem"
></i> ></i>
</div> </div>
<div <div
class="flex align-items-center justify-content-center h-4rem border-round m-2" class="flex justify-content-center"
> >
<h5 class="text-2xl">{{ $t("roomFinderPage.detail") }}</h5> <h5 class="text-2xl m-2">{{ $t("roomFinderPage.detail") }}</h5>
</div> </div>
<div <div
class="flex align-items-center justify-content-center border-round m-2" class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8"
> >
<Dropdown <Dropdown
v-model="selectedRoom" v-model="selectedRoom"
:options="roomsList" :options="roomsList"
class="w-full md:w-25rem mx-2" class="flex-1 m-0"
filter filter
option-label="name" option-label="name"
:placeholder="$t('roomFinderPage.dropDownSelect')" :placeholder="$t('roomFinderPage.dropDownSelect')"
@@ -46,8 +51,17 @@ rooms().then(
:auto-filter-focus="true" :auto-filter-focus="true"
/> />
</div> </div>
<div class="m-6"> <div
<RoomOccupation :room="selectedRoom.name" /> :class="
[selectedRoom.name === ''?
['opacity-0', 'pointer-events-none'] :
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
,
'w-full', 'lg:w-8']"
>
<RoomOccupation
:room="selectedRoom.name"
/>
</div> </div>
</div> </div>
</template> </template>