fix(ui): optimizar UX y relacion de aspecto para tablets Samsung Galaxy Tab (acordeon polizas, cockpit 0-scroll y contraste)
This commit is contained in:
@@ -33,6 +33,9 @@ class Settings(BaseSettings):
|
|||||||
"http://127.0.0.1:5173",
|
"http://127.0.0.1:5173",
|
||||||
"http://localhost:8000",
|
"http://localhost:8000",
|
||||||
"http://127.0.0.1:8000",
|
"http://127.0.0.1:8000",
|
||||||
|
"https://localhost",
|
||||||
|
"http://localhost",
|
||||||
|
"capacitor://localhost",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Base de Datos SQL Server (videoman)
|
# Base de Datos SQL Server (videoman)
|
||||||
|
|||||||
+2
-1
@@ -25,10 +25,11 @@ app = FastAPI(
|
|||||||
# Middleware de Compresión GZip (optimiza transferencia a tablets por Wi-Fi)
|
# Middleware de Compresión GZip (optimiza transferencia a tablets por Wi-Fi)
|
||||||
app.add_middleware(GZipMiddleware, minimum_size=1000)
|
app.add_middleware(GZipMiddleware, minimum_size=1000)
|
||||||
|
|
||||||
# Middleware de CORS
|
# Middleware de CORS con soporte para Capacitor (Android/iOS), LAN y Web
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=settings.ALLOWED_ORIGINS,
|
allow_origins=settings.ALLOWED_ORIGINS,
|
||||||
|
allow_origin_regex=r"^(https?|capacitor)://(localhost|127\.0\.0\.1|192\.168\.\d+\.\d+|172\.\d+\.\d+\.\d+|10\.\d+\.\d+\.\d+)(:\d+)?$",
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|||||||
@@ -598,13 +598,30 @@ button:disabled, .btn:disabled, .touch-button:disabled {
|
|||||||
|
|
||||||
.desktop-top-header {
|
.desktop-top-header {
|
||||||
height: 48px;
|
height: 48px;
|
||||||
background-color: #070D1E;
|
background-color: var(--bg-surface, #070D1E);
|
||||||
border-bottom: 1px solid #14203B;
|
border-bottom: 1px solid var(--border-subtle, #14203B);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 16px;
|
padding: 0 12px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop-top-header::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.desktop-top-header {
|
||||||
|
padding: 0 8px;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.desktop-tab-btn {
|
||||||
|
padding: 0 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.desktop-tab-btn {
|
.desktop-tab-btn {
|
||||||
@@ -797,47 +814,81 @@ button:disabled, .btn:disabled, .touch-button:disabled {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ==============================================================================
|
/* ==============================================================================
|
||||||
RESPONSIVIDAD Y ERGONOMÍA PARA TABLETS SAMSUNG GALAXY TAB A11 (1340x800)
|
RESPONSIVIDAD Y ERGONOMÍA PARA TABLETS SAMSUNG GALAXY TAB (16:10 - 1280x800 / 1340x800)
|
||||||
============================================================================== */
|
============================================================================== */
|
||||||
@media (max-width: 1180px) and (min-width: 961px) {
|
|
||||||
|
/* Modo Horizontal (Landscape) en Tablets y Escritorios (ancho >= 768px y orientacion landscape) */
|
||||||
|
@media (orientation: landscape) and (min-width: 768px) {
|
||||||
.desktop-cockpit-grid {
|
.desktop-cockpit-grid {
|
||||||
grid-template-columns: 210px 1fr 195px !important;
|
display: grid !important;
|
||||||
|
grid-template-columns: 225px 1fr 220px !important;
|
||||||
gap: 8px !important;
|
gap: 8px !important;
|
||||||
padding: 6px 8px !important;
|
padding: 6px 8px !important;
|
||||||
}
|
padding-bottom: 6px !important;
|
||||||
}
|
height: calc(100vh - 48px) !important;
|
||||||
|
overflow-y: auto !important;
|
||||||
/* Modo Vertical (Portrait) en Tablets (Samsung Galaxy Tab 800x1340) -> 2 Columnas */
|
|
||||||
@media (max-width: 960px) and (min-width: 680px) {
|
|
||||||
.desktop-cockpit-grid {
|
|
||||||
grid-template-columns: 270px 1fr !important;
|
|
||||||
gap: 8px !important;
|
|
||||||
padding: 8px 10px !important;
|
|
||||||
padding-bottom: 64px !important;
|
|
||||||
}
|
}
|
||||||
.desktop-column-actions {
|
.desktop-column-actions {
|
||||||
grid-column: span 2;
|
display: flex !important;
|
||||||
|
grid-column: auto !important;
|
||||||
|
}
|
||||||
|
.tablet-portrait-dock {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.desktop-card-action-buttons,
|
||||||
|
.desktop-card-hardware-buttons {
|
||||||
|
display: flex !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modo Smartphone o Pantalla Muy Estrecha (<680px) */
|
/* Modo Horizontal en pantallas medianas / compactas (1024px a 1180px) */
|
||||||
@media (max-width: 679px) {
|
@media (orientation: landscape) and (max-width: 1180px) and (min-width: 840px) {
|
||||||
.desktop-cockpit-grid {
|
.desktop-cockpit-grid {
|
||||||
grid-template-columns: 1fr !important;
|
grid-template-columns: 215px 1fr 205px !important;
|
||||||
gap: 10px !important;
|
gap: 6px !important;
|
||||||
padding: 8px 10px !important;
|
padding: 4px 6px !important;
|
||||||
padding-bottom: 64px !important;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modo Vertical (Portrait) en Tablets Samsung Galaxy Tab (ancho CSS 500px a 960px) -> 2 Columnas */
|
||||||
|
@media (orientation: portrait) and (min-width: 500px), (max-width: 960px) and (orientation: portrait) {
|
||||||
|
.desktop-cockpit-grid {
|
||||||
|
display: grid !important;
|
||||||
|
grid-template-columns: 245px 1fr !important;
|
||||||
|
gap: 8px !important;
|
||||||
|
padding: 6px 8px !important;
|
||||||
|
padding-bottom: 70px !important;
|
||||||
|
overflow-y: auto !important;
|
||||||
|
}
|
||||||
|
.desktop-column-actions {
|
||||||
|
display: none !important; /* Sus acciones están ancladas en tablet-portrait-dock */
|
||||||
|
}
|
||||||
|
.tablet-portrait-dock {
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modo Celular o Pantalla Ultra Angosta (<500px) */
|
||||||
|
@media (max-width: 499px) {
|
||||||
|
.desktop-cockpit-grid {
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
|
gap: 8px !important;
|
||||||
|
padding: 6px 8px !important;
|
||||||
|
padding-bottom: 70px !important;
|
||||||
|
overflow-y: auto !important;
|
||||||
|
}
|
||||||
|
.desktop-column-actions {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.tablet-portrait-dock {
|
||||||
|
display: flex !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dock de Acciones Rápidas para Modo Vertical (Portrait) */
|
/* Dock de Acciones Rápidas para Modo Vertical (Portrait) */
|
||||||
.tablet-portrait-dock {
|
.tablet-portrait-dock {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 960px) {
|
|
||||||
.tablet-portrait-dock {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
@@ -847,13 +898,6 @@ button:disabled, .btn:disabled, .touch-button:disabled {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
|
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
|
||||||
}
|
|
||||||
|
|
||||||
/* Evitar repetición de botones en la tarjeta de acciones cuando el dock fijo está activo */
|
|
||||||
.desktop-card-action-buttons,
|
|
||||||
.desktop-card-hardware-buttons {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==============================================================================
|
/* ==============================================================================
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
const [tipoDoc, setTipoDoc] = useState<string>('DNI');
|
const [tipoDoc, setTipoDoc] = useState<string>('DNI');
|
||||||
const [tipoIngresoLabel, setTipoIngresoLabel] = useState<string>('Visita');
|
const [tipoIngresoLabel, setTipoIngresoLabel] = useState<string>('Visita');
|
||||||
const [scannerInputValue, setScannerInputValue] = useState<string>('');
|
const [scannerInputValue, setScannerInputValue] = useState<string>('');
|
||||||
|
const [isDocExpanded, setIsDocExpanded] = useState<boolean>(false);
|
||||||
|
|
||||||
|
|
||||||
// Tickets activos y movimientos registrados en BD
|
// Tickets activos y movimientos registrados en BD
|
||||||
@@ -1154,7 +1155,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
{/* Cabecera Superior: Usuario + Logo Infinito + Tabs Entrada/Salida + Puesto + Reloj */}
|
{/* Cabecera Superior: Usuario + Logo Infinito + Tabs Entrada/Salida + Puesto + Reloj */}
|
||||||
<header className="desktop-top-header">
|
<header className="desktop-top-header">
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem' }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.4rem', fontSize: '0.88rem', color: '#CBD5E1' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.4rem', fontSize: '0.88rem', color: 'var(--text-1)' }}>
|
||||||
<span>👤</span>
|
<span>👤</span>
|
||||||
<span style={{ fontWeight: 600 }}>{user?.username || 'root'}</span>
|
<span style={{ fontWeight: 600 }}>{user?.username || 'root'}</span>
|
||||||
<button
|
<button
|
||||||
@@ -1162,9 +1163,9 @@ export const ControlPostView: React.FC = () => {
|
|||||||
onClick={() => logout()}
|
onClick={() => logout()}
|
||||||
style={{
|
style={{
|
||||||
background: 'none',
|
background: 'none',
|
||||||
border: '1px solid #475569',
|
border: '1px solid var(--border)',
|
||||||
borderRadius: '12px',
|
borderRadius: '12px',
|
||||||
color: '#94A3B8',
|
color: 'var(--text-2)',
|
||||||
fontSize: '0.75rem',
|
fontSize: '0.75rem',
|
||||||
padding: '0.15rem 0.5rem',
|
padding: '0.15rem 0.5rem',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
@@ -1245,16 +1246,17 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsWksModalOpen(true)}
|
onClick={() => setIsWksModalOpen(true)}
|
||||||
style={{
|
style={{
|
||||||
background: 'rgba(30, 41, 59, 0.7)',
|
background: 'var(--input-bg)',
|
||||||
border: '1px solid #334155',
|
border: '1px solid var(--border)',
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
color: '#94A3B8',
|
color: 'var(--text-1)',
|
||||||
padding: '0.25rem 0.65rem',
|
padding: '0.25rem 0.65rem',
|
||||||
fontSize: '0.8rem',
|
fontSize: '0.8rem',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
gap: '0.4rem',
|
gap: '0.4rem',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span>🖥️ {workstation}</span>
|
<span>🖥️ {workstation}</span>
|
||||||
@@ -1274,6 +1276,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
boxShadow: '0 0 10px rgba(16, 185, 129, 0.45)',
|
boxShadow: '0 0 10px rgba(16, 185, 129, 0.45)',
|
||||||
animation: 'pulse 2s infinite',
|
animation: 'pulse 2s infinite',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
title="Instalar OnEverControl como Aplicación en esta Tablet"
|
title="Instalar OnEverControl como Aplicación en esta Tablet"
|
||||||
>
|
>
|
||||||
@@ -1286,16 +1289,17 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={toggleTheme}
|
onClick={toggleTheme}
|
||||||
style={{
|
style={{
|
||||||
background: 'none',
|
background: 'var(--input-bg)',
|
||||||
border: '1px solid #475569',
|
border: '1px solid var(--border)',
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
color: '#94A3B8',
|
color: 'var(--text-2)',
|
||||||
padding: '0.2rem 0.5rem',
|
padding: '0.2rem 0.5rem',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
fontSize: '0.8rem',
|
fontSize: '0.8rem',
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
gap: '0.35rem',
|
gap: '0.35rem',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
title={`Cambiar a tema ${theme === 'dark' ? 'claro' : 'oscuro'}`}
|
title={`Cambiar a tema ${theme === 'dark' ? 'claro' : 'oscuro'}`}
|
||||||
>
|
>
|
||||||
@@ -1303,26 +1307,27 @@ export const ControlPostView: React.FC = () => {
|
|||||||
<span>{theme === 'dark' ? 'Claro' : 'Oscuro'}</span>
|
<span>{theme === 'dark' ? 'Claro' : 'Oscuro'}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span style={{ fontFamily: 'monospace', fontSize: '0.95rem', fontWeight: 700, color: '#F8FAFC' }}>
|
<span style={{ fontFamily: 'monospace', fontSize: '0.95rem', fontWeight: 700, color: 'var(--text-1)', whiteSpace: 'nowrap' }}>
|
||||||
{clock}
|
{clock}
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={toggleFullscreen}
|
onClick={toggleFullscreen}
|
||||||
style={{
|
style={{
|
||||||
background: 'none',
|
background: 'var(--input-bg)',
|
||||||
border: '1px solid #475569',
|
border: '1px solid var(--border)',
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
color: '#94A3B8',
|
color: 'var(--text-2)',
|
||||||
padding: '0.2rem 0.45rem',
|
padding: '0.2rem 0.45rem',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
fontSize: '0.85rem',
|
fontSize: '0.85rem',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
}}
|
}}
|
||||||
title="Pantalla Completa"
|
title="Pantalla Completa"
|
||||||
>
|
>
|
||||||
⛶
|
⛶
|
||||||
</button>
|
</button>
|
||||||
<span style={{ fontSize: '0.75rem', color: '#64748B' }} title={`Compilación: ${APP_BUILD}`}>{APP_VERSION}</span>
|
<span style={{ fontSize: '0.75rem', color: 'var(--text-muted)', whiteSpace: 'nowrap' }} title={`Compilación: ${APP_BUILD}`}>{APP_VERSION}</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -1565,6 +1570,108 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Groupbox: Historial de Escaneos (DNI) reubicado ergonómicamente en Columna 1 */}
|
||||||
|
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem', padding: '6px 8px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
|
<span className="desktop-groupbox-title" style={{ position: 'static' }}>
|
||||||
|
Historial Escaneos ({scanHistory.length})
|
||||||
|
</span>
|
||||||
|
{scanHistory.length > 0 && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={clearScanHistory}
|
||||||
|
style={{
|
||||||
|
background: 'none',
|
||||||
|
border: 'none',
|
||||||
|
color: 'var(--text-muted)',
|
||||||
|
fontSize: '0.72rem',
|
||||||
|
cursor: 'pointer',
|
||||||
|
padding: '0.1rem 0.2rem',
|
||||||
|
}}
|
||||||
|
title="Limpiar lista de escaneos"
|
||||||
|
>
|
||||||
|
🗑️ Limpiar
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
maxHeight: '130px',
|
||||||
|
overflowY: 'auto',
|
||||||
|
border: '1px solid var(--border)',
|
||||||
|
borderRadius: '6px',
|
||||||
|
backgroundColor: 'var(--input-bg)',
|
||||||
|
fontSize: '0.78rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{scanHistory.length === 0 ? (
|
||||||
|
<div style={{ textAlign: 'center', padding: '0.6rem', color: 'var(--text-muted)', fontStyle: 'italic', fontSize: '0.72rem' }}>
|
||||||
|
Sin escaneos recientes en este puesto.
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
|
||||||
|
<tbody>
|
||||||
|
{scanHistory.map((it) => {
|
||||||
|
const isSelected = selectedHistoryDoc === it.documento;
|
||||||
|
return (
|
||||||
|
<tr
|
||||||
|
key={it.documento}
|
||||||
|
onClick={() => setSelectedHistoryDoc(it.documento)}
|
||||||
|
onDoubleClick={() => handleLoadFromHistory(it)}
|
||||||
|
style={{
|
||||||
|
borderBottom: '1px solid var(--border-subtle)',
|
||||||
|
backgroundColor: isSelected ? 'var(--selection-bg)' : 'transparent',
|
||||||
|
cursor: 'pointer',
|
||||||
|
transition: 'background-color 0.1s',
|
||||||
|
}}
|
||||||
|
title="Tocar o doble clic para cargar en carril"
|
||||||
|
>
|
||||||
|
<td style={{ padding: '0.2rem 0.35rem', fontWeight: 700, color: 'var(--text-1)', whiteSpace: 'nowrap' }}>
|
||||||
|
{it.documento}
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
marginLeft: '0.2rem',
|
||||||
|
fontSize: '0.62rem',
|
||||||
|
padding: '0.05rem 0.2rem',
|
||||||
|
borderRadius: '3px',
|
||||||
|
backgroundColor: it.sexo === 'F' ? '#EC4899' : '#3B82F6',
|
||||||
|
color: '#fff',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{it.sexo}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td style={{ padding: '0.2rem 0.3rem', color: 'var(--text-1)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '85px', fontSize: '0.74rem' }}>
|
||||||
|
{it.apellido ? `${it.apellido}, ${it.nombre}` : 'Persona'}
|
||||||
|
{it.patente ? <span style={{ color: 'var(--blue-base)', marginLeft: '0.2rem', fontWeight: 700 }}>({it.patente})</span> : null}
|
||||||
|
</td>
|
||||||
|
<td style={{ padding: '0.2rem 0.3rem', color: 'var(--text-muted)', fontSize: '0.68rem', textAlign: 'right', whiteSpace: 'nowrap' }}>
|
||||||
|
{it.hora}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{scanHistory.length > 0 && selectedHistoryDoc && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="desktop-btn-action desktop-btn-blue"
|
||||||
|
style={{ width: '100%', padding: '0.25rem', fontSize: '0.72rem', minHeight: '30px' }}
|
||||||
|
onClick={() => {
|
||||||
|
const item = scanHistory.find((it) => it.documento === selectedHistoryDoc);
|
||||||
|
if (item) handleLoadFromHistory(item);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
📥 Cargar en Carril
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* =========================================================================
|
{/* =========================================================================
|
||||||
@@ -1575,9 +1682,10 @@ export const ControlPostView: React.FC = () => {
|
|||||||
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.45rem', padding: '8px 12px' }}>
|
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.45rem', padding: '8px 12px' }}>
|
||||||
<span className="desktop-groupbox-title">Datos Persona</span>
|
<span className="desktop-groupbox-title">Datos Persona</span>
|
||||||
|
|
||||||
{/* Fila 1: Ingreso / Doc / Nro Doc / Radios Conductor - Peatón (Fluido con flex-wrap para que Nro Doc nunca se aplaste) */}
|
{/* Fila 1: Ingreso / Doc / Nro Doc / Radios Conductor - Peatón (Grid fluido) */}
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', flexWrap: 'wrap' }}>
|
<div style={{ display: 'grid', gridTemplateColumns: 'auto auto auto 1fr auto', alignItems: 'center', gap: '0.45rem' }}>
|
||||||
<span className="desktop-label">Ingreso / Doc:</span>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.35rem' }}>
|
||||||
|
<span className="desktop-label">Ingreso:</span>
|
||||||
<select
|
<select
|
||||||
className="desktop-select"
|
className="desktop-select"
|
||||||
value={tipoIngresoLabel}
|
value={tipoIngresoLabel}
|
||||||
@@ -1589,6 +1697,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
<option value="Contratista">Contratista</option>
|
<option value="Contratista">Contratista</option>
|
||||||
<option value="Servicio">Servicio</option>
|
<option value="Servicio">Servicio</option>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
<select
|
<select
|
||||||
className="desktop-select"
|
className="desktop-select"
|
||||||
value={tipoDoc}
|
value={tipoDoc}
|
||||||
@@ -1599,12 +1708,11 @@ export const ControlPostView: React.FC = () => {
|
|||||||
<option value="PAS">Pasaporte</option>
|
<option value="PAS">Pasaporte</option>
|
||||||
<option value="EXT">Extranjero</option>
|
<option value="EXT">Extranjero</option>
|
||||||
</select>
|
</select>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.35rem', flex: '1 1 180px', minWidth: '150px' }}>
|
|
||||||
<span className="desktop-label" style={{ whiteSpace: 'nowrap' }}>Nro Doc:</span>
|
<span className="desktop-label" style={{ whiteSpace: 'nowrap' }}>Nro Doc:</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="desktop-input"
|
className="desktop-input"
|
||||||
placeholder={isModoSalida ? "DNI Salida (Enter)..." : "DNI Persona..."}
|
placeholder={isModoSalida ? "DNI Salida..." : "DNI Persona..."}
|
||||||
value={form.documento}
|
value={form.documento}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const raw = e.target.value;
|
const raw = e.target.value;
|
||||||
@@ -1626,9 +1734,8 @@ export const ControlPostView: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', paddingLeft: '0.2rem', whiteSpace: 'nowrap' }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.65rem', paddingLeft: '0.25rem' }}>
|
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.25rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
||||||
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.3rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="tipo_ingreso"
|
name="tipo_ingreso"
|
||||||
@@ -1637,7 +1744,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<span style={{ fontWeight: 600 }}>Conductor</span>
|
<span style={{ fontWeight: 600 }}>Conductor</span>
|
||||||
</label>
|
</label>
|
||||||
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.3rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.25rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="tipo_ingreso"
|
name="tipo_ingreso"
|
||||||
@@ -1700,7 +1807,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
{/* Fila 4: Patente y Botonera Operativa Integrada */}
|
{/* Fila 4: Patente y Botonera Operativa Integrada */}
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.45rem', flexWrap: 'wrap' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.45rem', flexWrap: 'wrap' }}>
|
||||||
<span className="desktop-label">Patente:</span>
|
<span className="desktop-label">Patente:</span>
|
||||||
<div style={{ display: 'flex', gap: '0.35rem', alignItems: 'center', width: '180px' }}>
|
<div style={{ display: 'flex', gap: '0.25rem', alignItems: 'center', width: '160px' }}>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="desktop-input"
|
className="desktop-input"
|
||||||
@@ -1717,7 +1824,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-blue"
|
className="desktop-btn-action desktop-btn-blue"
|
||||||
style={{ padding: '0 0.5rem', minHeight: '36px' }}
|
style={{ padding: '0 0.45rem', minHeight: '34px' }}
|
||||||
onClick={() => setIsVehicleModalOpen(true)}
|
onClick={() => setIsVehicleModalOpen(true)}
|
||||||
title="Buscar por Patente en base de datos"
|
title="Buscar por Patente en base de datos"
|
||||||
>
|
>
|
||||||
@@ -1725,12 +1832,12 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ display: 'flex', gap: '0.35rem', flexWrap: 'wrap', flex: 1 }}>
|
<div style={{ display: 'flex', gap: '0.3rem', flexWrap: 'wrap', flex: 1 }}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-blue"
|
className="desktop-btn-action desktop-btn-blue"
|
||||||
onClick={() => setIsPersonSearchModalOpen(true)}
|
onClick={() => setIsPersonSearchModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
title="Búsqueda avanzada de personas"
|
title="Búsqueda avanzada de personas"
|
||||||
>
|
>
|
||||||
BUSCAR PERSONA
|
BUSCAR PERSONA
|
||||||
@@ -1742,7 +1849,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-cyan"
|
className="desktop-btn-action desktop-btn-cyan"
|
||||||
onClick={() => setIsPreauthorizedModalOpen(true)}
|
onClick={() => setIsPreauthorizedModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
title="Visitas preautorizadas / Invitaciones"
|
title="Visitas preautorizadas / Invitaciones"
|
||||||
>
|
>
|
||||||
📋 PREAUTORIZADOS
|
📋 PREAUTORIZADOS
|
||||||
@@ -1751,7 +1858,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-purple"
|
className="desktop-btn-action desktop-btn-purple"
|
||||||
onClick={() => setCompanionsModalOpen(true)}
|
onClick={() => setCompanionsModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
>
|
>
|
||||||
ACOMPAÑANTES
|
ACOMPAÑANTES
|
||||||
</button>
|
</button>
|
||||||
@@ -1762,7 +1869,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-green"
|
className="desktop-btn-action desktop-btn-green"
|
||||||
onClick={() => setIsIngresadosModalOpen(true)}
|
onClick={() => setIsIngresadosModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
>
|
>
|
||||||
BUSCAR INGRESADOS
|
BUSCAR INGRESADOS
|
||||||
</button>
|
</button>
|
||||||
@@ -1770,7 +1877,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-red"
|
className="desktop-btn-action desktop-btn-red"
|
||||||
onClick={() => setIsMassExitModalOpen(true)}
|
onClick={() => setIsMassExitModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
title="Gestión de salida masiva / toque de queda"
|
title="Gestión de salida masiva / toque de queda"
|
||||||
>
|
>
|
||||||
🚨 SALIDA MASIVA
|
🚨 SALIDA MASIVA
|
||||||
@@ -1782,7 +1889,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-blue"
|
className="desktop-btn-action desktop-btn-blue"
|
||||||
onClick={() => setIsPersonProfileModalOpen(true)}
|
onClick={() => setIsPersonProfileModalOpen(true)}
|
||||||
style={{ minHeight: '36px', padding: '0 0.65rem', fontSize: '0.8rem' }}
|
style={{ minHeight: '34px', padding: '0 0.55rem', fontSize: '0.78rem' }}
|
||||||
>
|
>
|
||||||
VER FICHA
|
VER FICHA
|
||||||
</button>
|
</button>
|
||||||
@@ -1863,15 +1970,47 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Groupbox Unificado: Documentación y Pólizas (ART, Licencia y Seguro) */}
|
{/* Groupbox Unificado: Documentación y Pólizas (ART, Licencia y Seguro) con Acordeón Ergonómico */}
|
||||||
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', padding: '8px 12px' }}>
|
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', padding: '6px 10px' }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
<div
|
||||||
<span className="desktop-groupbox-title" style={{ margin: 0 }}>Documentación y Pólizas de Seguro</span>
|
onClick={() => setIsDocExpanded(!isDocExpanded)}
|
||||||
<span style={{ fontSize: '0.72rem', color: 'var(--text-muted)' }}>ART • Registro • Seguro Auto</span>
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
cursor: 'pointer',
|
||||||
|
userSelect: 'none',
|
||||||
|
padding: '2px 0',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.4rem' }}>
|
||||||
|
<span style={{ fontSize: '0.85rem', color: 'var(--brand-primary)', fontWeight: 800 }}>
|
||||||
|
{isDocExpanded ? '▼' : '▶'}
|
||||||
|
</span>
|
||||||
|
<span className="desktop-groupbox-title" style={{ margin: 0, cursor: 'pointer' }}>
|
||||||
|
Documentación y Pólizas
|
||||||
|
</span>
|
||||||
|
<span style={{ fontSize: '0.72rem', color: 'var(--text-muted)' }}>
|
||||||
|
(ART • Licencia • Seguro Auto)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
fontSize: '0.75rem',
|
||||||
|
fontWeight: 700,
|
||||||
|
color: (form.licencia_nro || form.art_poliza || form.seguro_poliza) ? '#10B981' : 'var(--text-muted)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(form.licencia_nro || form.art_poliza || form.seguro_poliza)
|
||||||
|
? '✓ Pólizas Registradas'
|
||||||
|
: (isDocExpanded ? 'Ocultar ▲' : 'Completar ▼')}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{isDocExpanded && (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', paddingTop: '0.3rem', borderTop: '1px solid var(--border-subtle)' }}>
|
||||||
{/* Fila 1: Reg. Conductor */}
|
{/* Fila 1: Reg. Conductor */}
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||||
<span className="desktop-label">Licencia Cond:</span>
|
<span className="desktop-label">Licencia Cond:</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -1897,7 +2036,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Fila 2: Pol ART */}
|
{/* Fila 2: Pol ART */}
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||||
<span className="desktop-label">Póliza ART:</span>
|
<span className="desktop-label">Póliza ART:</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -1923,12 +2062,12 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Fila 3: Seguro Auto */}
|
{/* Fila 3: Seguro Auto */}
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||||
<span className="desktop-label">Seguro Auto:</span>
|
<span className="desktop-label">Seguro Auto:</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="desktop-input"
|
className="desktop-input"
|
||||||
placeholder="Nro Póliza Seguro Automotor..."
|
placeholder="Nro Póliza Seguro..."
|
||||||
value={form.seguro_poliza}
|
value={form.seguro_poliza}
|
||||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_poliza: e.target.value }))}
|
onChange={(e) => setForm((prev) => ({ ...prev, seguro_poliza: e.target.value }))}
|
||||||
/>
|
/>
|
||||||
@@ -1948,17 +2087,19 @@ export const ControlPostView: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* =========================================================================
|
{/* =========================================================================
|
||||||
COLUMNA 3: ACCIONES (MÓDULOS VIRTUALES)
|
COLUMNA 3: ACCIONES (MÓDULOS VIRTUALES)
|
||||||
========================================================================= */}
|
========================================================================= */}
|
||||||
<div className="desktop-column-actions" style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem' }}>
|
<div className="desktop-column-actions" style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem' }}>
|
||||||
<div className="desktop-groupbox" style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: '0.6rem' }}>
|
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem', padding: '8px 10px' }}>
|
||||||
<span className="desktop-groupbox-title">Acciones (Módulos Virtuales)</span>
|
<span className="desktop-groupbox-title">Acciones (Módulos Virtuales)</span>
|
||||||
|
|
||||||
{/* Botón Principal y Cancelar: exclusivos de modo Landscape (en Portrait van en dock fijo) */}
|
{/* Botón Principal y Cancelar */}
|
||||||
<div className="desktop-card-action-buttons" style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem' }}>
|
<div className="desktop-card-action-buttons" style={{ display: 'flex', flexDirection: 'column', gap: '0.45rem' }}>
|
||||||
{isModoSalida ? (
|
{isModoSalida ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -2003,7 +2144,7 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Checks Operativos */}
|
{/* Checks Operativos */}
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', marginTop: '0.2rem' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem', marginTop: '0.1rem' }}>
|
||||||
{isModoSalida ? (
|
{isModoSalida ? (
|
||||||
<>
|
<>
|
||||||
<label style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
<label style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
||||||
@@ -2030,14 +2171,14 @@ export const ControlPostView: React.FC = () => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => setSalidaAutomatica(!salidaAutomatica)}
|
onClick={() => setSalidaAutomatica(!salidaAutomatica)}
|
||||||
style={{
|
style={{
|
||||||
marginTop: '0.35rem',
|
marginTop: '0.2rem',
|
||||||
padding: '0.5rem 0.8rem',
|
padding: '0.45rem 0.8rem',
|
||||||
backgroundColor: salidaAutomatica ? '#10B981' : '#F8FAFC',
|
backgroundColor: salidaAutomatica ? '#10B981' : 'var(--input-bg)',
|
||||||
color: salidaAutomatica ? '#FFFFFF' : '#0F172A',
|
color: salidaAutomatica ? '#FFFFFF' : 'var(--text-1)',
|
||||||
|
border: '1px solid var(--border)',
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
fontSize: '0.85rem',
|
fontSize: '0.82rem',
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
border: 'none',
|
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
}}
|
}}
|
||||||
@@ -2064,14 +2205,14 @@ export const ControlPostView: React.FC = () => {
|
|||||||
onChange={(e) => setForm((prev) => ({ ...prev, cacheo_salida: e.target.checked }))}
|
onChange={(e) => setForm((prev) => ({ ...prev, cacheo_salida: e.target.checked }))}
|
||||||
style={{ width: '18px', height: '18px', accentColor: '#2563EB' }}
|
style={{ width: '18px', height: '18px', accentColor: '#2563EB' }}
|
||||||
/>
|
/>
|
||||||
<span style={{ color: '#94A3B8' }}>Exigir Cacheo al Egresar</span>
|
<span style={{ color: 'var(--text-2)' }}>Exigir Cacheo al Egresar</span>
|
||||||
</label>
|
</label>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Botonera de Control de Hardware en Columna de Acciones (en Portrait va en dock fijo) */}
|
{/* Botonera de Control de Hardware: Pulso Apertura & Forzar Cierre */}
|
||||||
<div className="desktop-card-hardware-buttons" style={{ marginTop: 'auto', paddingTop: '0.6rem', borderTop: '1px solid rgba(255,255,255,0.08)', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '0.4rem' }}>
|
<div className="desktop-card-hardware-buttons" style={{ paddingTop: '0.5rem', borderTop: '1px solid var(--border-subtle)', display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '0.4rem' }}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="desktop-btn-action desktop-btn-slate"
|
className="desktop-btn-action desktop-btn-slate"
|
||||||
@@ -2102,108 +2243,6 @@ export const ControlPostView: React.FC = () => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Groupbox: Historial de Escaneos (DNI) (Paridad pct_view.py:2752) */}
|
|
||||||
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.35rem' }}>
|
|
||||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
||||||
<span className="desktop-groupbox-title" style={{ position: 'static' }}>
|
|
||||||
Historial de Escaneos ({scanHistory.length})
|
|
||||||
</span>
|
|
||||||
{scanHistory.length > 0 && (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={clearScanHistory}
|
|
||||||
style={{
|
|
||||||
background: 'none',
|
|
||||||
border: 'none',
|
|
||||||
color: '#94A3B8',
|
|
||||||
fontSize: '0.75rem',
|
|
||||||
cursor: 'pointer',
|
|
||||||
padding: '0.1rem 0.3rem',
|
|
||||||
}}
|
|
||||||
title="Limpiar lista de escaneos"
|
|
||||||
>
|
|
||||||
🗑️ Limpiar
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
maxHeight: '110px',
|
|
||||||
overflowY: 'auto',
|
|
||||||
border: '1px solid #334155',
|
|
||||||
borderRadius: '6px',
|
|
||||||
backgroundColor: '#0F172A',
|
|
||||||
fontSize: '0.8rem',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{scanHistory.length === 0 ? (
|
|
||||||
<div style={{ textAlign: 'center', padding: '0.75rem', color: '#64748B', fontStyle: 'italic', fontSize: '0.75rem' }}>
|
|
||||||
Sin escaneos recientes en este puesto.
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
|
|
||||||
<tbody>
|
|
||||||
{scanHistory.map((it) => {
|
|
||||||
const isSelected = selectedHistoryDoc === it.documento;
|
|
||||||
return (
|
|
||||||
<tr
|
|
||||||
key={it.documento}
|
|
||||||
onClick={() => setSelectedHistoryDoc(it.documento)}
|
|
||||||
onDoubleClick={() => handleLoadFromHistory(it)}
|
|
||||||
style={{
|
|
||||||
borderBottom: '1px solid rgba(51, 65, 85, 0.4)',
|
|
||||||
backgroundColor: isSelected ? 'rgba(37, 99, 235, 0.25)' : 'transparent',
|
|
||||||
cursor: 'pointer',
|
|
||||||
transition: 'background-color 0.1s',
|
|
||||||
}}
|
|
||||||
title="Doble clic para cargar en el carril activo"
|
|
||||||
>
|
|
||||||
<td style={{ padding: '0.25rem 0.4rem', fontWeight: 700, color: '#F1F5F9', whiteSpace: 'nowrap' }}>
|
|
||||||
{it.documento}
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
marginLeft: '0.25rem',
|
|
||||||
fontSize: '0.65rem',
|
|
||||||
padding: '0.05rem 0.2rem',
|
|
||||||
borderRadius: '3px',
|
|
||||||
backgroundColor: it.sexo === 'F' ? '#EC4899' : '#3B82F6',
|
|
||||||
color: '#fff',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{it.sexo}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td style={{ padding: '0.25rem 0.35rem', color: 'var(--text-primary)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '110px' }}>
|
|
||||||
{it.apellido ? `${it.apellido}, ${it.nombre}` : 'Persona'}
|
|
||||||
{it.patente ? <span style={{ color: 'var(--blue-base)', marginLeft: '0.25rem', fontWeight: 700 }}>({it.patente})</span> : null}
|
|
||||||
</td>
|
|
||||||
<td style={{ padding: '0.25rem 0.4rem', color: 'var(--text-muted)', fontSize: '0.72rem', textAlign: 'right', whiteSpace: 'nowrap' }}>
|
|
||||||
{it.hora}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{scanHistory.length > 0 && selectedHistoryDoc && (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="desktop-btn-action desktop-btn-blue"
|
|
||||||
style={{ width: '100%', padding: '0.3rem', fontSize: '0.75rem', marginTop: '0.1rem' }}
|
|
||||||
onClick={() => {
|
|
||||||
const item = scanHistory.find((it) => it.documento === selectedHistoryDoc);
|
|
||||||
if (item) handleLoadFromHistory(item);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
📥 Cargar Seleccionado en Carril
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,3 +16,4 @@ echo ===================================================
|
|||||||
echo.
|
echo.
|
||||||
venv\Scripts\uvicorn.exe app.main:app --host 0.0.0.0 --port 8000 --reload
|
venv\Scripts\uvicorn.exe app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user