diff --git a/application/controllers/api/frontend/v1/lv/Betreuungen.php b/application/controllers/api/frontend/v1/lv/Betreuungen.php
index 8267a5b56..f81474fd2 100644
--- a/application/controllers/api/frontend/v1/lv/Betreuungen.php
+++ b/application/controllers/api/frontend/v1/lv/Betreuungen.php
@@ -37,7 +37,45 @@ class Betreuungen extends FHCAPI_Controller
public function getBetreuungen()
{
-
+ $semester = $this->input->get("semester");
+ if (!$semester) $this->terminateWithError("Missing parameters!");
+
+ $personId = getAuthPersonId();
+
+ $betreuungenQuery = "SELECT
+ tbl_lehrveranstaltung.bezeichnung,
+ tbl_projektarbeit.titel,
+ (SELECT nachname || ' ' || vorname
+ FROM public.tbl_benutzer
+ JOIN public.tbl_person USING(person_id)
+ WHERE uid=student_uid)
+ as name,
+ (SELECT uid
+ FROM public.tbl_benutzer
+ WHERE uid=student_uid)
+ as uid,
+ tbl_lehrveranstaltung.studiengang_kz,
+ tbl_lehrveranstaltung.semester,
+ tbl_studiengang.kurzbzlang as studiengang,
+ tbl_studiengang.email,
+ tbl_betreuerart.beschreibung AS beutreuerart_beschreibung,
+ tbl_projektbetreuer.stunden
+ FROM
+ lehre.tbl_lehrveranstaltung, lehre.tbl_projektarbeit, lehre.tbl_projektbetreuer, public.tbl_studiengang, lehre.tbl_betreuerart
+ WHERE
+ tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_projektarbeit.lehrveranstaltung_id AND
+ tbl_projektarbeit.studiensemester_kurzbz = '$semester' AND
+ tbl_projektarbeit.projektarbeit_id = tbl_projektbetreuer.projektarbeit_id AND
+ tbl_lehrveranstaltung.studiengang_kz = tbl_studiengang.studiengang_kz AND
+ tbl_projektbetreuer.betreuerart_kurzbz = tbl_betreuerart.betreuerart_kurzbz AND
+ tbl_projektbetreuer.person_id = '$personId'";
+ $this->addMeta("query", $betreuungenQuery);
+
+ $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
+ $result = $this->LehrveranstaltungModel->execReadOnlyQuery($betreuungenQuery);
+ $result = $this->getDataOrTerminateWithError($result);
+
+ $this->terminateWithSuccess($result);
}
}
diff --git a/public/js/api/factory/betreuungen.js b/public/js/api/factory/betreuungen.js
new file mode 100644
index 000000000..6aecadd15
--- /dev/null
+++ b/public/js/api/factory/betreuungen.js
@@ -0,0 +1,28 @@
+/**
+ * Copyright (C) 2026 fhcomplete.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+export default {
+ getBetreuungen(semester) {
+ return {
+ method: 'get',
+ url: '/api/frontend/v1/lv/Betreuungen/getBetreuungen',
+ params: {
+ semester
+ },
+ };
+ },
+};
\ No newline at end of file
diff --git a/public/js/components/Cis/Mylv/MyLv.js b/public/js/components/Cis/Mylv/MyLv.js
index ecb30b5f3..7720a37c9 100644
--- a/public/js/components/Cis/Mylv/MyLv.js
+++ b/public/js/components/Cis/Mylv/MyLv.js
@@ -17,7 +17,7 @@ export default {
studiensemester: null,
lvs: {},
currentSemester: null,
- modes: ["lvs", "lehrenheiten", "supervision"],
+ modes: ["lvs", "lehrenheiten", "supervision", "all"],
selectedMode: "lvs"
};
},
@@ -153,9 +153,11 @@ export default {
diff --git a/public/js/components/Cis/Mylv/Supervisor.js b/public/js/components/Cis/Mylv/Supervisor.js
index 32af05e63..157322f0a 100644
--- a/public/js/components/Cis/Mylv/Supervisor.js
+++ b/public/js/components/Cis/Mylv/Supervisor.js
@@ -1,12 +1,136 @@
+import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
+
+import ApiBetreuungen from "../../../api/factory/betreuungen.js";
+
export default {
name: "Supervisor",
- props: ["current"],
+ components: {
+ CoreFilterCmpt
+ },
+ props: {
+ semester: null | String,
+ },
data() {
- return {};
+ return {
+ students: [],
+ isFetchingStudents: false,
+ supervisorTableOptions: {
+ index: 'lehrveranstaltung_id',
+ layout: 'fitColumns',
+ columns: [
+ {
+ titlePhrase: "betreuungen/studiengang",
+ title: "placeholder",
+ field: "studiengang",
+ widthGrow: 1,
+ },
+ {
+ titlePhrase: "betreuungen/semester",
+ title: "placeholder",
+ field: "semester",
+ widthGrow: 1,
+ },
+ {
+ titlePhrase: "betreuungen/stunden",
+ title: "placeholder",
+ field: "stunden",
+ widthGrow: 1,
+ },
+ {
+ titlePhrase: "betreuungen/lvBezeichnung",
+ title: "placeholder",
+ field: "bezeichnung",
+ widthGrow: 3,
+ },
+ {
+ titlePhrase: "betreuungen/student",
+ title: "placeholder",
+ field: "name",
+ widthGrow: 3,
+ formatter: "link",
+ formatterParams: {
+ target:"_blank",
+ url: (cell) => {
+ const uid = cell._cell.row.data.uid;
+ // todo: get full profilview url (or just use cell click instead of link formatter)
+ return this.$router.resolve("ProfilView").href;
+ },
+ },
+ },
+ {
+ titlePhrase: "betreuungen/betreuungsart",
+ title: "placeholder",
+ field: "beutreuerart_beschreibung",
+ widthGrow: 3,
+ },
+ {
+ titlePhrase: "betreuungen/titelProjektarbeit",
+ title: "placeholder",
+ field: "titel",
+ widthGrow: 6,
+ },
+ ],
+ locale: true,
+ persistence: false,
+ persistenceID: "supervisorTable",
+ },
+ };
+ },
+ watch: {
+ semester() {
+ this.getStudents();
+ },
+ },
+ methods: {
+ async getStudents() {
+ if (!this.$props.semester?.length) return;
+
+ this.students = [];
+ this.isFetchingStudents = true;
+
+ const studentsResponse = await this.$api.call(
+ ApiBetreuungen.getBetreuungen(this.$props.semester),
+ );
+ if (studentsResponse.meta.status === "success") {
+ this.students = studentsResponse.data;
+ this.setTableData();
+ }
+
+ this.isFetchingStudents = false;
+ },
+ handleTableBuilt() {
+ this.setTableData();
+ },
+ setTableData() {
+ if (this.$refs.supervisorTable && this.students?.length) {
+ this.$refs.supervisorTable.tabulator.setData(
+ this.students
+ );
+ }
+ },
+ },
+ mounted() {
+ this.getStudents();
+ console.log(this.$router);
},
template: /*html*/ `
- SUPERVISOR PLACEHOLDER
+
+
+
+
+ {{ students.length + " supervised students" }}
+
+
+
+
No supervised students found!
+
`,
-}
\ No newline at end of file
+};
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index d927c14b3..f03042257 100644
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -67013,6 +67013,148 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
+ // BETREUUNGEN PHRASES START
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'studiengang',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Stg',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'DP',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'semester',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Sem',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Sem',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'stunden',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Std',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Hrs',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'lvBezeichnung',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'LV Bezeichnung',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Course title',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'student',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Student/in',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Student',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'betreuungsart',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Betreuungsart',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Supervision type',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'betreuungen',
+ 'phrase' => 'titelProjektarbeit',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Titel der Projektarbeit',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Project title',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ // BETREUUNGEN PHRASES END
);