mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
uses the new fhcApi factory to make the roomInformation get request from the frontent/v1/stundenplan api and uses the CalendarDate class to get the first day of the week and the last day of the week to make the request for the room information over the whole week
This commit is contained in:
@@ -18,7 +18,7 @@ class Stundenplan_model extends DB_Model
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getRoomDataOnDay($ort_kurzbz,$date){
|
||||
public function getRoomDataOnDay($ort_kurzbz='EDV_A2.06',$start_date='2024-05-21',$end_date='2024-05-21'){
|
||||
|
||||
|
||||
$this->addSelect(['*',"CONCAT(UPPER(sp.stg_typ),UPPER(sp.stg_kurzbz),'-',COALESCE(CAST(sp.semester AS varchar),'/'),COALESCE(CAST(sp.verband AS varchar),'/')) as stg","lektor","CONCAT(lehrfach,'-',lehrform) as lv_info" ]);
|
||||
@@ -28,12 +28,13 @@ class Stundenplan_model extends DB_Model
|
||||
$res = $this->loadWhere(['ort_kurzbz'=>$ort_kurzbz,'datum'=>$date]);
|
||||
$res = hasData($res) ? getData($res): null;
|
||||
return $res; */
|
||||
$this->db->where('ort_kurzbz','EDV_A2.06',true);
|
||||
$this->db->where('datum >=','2024-05-21',true);
|
||||
$this->db->where('ort_kurzbz',$ort_kurzbz,true);
|
||||
$this->db->where('datum >=',$start_date,true);
|
||||
$this->db->where('datum <=',$end_date,true);
|
||||
|
||||
$query = $this->db->get_compiled_select('lehre.vw_stundenplan sp');
|
||||
|
||||
return $this->execQuery($query, [$ort_kurzbz, $date]);
|
||||
return $this->execQuery($query, [$ort_kurzbz, $start_date, $end_date]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user