| vue/src/components/KursTnByRole.vue | ●●●●● patch | view | raw | blame | history | |
| vue/src/pages/KursDetail.vue | ●●●●● patch | view | raw | blame | history |
vue/src/components/KursTnByRole.vue
New file @@ -0,0 +1,40 @@ <script setup> import {routerBase} from "@/lib/api" const props = defineProps({ kursTnByRolle: { type: Array, } }) </script> <template> <table> <thead> <tr> <th>role_id</th> <th>usr_id</th> <th>firstname</th> <th>lastname</th> </tr> </thead> <tbody> <tr v-for="tn in kursTnByRolle"> <td>{{ tn.role_id }}</td> <td> <RouterLink :to="`${routerBase}/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink> </td> <td>{{ tn.firstname }}</td> <td>{{ tn.lastname }}</td> </tr> </tbody> </table> </template> <style scoped> </style> vue/src/pages/KursDetail.vue
@@ -8,6 +8,7 @@ import KursItems from '../components/KursItems.vue' import KursRoles from '../components/KursRoles.vue' import KursMembers from '../components/KursMembers.vue' import KursTnByRole from '../components/KursTnByRole.vue' const route = useRoute() @@ -107,26 +108,7 @@ <div> <h2>KursTnByRole <small>({{ kursTnByRolle?.length }})</small></h2> <table> <thead> <tr> <th>role_id</th> <th>usr_id</th> <th>firstname</th> <th>lastname</th> </tr> </thead> <tbody> <tr v-for="tn in kursTnByRolle"> <td>{{ tn.role_id }}</td> <td> <RouterLink :to="`${routerBase}/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink> </td> <td>{{ tn.firstname }}</td> <td>{{ tn.lastname }}</td> </tr> </tbody> </table> <KursTnByRole :kursTnByRolle="kursTnByRolle" /> </div> </div>