From 8d33fafb3224360f49f6ebc9e1b98f4fbdc1d1ad Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Wed, 25 Jun 2025 07:09:10 +0000
Subject: [PATCH] GS-2169
---
vue/src/pages/KursDetail.vue | 45 ++++++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/vue/src/pages/KursDetail.vue b/vue/src/pages/KursDetail.vue
index a91b5dc..48cca6f 100644
--- a/vue/src/pages/KursDetail.vue
+++ b/vue/src/pages/KursDetail.vue
@@ -2,8 +2,9 @@
import {useRoute} from 'vue-router'
import {onMounted, reactive, ref} from "vue"
-import {getKurs, getKursItems, getKursTn, iliasBase} from "../lib/api.js"
+import {getKurs, getKursItems, getKursTn, iliasBase, routerBase} from "../lib/api.js"
import LinkExtern from "../components/LinkExtern.vue"
+import dayjs from "dayjs"
const route = useRoute()
const kursId = route.params.kursId
@@ -28,7 +29,10 @@
const dataKursTn = await getKursTn(kursId)
console.log(dataKursTn)
kursTn.value = dataKursTn
+
}
+
+const aaa = import.meta.env.VITE_TST
</script>
@@ -38,7 +42,6 @@
<h1>
Kurs
<small>{{ kurs?.title }}</small>
- <!-- <small>{{ user?.firstname }} {{ user?.lastname }}</small>-->
</h1>
<p v-if="error">{{ error }}</p>
@@ -48,7 +51,8 @@
<span>ref_id</span>
<div>
<a :href="`${iliasBase}/goto.php?target=${kurs.type}_${kurs.ref_id}`" target="_blank">
- {{ kurs.ref_id }} <LinkExtern />
+ {{ kurs.ref_id }}
+ <LinkExtern />
</a>
</div>
@@ -69,11 +73,13 @@
</h2>
<table>
<thead>
- <th>parent_id</th>
- <th>ref_id</th>
- <th>obj_id</th>
- <th>title</th>
- <th>type</th>
+ <tr>
+ <th>parent_id</th>
+ <th>ref_id</th>
+ <th>obj_id</th>
+ <th>title</th>
+ <th>type</th>
+ </tr>
</thead>
<tbody>
<!-- TODO verlinken auf Ziel in ILAS | goto.php?target=crs_ID -->
@@ -81,7 +87,8 @@
<td>{{ item.parent_id }}</td>
<td>
<a :href="`${iliasBase}/goto.php?target=${item.type}_${item.ref_id}`" target="_blank">
- {{ item.ref_id }} <LinkExtern />
+ {{ item.ref_id }}
+ <LinkExtern />
</a>
</td>
<td>{{ item.obj_id }}</td>
@@ -95,22 +102,30 @@
KursTn
<small>({{ kursTn?.length }})</small>
</h2>
- <div :style="{columns: kursTn?.length > 16 ? 3 : 1}">
+ <div :style="{columns: kursTn?.length > 16 ? 1 : 1}">
<table>
<thead>
- <th>usr_id</th>
- <th>login</th>
- <th>firstname</th>
- <th>lastname</th>
+ <tr>
+ <th>usr_id</th>
+ <th>login</th>
+ <th>firstname</th>
+ <th>lastname</th>
+ <th>passed</th>
+ <th>status</th>
+ <th>status_changed</th>
+ </tr>
</thead>
<tbody>
<tr v-for="tn in kursTn">
<td>
- <RouterLink :to="`/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink>
+ <RouterLink :to="`${routerBase}/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink>
</td>
<td>{{ tn.login }}</td>
<td>{{ tn.firstname }}</td>
<td>{{ tn.lastname }}</td>
+ <td>{{ tn.passed }}</td>
+ <td>{{ tn.status }}</td>
+ <td>{{ dayjs(tn.status_changed).format("DD.MM.YYYY HH:mm:ss") }}</td>
</tr>
</tbody>
</table>
--
Gitblit v1.8.0