feat(padres): separar opciones en pantallas dedicadas con boton volver y limpiar panel principal
This commit is contained in:
+342
-261
@@ -830,294 +830,375 @@
|
||||
|
||||
<!-- SECCIÓN DE GESTIÓN DEL HIJO SELECCIONADO -->
|
||||
<div id="parentSelectedChildContainer" style="display: none;">
|
||||
<!-- TARJETA ELEGANTE DE SALDO EN LA CUENTA (ESTILO ORDEREAT REFINADO) -->
|
||||
<div class="parent-balance-card-refined">
|
||||
<div class="parent-balance-header-row">
|
||||
<div style="display: flex; align-items: center; gap: 10px; min-width: 0;">
|
||||
<img id="parentActiveChildAvatar" src="" style="width: 40px; height: 40px; border-radius: 50%; border: 2px solid #0284c7; background: white; object-fit: cover; flex-shrink: 0;">
|
||||
<div style="min-width: 0;">
|
||||
<span class="parent-balance-tag-title">Saldo en la cuenta</span>
|
||||
<div style="display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap;">
|
||||
<span id="parentActiveChildName" class="parent-balance-child-pill">Cargando...</span>
|
||||
<span id="parentActiveChildMeta" class="parent-balance-grade-pill">Grado • Carné</span>
|
||||
<!-- PANTALLA PRINCIPAL DEL HIJO (TERMINA EN EL MENÚ DE ACCIONES) -->
|
||||
<div id="parentChildDashboardMain">
|
||||
<!-- TARJETA ELEGANTE DE SALDO EN LA CUENTA (ESTILO ORDEREAT REFINADO) -->
|
||||
<div class="parent-balance-card-refined">
|
||||
<div class="parent-balance-header-row">
|
||||
<div style="display: flex; align-items: center; gap: 10px; min-width: 0;">
|
||||
<img id="parentActiveChildAvatar" src="" style="width: 40px; height: 40px; border-radius: 50%; border: 2px solid #0284c7; background: white; object-fit: cover; flex-shrink: 0;">
|
||||
<div style="min-width: 0;">
|
||||
<span class="parent-balance-tag-title">Saldo en la cuenta</span>
|
||||
<div style="display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap;">
|
||||
<span id="parentActiveChildName" class="parent-balance-child-pill">Cargando...</span>
|
||||
<span id="parentActiveChildMeta" class="parent-balance-grade-pill">Grado • Carné</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="switchToSodaMenuAsParent()" style="background: none; border: none; color: #0284c7; font-size: 0.78rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px;">
|
||||
<span>Ver Menú</span>
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" onclick="switchToSodaMenuAsParent()" style="background: none; border: none; color: #0284c7; font-size: 0.78rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px;">
|
||||
<span>Ver Menú</span>
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
|
||||
<div class="parent-balance-amount-display">
|
||||
<span id="parentActiveChildBalance">₡0</span>
|
||||
</div>
|
||||
|
||||
<div class="parent-balance-footer-row">
|
||||
<div class="parent-balance-limit-info">
|
||||
Límite Diario: <strong id="parentDailyLimitInlineDisplay" style="color: #0284c7;">₡3.000</strong>
|
||||
</div>
|
||||
<button type="button" onclick="openParentSubView('sinpe')" class="parent-balance-btn-recharge">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<span>Recargar Saldo</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR DE SEDE ESCOLAR ACTIVA -->
|
||||
<div class="parent-school-selector-pill">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 34px; height: 34px; border-radius: 10px; background: rgba(2, 132, 199, 0.1); color: #0284c7; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;">
|
||||
🏫
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block;">Sede Escolar Activa</span>
|
||||
<strong id="parentActiveSchoolNameBadge" style="font-size: 0.85rem; font-weight: 900; color: var(--text-main);">Soda Escolar Central</strong>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-size: 0.72rem; color: #0284c7; font-weight: 800; background: #f0f9ff; padding: 3px 8px; border-radius: 6px;">● Conectada</span>
|
||||
</div>
|
||||
|
||||
<!-- MENÚ DE ACCIONES RÁPIDAS SUPERFINAS (ESTILO ORDEREAT) -->
|
||||
<div class="parent-refined-menu-card">
|
||||
<div onclick="switchToSodaMenuAsParent()" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"/><path d="M7 2v20"/><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Pre-ordenar Merienda / Ver Menú</span>
|
||||
<span class="parent-refined-item-desc">Alimentos saludables aprobados por el MEP</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="openParentSubView('alergias')" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box rose-halo">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title" style="color: #e11d48;">Alergias y Restricciones</span>
|
||||
<span class="parent-refined-item-desc">Veto de golosinas y expediente médico</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow" style="color: #f43f5e;">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="openParentSubView('limites')" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Límite Diario de Gasto</span>
|
||||
<span class="parent-refined-item-desc">Control presupuestario y transferencias</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="openParentSubView('historial')" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Historial de Compras en Soda</span>
|
||||
<span class="parent-refined-item-desc">Revisar consumos escolares</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="openParentSubView('credenciales')" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Seguridad y PIN Escolar</span>
|
||||
<span class="parent-refined-item-desc">PIN de 4 dígitos y contraseña del carné</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 1. SUB-PANTALLA: RECARGA SINPE MÓVIL -->
|
||||
<div id="parentSubViewSinpe" class="parent-subview" style="display: none;">
|
||||
<div class="parent-subview-header">
|
||||
<button type="button" onclick="closeParentSubView()" class="parent-subview-back-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
|
||||
<span>Volver</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="parent-balance-amount-display">
|
||||
<span id="parentActiveChildBalance">₡0</span>
|
||||
</div>
|
||||
|
||||
<div class="parent-balance-footer-row">
|
||||
<div class="parent-balance-limit-info">
|
||||
Límite Diario: <strong id="parentDailyLimitInlineDisplay" style="color: #0284c7;">₡3.000</strong>
|
||||
<div class="parent-subview-child-tag">
|
||||
<img class="parentSubViewChildAvatar" src="" alt="Hijo">
|
||||
<span class="parentSubViewChildName">Estudiante</span>
|
||||
</div>
|
||||
<button type="button" onclick="focusParentSinpeRecharge()" class="parent-balance-btn-recharge">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<span>Recargar Saldo</span>
|
||||
</div>
|
||||
|
||||
<div class="parent-card" style="background: #f0fdf4; border: 1.5px solid #86efac;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 36px; height: 36px; border-radius: 10px; background: #dcfce7; color: #166534; display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><line x1="12" x2="12.01" y1="18" y2="18"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #166534; font-size: 1rem; display: block;">Recarga por SINPE Móvil</strong>
|
||||
<p style="font-size: 0.74rem; color: #15803d; margin: 0;">
|
||||
<span id="parentSinpeEscuelaNombre" style="font-weight: 800;">Soda Escolar</span> · Tel: <strong id="parentSinpeNumero">8888-8888</strong>
|
||||
</p>
|
||||
<p style="font-size: 0.70rem; color: #166534; margin: 2px 0 0 0;">
|
||||
Titular: <span id="parentSinpeTitular" style="font-weight: 700;">Soda Central</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-size: 0.7rem; color: #166534; background: #dcfce7; font-weight: 800; padding: 3px 8px; border-radius: 6px;">Inmediato</span>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;">
|
||||
<div>
|
||||
<label for="inputParentSinpeMonto" style="display: block; font-size: 0.78rem; font-weight: 800; color: #166534; margin-bottom: 4px;">
|
||||
Monto a recargar (₡):
|
||||
</label>
|
||||
<div style="position: relative;">
|
||||
<span style="position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #166534; font-size: 1.05rem;">₡</span>
|
||||
<input type="tel" inputmode="numeric" pattern="[0-9]*" id="inputParentSinpeMonto" placeholder="Ej: 3000" style="width: 100%; padding: 10px 10px 10px 28px; border-radius: 10px; border: 1.5px solid #86efac; font-size: 1.05rem; font-weight: 800; color: #166534; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="inputParentSinpeComprobante" style="display: block; font-size: 0.78rem; font-weight: 800; color: #166534; margin-bottom: 4px;">
|
||||
N° Comprobante SINPE:
|
||||
</label>
|
||||
<input type="text" id="inputParentSinpeComprobante" placeholder="Ej: 894321" style="width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #86efac; font-size: 1.05rem; font-weight: 800; color: #166534; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" id="btnParentValidarSinpe" onclick="executeParentSinpeRecharge()" style="width: 100%; padding: 13px; background: linear-gradient(135deg, #16a34a, #15803d); color: white; border: none; border-radius: 12px; font-weight: 900; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
||||
<span>Validar SINPE</span>
|
||||
</button>
|
||||
|
||||
<!-- LISTA DE SOLICITUDES SINPE PENDIENTES DEL HIJO -->
|
||||
<div id="parentSinpePendingBox" style="margin-top: 14px; border-top: 1px dashed #86efac; padding-top: 10px; display: none;">
|
||||
<div style="font-size: 0.76rem; font-weight: 800; color: #166534; margin-bottom: 6px;">Estado de Recargas Recientes:</div>
|
||||
<div id="parentSinpePendingList" style="display: flex; flex-direction: column; gap: 6px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2. SUB-PANTALLA: ALERGIAS Y SALUD -->
|
||||
<div id="parentSubViewAlergias" class="parent-subview" style="display: none;">
|
||||
<div class="parent-subview-header">
|
||||
<button type="button" onclick="closeParentSubView()" class="parent-subview-back-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
|
||||
<span>Volver</span>
|
||||
</button>
|
||||
<div class="parent-subview-child-tag">
|
||||
<img class="parentSubViewChildAvatar" src="" alt="Hijo">
|
||||
<span class="parentSubViewChildName">Estudiante</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="parentAllergiesCard" class="parent-card" style="background: #ffffff; border: 1.5px solid #fecdd3; border-radius: 20px; box-shadow: 0 4px 14px rgba(225, 29, 72, 0.05);">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div class="parent-refined-icon-box rose-halo" style="width: 36px; height: 36px;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #9f1239; font-size: 0.95rem; display: block;">Alergias y Restricciones</strong>
|
||||
<span style="font-size: 0.72rem; color: #e11d48; font-weight: 600;">Expediente de salud y veto de golosinas</span>
|
||||
</div>
|
||||
</div>
|
||||
<span id="parentAllergiesStatusBadge" style="font-size: 0.7rem; color: #e11d48; background: #ffe4e6; font-weight: 800; padding: 3px 8px; border-radius: 6px;">Sin alergias</span>
|
||||
</div>
|
||||
|
||||
<!-- Alergias clínicas -->
|
||||
<div style="margin-bottom: 14px; background: #fff1f2; border: 1px solid #fecdd3; padding: 12px; border-radius: 14px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
|
||||
<label style="font-size: 0.76rem; font-weight: 800; color: #9f1239; display: block;">Alergias o Intolerancias Médicas:</label>
|
||||
<span style="font-size: 0.68rem; color: #e11d48; font-weight: 700;">Visible en caja de soda</span>
|
||||
</div>
|
||||
<input type="text" id="inputParentStudentAllergies" placeholder="Ej: Maní, Gluten, Lactosa, Mariscos..." style="width: 100%; padding: 9px 12px; border-radius: 10px; border: 1.5px solid #fca5a5; font-size: 0.85rem; font-weight: 700; color: #881337; background: #ffffff; box-sizing: border-box;">
|
||||
<div style="display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap;">
|
||||
<button type="button" onclick="addParentAllergyTag('Maní')" class="allergy-tag-pill">+ Maní</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Gluten')" class="allergy-tag-pill">+ Gluten</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Lactosa')" class="allergy-tag-pill">+ Lactosa</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Mariscos')" class="allergy-tag-pill">+ Mariscos</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Huevo')" class="allergy-tag-pill">+ Huevo</button>
|
||||
<button type="button" onclick="clearParentAllergies()" class="allergy-tag-pill" style="color: #64748b; background: white; border-color: #cbd5e1;">Ninguna</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toggle Veto de Chucherías / Comida no saludable -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; padding: 12px; border-radius: 14px; margin-bottom: 12px;">
|
||||
<div>
|
||||
<strong style="font-size: 0.84rem; color: #1e293b; display: block;">Veto de Comida Chatarra / Golosinas</strong>
|
||||
<span style="font-size: 0.70rem; color: #64748b; display: block; margin-top: 2px;">Bloquea confites, gaseosas y productos no avalados por el MEP en caja</span>
|
||||
</div>
|
||||
<input type="checkbox" id="chkParentBlockJunkFood" onchange="onToggleParentBlockJunkFood(this.checked)" style="width: 22px; height: 22px; cursor: pointer; accent-color: #e11d48;">
|
||||
</div>
|
||||
|
||||
<!-- Botón Guardar Alergias -->
|
||||
<button type="button" onclick="saveParentAllergiesSettings()" style="width: 100%; padding: 11px; background: linear-gradient(135deg, #e11d48, #be123c); color: white; border: none; border-radius: 12px; font-weight: 800; font-size: 0.86rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
|
||||
<span>Guardar Configuración de Salud</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR DE SEDE ESCOLAR ACTIVA -->
|
||||
<div class="parent-school-selector-pill">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 34px; height: 34px; border-radius: 10px; background: rgba(2, 132, 199, 0.1); color: #0284c7; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;">
|
||||
🏫
|
||||
<!-- 3. SUB-PANTALLA: LÍMITE DIARIO Y TRANSFERENCIAS -->
|
||||
<div id="parentSubViewLimites" class="parent-subview" style="display: none;">
|
||||
<div class="parent-subview-header">
|
||||
<button type="button" onclick="closeParentSubView()" class="parent-subview-back-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
|
||||
<span>Volver</span>
|
||||
</button>
|
||||
<div class="parent-subview-child-tag">
|
||||
<img class="parentSubViewChildAvatar" src="" alt="Hijo">
|
||||
<span class="parentSubViewChildName">Estudiante</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="parentDailyLimitCard" class="parent-card" style="background: #f0f9ff; border: 2px solid #38bdf8; margin-bottom: 12px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<div>
|
||||
<strong style="font-size: 0.95rem; color: #0369a1; display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
|
||||
<span>Límite de Gasto Máximo Diario</span>
|
||||
</strong>
|
||||
<span style="font-size: 0.74rem; color: #64748b; display: block; margin-top: 2px;">Monto máximo que el estudiante puede gastar por día</span>
|
||||
</div>
|
||||
<span id="lblParentDailyLimitDisplay" style="font-size: 1.1rem; color: #0284c7; font-weight: 900; background: white; border: 1.5px solid #bae6fd; padding: 4px 12px; border-radius: 8px;">₡3.000</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 8px; margin-bottom: 10px;">
|
||||
<div style="position: relative; flex: 1;">
|
||||
<span style="position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #0284c7; font-size: 1.1rem;">₡</span>
|
||||
<input type="tel" inputmode="numeric" pattern="[0-9]*" id="inputParentCustomLimit" placeholder="Ej: 3000" style="width: 100%; padding: 10px 10px 10px 30px; border-radius: 10px; border: 2px solid #0284c7; font-size: 1.1rem; font-weight: 900; color: #0f172a; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
<button type="button" onclick="saveParentCustomLimit()" style="padding: 10px 16px; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; border-radius: 10px; font-weight: 900; font-size: 0.85rem; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>Guardar</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 10px;">
|
||||
<button type="button" onclick="setParentLimitPreset(1500)" class="stock-btn-quick">₡1.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(2500)" class="stock-btn-quick">₡2.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(3500)" class="stock-btn-quick">₡3.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(5000)" class="stock-btn-quick">₡5.000</button>
|
||||
</div>
|
||||
|
||||
<input type="range" id="rangeParentLimit" min="1000" max="10000" step="500" value="3000" oninput="onParentLimitSliderChange(this.value)" style="width: 100%;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 0.7rem; color: #64748b; margin-top: 2px;">
|
||||
<span>₡1.000 min</span>
|
||||
<span>₡10.000 max</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PERMISOS DE TRANSFERENCIA ENTRE COMPAÑEROS -->
|
||||
<div class="parent-card" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<span style="font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block;">Sede Escolar Activa</span>
|
||||
<strong id="parentActiveSchoolNameBadge" style="font-size: 0.85rem; font-weight: 900; color: var(--text-main);">Soda Escolar Central</strong>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-size: 0.72rem; color: #0284c7; font-weight: 800; background: #f0f9ff; padding: 3px 8px; border-radius: 6px;">● Conectada</span>
|
||||
</div>
|
||||
|
||||
<!-- MENÚ DE ACCIONES RÁPIDAS SUPERFINAS (ESTILO ORDEREAT) -->
|
||||
<div class="parent-refined-menu-card">
|
||||
<div onclick="switchToSodaMenuAsParent()" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"/><path d="M7 2v20"/><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Pre-ordenar Merienda / Ver Menú</span>
|
||||
<span class="parent-refined-item-desc">Alimentos saludables aprobados por el MEP</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="document.getElementById('parentAllergiesCard')?.scrollIntoView({ behavior: 'smooth' })" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box rose-halo">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title" style="color: #e11d48;">Alergias y Restricciones</span>
|
||||
<span class="parent-refined-item-desc">Veto de golosinas y expediente médico</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow" style="color: #f43f5e;">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="document.getElementById('parentDailyLimitCard')?.scrollIntoView({ behavior: 'smooth' })" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Límite Diario de Gasto</span>
|
||||
<span class="parent-refined-item-desc">Control presupuestario de compras</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
|
||||
<div onclick="document.getElementById('parentHistoryCard')?.scrollIntoView({ behavior: 'smooth' })" class="parent-refined-menu-item">
|
||||
<div class="parent-refined-item-left">
|
||||
<div class="parent-refined-icon-box">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<span class="parent-refined-item-title">Historial de Compras en Soda</span>
|
||||
<span class="parent-refined-item-desc">Revisar consumos escolares</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parent-refined-arrow">›</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RECARGA SINPE MÓVIL (DIRECTO EN PANTALLA, NO MODAL) -->
|
||||
<div class="parent-card" style="background: #f0fdf4; border: 1.5px solid #86efac;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 36px; height: 36px; border-radius: 10px; background: #dcfce7; color: #166534; display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><line x1="12" x2="12.01" y1="18" y2="18"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #166534; font-size: 1rem; display: block;">Recarga por SINPE Móvil</strong>
|
||||
<p style="font-size: 0.74rem; color: #15803d; margin: 0;">
|
||||
<span id="parentSinpeEscuelaNombre" style="font-weight: 800;">Soda Escolar</span> · Tel: <strong id="parentSinpeNumero">8888-8888</strong>
|
||||
</p>
|
||||
<p style="font-size: 0.70rem; color: #166534; margin: 2px 0 0 0;">
|
||||
Titular: <span id="parentSinpeTitular" style="font-weight: 700;">Soda Central</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-size: 0.7rem; color: #166534; background: #dcfce7; font-weight: 800; padding: 3px 8px; border-radius: 6px;">Inmediato</span>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;">
|
||||
<div>
|
||||
<label for="inputParentSinpeMonto" style="display: block; font-size: 0.78rem; font-weight: 800; color: #166534; margin-bottom: 4px;">
|
||||
Monto a recargar (₡):
|
||||
</label>
|
||||
<div style="position: relative;">
|
||||
<span style="position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #166534; font-size: 1.05rem;">₡</span>
|
||||
<input type="tel" inputmode="numeric" pattern="[0-9]*" id="inputParentSinpeMonto" placeholder="Ej: 3000" style="width: 100%; padding: 10px 10px 10px 28px; border-radius: 10px; border: 1.5px solid #86efac; font-size: 1.05rem; font-weight: 800; color: #166534; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="inputParentSinpeComprobante" style="display: block; font-size: 0.78rem; font-weight: 800; color: #166534; margin-bottom: 4px;">
|
||||
N° Comprobante SINPE:
|
||||
</label>
|
||||
<input type="text" id="inputParentSinpeComprobante" placeholder="Ej: 894321" style="width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #86efac; font-size: 1.05rem; font-weight: 800; color: #166534; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" id="btnParentValidarSinpe" onclick="executeParentSinpeRecharge()" style="width: 100%; padding: 13px; background: linear-gradient(135deg, #16a34a, #15803d); color: white; border: none; border-radius: 12px; font-weight: 900; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
||||
<span>Validar SINPE</span>
|
||||
</button>
|
||||
|
||||
<!-- LISTA DE SOLICITUDES SINPE PENDIENTES DEL HIJO -->
|
||||
<div id="parentSinpePendingBox" style="margin-top: 14px; border-top: 1px dashed #86efac; padding-top: 10px; display: none;">
|
||||
<div style="font-size: 0.76rem; font-weight: 800; color: #166534; margin-bottom: 6px;">Estado de Recargas Recientes:</div>
|
||||
<div id="parentSinpePendingList" style="display: flex; flex-direction: column; gap: 6px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TARJETA DE ALERGIAS Y RESTRICCIONES (ESTILO ORDEREAT SALUDABLE) -->
|
||||
<div id="parentAllergiesCard" class="parent-card" style="background: #ffffff; border: 1.5px solid #fecdd3; border-radius: 20px; box-shadow: 0 4px 14px rgba(225, 29, 72, 0.05);">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div class="parent-refined-icon-box rose-halo" style="width: 36px; height: 36px;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #9f1239; font-size: 0.95rem; display: block;">Alergias y Restricciones</strong>
|
||||
<span style="font-size: 0.72rem; color: #e11d48; font-weight: 600;">Expediente de salud y veto de golosinas</span>
|
||||
</div>
|
||||
</div>
|
||||
<span id="parentAllergiesStatusBadge" style="font-size: 0.7rem; color: #e11d48; background: #ffe4e6; font-weight: 800; padding: 3px 8px; border-radius: 6px;">Sin alergias</span>
|
||||
</div>
|
||||
|
||||
<!-- Alergias clínicas -->
|
||||
<div style="margin-bottom: 14px; background: #fff1f2; border: 1px solid #fecdd3; padding: 12px; border-radius: 14px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
|
||||
<label style="font-size: 0.76rem; font-weight: 800; color: #9f1239; display: block;">Alergias o Intolerancias Médicas:</label>
|
||||
<span style="font-size: 0.68rem; color: #e11d48; font-weight: 700;">Visible en caja de soda</span>
|
||||
</div>
|
||||
<input type="text" id="inputParentStudentAllergies" placeholder="Ej: Maní, Gluten, Lactosa, Mariscos..." style="width: 100%; padding: 9px 12px; border-radius: 10px; border: 1.5px solid #fca5a5; font-size: 0.85rem; font-weight: 700; color: #881337; background: #ffffff; box-sizing: border-box;">
|
||||
<div style="display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap;">
|
||||
<button type="button" onclick="addParentAllergyTag('Maní')" class="allergy-tag-pill">+ Maní</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Gluten')" class="allergy-tag-pill">+ Gluten</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Lactosa')" class="allergy-tag-pill">+ Lactosa</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Mariscos')" class="allergy-tag-pill">+ Mariscos</button>
|
||||
<button type="button" onclick="addParentAllergyTag('Huevo')" class="allergy-tag-pill">+ Huevo</button>
|
||||
<button type="button" onclick="clearParentAllergies()" class="allergy-tag-pill" style="color: #64748b; background: white; border-color: #cbd5e1;">Ninguna</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toggle Veto de Chucherías / Comida no saludable -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; padding: 12px; border-radius: 14px; margin-bottom: 12px;">
|
||||
<div>
|
||||
<strong style="font-size: 0.84rem; color: #1e293b; display: block;">Veto de Comida Chatarra / Golosinas</strong>
|
||||
<span style="font-size: 0.70rem; color: #64748b; display: block; margin-top: 2px;">Bloquea confites, gaseosas y productos no avalados por el MEP en caja</span>
|
||||
</div>
|
||||
<input type="checkbox" id="chkParentBlockJunkFood" onchange="onToggleParentBlockJunkFood(this.checked)" style="width: 22px; height: 22px; cursor: pointer; accent-color: #e11d48;">
|
||||
</div>
|
||||
|
||||
<!-- Botón Guardar Alergias -->
|
||||
<button type="button" onclick="saveParentAllergiesSettings()" style="width: 100%; padding: 11px; background: linear-gradient(135deg, #e11d48, #be123c); color: white; border: none; border-radius: 12px; font-weight: 800; font-size: 0.86rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
|
||||
<span>Guardar Configuración de Salud</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- CONFIGURACIÓN DE LÍMITE DIARIO -->
|
||||
<div id="parentDailyLimitCard" class="parent-card" style="background: #f0f9ff; border: 2px solid #38bdf8;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<div>
|
||||
<strong style="font-size: 0.95rem; color: #0369a1; display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
|
||||
<span>Límite de Gasto Máximo Diario</span>
|
||||
<strong style="font-size: 0.88rem; color: var(--text-main); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg>
|
||||
<span>Transferencias entre Compañeros</span>
|
||||
</strong>
|
||||
<span style="font-size: 0.74rem; color: #64748b; display: block; margin-top: 2px;">Monto máximo que el estudiante puede gastar por día</span>
|
||||
<span style="font-size: 0.74rem; color: var(--text-muted); display: block; margin-top: 2px;">Permitir transferir saldo a compañeros de clase</span>
|
||||
</div>
|
||||
<span id="lblParentDailyLimitDisplay" style="font-size: 1.1rem; color: #0284c7; font-weight: 900; background: white; border: 1.5px solid #bae6fd; padding: 4px 12px; border-radius: 8px;">₡3.000</span>
|
||||
<input type="checkbox" id="chkParentAllowTransferDirect" onchange="onToggleParentTransfer(this.checked)" style="width: 24px; height: 24px; cursor: pointer; accent-color: #0284c7;" checked>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 8px; margin-bottom: 10px;">
|
||||
<div style="position: relative; flex: 1;">
|
||||
<span style="position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #0284c7; font-size: 1.1rem;">₡</span>
|
||||
<input type="tel" inputmode="numeric" pattern="[0-9]*" id="inputParentCustomLimit" placeholder="Ej: 3000" style="width: 100%; padding: 10px 10px 10px 30px; border-radius: 10px; border: 2px solid #0284c7; font-size: 1.1rem; font-weight: 900; color: #0f172a; background: white; box-sizing: border-box;">
|
||||
</div>
|
||||
<button type="button" onclick="saveParentCustomLimit()" style="padding: 10px 16px; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; border-radius: 10px; font-weight: 900; font-size: 0.85rem; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>Guardar</span>
|
||||
<!-- 4. SUB-PANTALLA: HISTORIAL DE COMPRAS -->
|
||||
<div id="parentSubViewHistorial" class="parent-subview" style="display: none;">
|
||||
<div class="parent-subview-header">
|
||||
<button type="button" onclick="closeParentSubView()" class="parent-subview-back-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
|
||||
<span>Volver</span>
|
||||
</button>
|
||||
<div class="parent-subview-child-tag">
|
||||
<img class="parentSubViewChildAvatar" src="" alt="Hijo">
|
||||
<span class="parentSubViewChildName">Estudiante</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 10px;">
|
||||
<button type="button" onclick="setParentLimitPreset(1500)" class="stock-btn-quick">₡1.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(2500)" class="stock-btn-quick">₡2.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(3500)" class="stock-btn-quick">₡3.500</button>
|
||||
<button type="button" onclick="setParentLimitPreset(5000)" class="stock-btn-quick">₡5.000</button>
|
||||
</div>
|
||||
|
||||
<input type="range" id="rangeParentLimit" min="1000" max="10000" step="500" value="3000" oninput="onParentLimitSliderChange(this.value)" style="width: 100%;">
|
||||
<div style="display: flex; justify-content: space-between; font-size: 0.7rem; color: #64748b; margin-top: 2px;">
|
||||
<span>₡1.000 min</span>
|
||||
<span>₡10.000 max</span>
|
||||
<div id="parentHistoryCard" class="parent-card">
|
||||
<h4 style="font-size: 0.95rem; font-weight: 900; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" x2="8" y1="13" y2="13"/><line x1="16" x2="8" y1="17" y2="17"/></svg>
|
||||
<span>Historial Detallado de Compras</span>
|
||||
</h4>
|
||||
<div id="parentStudentHistoryList" style="font-size: 0.85rem; color: var(--text-muted);">
|
||||
Sin compras recientes registradas.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PERMISOS DE TRANSFERENCIA ENTRE COMPAÑEROS -->
|
||||
<div class="parent-card" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<strong style="font-size: 0.88rem; color: var(--text-main); display: inline-flex; align-items: center; gap: 6px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg>
|
||||
<span>Transferencias entre Compañeros</span>
|
||||
</strong>
|
||||
<span style="font-size: 0.74rem; color: var(--text-muted); display: block; margin-top: 2px;">Permitir transferir saldo a compañeros de clase</span>
|
||||
</div>
|
||||
<input type="checkbox" id="chkParentAllowTransferDirect" onchange="onToggleParentTransfer(this.checked)" style="width: 24px; height: 24px; cursor: pointer; accent-color: #0284c7;" checked>
|
||||
</div>
|
||||
|
||||
<!-- SEGURIDAD Y PIN ESCOLAR -->
|
||||
<div class="parent-card" style="border: 1.5px dashed var(--border);">
|
||||
<div style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px;">
|
||||
<div style="width: 32px; height: 32px; border-radius: 8px; background: rgba(51, 65, 85, 0.1); color: #334155; display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="font-size: 0.9rem; color: var(--text-main); display: block;">Credenciales del Estudiante</strong>
|
||||
<span style="font-size: 0.74rem; color: var(--text-muted);">Restablece el PIN o la contraseña de acceso escolar</span>
|
||||
<!-- 5. SUB-PANTALLA: SEGURIDAD Y CREDENCIALES -->
|
||||
<div id="parentSubViewCredenciales" class="parent-subview" style="display: none;">
|
||||
<div class="parent-subview-header">
|
||||
<button type="button" onclick="closeParentSubView()" class="parent-subview-back-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
|
||||
<span>Volver</span>
|
||||
</button>
|
||||
<div class="parent-subview-child-tag">
|
||||
<img class="parentSubViewChildAvatar" src="" alt="Hijo">
|
||||
<span class="parentSubViewChildName">Estudiante</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;">
|
||||
<div>
|
||||
<label style="display: block; font-size: 0.74rem; font-weight: 800; color: var(--text-muted); margin-bottom: 3px;">Nuevo PIN (4 dígitos):</label>
|
||||
<input type="password" inputmode="numeric" maxlength="4" id="inputParentStudentPin" placeholder="1234" style="width: 100%; padding: 9px; border-radius: 8px; border: 1.5px solid var(--border); font-weight: 900; letter-spacing: 2px; text-align: center; box-sizing: border-box; background: var(--card-bg); color: var(--text-main);">
|
||||
<div class="parent-card" style="border: 1.5px solid var(--border);">
|
||||
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 14px;">
|
||||
<div style="width: 38px; height: 38px; border-radius: 10px; background: rgba(51, 65, 85, 0.1); color: #334155; display: flex; align-items: center; justify-content: center; flex-shrink: 0;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<strong style="font-size: 0.95rem; color: var(--text-main); display: block;">Credenciales de Acceso Escolar</strong>
|
||||
<span style="font-size: 0.74rem; color: var(--text-muted);">Restablece el PIN de 4 dígitos o contraseña de tu hijo</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label style="display: block; font-size: 0.74rem; font-weight: 800; color: var(--text-muted); margin-bottom: 3px;">Nueva Contraseña:</label>
|
||||
<input type="text" id="inputParentStudentPass" placeholder="Ej: 1234" style="width: 100%; padding: 9px; border-radius: 8px; border: 1.5px solid var(--border); font-weight: 800; box-sizing: border-box; background: var(--card-bg); color: var(--text-main);">
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;">
|
||||
<div>
|
||||
<label style="display: block; font-size: 0.76rem; font-weight: 800; color: var(--text-muted); margin-bottom: 4px;">Nuevo PIN (4 dígitos):</label>
|
||||
<input type="password" inputmode="numeric" maxlength="4" id="inputParentStudentPin" placeholder="1234" style="width: 100%; padding: 11px; border-radius: 10px; border: 1.5px solid var(--border); font-weight: 900; letter-spacing: 3px; text-align: center; box-sizing: border-box; background: var(--card-bg); color: var(--text-main); font-size: 1.05rem;">
|
||||
</div>
|
||||
<div>
|
||||
<label style="display: block; font-size: 0.76rem; font-weight: 800; color: var(--text-muted); margin-bottom: 4px;">Nueva Contraseña:</label>
|
||||
<input type="text" id="inputParentStudentPass" placeholder="Ej: 1234" style="width: 100%; padding: 11px; border-radius: 10px; border: 1.5px solid var(--border); font-weight: 800; box-sizing: border-box; background: var(--card-bg); color: var(--text-main); font-size: 0.95rem;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" onclick="saveParentStudentCredentials()" style="width: 100%; padding: 10px; background: #334155; color: white; border: none; border-radius: 8px; font-weight: 800; font-size: 0.82rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>Guardar Nuevas Credenciales</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- HISTORIAL DE COMPRAS RECIENTES -->
|
||||
<div id="parentHistoryCard" class="parent-card">
|
||||
<h4 style="font-size: 0.9rem; font-weight: 900; color: var(--text-main); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" x2="8" y1="13" y2="13"/><line x1="16" x2="8" y1="17" y2="17"/></svg>
|
||||
<span>Historial de Compras en Soda</span>
|
||||
</h4>
|
||||
<div id="parentStudentHistoryList" style="font-size: 0.8rem; color: var(--text-muted);">
|
||||
Sin compras recientes registradas.
|
||||
<button type="button" onclick="saveParentStudentCredentials()" style="width: 100%; padding: 12px; background: #334155; color: white; border: none; border-radius: 10px; font-weight: 800; font-size: 0.88rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
<span>Guardar Nuevas Credenciales</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user