feat(v3.4.7): add interactive floors and classrooms panel in building edit and preselect room creation
This commit is contained in:
@@ -350,9 +350,14 @@ const handleAddClassroom = async (req, res) => {
|
||||
{ value: 'new', text: '+ Crear nuevo edificio / sede' }
|
||||
];
|
||||
|
||||
const preselectedBuildingId = req.query.building_id || '';
|
||||
const preselectedFloor = req.query.floor || '';
|
||||
|
||||
const form = createFormMock({
|
||||
is_active: true,
|
||||
capacity: 35
|
||||
capacity: 35,
|
||||
building_id: preselectedBuildingId,
|
||||
floor: preselectedFloor
|
||||
}, {
|
||||
building_id: buildingOptions
|
||||
});
|
||||
@@ -361,7 +366,9 @@ const handleAddClassroom = async (req, res) => {
|
||||
title: 'Add Classroom - Edu-Space Admin',
|
||||
form,
|
||||
buildings,
|
||||
building_floors: buildingFloors
|
||||
building_floors: buildingFloors,
|
||||
preselected_building_id: preselectedBuildingId,
|
||||
preselected_floor: preselectedFloor
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error rendering add classroom:', error.message);
|
||||
|
||||
Reference in New Issue
Block a user