added dialog information transfer

This commit is contained in:
masterelmar
2023-10-17 00:04:10 +02:00
parent b9acdd3a34
commit 87b51fd6fe
4 changed files with 17 additions and 18 deletions

View File

@ -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>