diff --git a/application/controllers/api/frontend/v1/Stundenplan.php b/application/controllers/api/frontend/v1/Stundenplan.php
index d360c1b90..4f7e7a053 100644
--- a/application/controllers/api/frontend/v1/Stundenplan.php
+++ b/application/controllers/api/frontend/v1/Stundenplan.php
@@ -316,6 +316,8 @@ class Stundenplan extends FHCAPI_Controller
public function Reservierungen()
{
+ //TODO the reservierungen have to be grouped like the stundenplan
+
$ort_kurzbz = $this->input->get('ort_kurzbz', TRUE);
$start_date = $this->input->get('start_date', TRUE);
$end_date = $this->input->get('end_date', TRUE);
diff --git a/application/models/ressource/Reservierung_model.php b/application/models/ressource/Reservierung_model.php
index 260104305..23d17f974 100755
--- a/application/models/ressource/Reservierung_model.php
+++ b/application/models/ressource/Reservierung_model.php
@@ -22,8 +22,11 @@ class Reservierung_model extends DB_Model
{
$raum_reservierungen= $this->execReadOnlyQuery("
- SELECT * FROM lehre.vw_reservierung res
- WHERE ort_kurzbz = ? AND datum >= ? AND datum <= ?
+ SELECT res.*, mit.kurzbz as person_kurzbz , CONCAT(studg.typ,studg.kurzbz,'-') as stg
+ FROM lehre.vw_reservierung res
+ JOIN public.tbl_mitarbeiter mit ON mit.mitarbeiter_uid=res.uid
+ JOIN public.tbl_studiengang studg ON studg.studiengang_kz=res.studiengang_kz
+ WHERE res.ort_kurzbz = ? AND datum >= ? AND datum <= ?
", [$ort_kurzbz, $start_date, $end_date]);
return $raum_reservierungen;
diff --git a/public/js/apps/Cis/RoomInformation.js b/public/js/apps/Cis/RoomInformation.js
index a7aced683..d485227b2 100644
--- a/public/js/apps/Cis/RoomInformation.js
+++ b/public/js/apps/Cis/RoomInformation.js
@@ -78,7 +78,7 @@ const app = Vue.createApp({
let reservierungs_events = res.data;
console.log(reservierungs_events, " this are the reserverungs event")
- this.events = [...this.events,...reservierungs_events];
+ this.events = [...(this.events?this.events:[]),...reservierungs_events];
});
});
@@ -91,9 +91,9 @@ const app = Vue.createApp({
{{event.orig.reservierung? event.orig.title :event.orig.lv_info}}
- {{'this is a reservierung'}}
+ {{event.orig.stg}}
{{item}}
- {{event.orig.reservierung? event.orig.uid : event.orig.lektor}}
+ {{event.orig.reservierung? event.orig.person_kurzbz : event.orig.lektor}}