Merge branch '5-room-finder-for-each-week' of ssh://git.imn.htwk-leipzig.de:2244/ekresse/htwkalender into 5-room-finder-for-each-week

This commit is contained in:
survellow
2024-01-25 22:43:50 +01:00
3 changed files with 15 additions and 34 deletions

View File

@@ -9,43 +9,44 @@ const items = computed(() => [
{ {
label: t("createCalendar"), label: t("createCalendar"),
icon: "pi pi-fw pi-plus", icon: "pi pi-fw pi-plus",
route: "/", route: "/"
}, },
{ {
label: t("editCalendar"), label: t("editCalendar"),
icon: "pi pi-fw pi-pencil", icon: "pi pi-fw pi-pencil",
route: "/edit", route: "/edit"
}, },
{ {
label: t("rooms"), label: t("rooms"),
icon: "pi pi-fw pi-angle-down", icon: "pi pi-fw pi-angle-down",
info: "rooms",
items: [ items: [
{ {
label: t("roomFinderPage.roomSchedule"), label: t("roomFinderPage.roomSchedule"),
icon: "pi pi-fw pi-hourglass", icon: "pi pi-fw pi-hourglass",
route: "/rooms", route: "/rooms/occupancy"
}, },
{ {
label: t("freeRooms.freeRooms"), label: t("freeRooms.freeRooms"),
icon: "pi pi-fw pi-calendar", icon: "pi pi-fw pi-calendar",
route: "/rooms/free", route: "/rooms/free"
}, },
], ],
}, },
{ {
label: t("faq"), label: t("faq"),
icon: "pi pi-fw pi-book", icon: "pi pi-fw pi-book",
route: "/faq", route: "/faq"
}, },
{ {
label: t("imprint"), label: t("imprint"),
icon: "pi pi-fw pi-id-card", icon: "pi pi-fw pi-id-card",
route: "/imprint", route: "/imprint"
}, },
{ {
label: t("privacy"), label: t("privacy"),
icon: "pi pi-fw pi-exclamation-triangle", icon: "pi pi-fw pi-exclamation-triangle",
route: "/privacy-policy", route: "/privacy-policy"
}, },
]); ]);
</script> </script>
@@ -59,7 +60,7 @@ const items = computed(() => [
</Button> </Button>
</router-link> </router-link>
</template> </template>
<template #item="{ item, props, root }"> <template #item="{ item, props }">
<router-link <router-link
v-if="item.route" v-if="item.route"
v-slot="{ navigate }" v-slot="{ navigate }"
@@ -68,7 +69,7 @@ const items = computed(() => [
> >
<a <a
:class=" :class="
item.route === $route.path $route.path == item.route
? 'flex align-items-center active' ? 'flex align-items-center active'
: 'flex align-items-center' : 'flex align-items-center'
" "
@@ -77,22 +78,12 @@ const items = computed(() => [
> >
<span :class="item.icon" /> <span :class="item.icon" />
<span class="ml-2 p-menuitem-label">{{ item.label }}</span> <span class="ml-2 p-menuitem-label">{{ item.label }}</span>
<Badge
v-if="item.badge"
:class="{ 'ml-auto': !root, 'ml-2': root }"
:value="item.badge"
/>
<span
v-if="item.shortcut"
class="ml-auto border-1 surface-border border-round surface-100 text-xs p-1"
>{{ item.shortcut }}</span
>
</a> </a>
</router-link> </router-link>
<a <a
v-else v-else
:class=" :class="
item.route === $route.path $route.path.includes(item.info)
? 'flex align-items-center active' ? 'flex align-items-center active'
: 'flex align-items-center' : 'flex align-items-center'
" "
@@ -100,16 +91,6 @@ const items = computed(() => [
> >
<span :class="item.icon" /> <span :class="item.icon" />
<span class="ml-2 p-menuitem-label">{{ item.label }}</span> <span class="ml-2 p-menuitem-label">{{ item.label }}</span>
<Badge
v-if="item.badge"
:class="{ 'ml-auto': !root, 'ml-2': root }"
:value="item.badge"
/>
<span
v-if="item.shortcut"
class="ml-auto border-1 surface-border border-round surface-100 text-xs p-1"
>{{ item.shortcut }}</span
>
</a> </a>
</template> </template>
<template #end> <template #end>

View File

@@ -25,7 +25,7 @@ const router = createRouter({
component: CourseSelection, component: CourseSelection,
}, },
{ {
path: "/rooms", path: "/rooms/occupancy",
name: "room-schedule", name: "room-schedule",
component: RoomFinder, component: RoomFinder,
}, },

View File

@@ -20,7 +20,7 @@
:empty-message="$t('roomFinderPage.noRoomsAvailable')" :empty-message="$t('roomFinderPage.noRoomsAvailable')"
date-format="dd.mm.yy" date-format="dd.mm.yy"
panel-class="min-w-min" panel-class="min-w-min"
touchUI touch-u-i
/> />
<div class="break"/> <div class="break"/>
<Calendar <Calendar
@@ -34,7 +34,7 @@
date-format="HH:mm" date-format="HH:mm"
:class="[{'p-invalid':isLater}, flexSpecs]" :class="[{'p-invalid':isLater}, flexSpecs]"
panel-class="min-w-min" panel-class="min-w-min"
touchUI touch-u-i
/> />
<Calendar <Calendar
v-model="end" v-model="end"
@@ -47,7 +47,7 @@
date-format="HH:mm" date-format="HH:mm"
:class="[{'p-invalid':isLater}, flexSpecs]" :class="[{'p-invalid':isLater}, flexSpecs]"
panel-class="min-w-min" panel-class="min-w-min"
touchUI touch-u-i
/> />
<div <div
class="flex-grow-1 relative mb-2" class="flex-grow-1 relative mb-2"