mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-24 21:39:14 +02:00
feat:#30 added linkout to room finder
This commit is contained in:
@@ -33,7 +33,8 @@
|
|||||||
"searchByRoom": "Suche nach Räumen",
|
"searchByRoom": "Suche nach Räumen",
|
||||||
"pleaseSelectDate": "Bitte wähle ein Datum aus",
|
"pleaseSelectDate": "Bitte wähle ein Datum aus",
|
||||||
"room": "Raum",
|
"room": "Raum",
|
||||||
"search": "Suchen"
|
"search": "Suchen",
|
||||||
|
"viewOccupancy": "Belegung anzeigen"
|
||||||
},
|
},
|
||||||
"moduleSelection": {
|
"moduleSelection": {
|
||||||
"selectAll": "Alle anwählen",
|
"selectAll": "Alle anwählen",
|
||||||
|
@@ -33,7 +33,8 @@
|
|||||||
"searchByRoom": "search by room",
|
"searchByRoom": "search by room",
|
||||||
"pleaseSelectDate": "please select a date",
|
"pleaseSelectDate": "please select a date",
|
||||||
"room": "room",
|
"room": "room",
|
||||||
"search": "search"
|
"search": "search",
|
||||||
|
"viewOccupancy": "View Occupancy"
|
||||||
},
|
},
|
||||||
"moduleSelection": {
|
"moduleSelection": {
|
||||||
"selectAll": "select all",
|
"selectAll": "select all",
|
||||||
|
@@ -110,6 +110,17 @@
|
|||||||
@input="filterCallback()"
|
@input="filterCallback()"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body="slotProps">
|
||||||
|
<div class="flex justify-content-between flex-wrap">
|
||||||
|
<div class="align-self-center">{{ slotProps.data.room }}</div>
|
||||||
|
<Button
|
||||||
|
:label="$t('freeRooms.viewOccupancy')"
|
||||||
|
icon="pi pi-hourglass"
|
||||||
|
class="p-button-rounded p-button-outlined"
|
||||||
|
@click="occupationRoute(slotProps.data.room)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
</template>
|
</template>
|
||||||
@@ -122,12 +133,25 @@ import DynamicPage from "@/view/DynamicPage.vue";
|
|||||||
import { requestFreeRooms } from "@/api/requestFreeRooms.ts";
|
import { requestFreeRooms } from "@/api/requestFreeRooms.ts";
|
||||||
import { FilterMatchMode } from "primevue/api";
|
import { FilterMatchMode } from "primevue/api";
|
||||||
import { padStart } from "@fullcalendar/core/internal";
|
import { padStart } from "@fullcalendar/core/internal";
|
||||||
|
import router from "@/router";
|
||||||
|
|
||||||
const mobilePage = inject("mobilePage") as Ref<boolean>;
|
const mobilePage = inject("mobilePage") as Ref<boolean>;
|
||||||
const filters = ref({
|
const filters = ref({
|
||||||
room: { value: null, matchMode: FilterMatchMode.CONTAINS, label: "Room" },
|
room: { value: null, matchMode: FilterMatchMode.CONTAINS, label: "Room" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function occupationRoute(room: string): void {
|
||||||
|
// date is in format like YYYYMMDD
|
||||||
|
router.push({
|
||||||
|
name: "room-schedule",
|
||||||
|
query: {
|
||||||
|
room: room,
|
||||||
|
date: date.value.toISOString().split("T")[0].replace(/-/g, ""),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const date: Ref<Date> = ref(new Date(Date.now()));
|
const date: Ref<Date> = ref(new Date(Date.now()));
|
||||||
const start: Ref<Date> = ref(new Date(0));
|
const start: Ref<Date> = ref(new Date(0));
|
||||||
const end: Ref<Date> = ref(new Date(0));
|
const end: Ref<Date> = ref(new Date(0));
|
||||||
|
Reference in New Issue
Block a user