Replace import_orders (insert-per-run) with orders table (one row per order, upsert on conflict). Eliminates dedup CTE on every dashboard query and prevents unbounded row growth at 4-500 orders/sync. Key changes: - orders table: PK order_number, upsert via ON CONFLICT DO UPDATE; COALESCE preserves id_comanda once set; times_skipped auto-increments - sync_run_orders: lightweight junction (sync_run_id, order_number) replaces sync_run_id column on orders - order_items: PK changed to (order_number, sku), INSERT OR IGNORE - Auto-migration in init_sqlite(): import_orders → orders on first boot, old table renamed to import_orders_bak - /api/dashboard/orders: period_days param (3/7/30/0=all, default 7) - Dashboard: period selector buttons in orders card header - start.sh: stop existing process on port 5003 before restart; remove --reload (broken on WSL2 /mnt/e/) - Add invoice_service, E2E Playwright tests, Oracle package updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
305 lines
5.7 KiB
CSS
305 lines
5.7 KiB
CSS
:root {
|
|
--sidebar-width: 220px;
|
|
--sidebar-bg: #1e293b;
|
|
--sidebar-text: #94a3b8;
|
|
--sidebar-active: #ffffff;
|
|
--sidebar-hover-bg: #334155;
|
|
--body-bg: #f1f5f9;
|
|
--card-shadow: 0 1px 3px rgba(0,0,0,0.08);
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background-color: var(--body-bg);
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.sidebar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: var(--sidebar-width);
|
|
height: 100vh;
|
|
background-color: var(--sidebar-bg);
|
|
padding: 0;
|
|
z-index: 1000;
|
|
overflow-y: auto;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.sidebar-header {
|
|
padding: 1.25rem 1rem;
|
|
border-bottom: 1px solid #334155;
|
|
}
|
|
|
|
.sidebar-header h5 {
|
|
color: #fff;
|
|
margin: 0;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.sidebar .nav-link {
|
|
color: var(--sidebar-text);
|
|
padding: 0.65rem 1rem;
|
|
font-size: 0.9rem;
|
|
border-left: 3px solid transparent;
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.sidebar .nav-link:hover {
|
|
color: var(--sidebar-active);
|
|
background-color: var(--sidebar-hover-bg);
|
|
}
|
|
|
|
.sidebar .nav-link.active {
|
|
color: var(--sidebar-active);
|
|
background-color: var(--sidebar-hover-bg);
|
|
border-left-color: #3b82f6;
|
|
}
|
|
|
|
.sidebar .nav-link i {
|
|
margin-right: 0.5rem;
|
|
width: 1.2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.sidebar-footer {
|
|
position: absolute;
|
|
bottom: 0;
|
|
padding: 0.75rem 1rem;
|
|
border-top: 1px solid #334155;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Main content */
|
|
.main-content {
|
|
margin-left: var(--sidebar-width);
|
|
padding: 1.5rem;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* Sidebar toggle button for mobile */
|
|
.sidebar-toggle {
|
|
position: fixed;
|
|
top: 0.5rem;
|
|
left: 0.5rem;
|
|
z-index: 1100;
|
|
border-radius: 0.375rem;
|
|
}
|
|
|
|
/* Cards */
|
|
.card {
|
|
border: none;
|
|
box-shadow: var(--card-shadow);
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #fff;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Status badges */
|
|
.badge-imported { background-color: #22c55e; }
|
|
.badge-skipped { background-color: #eab308; color: #000; }
|
|
.badge-error { background-color: #ef4444; }
|
|
.badge-pending { background-color: #94a3b8; }
|
|
.badge-ready { background-color: #3b82f6; }
|
|
|
|
/* Tables */
|
|
.table {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.table th {
|
|
font-weight: 600;
|
|
color: #475569;
|
|
border-top: none;
|
|
}
|
|
|
|
/* Forms */
|
|
.form-control:focus, .form-select:focus {
|
|
border-color: #3b82f6;
|
|
box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 767.98px) {
|
|
.sidebar {
|
|
transform: translateX(-100%);
|
|
}
|
|
.sidebar.show {
|
|
transform: translateX(0);
|
|
}
|
|
.main-content {
|
|
margin-left: 0;
|
|
}
|
|
.sidebar-toggle {
|
|
display: block !important;
|
|
}
|
|
}
|
|
|
|
/* Autocomplete dropdown */
|
|
.autocomplete-dropdown {
|
|
position: absolute;
|
|
z-index: 1050;
|
|
background: #fff;
|
|
border: 1px solid #dee2e6;
|
|
border-radius: 0.375rem;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.autocomplete-item {
|
|
padding: 0.5rem 0.75rem;
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
}
|
|
|
|
.autocomplete-item:hover, .autocomplete-item.active {
|
|
background-color: #f1f5f9;
|
|
}
|
|
|
|
.autocomplete-item .codmat {
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.autocomplete-item .denumire {
|
|
color: #64748b;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
/* Pagination */
|
|
.pagination .page-link {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* Loading spinner */
|
|
.spinner-overlay {
|
|
position: fixed;
|
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
background: rgba(255,255,255,0.7);
|
|
z-index: 9999;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Log viewer */
|
|
.log-viewer {
|
|
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
font-size: 0.8125rem;
|
|
line-height: 1.5;
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
padding: 1rem;
|
|
margin: 0;
|
|
background-color: #1e293b;
|
|
color: #e2e8f0;
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
border-radius: 0 0 0.5rem 0.5rem;
|
|
}
|
|
|
|
/* Clickable table rows */
|
|
.table-hover tbody tr[data-href] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.table-hover tbody tr[data-href]:hover {
|
|
background-color: #e2e8f0;
|
|
}
|
|
|
|
/* Sortable table headers (R7) */
|
|
.sortable {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
.sortable:hover {
|
|
background-color: #f1f5f9;
|
|
}
|
|
.sort-icon {
|
|
font-size: 0.75rem;
|
|
margin-left: 0.25rem;
|
|
color: #3b82f6;
|
|
}
|
|
|
|
/* SKU group visual grouping (R6) */
|
|
.sku-group-even {
|
|
/* default background */
|
|
}
|
|
.sku-group-odd {
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
/* Editable cells */
|
|
.editable {
|
|
cursor: pointer;
|
|
}
|
|
.editable:hover {
|
|
background-color: #e2e8f0;
|
|
}
|
|
|
|
/* Order detail modal items */
|
|
.modal-lg .table-sm td,
|
|
.modal-lg .table-sm th {
|
|
font-size: 0.8125rem;
|
|
padding: 0.35rem 0.5rem;
|
|
}
|
|
|
|
/* Filter button badges */
|
|
#orderFilterBtns .badge {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
/* Modal stacking for quickMap over orderDetail */
|
|
#quickMapModal {
|
|
z-index: 1060;
|
|
}
|
|
#quickMapModal + .modal-backdrop,
|
|
.modal-backdrop ~ .modal-backdrop {
|
|
z-index: 1055;
|
|
}
|
|
|
|
/* Deleted mapping rows */
|
|
tr.mapping-deleted td {
|
|
text-decoration: line-through;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* Map icon button (minimal, no border) */
|
|
.btn-map-icon {
|
|
color: #3b82f6;
|
|
padding: 0.1rem 0.25rem;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
text-decoration: none;
|
|
}
|
|
.btn-map-icon:hover {
|
|
color: #1d4ed8;
|
|
}
|
|
|
|
/* Last sync summary card columns */
|
|
.last-sync-col {
|
|
border-right: 1px solid #e2e8f0;
|
|
}
|
|
|
|
/* Dashboard filter badges */
|
|
#dashFilterBtns .badge {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
/* Cursor pointer utility */
|
|
.cursor-pointer {
|
|
cursor: pointer;
|
|
}
|