mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 02:39:14 +02:00
Merge branch 'main' into 104-exams-in-calendar
# Conflicts: # backend/service/addSchedule.go
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Event } from "../model/event.ts";
|
||||
import { AnonymizedEventDTO } from "../model/event.ts";
|
||||
|
||||
export async function fetchRoom(): Promise<string[]> {
|
||||
const rooms: string[] = [];
|
||||
@@ -16,8 +16,8 @@ export async function fetchEventsByRoomAndDuration(
|
||||
room: string,
|
||||
from_date: string,
|
||||
to_date: string,
|
||||
): Promise<Event[]> {
|
||||
const events: Event[] = [];
|
||||
): Promise<AnonymizedEventDTO[]> {
|
||||
const events: AnonymizedEventDTO[] = [];
|
||||
await fetch(
|
||||
"/api/schedule?room=" + room + "&from=" + from_date + "&to=" + to_date,
|
||||
)
|
||||
@@ -27,7 +27,7 @@ export async function fetchEventsByRoomAndDuration(
|
||||
})
|
||||
.then((eventsResponse) => {
|
||||
console.log("Response:", eventsResponse);
|
||||
eventsResponse.forEach((event: Event) => events.push(event));
|
||||
eventsResponse.forEach((event: AnonymizedEventDTO) => events.push(event));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error fetching events: ", error);
|
||||
|
@@ -52,7 +52,7 @@ async function getOccupation() {
|
||||
id: index,
|
||||
start: event.start.replace(/\s\+\d{4}\s\w+$/, "").replace(" ", "T"),
|
||||
end: event.end.replace(/\s\+\d{4}\s\w+$/, "").replace(" ", "T"),
|
||||
showFree: event.name.toLowerCase().includes("zur freien verfügung"),
|
||||
showFree: event.free
|
||||
};
|
||||
});
|
||||
|
||||
|
@@ -14,3 +14,14 @@ export class Event {
|
||||
public week: string,
|
||||
) {}
|
||||
}
|
||||
|
||||
export class AnonymizedEventDTO {
|
||||
constructor(
|
||||
public day: string,
|
||||
public week: string,
|
||||
public start: string,
|
||||
public end: string,
|
||||
public rooms: string,
|
||||
public free: boolean
|
||||
) {}
|
||||
}
|
||||
|
@@ -1,15 +1,17 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import Faq from "../components/FaqPage.vue";
|
||||
import AdditionalModules from "../view/AdditionalModules.vue";
|
||||
import CalendarLink from "../components/CalendarLink.vue";
|
||||
import Imprint from "../view/ImprintPage.vue";
|
||||
import PrivacyPolicy from "../view/PrivacyPolicy.vue";
|
||||
import RenameModules from "../components/RenameModules.vue";
|
||||
import RoomFinder from "../view/RoomFinder.vue";
|
||||
import EditCalendarView from "../view/EditCalendarView.vue";
|
||||
import EditAdditionalModules from "../components/editCalendar/EditAdditionalModules.vue";
|
||||
import EditModules from "../components/editCalendar/EditModules.vue";
|
||||
import CourseSelection from "../view/CourseSelection.vue";
|
||||
|
||||
const Faq = () => import("../components/FaqPage.vue");
|
||||
const AdditionalModules = () => import("../view/AdditionalModules.vue");
|
||||
const CalendarLink = () => import("../components/CalendarLink.vue");
|
||||
const Imprint = () => import("../view/ImprintPage.vue");
|
||||
const PrivacyPolicy = () => import("../view/PrivacyPolicy.vue");
|
||||
const RenameModules = () => import("../components/RenameModules.vue");
|
||||
const RoomFinder = () => import("../view/RoomFinder.vue");
|
||||
const EditCalendarView = () => import("../view/EditCalendarView.vue");
|
||||
const EditAdditionalModules = () => import("../components/editCalendar/EditAdditionalModules.vue");
|
||||
const EditModules = () => import("../components/editCalendar/EditModules.vue");
|
||||
const CourseSelection = () => import("../view/CourseSelection.vue");
|
||||
|
||||
import i18n from "../i18n";
|
||||
|
||||
const router = createRouter({
|
||||
|
Reference in New Issue
Block a user