mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-21 05:59:27 +00:00
refactor(RoomInformation): updates the roomInformation endpoint to use the Stundenplan library functions
This commit is contained in:
@@ -172,6 +172,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
*/
|
||||
public function getRoomplan()
|
||||
{
|
||||
$this->load->library('StundenplanLib');
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_data($_GET);
|
||||
@@ -188,8 +189,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
$roomplan_data = $this->StundenplanModel->stundenplanGruppierung($this->StundenplanModel->getRoomQuery($ort_kurzbz, $start_date, $end_date));
|
||||
|
||||
$roomplan_data = $this->getDataOrTerminateWithError($roomplan_data);
|
||||
|
||||
$this->expand_object_information($roomplan_data);
|
||||
$this->stundenplanlib->expand_object_information($roomplan_data);
|
||||
|
||||
$this->terminateWithSuccess($roomplan_data);
|
||||
|
||||
@@ -198,6 +198,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
// gets the reservierungen of a room if the ort_kurzbz parameter is supplied otherwise gets the reservierungen of the stundenplan of a student
|
||||
public function Reservierungen($ort_kurzbz = null)
|
||||
{
|
||||
$this->load->library('StundenplanLib');
|
||||
//form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_data($_GET);
|
||||
@@ -211,7 +212,6 @@ class Stundenplan extends FHCAPI_Controller
|
||||
$start_date = $this->input->get('start_date', TRUE);
|
||||
$end_date = $this->input->get('end_date', TRUE);
|
||||
|
||||
$this->load->library('StundenplanLib');
|
||||
$result = $this->stundenplanlib->getReservierungen($start_date,$end_date,$ort_kurzbz);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
|
||||
@@ -144,8 +144,8 @@ class StundenplanLib{
|
||||
}
|
||||
|
||||
|
||||
private function expand_object_information($data){
|
||||
|
||||
public function expand_object_information($data){
|
||||
$this->_ci =& get_instance();
|
||||
foreach ($data as $item)
|
||||
{
|
||||
|
||||
|
||||
@@ -219,25 +219,25 @@ const RoomInformation = {
|
||||
</span>
|
||||
</template>
|
||||
<template #weekPage="{event,day}">
|
||||
<div @click="showModal(event?.orig)" type="button" class=" border border-secondary border d-flex flex-column align-items-center justify-content-evenly h-100">
|
||||
<span>{{event?.orig.topic}}</span>
|
||||
<span v-for="lektor in event?.orig.lektor">{{lektor.kurzbz}}</span>
|
||||
<span>{{event?.orig.ort_kurzbz}}</span>
|
||||
<div @click="showModal(event)" type="button" class=" border border-secondary border d-flex flex-column align-items-center justify-content-evenly h-100">
|
||||
<span>{{event?.topic}}</span>
|
||||
<span v-for="lektor in event?.lektor">{{lektor.kurzbz}}</span>
|
||||
<span>{{event?.ort_kurzbz}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #dayPage="{event,day,mobile}">
|
||||
<div @click="mobile? showModal(event?.orig):null" type="button" class="fhc-entry border border-secondary border row h-100 justify-content-center align-items-center text-center">
|
||||
<div @click="mobile? showModal(event):null" type="button" class="fhc-entry border border-secondary border row h-100 justify-content-center align-items-center text-center">
|
||||
<div class="col ">
|
||||
<p>{{ $p.t('lehre/lehrveranstaltung') }}:</p>
|
||||
<p class="m-0">{{event?.orig.topic}}</p>
|
||||
<p class="m-0">{{event?.topic}}</p>
|
||||
</div>
|
||||
<div class="col ">
|
||||
<p>{{ $p.t('lehre/lektor') }}:</p>
|
||||
<p class="m-0" v-for="lektor in event?.orig.lektor">{{lektor.kurzbz}}</p>
|
||||
<p class="m-0" v-for="lektor in event?.lektor">{{lektor.kurzbz}}</p>
|
||||
</div>
|
||||
<div class="col ">
|
||||
<p>{{ $p.t('profil/Ort') }}: </p>
|
||||
<p class="m-0">{{event?.orig.ort_kurzbz}}</p>
|
||||
<p class="m-0">{{event?.ort_kurzbz}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user