diff --git a/public/js/app.js b/public/js/app.js index 9d7d279..efd6b84 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -4258,15 +4258,15 @@ function renderAdminMovimientos() { // Determinar badge de tipo let tipoBadge = ''; if (m.tipo === 'recarga_manual') { - tipoBadge = ` Recarga Efectivo`; + tipoBadge = ` Recarga Efectivo`; } else if (m.tipo === 'recarga_sinpe') { - tipoBadge = ` Recarga SINPE`; + tipoBadge = ` Recarga SINPE`; } else if (m.tipo === 'compra_mostrador' || m.tipo === 'preorden') { - tipoBadge = ` Cobro Soda`; + tipoBadge = ` Cobro Soda`; } else if (m.tipo === 'reversion_recarga') { - tipoBadge = ` Reversión Recarga`; + tipoBadge = ` Reversión Recarga (Eliminación)`; } else if (m.tipo === 'reembolso') { - tipoBadge = ` Reembolso Compra`; + tipoBadge = ` Reembolso Compra`; } else { tipoBadge = `${m.tipo.toUpperCase()}`; } @@ -4278,10 +4278,15 @@ function renderAdminMovimientos() { fechaHoraStr = d.toLocaleTimeString('es-CR', { hour: '2-digit', minute: '2-digit' }) + ' • ' + d.toLocaleDateString('es-CR', { day: '2-digit', month: 'short' }); } catch (e) {} - // Monto formateado + // Monto formateado: Verde al cargar (+), Rojo al cobrar o eliminar (-) const absMonto = Math.abs(m.monto_colones); const montoDisplay = isPositive ? `+₡${absMonto.toLocaleString('es-CR')}` : `-₡${absMonto.toLocaleString('es-CR')}`; - const montoColor = isPositive ? '#16a34a' : '#d97706'; + const montoColor = isPositive ? '#16a34a' : '#dc2626'; + const montoBg = isPositive ? 'rgba(22, 163, 74, 0.08)' : 'rgba(220, 38, 38, 0.08)'; + const montoBorder = isPositive ? '#bbf7d0' : '#fecaca'; + const montoIcon = isPositive + ? '' + : ''; // Regla de 10 min para Cajero const minutos = parseFloat(m.minutos_transcurridos) || 0; @@ -4320,6 +4325,23 @@ function renderAdminMovimientos() { `; } + // Avatar o círculo con iniciales: SIEMPRE celeste según requerimiento + const initials = getStudentInitials(m.estudiante_nombre); + let avatarHtml = ''; + if (m.estudiante_foto && m.estudiante_foto.trim() !== '' && !m.estudiante_foto.includes('avatar_default.png')) { + avatarHtml = ` +
+ `; + } else { + avatarHtml = ` +