changes the layout of the Stundenplan Events

This commit is contained in:
SimonGschnell
2024-06-24 13:50:13 +02:00
parent 008847e490
commit 63f089dc27
6 changed files with 21 additions and 10 deletions
@@ -90,7 +90,7 @@ class Stundenplan extends FHCAPI_Controller
$stunden = getData($stunden);
$result = $this->StundenplanModel->groupedRoomPlanning($ort_kurzbz,$start_date,$end_date);
$result = $this->StundenplanModel->groupedCalendarEvents($ort_kurzbz,$start_date,$end_date);
//$this->loglib->logErrorDB(print_r($result,TRUE),"this is the result of the grouped query");
if(isError($result)){
@@ -105,6 +105,8 @@ class Stundenplan extends FHCAPI_Controller
// gruppierung hat stattgefunden und das array muss in einem String konvertiert werden
}
}
// this is the old way the events were grouped, kept in case that the query doesnt work out as expected
/*
$final_events = array();
$grouped = array();
@@ -48,10 +48,10 @@ class Stundenplan_model extends DB_Model
*
* @return stdClass
*/
public function groupedRoomPlanning($ort_kurzbz,$start_date,$end_date){
public function groupedCalendarEvents($ort_kurzbz,$start_date,$end_date){
$gruppierteRaumVerplannung= $this->execReadOnlyQuery("
$gruppierteEvents= $this->execReadOnlyQuery("
SELECT
'reservierung' as type,
@@ -130,7 +130,7 @@ class Stundenplan_model extends DB_Model
ORDER BY datum, stunde
", [$ort_kurzbz, $start_date, $end_date, $ort_kurzbz, $start_date, $end_date]);
return $gruppierteRaumVerplannung;
return $gruppierteEvents;
}
/**
+1 -3
View File
@@ -9,9 +9,7 @@ $this->load->view('templates/CISHTML-Header', $includesArray);
?>
<div id="content">
<h2>Stundenplan</h2>
<hr>
<fhc-calendar :events="events" initial-mode="week" show-weeks></fhc-calendar>
</div>
<?php $this->load->view('templates/CISHTML-Footer', $includesArray); ?>