fix: update bedelia views for today and weekly reservations, available rooms and unassigned commissions
This commit is contained in:
@@ -833,6 +833,7 @@ const handleCommissionsList = async (req, res) => {
|
||||
const career_id = req.query.career_id || '';
|
||||
const shift = req.query.shift || '';
|
||||
const active = req.query.active || '';
|
||||
const unassigned_room = req.query.unassigned_room || '';
|
||||
const created = req.query.created === '1';
|
||||
|
||||
let commissions = [];
|
||||
@@ -843,7 +844,7 @@ const handleCommissionsList = async (req, res) => {
|
||||
|
||||
try {
|
||||
const [cRes, uRes] = await Promise.allSettled([
|
||||
req.apiClient.get('/commissions', { params: { search, subject_id, career_id, shift, active } }),
|
||||
req.apiClient.get('/commissions', { params: { search, subject_id, career_id, shift, active, unassigned_room } }),
|
||||
req.apiClient.get('/users')
|
||||
]);
|
||||
|
||||
@@ -853,6 +854,11 @@ const handleCommissionsList = async (req, res) => {
|
||||
get_full_code: () => c.full_code || c.code,
|
||||
career_id: c.career_id,
|
||||
career_name: c.career_name || 'Carrera General',
|
||||
classroom_name: c.classroom_name || 'Sin Aula Asignada',
|
||||
has_classroom: Boolean(c.has_classroom),
|
||||
is_virtual: Boolean(c.is_virtual),
|
||||
virtual_link: c.virtual_link || '',
|
||||
schedule: c.schedule || 'Sin horario',
|
||||
subject: {
|
||||
id: c.subject_id,
|
||||
name: c.subject_name,
|
||||
@@ -907,6 +913,7 @@ const handleCommissionsList = async (req, res) => {
|
||||
career_filter: career_id ? parseInt(career_id, 10) : '',
|
||||
shift_filter: shift,
|
||||
active_filter: active,
|
||||
unassigned_room_filter: unassigned_room,
|
||||
created,
|
||||
msg: req.query.msg || (created ? 'created' : ''),
|
||||
error: req.query.error || '',
|
||||
|
||||
Reference in New Issue
Block a user