mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 17:48:51 +02:00
added dialog information transfer
This commit is contained in:
@ -25,7 +25,7 @@ export async function fetchModulesByCourseAndSemester(
|
||||
})
|
||||
.then((modulesResponse) => {
|
||||
modulesResponse.forEach((module: Module) =>
|
||||
modules.push(new Module(module.id, module.name, course, module.name)),
|
||||
modules.push(new Module(module.name, course, module.name)),
|
||||
);
|
||||
});
|
||||
return modules;
|
||||
@ -39,7 +39,7 @@ export async function fetchAllModules(): Promise<Module[]> {
|
||||
})
|
||||
.then((responseModules: Module[]) => {
|
||||
responseModules.forEach((module: Module) => {
|
||||
modules.push(new Module(module.id, module.name, module.course, module.name));
|
||||
modules.push(new Module(module.name, module.course, module.name));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -38,10 +38,9 @@ const ModuleInformation = defineAsyncComponent(
|
||||
);
|
||||
|
||||
//TODO add missing module prop informations for ModuleInformation.vue
|
||||
const showInfo = () => {
|
||||
function showInfo(module : Module) {
|
||||
dialog.open(ModuleInformation, {
|
||||
props: {
|
||||
header: "Product List",
|
||||
style: {
|
||||
width: "50vw",
|
||||
},
|
||||
@ -51,8 +50,11 @@ const showInfo = () => {
|
||||
},
|
||||
modal: true,
|
||||
},
|
||||
data: {
|
||||
module: module,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const display = (module: Module) => module.name + " (" + module.course + ")";
|
||||
|
||||
@ -106,7 +108,7 @@ function selectChange() {
|
||||
rounded
|
||||
outlined
|
||||
aria-label="Information"
|
||||
@click.stop="showInfo()"
|
||||
@click.stop="showInfo(slotProps.option)"
|
||||
></Button>
|
||||
<DynamicDialog />
|
||||
</div>
|
||||
|
@ -1,26 +1,24 @@
|
||||
<script lang="ts" setup>
|
||||
import { PropType } from "vue";
|
||||
import { inject } from "vue";
|
||||
import { Module } from "../model/module.ts";
|
||||
|
||||
const props = defineProps({
|
||||
module: {
|
||||
type: Object as PropType<Module>,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const dialogRef = inject("dialogRef") as any;
|
||||
const module = dialogRef.value.data.module as Module;
|
||||
|
||||
console.debug(module);
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h2>{{ props.module.name }}</h2>
|
||||
<h2>{{ module.name }}</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Course:</td>
|
||||
<td>{{ props.module.course }}</td>
|
||||
<td>{{ module.course }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ID:</td>
|
||||
<td>{{ props.module.id }}</td>
|
||||
<td>Termine:</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,6 +1,5 @@
|
||||
export class Module {
|
||||
constructor(
|
||||
public id: string,
|
||||
public name: string,
|
||||
public course: string,
|
||||
public userDefinedName: string,
|
||||
|
Reference in New Issue
Block a user