mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2026-01-19 20:22:25 +01:00
115 refactor dynamic page component
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Ref, ref } from "vue";
|
||||
import { fetchRoom } from "../api/fetchRoom.ts";
|
||||
import DynamicPage from "./DynamicPage.vue";
|
||||
import RoomOccupation from "../components/RoomOccupation.vue";
|
||||
|
||||
const rooms = async () => {
|
||||
@@ -19,27 +20,13 @@ rooms().then(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
|
||||
:class="{'md:mt-8': selectedRoom.name === ''}"
|
||||
<DynamicPage
|
||||
:hideContent="selectedRoom.name === ''"
|
||||
:headline="$t('roomFinderPage.headline')"
|
||||
:subTitle="$t('roomFinderPage.detail')"
|
||||
icon="pi pi-search"
|
||||
>
|
||||
<div class="flex align-items-center justify-content-center gap-2 mx-2">
|
||||
<h3 class="text-4xl">
|
||||
{{ $t("roomFinderPage.headline") }}
|
||||
</h3>
|
||||
<i
|
||||
class="pi pi-search"
|
||||
style="font-size: 2rem"
|
||||
></i>
|
||||
</div>
|
||||
<div
|
||||
class="flex justify-content-center"
|
||||
>
|
||||
<h5 class="text-2xl m-2">{{ $t("roomFinderPage.detail") }}</h5>
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8"
|
||||
>
|
||||
<template #selection>
|
||||
<Dropdown
|
||||
v-model="selectedRoom"
|
||||
:options="roomsList"
|
||||
@@ -50,18 +37,11 @@ rooms().then(
|
||||
:empty-message="$t('roomFinderPage.noRoomsAvailable')"
|
||||
:auto-filter-focus="true"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
:class="
|
||||
[selectedRoom.name === ''?
|
||||
['opacity-0', 'pointer-events-none', 'h-1rem', 'overflow-hidden'] :
|
||||
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
|
||||
,
|
||||
'w-full', 'lg:w-8']"
|
||||
>
|
||||
</template>
|
||||
<template #content>
|
||||
<RoomOccupation
|
||||
:room="selectedRoom.name"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</DynamicPage>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user