fix(classrooms): blindar vistas presenciales y virtuales sin aulas + feat(admin): reinicializacion de sistema con clave de admin
This commit is contained in:
@@ -206,7 +206,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
function updatePreview() {
|
||||
var bText = '-';
|
||||
if (buildingSelect) {
|
||||
if (buildingSelect.value === '__new__') {
|
||||
if (buildingSelect.value === '__new__' || buildingSelect.value === 'new') {
|
||||
bText = newBuildingNameInput.value.trim() || '{{ _("Nuevo Edificio") }}';
|
||||
} else if (buildingSelect.selectedIndex >= 0) {
|
||||
bText = buildingSelect.options[buildingSelect.selectedIndex].text;
|
||||
@@ -222,7 +222,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
if (buildingSelect) {
|
||||
buildingSelect.addEventListener('change', function() {
|
||||
if (this.value === '__new__') {
|
||||
if (this.value === '__new__' || this.value === 'new') {
|
||||
newBuildingContainer.style.display = 'block';
|
||||
if (newBuildingNameInput) newBuildingNameInput.focus();
|
||||
} else {
|
||||
@@ -232,7 +232,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
updatePreview();
|
||||
});
|
||||
// Initial call
|
||||
if (buildingSelect.value === '__new__') {
|
||||
if (buildingSelect.value === '__new__' || buildingSelect.value === 'new') {
|
||||
newBuildingContainer.style.display = 'block';
|
||||
} else if (buildingSelect.value) {
|
||||
updateFloorsDatalist(buildingSelect.value);
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Grilla y Tabla de Aulas Físicas -->
|
||||
{% if classrooms and classrooms.items %}
|
||||
{% if classrooms and classrooms.items and (classrooms.items|length > 0) %}
|
||||
|
||||
<!-- 1. VISTA DE TARJETAS / MOSAICO -->
|
||||
<div data-view-context="classrooms" data-view-container="cards">
|
||||
@@ -708,7 +708,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Catálogo de Aulas Virtuales por Comisión -->
|
||||
{% if virtual_rooms %}
|
||||
{% if virtual_rooms and (virtual_rooms|length > 0) %}
|
||||
<div class="row g-3">
|
||||
{% for room in virtual_rooms %}
|
||||
<div class="col-xxl-3 col-xl-3 col-lg-4 col-md-6 col-sm-12 mb-2">
|
||||
@@ -1008,7 +1008,7 @@
|
||||
{% endif %}
|
||||
|
||||
<!-- Modales de Eliminación de Aulas Físicas -->
|
||||
{% if classrooms and classrooms.items %}
|
||||
{% if classrooms and classrooms.items and (classrooms.items|length > 0) %}
|
||||
{% for classroom in classrooms.items %}
|
||||
<div class="modal fade text-start" id="modalDeleteClassroom{{ classroom.id }}" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
|
||||
Reference in New Issue
Block a user