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 11-enhanced-module-titles
# Conflicts: # backend/model/eventModel.go # backend/service/fetch/fetchSeminarEventService.go
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { Module } from "../model/module";
|
||||
|
||||
export async function fetchModule(name: string): Promise<Module> {
|
||||
export async function fetchModule(module: Module): Promise<Module> {
|
||||
const request = new Request("/api/module", {
|
||||
method: "GET",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Name: encodeURI(name),
|
||||
},
|
||||
body: JSON.stringify(module),
|
||||
});
|
||||
|
||||
return await fetch(request)
|
||||
|
@@ -38,10 +38,9 @@ const ModuleInformation = defineAsyncComponent(
|
||||
() => import("./ModuleInformation.vue"),
|
||||
);
|
||||
|
||||
async function showInfo(moduleName: string) {
|
||||
const module: Ref<Module> = ref(new Module("", "", "", "", "", "", []));
|
||||
await fetchModule(moduleName).then((data) => {
|
||||
module.value = data;
|
||||
async function showInfo(module: Module) {
|
||||
await fetchModule(module).then((data) => {
|
||||
module = data;
|
||||
});
|
||||
dialog.open(ModuleInformation, {
|
||||
props: {
|
||||
@@ -66,7 +65,7 @@ const selectAll = ref(false);
|
||||
|
||||
const onSelectAllChange = (event: MultiSelectAllChangeEvent) => {
|
||||
selectedModules.value = event.checked
|
||||
? modules.value.map((module) => module)
|
||||
? modules.value.map((module: Module) => module)
|
||||
: [];
|
||||
selectAll.value = event.checked;
|
||||
};
|
||||
@@ -112,7 +111,7 @@ function selectChange() {
|
||||
rounded
|
||||
outlined
|
||||
aria-label="Information"
|
||||
@click.stop="showInfo(slotProps.option.name)"
|
||||
@click.stop="showInfo(slotProps.option)"
|
||||
></Button>
|
||||
<DynamicDialog />
|
||||
</div>
|
||||
|
@@ -36,9 +36,8 @@ const ModuleInformation = defineAsyncComponent(
|
||||
() => import("../ModuleInformation.vue"),
|
||||
);
|
||||
|
||||
async function showInfo(moduleName: string) {
|
||||
const module: Ref<Module> = ref(new Module("", "", "", "", "", "", []));
|
||||
await fetchModule(moduleName).then((data) => {
|
||||
async function showInfo(module: Module) {
|
||||
await fetchModule(module).then((data) => {
|
||||
module.value = data;
|
||||
});
|
||||
dialog.open(ModuleInformation, {
|
||||
@@ -110,7 +109,7 @@ function selectChange() {
|
||||
rounded
|
||||
outlined
|
||||
aria-label="Information"
|
||||
@click.stop="showInfo(slotProps.option.name)"
|
||||
@click.stop="showInfo(slotProps.option)"
|
||||
></Button>
|
||||
<DynamicDialog />
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user