diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 58c4f11..2b15ac5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,6 +6,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -69,7 +109,7 @@ "RunOnceActivity.go.migrated.go.modules.settings": "true", "RunOnceActivity.go.modules.automatic.dependencies.download": "true", "WebServerToolWindowFactoryState": "false", - "git-widget-placeholder": "10-roomfinder", + "git-widget-placeholder": "main", "go.import.settings.migrated": "true", "ignore.virus.scanning.warn.message": "true", "jdk.selected.JAVA_MODULE": "20", @@ -79,7 +119,7 @@ "node.js.selected.package.eslint": "(autodetect)", "node.js.selected.package.tslint": "(autodetect)", "nodejs_package_manager_path": "npm", - "prettierjs.PrettierConfiguration.Package": "C:\\Users\\masterelmar\\GolandProjects\\htwk-planner\\frontend\\node_modules\\prettier", + "prettierjs.PrettierConfiguration.Package": "C:\\Users\\masterelmar\\project\\htwkalender\\frontend\\node_modules\\prettier", "project.structure.last.edited": "Modules", "project.structure.proportion": "0.0", "project.structure.side.proportion": "0.42068964", @@ -138,6 +178,8 @@ + + @@ -149,7 +191,19 @@ - + + + + + + + + + + + + + diff --git a/frontend/src/api/fetchCourse.ts b/frontend/src/api/fetchCourse.ts index b641635..00974e4 100644 --- a/frontend/src/api/fetchCourse.ts +++ b/frontend/src/api/fetchCourse.ts @@ -33,6 +33,7 @@ export async function fetchModulesByCourseAndSemester( module.name, module.prof, semester, + false, module.events, ), ), @@ -57,6 +58,7 @@ export async function fetchAllModules(): Promise { module.name, module.prof, module.semester, + false, module.events, ), ); diff --git a/frontend/src/api/fetchModule.ts b/frontend/src/api/fetchModule.ts index e6a7f1c..3a03519 100644 --- a/frontend/src/api/fetchModule.ts +++ b/frontend/src/api/fetchModule.ts @@ -22,6 +22,7 @@ export async function fetchModule(module: Module): Promise { module.name, module.prof, module.semester, + false, module.events, ), ); diff --git a/frontend/src/api/fetchRoom.ts b/frontend/src/api/fetchRoom.ts index 3fb9e70..21566f9 100644 --- a/frontend/src/api/fetchRoom.ts +++ b/frontend/src/api/fetchRoom.ts @@ -1,4 +1,4 @@ -import {Event} from "../model/event.ts"; +import { Event } from "../model/event.ts"; export async function fetchRoom(): Promise { const rooms: string[] = []; @@ -13,24 +13,26 @@ export async function fetchRoom(): Promise { } export async function fetchEventsByRoomAndDuration( - room: string, - from_date: string, - to_date: string, + room: string, + from_date: string, + to_date: string, ): Promise { - const events: Event[] = []; - await fetch("/api/schedule?room=" + room + "&from=" + from_date + "&to=" + to_date) - .then((response) => { - console.log(response); - return response.json(); - }) - .then((eventsResponse) => { - console.log("Response:", eventsResponse); - eventsResponse.forEach((event: Event) => - events.push(event)); - }).catch((error) => { - console.log("Error fetching events: ", error); - return null; - }) - console.log("occupations: ", events); - return events; -} \ No newline at end of file + const events: Event[] = []; + await fetch( + "/api/schedule?room=" + room + "&from=" + from_date + "&to=" + to_date, + ) + .then((response) => { + console.log(response); + return response.json(); + }) + .then((eventsResponse) => { + console.log("Response:", eventsResponse); + eventsResponse.forEach((event: Event) => events.push(event)); + }) + .catch((error) => { + console.log("Error fetching events: ", error); + return null; + }); + console.log("occupations: ", events); + return events; +} diff --git a/frontend/src/components/ModuleTemplateDialog.vue b/frontend/src/components/ModuleTemplateDialog.vue index c03b238..e583492 100644 --- a/frontend/src/components/ModuleTemplateDialog.vue +++ b/frontend/src/components/ModuleTemplateDialog.vue @@ -4,13 +4,21 @@ import { Ref, ref } from "vue"; const helpVisible: Ref = ref(false); const placeholders = ref([ - { placeholder: "%t", description: "Event Type", examples: "V = Vorlesung, S = Seminar, P = Praktikum/Prüfung" }, - { placeholder: "%p", description: "Mandatory", examples: "w = optional, p = mandatory" }, + { + placeholder: "%t", + description: "Event Type", + examples: "V = Vorlesung, S = Seminar, P = Praktikum/Prüfung", + }, + { + placeholder: "%p", + description: "Mandatory", + examples: "w = optional, p = mandatory", + }, ]); - - + @click="helpVisible = true" + /> + - Here you can rename your modules to your liking. This will be the name - of the event in your calendar. + Here you can rename your modules to your liking. This will be the name of + the event in your calendar. - - You can use the following placeholders in your module names: - - + You can use the following placeholders in your module names: + - Additionally, you can toggle notifications for each module. - If you do so, you will be notified 15 minutes before the event starts. + Additionally, you can toggle notifications for each module. If you do so, + you will be notified 15 minutes before the event starts. diff --git a/frontend/src/components/RenameModules.vue b/frontend/src/components/RenameModules.vue index 6205344..3350100 100644 --- a/frontend/src/components/RenameModules.vue +++ b/frontend/src/components/RenameModules.vue @@ -18,7 +18,7 @@ const tableData = ref( const columns = ref([ { field: "Course", header: "Course" }, { field: "Module", header: "Module" }, - { field: "Reminder", header: "Reminder"} + { field: "Reminder", header: "Reminder" }, ]); async function finalStep() { @@ -43,11 +43,18 @@ async function finalStep() { > - Enable all notifications: + Enable all notifications: module.Module.reminder = $event)" + :model-value=" + tableData.reduce( + (acc, curr) => acc && curr.Module.reminder, + true, + ) + " + @update:model-value=" + tableData.forEach((module) => (module.Module.reminder = $event)) + " /> @@ -63,15 +70,15 @@ async function finalStep() { {{ data[field].userDefinedName }} - - + + @click="data.Module.reminder = !data.Module.reminder" + > {{ data[field] }} @@ -91,14 +98,14 @@ async function finalStep() { v-model="data.Module.reminder" class="align-self-center" />--> - + @click="data.Module.reminder = !data.Module.reminder" + > {{ data[field] }} @@ -115,9 +122,9 @@ async function finalStep() { diff --git a/frontend/src/components/RoomFinder.vue b/frontend/src/components/RoomFinder.vue index 18c6935..35cba3b 100644 --- a/frontend/src/components/RoomFinder.vue +++ b/frontend/src/components/RoomFinder.vue @@ -1,7 +1,6 @@ @@ -25,26 +24,24 @@ rooms().then( Raumfinder Please select a room - - + + diff --git a/frontend/src/components/RoomOccupation.vue b/frontend/src/components/RoomOccupation.vue index ab8cdbe..883233a 100644 --- a/frontend/src/components/RoomOccupation.vue +++ b/frontend/src/components/RoomOccupation.vue @@ -1,11 +1,11 @@ - - \ No newline at end of file + + diff --git a/frontend/src/components/editCalendar/EditAdditionalModules.vue b/frontend/src/components/editCalendar/EditAdditionalModules.vue index 5b07d39..db3f22d 100644 --- a/frontend/src/components/editCalendar/EditAdditionalModules.vue +++ b/frontend/src/components/editCalendar/EditAdditionalModules.vue @@ -37,23 +37,22 @@ const ModuleInformation = defineAsyncComponent( ); async function showInfo(module: Module) { - await fetchModule(module).then((data) => { - module.value = data; - }); - dialog.open(ModuleInformation, { - props: { - style: { - width: "50vw", + await fetchModule(module).then((data: Module) => { + dialog.open(ModuleInformation, { + props: { + style: { + width: "50vw", + }, + breakpoints: { + "960px": "75vw", + "640px": "90vw", + }, + modal: true, }, - breakpoints: { - "960px": "75vw", - "640px": "90vw", + data: { + module: data, }, - modal: true, - }, - data: { - module: module, - }, + }); }); } diff --git a/frontend/src/components/editCalendar/EditModules.vue b/frontend/src/components/editCalendar/EditModules.vue index ec69b53..a767e51 100644 --- a/frontend/src/components/editCalendar/EditModules.vue +++ b/frontend/src/components/editCalendar/EditModules.vue @@ -20,7 +20,7 @@ const tableData = computed(() => const columns = ref([ { field: "Course", header: "Course" }, { field: "Module", header: "Module" }, - { field: "Reminder", header: "Reminder"} + { field: "Reminder", header: "Reminder" }, ]); const fetchedModules = async () => { @@ -64,11 +64,18 @@ async function finalStep() { > - Enable all notifications: + Enable all notifications: module.Module.reminder = $event)" + :model-value=" + tableData.reduce( + (acc, curr) => acc && curr.Module.reminder, + true, + ) + " + @update:model-value=" + tableData.forEach((module) => (module.Module.reminder = $event)) + " /> @@ -84,15 +91,15 @@ async function finalStep() { {{ data[field].userDefinedName }} - - + + @click="data.Module.reminder = !data.Module.reminder" + > {{ data[field] }} @@ -108,14 +115,14 @@ async function finalStep() { /> - + @click="data.Module.reminder = !data.Module.reminder" + > @@ -143,9 +150,9 @@ async function finalStep() {
- Here you can rename your modules to your liking. This will be the name - of the event in your calendar. + Here you can rename your modules to your liking. This will be the name of + the event in your calendar.
- You can use the following placeholders in your module names: -
You can use the following placeholders in your module names:
- Additionally, you can toggle notifications for each module. - If you do so, you will be notified 15 minutes before the event starts. + Additionally, you can toggle notifications for each module. If you do so, + you will be notified 15 minutes before the event starts.