mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2026-01-17 10:52:26 +01:00
added information button to additional Modules
This commit is contained in:
@@ -9,6 +9,7 @@ import { useDialog } from "primevue/usedialog";
|
||||
const dialog = useDialog();
|
||||
|
||||
import router from "../router";
|
||||
import { fetchModule } from "../api/fetchModule.ts";
|
||||
|
||||
const fetchedModules = async () => {
|
||||
return await fetchAllModules();
|
||||
@@ -38,7 +39,12 @@ const ModuleInformation = defineAsyncComponent(
|
||||
);
|
||||
|
||||
//TODO add missing module prop informations for ModuleInformation.vue
|
||||
function showInfo(module : Module) {
|
||||
async function showInfo(moduleName : string) {
|
||||
|
||||
const module: Ref<Module> = ref(new Module("", "", "", "", "", []));
|
||||
await fetchModule(moduleName).then((data) => {
|
||||
module.value = data;
|
||||
});
|
||||
dialog.open(ModuleInformation, {
|
||||
props: {
|
||||
style: {
|
||||
@@ -108,7 +114,7 @@ function selectChange() {
|
||||
rounded
|
||||
outlined
|
||||
aria-label="Information"
|
||||
@click.stop="showInfo(slotProps.option)"
|
||||
@click.stop="showInfo(slotProps.option.name)"
|
||||
></Button>
|
||||
<DynamicDialog />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user