fix(ui/ux): relocate CAPTURAR button to scanner groupbox, fix Lot modal contrast/bleed, and enhance tablet touch ergonomics

This commit is contained in:
Carlos Tello
2026-10-29 21:25:02 -03:00
parent ad92bb5fc1
commit cb63806547
11 changed files with 464 additions and 228 deletions
+1
View File
@@ -263,3 +263,4 @@ async def test_mass_exit_transactional():
if 'salida_id' in locals() and salida_id > 0:
cursor.execute("DELETE FROM dbo.salida_masiva_detalle WHERE SalidaMasivaID = %s", (salida_id,))
cursor.execute("DELETE FROM dbo.salida_masiva WHERE SalidaMasivaID = %s", (salida_id,))
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "onevercontrol-frontend",
"version": "0.6.1-beta",
"version": "0.7.0-beta",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "onevercontrol-frontend",
"version": "0.6.1-beta",
"version": "0.7.0-beta",
"dependencies": {
"@zxing/library": "^0.23.0",
"react": "^18.3.1",
+170 -82
View File
@@ -136,6 +136,7 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
right: 0,
bottom: 0,
backgroundColor: 'rgba(0, 0, 0, 0.75)',
backdropFilter: 'blur(3px)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
@@ -146,15 +147,15 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
<div
style={{
width: '100%',
maxWidth: '920px',
maxHeight: '92vh',
maxWidth: '940px',
maxHeight: '94vh',
backgroundColor: 'var(--bg-card)',
borderRadius: 'var(--radius-lg)',
borderRadius: 'var(--radius-lg, 12px)',
boxShadow: 'var(--shadow-xl)',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
border: '1px solid var(--border-subtle)',
border: '1px solid var(--border-strong, var(--border))',
}}
>
{/* Cabecera del Modal */}
@@ -169,13 +170,13 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
}}
>
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
<span style={{ fontSize: '1.3rem' }}>🏘️</span>
<h2 style={{ margin: 0, fontSize: '1.15rem', fontWeight: 700, color: 'var(--text-primary)' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.6rem' }}>
<span style={{ fontSize: '1.4rem' }}>🏘️</span>
<h2 style={{ margin: 0, fontSize: '1.15rem', fontWeight: 800, color: 'var(--text-primary)' }}>
Buscador de Lotes y Padrón de Residentes
</h2>
</div>
<div style={{ fontSize: '0.8rem', color: 'var(--text-secondary)', marginTop: '0.2rem' }}>
<div style={{ fontSize: '0.82rem', color: 'var(--text-secondary)', marginTop: '0.25rem' }}>
Consulte el padrón de propietarios, residentes y teléfonos de contacto para autorizar el ingreso.
</div>
</div>
@@ -188,15 +189,30 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
fontSize: '1.4rem',
color: 'var(--text-secondary)',
cursor: 'pointer',
padding: '0.25rem 0.5rem',
padding: '0.4rem 0.6rem',
minWidth: '44px',
minHeight: '44px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '6px',
}}
title="Cerrar ventana"
>
✕
</button>
</div>
{/* Barra de Filtro de Búsqueda */}
<div style={{ padding: '0.85rem 1.25rem', borderBottom: '1px solid var(--border-subtle)', display: 'flex', gap: '0.5rem' }}>
<div
style={{
padding: '0.85rem 1.25rem',
borderBottom: '1px solid var(--border-subtle)',
backgroundColor: 'var(--bg-surface)',
display: 'flex',
gap: '0.65rem',
}}
>
<div style={{ position: 'relative', flex: 1 }}>
<input
type="text"
@@ -205,7 +221,16 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
placeholder="🔍 Buscar por número de lote, UF, residente o calle..."
value={query}
onChange={(e) => handleQueryChange(e.target.value)}
style={{ width: '100%', minHeight: '44px', paddingLeft: '1rem', fontSize: '0.95rem' }}
style={{
width: '100%',
minHeight: '44px',
paddingLeft: '1rem',
fontSize: '0.95rem',
backgroundColor: 'var(--input-bg)',
color: 'var(--text-primary)',
border: '1px solid var(--border-strong, var(--border))',
borderRadius: '8px',
}}
/>
{query && (
<button
@@ -221,9 +246,10 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
transform: 'translateY(-50%)',
background: 'transparent',
border: 'none',
fontSize: '1rem',
fontSize: '1.1rem',
color: 'var(--text-secondary)',
cursor: 'pointer',
padding: '6px',
}}
>
✕
@@ -234,46 +260,65 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
type="button"
className="btn btn-primary"
onClick={() => loadLotes(query)}
style={{ minHeight: '44px', padding: '0 1.25rem', fontWeight: 600 }}
style={{ minHeight: '44px', padding: '0 1.35rem', fontWeight: 700, borderRadius: '8px' }}
>
Buscar
</button>
</div>
{/* Cuerpo Principal Dividido: Panel Superior de Lotes + Panel Inferior de Residentes */}
<div style={{ flex: 1, overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: '0.75rem', padding: '1rem 1.25rem' }}>
<div
style={{
flex: 1,
overflowY: 'auto',
display: 'flex',
flexDirection: 'column',
gap: '0.85rem',
padding: '1rem 1.25rem',
backgroundColor: 'var(--bg-app)',
}}
>
{/* 1. SECCIÓN: LOTES ENCONTRADOS */}
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem' }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem' }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<span style={{ fontSize: '0.8rem', fontWeight: 700, color: 'var(--text-secondary)', textTransform: 'uppercase' }}>
<span
style={{
fontSize: '0.82rem',
fontWeight: 800,
color: 'var(--text-primary)',
letterSpacing: '0.04em',
textTransform: 'uppercase',
}}
>
Lotes Registrados ({lotes.length}) {isLoadingLotes && '• Cargando...'}
</span>
<span style={{ fontSize: '0.75rem', color: 'var(--text-muted)' }}>
<span style={{ fontSize: '0.78rem', color: 'var(--text-muted)' }}>
Tocar para seleccionar • Doble toque para confirmar
</span>
</div>
<div
style={{
maxHeight: '180px',
maxHeight: '200px',
overflowY: 'auto',
border: '1px solid var(--border-subtle)',
borderRadius: 'var(--radius-sm)',
backgroundColor: 'var(--bg-app)',
borderRadius: 'var(--radius-sm, 6px)',
backgroundColor: 'var(--bg-surface)',
boxShadow: 'var(--shadow-sm)',
}}
>
{lotes.length === 0 && !isLoadingLotes ? (
<div style={{ padding: '1.5rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.9rem' }}>
<div style={{ padding: '1.75rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.92rem' }}>
No se encontraron lotes que coincidan con la búsqueda.
</div>
) : (
<table style={{ width: '100%', borderCollapse: 'collapse', textAlign: 'left', fontSize: '0.85rem' }}>
<table style={{ width: '100%', borderCollapse: 'collapse', textAlign: 'left', fontSize: '0.88rem' }}>
<thead>
<tr style={{ backgroundColor: 'var(--bg-surface)', borderBottom: '1px solid var(--border-subtle)' }}>
<th style={{ padding: '0.5rem 0.75rem', width: '100px' }}>Lote / UF</th>
<th style={{ padding: '0.5rem 0.75rem' }}>Calle y Ubicación</th>
<th style={{ padding: '0.5rem 0.75rem' }}>Titular / Propietario</th>
<th style={{ padding: '0.5rem 0.75rem', width: '130px' }}>Estado / Cat</th>
<tr style={{ backgroundColor: 'var(--bg-surface-elevated, var(--bg-surface))', borderBottom: '1px solid var(--border-subtle)' }}>
<th style={{ padding: '0.65rem 0.85rem', width: '110px', color: 'var(--text-secondary)', fontWeight: 700 }}>Lote / UF</th>
<th style={{ padding: '0.65rem 0.85rem', color: 'var(--text-secondary)', fontWeight: 700 }}>Calle y Ubicación</th>
<th style={{ padding: '0.65rem 0.85rem', color: 'var(--text-secondary)', fontWeight: 700 }}>Titular / Propietario</th>
<th style={{ padding: '0.65rem 0.85rem', width: '140px', color: 'var(--text-secondary)', fontWeight: 700 }}>Estado / Cat</th>
</tr>
</thead>
<tbody>
@@ -286,43 +331,48 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
onDoubleClick={() => handleConfirm(l)}
style={{
cursor: 'pointer',
backgroundColor: isSel ? 'rgba(37, 99, 235, 0.18)' : 'transparent',
backgroundColor: isSel ? 'var(--selection-bg)' : 'transparent',
borderBottom: '1px solid var(--border-subtle)',
fontWeight: isSel ? 700 : 400,
borderLeft: isSel ? '4px solid var(--accent-primary)' : '4px solid transparent',
transition: 'background 0.1s ease',
borderLeft: isSel ? '4px solid var(--blue-base)' : '4px solid transparent',
transition: 'background 0.12s ease',
}}
>
<td style={{ padding: '0.55rem 0.75rem' }}>
<strong style={{ fontSize: '0.95rem', color: 'var(--text-primary)' }}>
<td style={{ padding: '0.6rem 0.85rem' }}>
<strong style={{ fontSize: '0.95rem', color: isSel ? 'var(--blue-base)' : 'var(--text-primary)' }}>
Lote {l.codigo}
</strong>
{l.uf && l.uf !== l.codigo && (
<div style={{ fontSize: '0.75rem', color: 'var(--text-secondary)' }}>UF: {l.uf}</div>
<div style={{ fontSize: '0.78rem', color: 'var(--text-secondary)' }}>UF: {l.uf}</div>
)}
</td>
<td style={{ padding: '0.55rem 0.75rem', color: 'var(--text-primary)' }}>
<td style={{ padding: '0.6rem 0.85rem', color: 'var(--text-primary)' }}>
{l.calle ? `${l.calle} ${l.numero || ''}`.trim() : 'Sin calle asignada'}
</td>
<td style={{ padding: '0.55rem 0.75rem', color: 'var(--text-primary)' }}>
<td style={{ padding: '0.6rem 0.85rem', color: 'var(--text-primary)' }}>
{l.propietario || <span style={{ color: 'var(--text-muted)' }}>-</span>}
</td>
<td style={{ padding: '0.55rem 0.75rem' }}>
<td style={{ padding: '0.6rem 0.85rem' }}>
<span
style={{
display: 'inline-block',
padding: '0.2rem 0.5rem',
padding: '0.25rem 0.6rem',
borderRadius: '4px',
fontSize: '0.75rem',
fontWeight: 600,
fontSize: '0.78rem',
fontWeight: 700,
backgroundColor:
l.estado === 'Habilitado' || l.estado === 'Residencia Permanente'
? 'rgba(16, 185, 129, 0.15)'
: 'rgba(239, 68, 68, 0.15)',
? 'var(--status-success-bg)'
: 'var(--status-danger-bg)',
color:
l.estado === 'Habilitado' || l.estado === 'Residencia Permanente'
? 'var(--status-success)'
: 'var(--status-danger)',
border: `1px solid ${
l.estado === 'Habilitado' || l.estado === 'Residencia Permanente'
? 'var(--status-success)'
: 'var(--status-danger)'
}`,
}}
>
{l.estado || 'General'}
@@ -338,24 +388,42 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
</div>
{/* 2. SECCIÓN: PADRÓN DE RESIDENTES DEL LOTE SELECCIONADO */}
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem', flex: 1 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', flex: 1 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<span style={{ fontSize: '0.8rem', fontWeight: 700, color: 'var(--text-secondary)', textTransform: 'uppercase' }}>
<span
style={{
fontSize: '0.82rem',
fontWeight: 800,
color: 'var(--text-primary)',
letterSpacing: '0.04em',
textTransform: 'uppercase',
}}
>
Padrón de Residentes del Lote {selectedLot ? `"${selectedLot.codigo}"` : ''} ({residentes.length}){' '}
{isLoadingResidentes && '• Cargando residentes...'}
</span>
{/* Badge de Permiso del Lote */}
{/* Badge de Permiso del Lote con Contraste Conforme WCAG */}
{lotPermission && (
<div
style={{
fontSize: '0.8rem',
fontWeight: 700,
padding: '0.2rem 0.6rem',
borderRadius: '4px',
backgroundColor: lotPermission.bg_color,
color: lotPermission.color,
border: `1px solid ${lotPermission.color}`,
padding: '0.25rem 0.65rem',
borderRadius: '6px',
backgroundColor:
lotPermission.estado === 'Habilitado'
? 'var(--status-success-bg)'
: 'var(--status-danger-bg)',
color:
lotPermission.estado === 'Habilitado'
? 'var(--status-success)'
: 'var(--status-danger)',
border: `1px solid ${
lotPermission.estado === 'Habilitado'
? 'var(--status-success)'
: 'var(--status-danger)'
}`,
}}
>
{lotPermission.estado}: {lotPermission.detalle}
@@ -367,60 +435,76 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
style={{
flex: 1,
minHeight: '140px',
maxHeight: '220px',
maxHeight: '240px',
overflowY: 'auto',
border: '1px solid var(--border-subtle)',
borderRadius: 'var(--radius-sm)',
backgroundColor: 'var(--bg-app)',
borderRadius: 'var(--radius-sm, 6px)',
backgroundColor: 'var(--bg-surface)',
boxShadow: 'var(--shadow-sm)',
}}
>
{!selectedLot ? (
<div style={{ padding: '1.5rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.9rem' }}>
<div style={{ padding: '1.75rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.92rem' }}>
Seleccione un lote en la grilla superior para visualizar sus residentes y teléfonos.
</div>
) : residentes.length === 0 && !isLoadingResidentes ? (
<div style={{ padding: '1.5rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.9rem' }}>
<div style={{ padding: '1.75rem', textAlign: 'center', color: 'var(--text-secondary)', fontSize: '0.92rem' }}>
No hay residentes o contactos registrados en la ficha de este lote.
</div>
) : (
<table style={{ width: '100%', borderCollapse: 'collapse', textAlign: 'left', fontSize: '0.85rem' }}>
<table style={{ width: '100%', borderCollapse: 'collapse', textAlign: 'left', fontSize: '0.88rem' }}>
<thead>
<tr style={{ backgroundColor: 'var(--bg-surface)', borderBottom: '1px solid var(--border-subtle)' }}>
<th style={{ padding: '0.5rem 0.75rem' }}>Residente</th>
<th style={{ padding: '0.5rem 0.75rem', width: '100px' }}>DNI</th>
<th style={{ padding: '0.5rem 0.75rem', width: '130px' }}>Perfil / Relación</th>
<th style={{ padding: '0.5rem 0.75rem' }}>Teléfonos de Contacto</th>
<th style={{ padding: '0.5rem 0.75rem', width: '90px' }}>Estado</th>
<tr style={{ backgroundColor: 'var(--bg-surface-elevated, var(--bg-surface))', borderBottom: '1px solid var(--border-subtle)' }}>
<th style={{ padding: '0.65rem 0.85rem', color: 'var(--text-secondary)', fontWeight: 700 }}>Residente</th>
<th style={{ padding: '0.65rem 0.85rem', width: '110px', color: 'var(--text-secondary)', fontWeight: 700 }}>DNI</th>
<th style={{ padding: '0.65rem 0.85rem', width: '140px', color: 'var(--text-secondary)', fontWeight: 700 }}>Perfil / Relación</th>
<th style={{ padding: '0.65rem 0.85rem', color: 'var(--text-secondary)', fontWeight: 700 }}>Teléfonos de Contacto</th>
<th style={{ padding: '0.65rem 0.85rem', width: '100px', color: 'var(--text-secondary)', fontWeight: 700 }}>Estado</th>
</tr>
</thead>
<tbody>
{residentes.map((r) => (
<tr key={r.persona_id} style={{ borderBottom: '1px solid var(--border-subtle)' }}>
<td style={{ padding: '0.5rem 0.75rem', fontWeight: 600, color: 'var(--text-primary)' }}>
<td style={{ padding: '0.6rem 0.85rem', fontWeight: 700, color: 'var(--text-primary)' }}>
{r.apellido}, {r.nombre}
</td>
<td style={{ padding: '0.5rem 0.75rem', color: 'var(--text-secondary)' }}>
<td style={{ padding: '0.6rem 0.85rem', color: 'var(--text-secondary)' }}>
{r.documento || '-'}
</td>
<td style={{ padding: '0.5rem 0.75rem' }}>
<span className="badge badge-info" style={{ fontSize: '0.75rem' }}>
<td style={{ padding: '0.6rem 0.85rem' }}>
<span
style={{
display: 'inline-block',
padding: '0.2rem 0.55rem',
borderRadius: '4px',
fontSize: '0.78rem',
fontWeight: 700,
backgroundColor: 'var(--status-info-bg)',
color: 'var(--status-info)',
border: '1px solid var(--status-info)',
}}
>
{r.perfil}
</span>
</td>
<td style={{ padding: '0.5rem 0.75rem', color: 'var(--text-primary)' }}>
<td style={{ padding: '0.6rem 0.85rem', color: 'var(--text-primary)' }}>
{r.telefonos && r.telefonos !== '-' ? (
<div style={{ display: 'flex', alignItems: 'center', gap: '0.4rem', flexWrap: 'wrap' }}>
<span>{r.telefonos}</span>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', flexWrap: 'wrap' }}>
<span style={{ fontWeight: 600 }}>{r.telefonos}</span>
<a
href={`tel:${r.telefonos.split('/')[0].trim()}`}
style={{
fontSize: '0.75rem',
padding: '0.15rem 0.4rem',
backgroundColor: 'rgba(37, 99, 235, 0.15)',
color: 'var(--accent-primary)',
borderRadius: '4px',
fontSize: '0.78rem',
padding: '0.25rem 0.6rem',
backgroundColor: 'var(--btn-blue)',
color: '#FFFFFF',
borderRadius: '6px',
textDecoration: 'none',
fontWeight: 600,
fontWeight: 700,
boxShadow: 'var(--shadow-sm)',
display: 'inline-flex',
alignItems: 'center',
gap: '4px',
}}
>
📞 Llamar
@@ -430,8 +514,8 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
<span style={{ color: 'var(--text-muted)' }}>Sin teléfono</span>
)}
</td>
<td style={{ padding: '0.5rem 0.75rem' }}>
<span style={{ fontSize: '0.75rem', color: 'var(--status-success)', fontWeight: 600 }}>
<td style={{ padding: '0.6rem 0.85rem' }}>
<span style={{ fontSize: '0.8rem', color: 'var(--status-success)', fontWeight: 700 }}>
{r.estado}
</span>
</td>
@@ -447,25 +531,27 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
{/* Pie de Acciones del Modal */}
<div
style={{
padding: '0.85rem 1.25rem',
padding: '0.95rem 1.25rem',
backgroundColor: 'var(--bg-surface)',
borderTop: '1px solid var(--border-subtle)',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexWrap: 'wrap',
gap: '0.75rem',
}}
>
<div>
{selectedLot ? (
<span style={{ fontSize: '0.9rem', color: 'var(--text-primary)' }}>
<span style={{ fontSize: '0.95rem', color: 'var(--text-primary)' }}>
Lote seleccionado:{' '}
<strong style={{ color: 'var(--accent-primary)', fontSize: '1rem' }}>
<strong style={{ color: 'var(--blue-base)', fontSize: '1.05rem', fontWeight: 800 }}>
Lote {selectedLot.codigo}
</strong>{' '}
{selectedLot.calle ? `(${selectedLot.calle})` : ''}
</span>
) : (
<span style={{ fontSize: '0.85rem', color: 'var(--text-muted)' }}>
<span style={{ fontSize: '0.88rem', color: 'var(--text-muted)' }}>
Seleccione un lote para continuar
</span>
)}
@@ -476,7 +562,7 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
type="button"
className="btn btn-secondary"
onClick={onClose}
style={{ minHeight: '44px', padding: '0 1.25rem' }}
style={{ minHeight: '44px', padding: '0 1.25rem', borderRadius: '8px', fontWeight: 600 }}
>
Cancelar
</button>
@@ -488,9 +574,11 @@ export const LotSearchModal: React.FC<LotSearchModalProps> = ({
style={{
minHeight: '44px',
padding: '0 1.5rem',
fontWeight: 700,
fontWeight: 800,
backgroundColor: 'var(--status-success)',
color: '#fff',
borderRadius: '8px',
boxShadow: 'var(--shadow-sm)',
}}
>
✓ Seleccionar Lote
@@ -266,3 +266,4 @@ export const PersonProfileModal: React.FC<PersonProfileModalProps> = ({
</div>
);
};
@@ -335,3 +335,4 @@ export const PersonSearchModal: React.FC<PersonSearchModalProps> = ({
</div>
);
};
@@ -350,3 +350,4 @@ export const PreauthorizedModal: React.FC<PreauthorizedModalProps> = ({
</div>
);
};
@@ -357,3 +357,4 @@ export const VehicleSearchModal: React.FC<VehicleSearchModalProps> = ({
</div>
);
};
@@ -656,7 +656,7 @@ export const CameraScannerModal: React.FC<CameraScannerModalProps> = ({
justifyContent: 'space-between',
padding: '0.85rem 1.25rem',
borderBottom: '1px solid var(--border-subtle)',
backgroundColor: 'var(--bg-card)',
backgroundColor: 'var(--bg-surface)',
}}
>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem' }}>
@@ -902,19 +902,19 @@ export const CameraScannerModal: React.FC<CameraScannerModalProps> = ({
{errorMsg && (
<div
style={{
padding: '0.75rem 1.25rem',
backgroundColor: 'rgba(239, 68, 68, 0.15)',
padding: '0.85rem 1.25rem',
backgroundColor: 'var(--status-danger-bg)',
color: 'var(--status-danger)',
fontSize: '0.85rem',
fontWeight: 600,
borderBottom: '1px solid rgba(239, 68, 68, 0.3)',
fontSize: '0.88rem',
fontWeight: 700,
borderBottom: '1px solid var(--status-danger)',
display: 'flex',
alignItems: 'center',
gap: '0.5rem',
gap: '0.65rem',
}}
>
<span>⚠️</span>
<span style={{ flex: 1 }}>{errorMsg}</span>
<span style={{ fontSize: '1.15rem' }}>⚠️</span>
<span style={{ flex: 1, lineHeight: 1.35 }}>{errorMsg}</span>
</div>
)}
@@ -925,7 +925,8 @@ export const CameraScannerModal: React.FC<CameraScannerModalProps> = ({
display: 'flex',
flexDirection: 'column',
gap: '0.75rem',
backgroundColor: 'var(--bg-card)',
backgroundColor: 'var(--bg-surface)',
borderTop: '1px solid var(--border-subtle)',
}}
>
{/* Selector de cámara si hay más de 1 lente */}
+138 -49
View File
@@ -633,104 +633,192 @@ button:disabled, .btn:disabled, .touch-button:disabled {
.desktop-cockpit-grid {
flex: 1;
display: grid;
grid-template-columns: 240px 1fr 210px;
gap: 10px;
padding: 8px 12px;
grid-template-columns: 240px 1fr 220px;
gap: 12px;
padding: 10px 14px;
overflow-y: auto;
background-color: #070D1E;
-webkit-overflow-scrolling: touch;
background-color: var(--bg-main, #0B1120);
}
.desktop-groupbox {
background-color: #0B132B;
border: 1px solid #1E2D56;
border-radius: 8px;
padding: 10px 12px;
background-color: var(--bg-surface, #1E293B);
border: 1px solid var(--border, #334155);
border-radius: 10px;
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 8px;
gap: 10px;
box-sizing: border-box;
box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.3));
}
.desktop-groupbox-title {
font-size: 12px;
font-weight: 600;
color: #8E9CAE;
margin-bottom: 4px;
font-size: 0.85rem;
font-weight: 700;
color: var(--text-2, #93C5FD);
letter-spacing: 0.03em;
text-transform: uppercase;
margin-bottom: 2px;
display: flex;
align-items: center;
gap: 6px;
}
.desktop-input {
background-color: #091124;
border: 1px solid #1E2D56;
border-radius: 4px;
color: #F1F5F9;
font-size: 12px;
padding: 4px 8px;
height: 28px;
background-color: var(--input-bg, #0F172A);
border: 1px solid var(--border-strong, #475569);
border-radius: 6px;
color: var(--text-1, #F8FAFC);
font-size: 0.92rem;
padding: 6px 10px;
min-height: 42px;
width: 100%;
box-sizing: border-box;
outline: none;
transition: border-color 0.15s ease;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.desktop-input:focus {
border-color: #3B82F6;
box-shadow: 0 0 4px rgba(59, 130, 246, 0.4);
border-color: var(--blue-base, #3B82F6);
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.desktop-select {
background-color: #091124;
border: 1px solid #1E2D56;
border-radius: 4px;
color: #F1F5F9;
font-size: 12px;
padding: 2px 6px;
height: 28px;
background-color: var(--input-bg, #0F172A);
border: 1px solid var(--border-strong, #475569);
border-radius: 6px;
color: var(--text-1, #F8FAFC);
font-size: 0.92rem;
padding: 6px 10px;
min-height: 42px;
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.desktop-select:focus {
border-color: var(--blue-base, #3B82F6);
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.desktop-label {
font-size: 11px;
font-size: 0.82rem;
font-weight: 600;
color: #94A3B8;
color: var(--text-2, #CBD5E1);
white-space: nowrap;
}
.desktop-btn-action {
font-size: 11px;
font-size: 0.85rem;
font-weight: 700;
padding: 5px 8px;
height: 30px;
border-radius: 4px;
padding: 6px 12px;
min-height: 42px;
border-radius: 6px;
border: none;
cursor: pointer;
display: flex;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
gap: 6px;
white-space: nowrap;
transition: filter 0.15s ease;
transition: background-color 0.15s ease, transform 0.05s ease, filter 0.15s ease, box-shadow 0.15s ease;
color: #FFFFFF;
touch-action: manipulation;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.desktop-btn-action:hover {
filter: brightness(1.15);
filter: brightness(1.12);
}
@media (max-width: 1100px) {
.desktop-btn-action:active {
transform: scale(0.98);
}
/* Variantes de Color Oficiales para Cockpit y Puestos de Control */
.desktop-btn-blue {
background-color: var(--btn-blue, #2563EB) !important;
color: #FFFFFF !important;
}
.desktop-btn-blue:hover {
background-color: var(--btn-blue-hover, #3B82F6) !important;
}
.desktop-btn-green {
background-color: var(--btn-green, #10B981) !important;
color: #FFFFFF !important;
}
.desktop-btn-green:hover {
background-color: var(--btn-green-hover, #059669) !important;
}
.desktop-btn-red {
background-color: var(--btn-red, #EF4444) !important;
color: #FFFFFF !important;
}
.desktop-btn-red:hover {
background-color: var(--btn-red-hover, #DC2626) !important;
}
.desktop-btn-slate {
background-color: var(--btn-slate, #475569) !important;
color: #FFFFFF !important;
}
.desktop-btn-slate:hover {
background-color: var(--btn-slate-hover, #64748B) !important;
}
.desktop-btn-cyan {
background-color: var(--btn-cyan, #0284C7) !important;
color: #FFFFFF !important;
}
.desktop-btn-cyan:hover {
background-color: var(--btn-cyan-hover, #0369A1) !important;
}
.desktop-btn-purple {
background-color: var(--btn-purple, #7C3AED) !important;
color: #FFFFFF !important;
}
.desktop-btn-purple:hover {
background-color: var(--btn-purple-hover, #6D28D9) !important;
}
.desktop-avatar-box {
width: 100%;
height: 120px;
background-color: var(--input-bg, #091124);
border: 1px dashed var(--border-strong, #334155);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
/* ==============================================================================
RESPONSIVIDAD Y ERGONOMÍA PARA TABLETS SAMSUNG GALAXY TAB A11 (1340x800)
============================================================================== */
@media (max-width: 1180px) and (min-width: 961px) {
.desktop-cockpit-grid {
grid-template-columns: 220px 1fr 190px !important;
grid-template-columns: 220px 1fr 200px !important;
gap: 10px !important;
padding: 8px 10px !important;
}
}
@media (max-width: 880px) {
/* Modo Vertical (Portrait) en Tablets o Pantallas Estrechas */
@media (max-width: 960px) {
.desktop-cockpit-grid {
grid-template-columns: 1fr !important;
gap: 14px !important;
padding: 10px 12px !important;
}
}
/* Soporte de Tema Claro para Cockpit de Escritorio */
/* ==============================================================================
SOPORTE TEMA CLARO (LIGHT) - ALTO CONTRASTE WCAG AA+
============================================================================== */
[data-theme="light"] .desktop-shell {
background-color: #F1F5F9;
color: #0F172A;
@@ -757,17 +845,17 @@ button:disabled, .btn:disabled, .touch-button:disabled {
[data-theme="light"] .desktop-groupbox {
background-color: #FFFFFF;
border: 1px solid #CBD5E1;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .desktop-groupbox-title {
color: #475569;
color: #1E3A8A;
}
[data-theme="light"] .desktop-input,
[data-theme="light"] .desktop-select {
background-color: #F8FAFC;
border: 1px solid #CBD5E1;
background-color: #FFFFFF;
border: 1px solid #94A3B8;
color: #0F172A;
}
@@ -775,6 +863,7 @@ button:disabled, .btn:disabled, .touch-button:disabled {
[data-theme="light"] .desktop-select:focus {
border-color: #0284C7;
background-color: #FFFFFF;
box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
}
[data-theme="light"] .desktop-label {
@@ -783,6 +872,6 @@ button:disabled, .btn:disabled, .touch-button:disabled {
[data-theme="light"] .desktop-avatar-box {
background-color: #F8FAFC;
border: 1px dashed #CBD5E1;
border: 1px dashed #94A3B8;
}
+54 -20
View File
@@ -8,6 +8,7 @@
/* --- PALETA DARK (Por defecto - Modo Nocturno Garita) --- */
--bg-main: #0B1120;
--bg-sidebar: #1E293B;
--bg-card: #1E293B;
--text-1: #F8FAFC;
--text-2: #CBD5E1;
--text-3: #94A3B8;
@@ -19,9 +20,9 @@
--danger: #EF4444;
--danger-hover: #F87171;
--warning: #F59E0B;
--selection-bg: #2563EB;
--selection-bg: rgba(37, 99, 235, 0.25);
--selection-text: #FFFFFF;
--hover-bg: #1E293B;
--hover-bg: #273549;
--input-bg: #0F172A;
--btn-text: #FFFFFF;
--sidebar-icon: #FFFFFF;
@@ -32,7 +33,7 @@
--bg-surface-elevated: #334155;
--bg-surface-highlight: #273549;
--border-subtle: #1E293B;
--border-subtle: #334155;
--border-strong: #475569;
--text-primary: var(--text-1);
@@ -45,37 +46,53 @@
--accent: #38BDF8;
--accent-primary: var(--blue-base);
/* Variantes de Color para Botones y Acciones Táctiles */
--btn-blue: #2563EB;
--btn-blue-hover: #3B82F6;
--btn-green: #10B981;
--btn-green-hover: #059669;
--btn-red: #EF4444;
--btn-red-hover: #DC2626;
--btn-slate: #475569;
--btn-slate-hover: #64748B;
--btn-cyan: #0284C7;
--btn-cyan-hover: #0369A1;
--btn-purple: #7C3AED;
--btn-purple-hover: #6D28D9;
--color-success: var(--success);
--status-success: #34D399;
--status-success-bg: rgba(16, 185, 129, 0.18);
--status-success-bg: rgba(16, 185, 129, 0.22);
--color-success-bg: var(--status-success-bg);
--color-danger: var(--danger);
--status-danger: #F87171;
--status-danger-bg: rgba(239, 68, 68, 0.2);
--status-danger-bg: rgba(239, 68, 68, 0.22);
--color-danger-bg: var(--status-danger-bg);
--color-warning: var(--warning);
--status-warning: #FBBF24;
--status-warning-bg: rgba(245, 158, 11, 0.2);
--status-warning-bg: rgba(245, 158, 11, 0.22);
--color-info: #38BDF8;
--status-info: #38BDF8;
--status-info-bg: rgba(56, 189, 248, 0.18);
--status-info-bg: rgba(56, 189, 248, 0.2);
/* Touch Targets y Ergonomía */
--touch-min-size: 48px;
--touch-button-height: 48px;
--touch-input-height: 44px;
--touch-radius: 10px;
/* Touch Targets y Ergonomía Samsung Galaxy Tab A11 */
--touch-min-size: 44px;
--touch-button-height: 44px;
--touch-input-height: 42px;
--touch-radius: 8px;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 12px;
--radius-xl: 16px;
/* Tipografía */
--font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 0.9375rem;
--font-size-base: 0.95rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-2xl: 1.5rem;
@@ -84,12 +101,14 @@
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
--shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.5);
--shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.7);
}
/* --- PALETA LIGHT (OnEverDesignSystem Light - Alto Contraste y Nitidez) --- */
[data-theme="light"] {
--bg-main: #F1F5F9;
--bg-sidebar: #FFFFFF;
--bg-card: #FFFFFF;
--text-1: #0F172A;
--text-2: #334155;
--text-3: #64748B;
@@ -97,13 +116,13 @@
--divider: #E2E8F0;
--blue-base: #0284C7;
--blue-hover: #0369A1;
--success: #16A34A;
--success: #15803D;
--danger: #DC2626;
--danger-hover: #B91C1C;
--warning: #B45309;
--selection-bg: #E0F2FE;
--selection-text: #0369A1;
--hover-bg: #E2E8F0;
--hover-bg: #F1F5F9;
--input-bg: #FFFFFF;
--btn-text: #FFFFFF;
--sidebar-icon: #334155;
@@ -126,25 +145,40 @@
--accent: #0284C7;
--accent-primary: var(--blue-base);
/* Variantes de Color para Botones y Acciones Táctiles en Light */
--btn-blue: #0284C7;
--btn-blue-hover: #0369A1;
--btn-green: #15803D;
--btn-green-hover: #166534;
--btn-red: #DC2626;
--btn-red-hover: #B91C1C;
--btn-slate: #64748B;
--btn-slate-hover: #475569;
--btn-cyan: #0891B2;
--btn-cyan-hover: #0E7490;
--btn-purple: #7C3AED;
--btn-purple-hover: #6D28D9;
--color-success: var(--success);
--status-success: #15803D;
--status-success-bg: rgba(22, 163, 74, 0.12);
--status-success-bg: rgba(22, 163, 74, 0.14);
--color-success-bg: var(--status-success-bg);
--color-danger: var(--danger);
--status-danger: #B91C1C;
--status-danger-bg: rgba(220, 38, 38, 0.12);
--status-danger-bg: rgba(220, 38, 38, 0.14);
--color-danger-bg: var(--status-danger-bg);
--color-warning: var(--warning);
--status-warning: #B45309;
--status-warning-bg: rgba(217, 119, 6, 0.14);
--status-warning-bg: rgba(217, 119, 6, 0.16);
--color-info: #0369A1;
--status-info: #0369A1;
--status-info-bg: rgba(2, 132, 199, 0.12);
--status-info-bg: rgba(2, 132, 199, 0.14);
--shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
--shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.12);
--shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
}
+84 -65
View File
@@ -1418,7 +1418,7 @@ export const ControlPostView: React.FC = () => {
========================================================================= */}
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.75rem' }}>
{/* Groupbox Lector */}
<div className="desktop-groupbox">
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.6rem' }}>
<span className="desktop-groupbox-title">Lector de Documento / QR</span>
<div>
<input
@@ -1447,6 +1447,19 @@ export const ControlPostView: React.FC = () => {
autoFocus
/>
</div>
{/* Botón CAPTURAR reubicado dentro del Groupbox Lector de Documento / QR */}
{!isModoSalida && (
<button
type="button"
className="desktop-btn-action desktop-btn-blue"
style={{ width: '100%', padding: '0.55rem', fontWeight: 700 }}
onClick={() => setScannerOpen(true)}
title="Abrir cámara / escáner óptico de DNI"
>
📷 CAPTURAR
</button>
)}
</div>
{/* Groupbox Cámaras / Imágenes */}
@@ -1455,13 +1468,13 @@ export const ControlPostView: React.FC = () => {
{/* Foto Persona BD */}
<div>
<div style={{ fontSize: '0.78rem', color: '#94A3B8', marginBottom: '0.25rem' }}>Foto (BD):</div>
<div style={{ fontSize: '0.78rem', color: 'var(--text-secondary)', marginBottom: '0.25rem' }}>Foto (BD):</div>
<div className="desktop-avatar-box">
{fotoPersonaUrl ? (
<img src={fotoPersonaUrl} alt="Persona" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
) : (
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', color: '#64748B' }}>
<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor">
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', color: 'var(--text-muted)' }}>
<svg width="60" height="60" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
</svg>
<span style={{ fontSize: '0.75rem', marginTop: '0.25rem' }}>Foto Persona</span>
@@ -1471,7 +1484,7 @@ export const ControlPostView: React.FC = () => {
<button
type="button"
className="desktop-btn-action desktop-btn-blue"
style={{ width: '100%', marginTop: '0.4rem', padding: '0.4rem 0.5rem', fontSize: '0.8rem' }}
style={{ width: '100%', marginTop: '0.45rem', padding: '0.45rem 0.5rem', fontSize: '0.8rem' }}
onClick={() => setScannerOpen(true)}
>
Capturar Persona (Webcam)
@@ -1480,13 +1493,13 @@ export const ControlPostView: React.FC = () => {
{/* Foto DNI Frente */}
<div style={{ marginTop: '0.25rem' }}>
<div style={{ fontSize: '0.78rem', color: '#94A3B8', marginBottom: '0.25rem' }}>DNI (Frente):</div>
<div style={{ fontSize: '0.78rem', color: 'var(--text-secondary)', marginBottom: '0.25rem' }}>DNI (Frente):</div>
<div className="desktop-avatar-box">
{fotoDniUrl ? (
<img src={fotoDniUrl} alt="DNI" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
) : (
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', color: '#64748B' }}>
<svg width="56" height="56" viewBox="0 0 24 24" fill="currentColor">
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', color: 'var(--text-muted)' }}>
<svg width="54" height="54" viewBox="0 0 24 24" fill="currentColor">
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z" />
</svg>
<span style={{ fontSize: '0.75rem', marginTop: '0.25rem' }}>Foto DNI</span>
@@ -1496,23 +1509,12 @@ export const ControlPostView: React.FC = () => {
<button
type="button"
className="desktop-btn-action desktop-btn-blue"
style={{ width: '100%', marginTop: '0.4rem', padding: '0.4rem 0.5rem', fontSize: '0.8rem' }}
style={{ width: '100%', marginTop: '0.45rem', padding: '0.45rem 0.5rem', fontSize: '0.8rem' }}
onClick={() => setScannerOpen(true)}
>
Capturar DNI (Webcam)
</button>
</div>
{!isModoSalida && (
<button
type="button"
className="desktop-btn-action desktop-btn-blue"
style={{ width: '100%', marginTop: 'auto', padding: '0.55rem', fontWeight: 700 }}
onClick={() => setScannerOpen(true)}
>
CAPTURAR
</button>
)}
</div>
</div>
@@ -1807,14 +1809,22 @@ export const ControlPostView: React.FC = () => {
{/* Badge Estado Permiso */}
<div
style={{
backgroundColor: lotPermission ? (lotPermission.bg_color || '#FEF2F2') : '#FFFFFF',
color: lotPermission ? (lotPermission.color || '#DC2626') : '#64748B',
border: `1px solid ${lotPermission ? (lotPermission.color || '#DC2626') : '#CBD5E1'}`,
borderRadius: '4px',
padding: '0.4rem',
backgroundColor: lotPermission
? (lotPermission.estado === 'Habilitado' ? 'var(--status-success-bg)' : 'var(--status-danger-bg)')
: 'var(--input-bg)',
color: lotPermission
? (lotPermission.estado === 'Habilitado' ? 'var(--status-success)' : 'var(--status-danger)')
: 'var(--text-muted)',
border: `1px solid ${
lotPermission
? (lotPermission.estado === 'Habilitado' ? 'var(--status-success)' : 'var(--status-danger)')
: 'var(--border-subtle)'
}`,
borderRadius: '6px',
padding: '0.45rem',
textAlign: 'center',
fontSize: '0.85rem',
fontWeight: 600,
fontWeight: 700,
}}
>
{lotPermission ? `Permiso: ${lotPermission.detalle}` : 'Estado Permiso: N/A'}
@@ -2177,11 +2187,11 @@ export const ControlPostView: React.FC = () => {
{it.sexo}
</span>
</td>
<td style={{ padding: '0.35rem 0.4rem', color: '#CBD5E1', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '120px' }}>
<td style={{ padding: '0.35rem 0.4rem', color: 'var(--text-primary)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '120px' }}>
{it.apellido ? `${it.apellido}, ${it.nombre}` : 'Persona'}
{it.patente ? <span style={{ color: '#93C5FD', marginLeft: '0.35rem' }}>({it.patente})</span> : null}
{it.patente ? <span style={{ color: 'var(--blue-base)', marginLeft: '0.35rem', fontWeight: 700 }}>({it.patente})</span> : null}
</td>
<td style={{ padding: '0.35rem 0.5rem', color: '#64748B', fontSize: '0.72rem', textAlign: 'right', whiteSpace: 'nowrap' }}>
<td style={{ padding: '0.35rem 0.5rem', color: 'var(--text-muted)', fontSize: '0.75rem', textAlign: 'right', whiteSpace: 'nowrap' }}>
{it.hora}
</td>
</tr>
@@ -2222,6 +2232,7 @@ export const ControlPostView: React.FC = () => {
right: 0,
bottom: 0,
backgroundColor: 'rgba(0, 0, 0, 0.75)',
backdropFilter: 'blur(3px)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
@@ -2231,15 +2242,15 @@ export const ControlPostView: React.FC = () => {
>
<div
style={{
maxWidth: '800px',
maxWidth: '850px',
width: '100%',
maxHeight: '85vh',
backgroundColor: '#1E293B',
borderRadius: '10px',
border: '1px solid #334155',
maxHeight: '88vh',
backgroundColor: 'var(--bg-card)',
borderRadius: '12px',
border: '1px solid var(--border-strong, var(--border))',
display: 'flex',
flexDirection: 'column',
boxShadow: '0 20px 25px -5px rgba(0, 0, 0, 0.5)',
boxShadow: 'var(--shadow-xl)',
overflow: 'hidden',
}}
onClick={(e) => e.stopPropagation()}
@@ -2251,27 +2262,34 @@ export const ControlPostView: React.FC = () => {
alignItems: 'center',
justifyContent: 'space-between',
padding: '1rem 1.25rem',
borderBottom: '1px solid #334155',
backgroundColor: '#0F172A',
borderBottom: '1px solid var(--border-subtle)',
backgroundColor: 'var(--bg-surface)',
}}
>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.6rem' }}>
<span style={{ fontSize: '1.25rem' }}>📋</span>
<h3 style={{ margin: 0, fontSize: '1.1rem', color: '#F8FAFC', fontWeight: 700 }}>
<span style={{ fontSize: '1.35rem' }}>📋</span>
<h3 style={{ margin: 0, fontSize: '1.15rem', color: 'var(--text-primary)', fontWeight: 800 }}>
Visitas y Vehículos Ingresados al Predio ({activeTickets.length})
</h3>
</div>
<button
type="button"
onClick={() => setIsIngresadosModalOpen(false)}
style={{ background: 'none', border: 'none', color: '#94A3B8', fontSize: '1.25rem', cursor: 'pointer' }}
style={{
background: 'none',
border: 'none',
color: 'var(--text-secondary)',
fontSize: '1.35rem',
cursor: 'pointer',
padding: '0.35rem 0.6rem',
}}
>
✕
</button>
</div>
{/* Modal Body: Filtro y Tabla */}
<div style={{ padding: '0.85rem 1.25rem', borderBottom: '1px solid #334155', backgroundColor: '#1E293B' }}>
<div style={{ padding: '0.85rem 1.25rem', borderBottom: '1px solid var(--border-subtle)', backgroundColor: 'var(--bg-surface)' }}>
<input
type="text"
className="desktop-input"
@@ -2282,28 +2300,28 @@ export const ControlPostView: React.FC = () => {
/>
</div>
<div style={{ flex: 1, overflowY: 'auto', padding: '0.5rem 1.25rem' }}>
<div style={{ flex: 1, overflowY: 'auto', padding: '0.75rem 1.25rem', backgroundColor: 'var(--bg-app)' }}>
{filteredTickets.length === 0 ? (
<div style={{ textAlign: 'center', padding: '2.5rem', color: '#64748B' }}>
<div style={{ textAlign: 'center', padding: '2.5rem', color: 'var(--text-muted)' }}>
No se encontraron ocupantes o visitas activas con ese criterio.
</div>
) : (
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '0.88rem' }}>
<thead>
<tr style={{ borderBottom: '1px solid #334155', color: '#94A3B8', textAlign: 'left' }}>
<th style={{ padding: '0.5rem' }}>Patente</th>
<th style={{ padding: '0.5rem' }}>DNI</th>
<th style={{ padding: '0.5rem' }}>Nombre y Apellido</th>
<th style={{ padding: '0.5rem' }}>Destino</th>
<th style={{ padding: '0.5rem' }}>Ingreso</th>
<th style={{ padding: '0.5rem', textAlign: 'right' }}>Acción</th>
<tr style={{ borderBottom: '1px solid var(--border-subtle)', color: 'var(--text-secondary)', textAlign: 'left', backgroundColor: 'var(--bg-surface-elevated)' }}>
<th style={{ padding: '0.6rem 0.75rem' }}>Patente</th>
<th style={{ padding: '0.6rem 0.75rem' }}>DNI</th>
<th style={{ padding: '0.6rem 0.75rem' }}>Nombre y Apellido</th>
<th style={{ padding: '0.6rem 0.75rem' }}>Destino</th>
<th style={{ padding: '0.6rem 0.75rem' }}>Ingreso</th>
<th style={{ padding: '0.6rem 0.75rem', textAlign: 'right' }}>Acción</th>
</tr>
</thead>
<tbody>
{filteredTickets.map((t) => (
<tr
key={t.ticket_id}
style={{ borderBottom: '1px solid rgba(51, 65, 85, 0.5)', cursor: 'pointer' }}
style={{ borderBottom: '1px solid var(--border-subtle)', cursor: 'pointer' }}
onClick={() => {
setTicketForExit(t);
setForm((prev) => ({
@@ -2320,29 +2338,30 @@ export const ControlPostView: React.FC = () => {
setTimeout(() => setActionSuccess(null), 3000);
}}
>
<td style={{ padding: '0.55rem' }}>
<td style={{ padding: '0.6rem 0.75rem' }}>
<span
style={{
backgroundColor: t.patente ? '#1E3A8A' : '#334155',
color: t.patente ? '#93C5FD' : '#94A3B8',
padding: '0.2rem 0.45rem',
backgroundColor: t.patente ? 'var(--status-info-bg)' : 'var(--bg-surface-highlight)',
color: t.patente ? 'var(--status-info)' : 'var(--text-secondary)',
border: `1px solid ${t.patente ? 'var(--status-info)' : 'var(--border-subtle)'}`,
padding: '0.2rem 0.5rem',
borderRadius: '4px',
fontWeight: 700,
fontSize: '0.85rem',
fontSize: '0.82rem',
}}
>
{t.patente || 'PEATÓN'}
</span>
</td>
<td style={{ padding: '0.55rem', fontWeight: 600, color: '#F1F5F9' }}>{t.documento}</td>
<td style={{ padding: '0.55rem', color: '#F8FAFC' }}>{t.apellido}, {t.nombre}</td>
<td style={{ padding: '0.55rem', color: '#94A3B8' }}>Lote {t.lote_codigo || 'S/D'}</td>
<td style={{ padding: '0.55rem', color: '#94A3B8', fontSize: '0.8rem' }}>{t.fecha_ingreso}</td>
<td style={{ padding: '0.55rem', textAlign: 'right' }}>
<td style={{ padding: '0.6rem 0.75rem', fontWeight: 700, color: 'var(--text-primary)' }}>{t.documento}</td>
<td style={{ padding: '0.6rem 0.75rem', color: 'var(--text-primary)' }}>{t.apellido}, {t.nombre}</td>
<td style={{ padding: '0.6rem 0.75rem', color: 'var(--text-secondary)' }}>Lote {t.lote_codigo || 'S/D'}</td>
<td style={{ padding: '0.6rem 0.75rem', color: 'var(--text-muted)', fontSize: '0.8rem' }}>{t.fecha_ingreso}</td>
<td style={{ padding: '0.6rem 0.75rem', textAlign: 'right' }}>
<button
type="button"
className="desktop-btn-action desktop-btn-red"
style={{ padding: '0.3rem 0.65rem', fontSize: '0.8rem' }}
style={{ padding: '0.35rem 0.75rem', fontSize: '0.82rem' }}
onClick={(e) => {
e.stopPropagation();
setIsIngresadosModalOpen(false);
@@ -2362,12 +2381,12 @@ export const ControlPostView: React.FC = () => {
{/* Modal Footer */}
<div
style={{
padding: '0.75rem 1.25rem',
borderTop: '1px solid #334155',
padding: '0.85rem 1.25rem',
borderTop: '1px solid var(--border-subtle)',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#0F172A',
backgroundColor: 'var(--bg-surface)',
}}
>
<button