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:
@@ -598,13 +598,30 @@ button:disabled, .btn:disabled, .touch-button:disabled {
|
||||
|
||||
.desktop-top-header {
|
||||
height: 48px;
|
||||
background-color: #070D1E;
|
||||
border-bottom: 1px solid #14203B;
|
||||
background-color: var(--bg-surface, #070D1E);
|
||||
border-bottom: 1px solid var(--border-subtle, #14203B);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 16px;
|
||||
padding: 0 12px;
|
||||
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 {
|
||||
@@ -797,63 +814,90 @@ 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 {
|
||||
grid-template-columns: 210px 1fr 195px !important;
|
||||
display: grid !important;
|
||||
grid-template-columns: 225px 1fr 220px !important;
|
||||
gap: 8px !important;
|
||||
padding: 6px 8px !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;
|
||||
padding-bottom: 6px !important;
|
||||
height: calc(100vh - 48px) !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
.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) */
|
||||
@media (max-width: 679px) {
|
||||
/* Modo Horizontal en pantallas medianas / compactas (1024px a 1180px) */
|
||||
@media (orientation: landscape) and (max-width: 1180px) and (min-width: 840px) {
|
||||
.desktop-cockpit-grid {
|
||||
grid-template-columns: 1fr !important;
|
||||
gap: 10px !important;
|
||||
padding: 8px 10px !important;
|
||||
padding-bottom: 64px !important;
|
||||
grid-template-columns: 215px 1fr 205px !important;
|
||||
gap: 6px !important;
|
||||
padding: 4px 6px !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) */
|
||||
.tablet-portrait-dock {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.tablet-portrait-dock {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
background-color: var(--bg-surface);
|
||||
border-top: 1px solid var(--border-strong);
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
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;
|
||||
}
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
background-color: var(--bg-surface);
|
||||
border-top: 1px solid var(--border-strong);
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
/* ==============================================================================
|
||||
|
||||
@@ -133,6 +133,7 @@ export const ControlPostView: React.FC = () => {
|
||||
const [tipoDoc, setTipoDoc] = useState<string>('DNI');
|
||||
const [tipoIngresoLabel, setTipoIngresoLabel] = useState<string>('Visita');
|
||||
const [scannerInputValue, setScannerInputValue] = useState<string>('');
|
||||
const [isDocExpanded, setIsDocExpanded] = useState<boolean>(false);
|
||||
|
||||
|
||||
// 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 */}
|
||||
<header className="desktop-top-header">
|
||||
<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 style={{ fontWeight: 600 }}>{user?.username || 'root'}</span>
|
||||
<button
|
||||
@@ -1162,9 +1163,9 @@ export const ControlPostView: React.FC = () => {
|
||||
onClick={() => logout()}
|
||||
style={{
|
||||
background: 'none',
|
||||
border: '1px solid #475569',
|
||||
border: '1px solid var(--border)',
|
||||
borderRadius: '12px',
|
||||
color: '#94A3B8',
|
||||
color: 'var(--text-2)',
|
||||
fontSize: '0.75rem',
|
||||
padding: '0.15rem 0.5rem',
|
||||
cursor: 'pointer',
|
||||
@@ -1245,16 +1246,17 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
onClick={() => setIsWksModalOpen(true)}
|
||||
style={{
|
||||
background: 'rgba(30, 41, 59, 0.7)',
|
||||
border: '1px solid #334155',
|
||||
background: 'var(--input-bg)',
|
||||
border: '1px solid var(--border)',
|
||||
borderRadius: '6px',
|
||||
color: '#94A3B8',
|
||||
color: 'var(--text-1)',
|
||||
padding: '0.25rem 0.65rem',
|
||||
fontSize: '0.8rem',
|
||||
cursor: 'pointer',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '0.4rem',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
<span>🖥️ {workstation}</span>
|
||||
@@ -1274,6 +1276,7 @@ export const ControlPostView: React.FC = () => {
|
||||
borderRadius: '6px',
|
||||
boxShadow: '0 0 10px rgba(16, 185, 129, 0.45)',
|
||||
animation: 'pulse 2s infinite',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
title="Instalar OnEverControl como Aplicación en esta Tablet"
|
||||
>
|
||||
@@ -1286,16 +1289,17 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
onClick={toggleTheme}
|
||||
style={{
|
||||
background: 'none',
|
||||
border: '1px solid #475569',
|
||||
background: 'var(--input-bg)',
|
||||
border: '1px solid var(--border)',
|
||||
borderRadius: '6px',
|
||||
color: '#94A3B8',
|
||||
color: 'var(--text-2)',
|
||||
padding: '0.2rem 0.5rem',
|
||||
cursor: 'pointer',
|
||||
fontSize: '0.8rem',
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
gap: '0.35rem',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
title={`Cambiar a tema ${theme === 'dark' ? 'claro' : 'oscuro'}`}
|
||||
>
|
||||
@@ -1303,26 +1307,27 @@ export const ControlPostView: React.FC = () => {
|
||||
<span>{theme === 'dark' ? 'Claro' : 'Oscuro'}</span>
|
||||
</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}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={toggleFullscreen}
|
||||
style={{
|
||||
background: 'none',
|
||||
border: '1px solid #475569',
|
||||
background: 'var(--input-bg)',
|
||||
border: '1px solid var(--border)',
|
||||
borderRadius: '6px',
|
||||
color: '#94A3B8',
|
||||
color: 'var(--text-2)',
|
||||
padding: '0.2rem 0.45rem',
|
||||
cursor: 'pointer',
|
||||
fontSize: '0.85rem',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
title="Pantalla Completa"
|
||||
>
|
||||
⛶
|
||||
</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>
|
||||
</header>
|
||||
|
||||
@@ -1565,6 +1570,108 @@ export const ControlPostView: React.FC = () => {
|
||||
</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>
|
||||
|
||||
{/* =========================================================================
|
||||
@@ -1575,20 +1682,22 @@ export const ControlPostView: React.FC = () => {
|
||||
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.45rem', padding: '8px 12px' }}>
|
||||
<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) */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', flexWrap: 'wrap' }}>
|
||||
<span className="desktop-label">Ingreso / Doc:</span>
|
||||
<select
|
||||
className="desktop-select"
|
||||
value={tipoIngresoLabel}
|
||||
onChange={(e) => setTipoIngresoLabel(e.target.value)}
|
||||
style={{ width: '95px' }}
|
||||
>
|
||||
<option value="Visita">Visita</option>
|
||||
<option value="Proveedor">Proveedor</option>
|
||||
<option value="Contratista">Contratista</option>
|
||||
<option value="Servicio">Servicio</option>
|
||||
</select>
|
||||
{/* Fila 1: Ingreso / Doc / Nro Doc / Radios Conductor - Peatón (Grid fluido) */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'auto auto auto 1fr auto', alignItems: 'center', gap: '0.45rem' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.35rem' }}>
|
||||
<span className="desktop-label">Ingreso:</span>
|
||||
<select
|
||||
className="desktop-select"
|
||||
value={tipoIngresoLabel}
|
||||
onChange={(e) => setTipoIngresoLabel(e.target.value)}
|
||||
style={{ width: '95px' }}
|
||||
>
|
||||
<option value="Visita">Visita</option>
|
||||
<option value="Proveedor">Proveedor</option>
|
||||
<option value="Contratista">Contratista</option>
|
||||
<option value="Servicio">Servicio</option>
|
||||
</select>
|
||||
</div>
|
||||
<select
|
||||
className="desktop-select"
|
||||
value={tipoDoc}
|
||||
@@ -1599,36 +1708,34 @@ export const ControlPostView: React.FC = () => {
|
||||
<option value="PAS">Pasaporte</option>
|
||||
<option value="EXT">Extranjero</option>
|
||||
</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>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder={isModoSalida ? "DNI Salida (Enter)..." : "DNI Persona..."}
|
||||
value={form.documento}
|
||||
onChange={(e) => {
|
||||
const raw = e.target.value;
|
||||
const norm = normalizarDniInput(raw);
|
||||
const docClean = norm.documento || raw;
|
||||
setForm((prev) => ({
|
||||
...prev,
|
||||
documento: docClean,
|
||||
...(norm.sexo ? { sexo: norm.sexo } : {}),
|
||||
}));
|
||||
if (docClean.length >= 4) {
|
||||
lookupPerson(docClean);
|
||||
}
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
buscarPersonaOPatente();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.65rem', paddingLeft: '0.25rem' }}>
|
||||
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.3rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
||||
<span className="desktop-label" style={{ whiteSpace: 'nowrap' }}>Nro Doc:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder={isModoSalida ? "DNI Salida..." : "DNI Persona..."}
|
||||
value={form.documento}
|
||||
onChange={(e) => {
|
||||
const raw = e.target.value;
|
||||
const norm = normalizarDniInput(raw);
|
||||
const docClean = norm.documento || raw;
|
||||
setForm((prev) => ({
|
||||
...prev,
|
||||
documento: docClean,
|
||||
...(norm.sexo ? { sexo: norm.sexo } : {}),
|
||||
}));
|
||||
if (docClean.length >= 4) {
|
||||
lookupPerson(docClean);
|
||||
}
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
buscarPersonaOPatente();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', paddingLeft: '0.2rem', whiteSpace: 'nowrap' }}>
|
||||
<label style={{ display: 'inline-flex', alignItems: 'center', gap: '0.25rem', cursor: 'pointer', fontSize: '0.85rem' }}>
|
||||
<input
|
||||
type="radio"
|
||||
name="tipo_ingreso"
|
||||
@@ -1637,7 +1744,7 @@ export const ControlPostView: React.FC = () => {
|
||||
/>
|
||||
<span style={{ fontWeight: 600 }}>Conductor</span>
|
||||
</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
|
||||
type="radio"
|
||||
name="tipo_ingreso"
|
||||
@@ -1700,7 +1807,7 @@ export const ControlPostView: React.FC = () => {
|
||||
{/* Fila 4: Patente y Botonera Operativa Integrada */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '0.45rem', flexWrap: 'wrap' }}>
|
||||
<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
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
@@ -1717,7 +1824,7 @@ export const ControlPostView: React.FC = () => {
|
||||
<button
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-blue"
|
||||
style={{ padding: '0 0.5rem', minHeight: '36px' }}
|
||||
style={{ padding: '0 0.45rem', minHeight: '34px' }}
|
||||
onClick={() => setIsVehicleModalOpen(true)}
|
||||
title="Buscar por Patente en base de datos"
|
||||
>
|
||||
@@ -1725,12 +1832,12 @@ export const ControlPostView: React.FC = () => {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', gap: '0.35rem', flexWrap: 'wrap', flex: 1 }}>
|
||||
<div style={{ display: 'flex', gap: '0.3rem', flexWrap: 'wrap', flex: 1 }}>
|
||||
<button
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-blue"
|
||||
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"
|
||||
>
|
||||
BUSCAR PERSONA
|
||||
@@ -1742,7 +1849,7 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-cyan"
|
||||
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"
|
||||
>
|
||||
📋 PREAUTORIZADOS
|
||||
@@ -1751,7 +1858,7 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-purple"
|
||||
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
|
||||
</button>
|
||||
@@ -1762,7 +1869,7 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-green"
|
||||
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
|
||||
</button>
|
||||
@@ -1770,7 +1877,7 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-red"
|
||||
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"
|
||||
>
|
||||
🚨 SALIDA MASIVA
|
||||
@@ -1782,7 +1889,7 @@ export const ControlPostView: React.FC = () => {
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-blue"
|
||||
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
|
||||
</button>
|
||||
@@ -1863,90 +1970,124 @@ export const ControlPostView: React.FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Groupbox Unificado: Documentación y Pólizas (ART, Licencia y Seguro) */}
|
||||
<div className="desktop-groupbox" style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', padding: '8px 12px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<span className="desktop-groupbox-title" style={{ margin: 0 }}>Documentación y Pólizas de Seguro</span>
|
||||
<span style={{ fontSize: '0.72rem', color: 'var(--text-muted)' }}>ART • Registro • Seguro Auto</span>
|
||||
{/* 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: '6px 10px' }}>
|
||||
<div
|
||||
onClick={() => setIsDocExpanded(!isDocExpanded)}
|
||||
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>
|
||||
|
||||
{/* Fila 1: Reg. Conductor */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Licencia Cond:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Licencia..."
|
||||
value={form.licencia_nro}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_nro: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Expedido Por..."
|
||||
value={form.licencia_entidad}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_entidad: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Licencia de Conducir"
|
||||
value={form.licencia_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
{isDocExpanded && (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.4rem', paddingTop: '0.3rem', borderTop: '1px solid var(--border-subtle)' }}>
|
||||
{/* Fila 1: Reg. Conductor */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Licencia Cond:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Licencia..."
|
||||
value={form.licencia_nro}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_nro: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Expedido Por..."
|
||||
value={form.licencia_entidad}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_entidad: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Licencia de Conducir"
|
||||
value={form.licencia_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, licencia_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Fila 2: Pol ART */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Póliza ART:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Póliza ART..."
|
||||
value={form.art_poliza}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_poliza: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Compañía Aseguradora ART..."
|
||||
value={form.art_empresa}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_empresa: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Cobertura ART"
|
||||
value={form.art_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
{/* Fila 2: Pol ART */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Póliza ART:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Póliza ART..."
|
||||
value={form.art_poliza}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_poliza: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Compañía Aseguradora ART..."
|
||||
value={form.art_empresa}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_empresa: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Cobertura ART"
|
||||
value={form.art_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, art_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Fila 3: Seguro Auto */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 135px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Seguro Auto:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Póliza Seguro Automotor..."
|
||||
value={form.seguro_poliza}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_poliza: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Compañía Aseguradora Auto..."
|
||||
value={form.seguro_empresa}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_empresa: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Póliza Automotor"
|
||||
value={form.seguro_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
{/* Fila 3: Seguro Auto */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '95px 1fr 1fr 130px', alignItems: 'center', gap: '0.4rem' }}>
|
||||
<span className="desktop-label">Seguro Auto:</span>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Nro Póliza Seguro..."
|
||||
value={form.seguro_poliza}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_poliza: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
className="desktop-input"
|
||||
placeholder="Compañía Aseguradora Auto..."
|
||||
value={form.seguro_empresa}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_empresa: e.target.value }))}
|
||||
/>
|
||||
<input
|
||||
type="date"
|
||||
className="desktop-input"
|
||||
title="Vencimiento Póliza Automotor"
|
||||
value={form.seguro_hasta}
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, seguro_hasta: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1954,11 +2095,11 @@ export const ControlPostView: React.FC = () => {
|
||||
COLUMNA 3: ACCIONES (MÓDULOS VIRTUALES)
|
||||
========================================================================= */}
|
||||
<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>
|
||||
|
||||
{/* Botón Principal y Cancelar: exclusivos de modo Landscape (en Portrait van en dock fijo) */}
|
||||
<div className="desktop-card-action-buttons" style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem' }}>
|
||||
{/* Botón Principal y Cancelar */}
|
||||
<div className="desktop-card-action-buttons" style={{ display: 'flex', flexDirection: 'column', gap: '0.45rem' }}>
|
||||
{isModoSalida ? (
|
||||
<button
|
||||
type="button"
|
||||
@@ -2003,7 +2144,7 @@ export const ControlPostView: React.FC = () => {
|
||||
</div>
|
||||
|
||||
{/* 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 ? (
|
||||
<>
|
||||
<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"
|
||||
onClick={() => setSalidaAutomatica(!salidaAutomatica)}
|
||||
style={{
|
||||
marginTop: '0.35rem',
|
||||
padding: '0.5rem 0.8rem',
|
||||
backgroundColor: salidaAutomatica ? '#10B981' : '#F8FAFC',
|
||||
color: salidaAutomatica ? '#FFFFFF' : '#0F172A',
|
||||
marginTop: '0.2rem',
|
||||
padding: '0.45rem 0.8rem',
|
||||
backgroundColor: salidaAutomatica ? '#10B981' : 'var(--input-bg)',
|
||||
color: salidaAutomatica ? '#FFFFFF' : 'var(--text-1)',
|
||||
border: '1px solid var(--border)',
|
||||
fontWeight: 700,
|
||||
fontSize: '0.85rem',
|
||||
fontSize: '0.82rem',
|
||||
borderRadius: '6px',
|
||||
border: 'none',
|
||||
cursor: 'pointer',
|
||||
textAlign: 'center',
|
||||
}}
|
||||
@@ -2064,14 +2205,14 @@ export const ControlPostView: React.FC = () => {
|
||||
onChange={(e) => setForm((prev) => ({ ...prev, cacheo_salida: e.target.checked }))}
|
||||
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>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Botonera de Control de Hardware en Columna de Acciones (en Portrait va en dock fijo) */}
|
||||
<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' }}>
|
||||
{/* Botonera de Control de Hardware: Pulso Apertura & Forzar Cierre */}
|
||||
<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
|
||||
type="button"
|
||||
className="desktop-btn-action desktop-btn-slate"
|
||||
@@ -2102,108 +2243,6 @@ export const ControlPostView: React.FC = () => {
|
||||
</button>
|
||||
</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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user