changes how the reservierungen are fetched from the database to have the same information as the room events

This commit is contained in:
SimonGschnell
2024-09-05 14:57:57 +02:00
parent e33162d20e
commit f9b69fe08c
4 changed files with 58 additions and 22 deletions
@@ -143,8 +143,8 @@ class Stundenplan extends FHCAPI_Controller
$result = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($result);
// loop over the days
$day_events = $this->filterEventsIntoAssociativeDateArray($result, $start_date, $end_date);
// imperative approach
/* $day_events = $this->filterEventsIntoAssociativeDateArray($result, $start_date, $end_date);
$final_reservierungen = array();
foreach($day_events as $date => $day_eventArray){
@@ -203,7 +203,7 @@ class Stundenplan extends FHCAPI_Controller
}
}
$this->terminateWithSuccess($final_reservierungen);
$this->terminateWithSuccess($final_reservierungen); */
}
private function filterEventsIntoAssociativeDateArray($events, $start_date, $end_date){