fix(audit): corrige errores criticos y mayores, mejora UX/accesibilidad y optimiza rendimiento
- Arregla @require_auth, permisos, race conditions, locks de caja/stock - Elimina N+1 en layaway, flotilla, dashboard y global_invoice - Asegura folios atomicos para CFDI, ordenes de servicio y polizas - Protege client_secret de MercadoLibre en backend - Conecta botones/filtros de config, customers, accounting e invoicing - Mejora accesibilidad (labels/aria-label) y estados de carga/vacio - Limpia accounting.js obsoleto y consolida accounting.v9.js - Actualiza cache busting a v32 y Service Worker a v32 - Documenta todo en docs/AUDIT_Y_MEJORAS_2026-06-15.md Tests: 35 passed
This commit is contained in:
@@ -1243,3 +1243,45 @@
|
||||
.summary-strip { grid-template-columns: 1fr; }
|
||||
.finance-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
MODAL DETALLE CUENTA POR COBRAR
|
||||
========================================================================= */
|
||||
.modal-overlay {
|
||||
position: fixed; inset: 0;
|
||||
background: var(--overlay-backdrop);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
z-index: var(--z-modal);
|
||||
opacity: 0; pointer-events: none;
|
||||
transition: var(--transition-normal);
|
||||
}
|
||||
.modal-overlay.open { opacity: 1; pointer-events: auto; }
|
||||
|
||||
.modal-pago {
|
||||
background: var(--color-bg-elevated); border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
|
||||
width: 560px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
|
||||
transform: translateY(20px); transition: var(--transition-normal);
|
||||
}
|
||||
.modal-overlay.open .modal-pago { transform: translateY(0); }
|
||||
|
||||
.modal-header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
.modal-header h3 {
|
||||
font-family: var(--font-heading); font-size: var(--text-h4);
|
||||
font-weight: var(--heading-weight-primary); color: var(--color-text-primary);
|
||||
}
|
||||
.modal-close {
|
||||
width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
|
||||
background: transparent; border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md); cursor: pointer;
|
||||
color: var(--color-text-muted); font-size: 18px; transition: var(--transition-fast);
|
||||
}
|
||||
.modal-close:hover { background: var(--color-surface-2); color: var(--color-text-primary); }
|
||||
|
||||
.modal-footer {
|
||||
display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3);
|
||||
padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
@@ -117,6 +117,16 @@
|
||||
.empty-state__action {
|
||||
margin-top: var(--space-2, 0.5rem);
|
||||
}
|
||||
.empty-state__icon svg {
|
||||
display: block;
|
||||
}
|
||||
.empty-state__icon[aria-hidden="true"],
|
||||
.empty-state__icon .empty-state__spinner {
|
||||
animation: empty-spin 1s linear infinite;
|
||||
}
|
||||
@keyframes empty-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
4. UNIFIED INPUT FOCUS RING
|
||||
|
||||
@@ -901,8 +901,9 @@
|
||||
font-family: 'Courier New', 'Consolas', monospace;
|
||||
font-size: 11px; line-height: 1.4; padding: 12px; text-align: left;
|
||||
border: 1px dashed #ccc;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.ticket-80 { width: 302px; }
|
||||
.ticket-80 { width: 80mm; max-width: 80mm; }
|
||||
.ticket .store-name { font-size: 14px; font-weight: bold; text-align: center; margin-bottom: 2px; }
|
||||
.ticket .store-tagline { font-size: 9px; text-align: center; color: #555; margin-bottom: 4px; }
|
||||
.ticket .store-info { font-size: 9px; text-align: center; color: #333; margin-bottom: 6px; line-height: 1.3; }
|
||||
@@ -921,17 +922,21 @@
|
||||
gap: 8px; align-items: baseline; font-size: 10px; margin-bottom: 3px;
|
||||
}
|
||||
.ticket-80 .item-line-wide .qty { font-weight: bold; min-width: 24px; text-align: right; }
|
||||
.ticket-80 .item-line-wide .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.ticket-80 .item-line-wide .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: break-word; }
|
||||
.ticket-80 .item-line-wide .price { text-align: right; min-width: 55px; }
|
||||
.ticket-80 .item-line-wide .subtotal { text-align: right; font-weight: bold; min-width: 60px; }
|
||||
.ticket-line { page-break-inside: avoid; }
|
||||
|
||||
@media print {
|
||||
@page { margin: 0; size: 80mm auto; }
|
||||
body * { display: none !important; }
|
||||
.ticket-print-area, .ticket-print-area * { display: block !important; }
|
||||
.ticket-print-area { position: fixed; top: 0; left: 0; }
|
||||
.ticket { border: none; box-shadow: none; padding: 4px; }
|
||||
.ticket .item-line-wide { display: grid !important; }
|
||||
.ticket-print-area { position: fixed; top: 0; left: 0; width: 80mm; }
|
||||
.ticket, .ticket-80 { width: 80mm !important; max-width: 80mm !important; border: none !important; box-shadow: none !important; padding: 3mm !important; font-size: 9pt !important; }
|
||||
.ticket * { word-break: break-word !important; }
|
||||
.ticket .item-line-wide { display: grid !important; grid-template-columns: auto 1fr auto auto !important; gap: 2mm !important; font-size: 8pt !important; }
|
||||
.ticket .ticket-row, .ticket .folio-line, .ticket .total-line { display: flex !important; }
|
||||
.ticket .name { white-space: normal !important; }
|
||||
}
|
||||
|
||||
/* =====================================================================
|
||||
|
||||
@@ -767,3 +767,233 @@ body {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
LIST VIEW, FILTERS & TABS
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
.workshop-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
padding: var(--space-4) var(--space-6);
|
||||
background: var(--color-bg-elevated);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
[data-theme="industrial"] .workshop-toolbar {
|
||||
background: var(--color-surface-1);
|
||||
}
|
||||
|
||||
.workshop-filters {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.workshop-filters .form-input {
|
||||
min-width: 160px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.toolbar-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-body-sm);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.toolbar-toggle input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.view-switch {
|
||||
display: inline-flex;
|
||||
background: var(--color-bg-base);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.view-switch__btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-2) var(--space-3);
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--text-body-sm);
|
||||
cursor: pointer;
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
.view-switch__btn svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
stroke: currentColor;
|
||||
fill: none;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.view-switch__btn.is-active {
|
||||
background: var(--color-primary);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.workshop-list {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: var(--space-4) var(--space-6);
|
||||
}
|
||||
|
||||
.workshop-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.workshop-table th,
|
||||
.workshop-table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.workshop-table td:nth-child(2) {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.list-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-4);
|
||||
margin-top: var(--space-4);
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* ── Detail tabs ── */
|
||||
|
||||
.so-detail-header {
|
||||
display: grid;
|
||||
gap: var(--space-1);
|
||||
margin-bottom: var(--space-4);
|
||||
padding-bottom: var(--space-4);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.so-detail-header__row {
|
||||
font-size: var(--text-body-sm);
|
||||
}
|
||||
|
||||
.so-detail-info {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.so-tabs {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.so-tabs__btn {
|
||||
padding: var(--space-2) var(--space-4);
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--text-body);
|
||||
cursor: pointer;
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
.so-tabs__btn.is-active {
|
||||
color: var(--color-primary);
|
||||
border-bottom-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.so-tab-panel {
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
.bitacora-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
BADGE STATUS COLORS
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
.badge--received { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
|
||||
.badge--diagnosis { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
|
||||
.badge--waiting_parts { background: rgba(245, 166, 35, 0.12); color: #f5a623; }
|
||||
.badge--repair { background: rgba(245, 166, 35, 0.18); color: #d97706; }
|
||||
.badge--quality_check { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
|
||||
.badge--ready { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
|
||||
.badge--delivered { background: rgba(16, 185, 129, 0.12); color: #10b981; }
|
||||
.badge--cancelled { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
|
||||
.badge--pending { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
|
||||
|
||||
.badge--normal { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
|
||||
.badge--high { background: rgba(245, 166, 35, 0.12); color: #f5a623; }
|
||||
.badge--urgent { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
MODAL FOOTER
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
.modal__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: var(--space-3);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.modal__footer .so-detail__actions {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.so-detail-info {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.workshop-toolbar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.workshop-filters {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.workshop-filters .form-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.so-detail-info {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user