feat(padres): modal interactivo de terminos de pago SINPE para movil y enlace bajo validar

This commit is contained in:
unknown
2026-10-07 14:13:58 -06:00
parent d4531744c4
commit e00f8fffb4
4 changed files with 147 additions and 0 deletions
+1
View File
@@ -405,6 +405,7 @@
}
.parent-sinpe-terms-card {
display: block !important;
background: var(--card-bg, #ffffff) !important;
border: 1.5px solid var(--border, #e2e8f0) !important;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
+19
View File
@@ -5214,6 +5214,11 @@ body.dark-mode .sinpe-card-receipt {
width: 100%;
}
/* En móviles se oculta la tarjeta lateral fija para no saturar la pantalla; se abre mediante el modal */
.parent-sinpe-terms-card {
display: none;
}
body.dark-mode .parent-sinpe-form-card {
background: rgba(6, 78, 59, 0.22) !important;
border-color: #059669 !important;
@@ -5225,6 +5230,20 @@ body.dark-mode .parent-sinpe-terms-card {
color: #f1f5f9;
}
body.dark-mode #modalSinpeTerms .modal-qr-card {
background: #0f172a !important;
color: #f8fafc !important;
border: 1px solid #334155 !important;
}
body.dark-mode #modalSinpeTerms strong {
color: #f8fafc !important;
}
body.dark-mode #modalSinpeTerms span {
color: #cbd5e1;
}
/* Filtros de Historial de Movimientos */
.mov-filter-btn {
padding: 6px 14px;
+114
View File
@@ -1219,6 +1219,14 @@
<span id="btnParentValidarSinpeText">Validar SINPE</span>
</button>
<!-- Enlace a Términos y Condiciones SINPE -->
<div style="text-align: center; margin-top: 10px; font-size: 0.72rem; color: #64748b; line-height: 1.45;">
<span>Al hacer pagos por SINPE acepta los </span>
<button type="button" onclick="openModalSinpeTerms()" style="background: none; border: none; padding: 0; color: #0284c7; font-weight: 800; font-size: 0.72rem; cursor: pointer; text-decoration: underline; display: inline;">
términos de pago con SINPE móvil
</button>
</div>
<!-- Banner de estado dinámico -->
<div id="parentSinpeStatusMsg" style="display: none; margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 0.80rem; line-height: 1.4;"></div>
@@ -2861,6 +2869,112 @@
</div>
</div>
<!-- MODAL: TÉRMINOS, CONDICIONES Y GUÍA DE RECARGA SINPE MÓVIL -->
<div class="modal-qr-backdrop modal-sinpe-backdrop" id="modalSinpeTerms" style="display: none;" onclick="closeModalSinpeTerms(event)">
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 480px; max-height: 85vh; overflow-y: auto; text-align: left; padding: 22px; border-radius: 20px; box-sizing: border-box;">
<!-- Encabezado del Modal -->
<div style="display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--border, #e2e8f0); padding-bottom: 12px; margin-bottom: 14px;">
<div style="display: flex; align-items: center; gap: 10px;">
<div style="width: 38px; height: 38px; border-radius: 10px; background: #e0f2fe; color: #0284c7; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0;">
🛡️
</div>
<div>
<h3 style="margin: 0; font-size: 1.05rem; font-weight: 900; color: var(--text-main, #0f172a);">Términos y Guía SINPE Móvil</h3>
<span style="font-size: 0.74rem; color: var(--text-muted, #64748b);">Reglas para acreditación automática</span>
</div>
</div>
<button type="button" onclick="closeModalSinpeTerms()" style="background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-muted, #64748b); padding: 4px;" title="Cerrar">✕</button>
</div>
<!-- Alerta Dorada: Coincidencia Exacta -->
<div style="background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 12px; padding: 12px; margin-bottom: 14px;">
<div style="display: flex; align-items: flex-start; gap: 8px;">
<span style="font-size: 1.15rem; line-height: 1;">⚠️</span>
<div style="font-size: 0.77rem; color: #92400e; line-height: 1.45;">
<strong style="display: block; font-size: 0.82rem; margin-bottom: 2px;">Atención a dos datos obligatorios:</strong>
El <strong>monto</strong> y el <strong>código SIBO</strong> deben coincidir con total precisión para que el sistema de la soda apruebe el saldo en segundos.
</div>
</div>
</div>
<!-- Lista de Términos Numerados -->
<div style="display: flex; flex-direction: column; gap: 13px; font-size: 0.78rem; color: var(--text-main, #334155); line-height: 1.45;">
<!-- 1. Monto Exacto -->
<div style="display: flex; gap: 10px; align-items: flex-start;">
<div style="width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;">
1
</div>
<div>
<strong style="color: var(--text-main, #0f172a); display: block; font-size: 0.82rem;">Monto idéntico al transferido:</strong>
<span>El monto elegido en esta pantalla debe ser <strong>exactamente igual</strong> al transferido desde su banco (ej: si transfirió ₡3.000, digite ₡3.000). Diferencias en el importe impiden la conciliación automática.</span>
</div>
</div>
<!-- 2. Código Obligatorio -->
<div style="display: flex; gap: 10px; align-items: flex-start;">
<div style="width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;">
2
</div>
<div>
<strong style="color: var(--text-main, #0f172a); display: block; font-size: 0.82rem;">Copiar y pegar el código en el Detalle:</strong>
<span>Es <strong>estrictamente obligatorio</strong> colocar el código que empieza con <code style="background: rgba(2, 132, 199, 0.08); color: #0284c7; padding: 1px 6px; border-radius: 4px; font-weight: 800; font-family: monospace;">SIBO-XXXXXX</code> en la casilla de <em>Detalle</em>, <em>Motivo</em> o <em>Concepto</em> del SINPE Móvil bancario.</span>
</div>
</div>
<!-- 3. Destinatario Oficial -->
<div style="display: flex; gap: 10px; align-items: flex-start;">
<div style="width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;">
3
</div>
<div>
<strong style="color: var(--text-main, #0f172a); display: block; font-size: 0.82rem;">Verificación del Destinatario:</strong>
<span>Transfiera únicamente al número telefónico y titular oficial registrados de la soda escolar. SiboPay nunca le solicitará fondos a cuentas particulares.</span>
</div>
</div>
<!-- 4. Comprobante de Respaldo -->
<div style="display: flex; gap: 10px; align-items: flex-start;">
<div style="width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;">
4
</div>
<div>
<strong style="color: var(--text-main, #0f172a); display: block; font-size: 0.82rem;">Comprobante de Respaldo:</strong>
<span>Conserve la captura o número de comprobante emitido por su banco. En caso de requerir aclaración, este servirá como comprobante ante la administración de la soda.</span>
</div>
</div>
<!-- 5. Disponibilidad del Saldo -->
<div style="display: flex; gap: 10px; align-items: flex-start;">
<div style="width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #166534; font-weight: 900; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;">
5
</div>
<div>
<strong style="color: var(--text-main, #0f172a); display: block; font-size: 0.82rem;">Disponibilidad Inmediata:</strong>
<span>Una vez validado el pago, los fondos quedan disponibles de inmediato para compras con carné QR o pre-órdenes. El saldo no vence durante el curso lectivo.</span>
</div>
</div>
</div>
<!-- Pie de Seguridad y Botón de Aceptar -->
<div style="margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border, #f1f5f9); display: flex; flex-direction: column; gap: 12px;">
<div style="display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted, #64748b);">
<span style="display: flex; align-items: center; gap: 6px;">
<span style="width: 7px; height: 7px; border-radius: 50%; background: #10b981; display: inline-block;"></span>
<span>Conciliación automática activa 24/7</span>
</span>
<span style="font-weight: 800; color: #0284c7;">SiboPay Protegido</span>
</div>
<button type="button" onclick="closeModalSinpeTerms()" style="width: 100%; padding: 12px; background: linear-gradient(135deg, #16a34a, #15803d); color: white; border: none; border-radius: 12px; font-weight: 900; font-size: 0.95rem; cursor: pointer; box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);">
Entendido y Aceptar
</button>
</div>
</div>
</div>
<!-- BARRA DE NAVEGACIÓN INFERIOR PWA (MÓVILES) -->
<nav class="pwa-bottom-nav" id="pwaBottomNav" style="display: none;">
<button class="pwa-nav-item active" id="pwaNavMenu" onclick="pwaNavigateTo('menu')">
+13
View File
@@ -3339,6 +3339,19 @@ function handleSinpeBackdropClick(event) {
closeSinpeModal();
}
function openModalSinpeTerms() {
const modal = document.getElementById('modalSinpeTerms');
if (modal) modal.style.display = 'flex';
}
function closeModalSinpeTerms(event) {
if (event && event.target && event.target.id !== 'modalSinpeTerms') {
return;
}
const modal = document.getElementById('modalSinpeTerms');
if (modal) modal.style.display = 'none';
}
async function executeParentSinpeRecharge() {
if (!currentParentChild) {
showSinpeModal('error', {