mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 15:04:04 +00:00
displaying room additional info in reservations window
This commit is contained in:
@@ -36,7 +36,8 @@ class Ort extends FHCAPI_Controller
|
||||
'ContentID' => self::PERM_LOGGED,
|
||||
'getOrtKurzbzContent' => self::PERM_LOGGED,
|
||||
'getRooms' => self::PERM_LOGGED,
|
||||
'getTypes' => self::PERM_LOGGED
|
||||
'getTypes' => self::PERM_LOGGED,
|
||||
'getRoomInfo' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->model('ressource/Ort_model', 'OrtModel');
|
||||
@@ -74,6 +75,8 @@ class Ort extends FHCAPI_Controller
|
||||
$vonStunde = getData($this->StundeModel->getStundeForTime($von))[0]->stunde;
|
||||
$bisStunde = getData($this->StundeModel->getStundeForTime($bis))[0]->stunde;
|
||||
|
||||
$this->load->model('ressource/Ort_model', 'OrtModel');
|
||||
|
||||
$params = array();
|
||||
$qry = "SELECT DISTINCT tbl_ort.*
|
||||
FROM public.tbl_ort JOIN public.tbl_ortraumtyp USING(ort_kurzbz)
|
||||
@@ -174,5 +177,16 @@ class Ort extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($content);
|
||||
}
|
||||
|
||||
public function getRoomInfo()
|
||||
{
|
||||
$ortKurzbz = $this->input->get("ortKurzbz");
|
||||
|
||||
$roomResult = $this->OrtModel->getRoomInfo($ortKurzbz);
|
||||
$roomData = $this->getDataOrTerminateWithError($roomResult);
|
||||
$room = count($roomData) ? $roomData[0] : null;
|
||||
|
||||
$this->terminateWithSuccess($room);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,12 @@ class Ort_model extends DB_Model
|
||||
$this->pk = "ort_kurzbz";
|
||||
}
|
||||
|
||||
public function getRoomInfo($ortKurzbz)
|
||||
{
|
||||
$this->addSelect("ort_kurzbz, ausstattung");
|
||||
return $this->OrtModel->loadWhere(array("ort_kurzbz" => $ortKurzbz));
|
||||
}
|
||||
|
||||
public function getAll($raumtyp_kurzbz)
|
||||
{
|
||||
$this->addOrder("ort_kurzbz");
|
||||
|
||||
@@ -18,23 +18,32 @@
|
||||
export default {
|
||||
getContentID(ort_kurbz) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Ort/ContentID',
|
||||
params: { ort_kurzbz: ort_kurbz }
|
||||
method: "get",
|
||||
url: "/api/frontend/v1/Ort/ContentID",
|
||||
params: { ort_kurzbz: ort_kurbz },
|
||||
};
|
||||
},
|
||||
getRooms(datum, von, bis, typ, personenanzahl = 0) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Ort/getRooms',
|
||||
params: { datum, von, bis, typ, personenanzahl }
|
||||
method: "get",
|
||||
url: "/api/frontend/v1/Ort/getRooms",
|
||||
params: { datum, von, bis, typ, personenanzahl },
|
||||
};
|
||||
},
|
||||
getRoomTypes() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Ort/getTypes',
|
||||
params: { }
|
||||
method: "get",
|
||||
url: "/api/frontend/v1/Ort/getTypes",
|
||||
params: {},
|
||||
};
|
||||
}
|
||||
};
|
||||
},
|
||||
getRoomInfo(ortKurzbz) {
|
||||
return {
|
||||
method: "get",
|
||||
url: "/api/frontend/v1/Ort/getRoomInfo",
|
||||
params: {
|
||||
ortKurzbz,
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ import FhcCalendar from "../../Calendar/LvPlan.js";
|
||||
|
||||
import ApiLvPlan from '../../../api/factory/lvPlan.js';
|
||||
import ApiRoomPlan from '../../../api/factory/calendar/roomPlan.js';
|
||||
import ApiRoom from '../../../api/factory/ort.js';
|
||||
|
||||
export const DEFAULT_MODE_RAUMINFO_MOBILE = 'List';
|
||||
export const DEFAULT_MODE_RAUMINFO_DESKTOP = 'Week';
|
||||
@@ -40,7 +41,8 @@ export default {
|
||||
searchGroup: this.searchGroup,
|
||||
searchLektor: this.searchLektor,
|
||||
},
|
||||
}
|
||||
},
|
||||
roomAdditionalInfo: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -155,9 +157,16 @@ export default {
|
||||
];
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const roomInfoResponse = await this.$api.call(
|
||||
ApiRoom.getRoomInfo(this.$props.propsViewData.ort_kurzbz),
|
||||
);
|
||||
this.roomAdditionalInfo = roomInfoResponse.data.ausstattung;
|
||||
},
|
||||
template: /*html*/`
|
||||
<div class="fhc-roominformation d-flex flex-column h-100">
|
||||
<h2>{{ $p.t('rauminfo/rauminfo') }} {{ propsViewData.ort_kurzbz }}</h2>
|
||||
<span v-if="roomAdditionalInfo?.length" v-html="roomAdditionalInfo"></span>
|
||||
<hr>
|
||||
<fhc-calendar
|
||||
ref="calendar"
|
||||
|
||||
Reference in New Issue
Block a user