From d564561a4ec44cbee82732424aa528df94016149 Mon Sep 17 00:00:00 2001 From: solocla Date: Fri, 24 Jul 2026 14:21:41 +0200 Subject: [PATCH] fixed mescole space --- public/userarea/mescole.php | 95 ++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 33 deletions(-) diff --git a/public/userarea/mescole.php b/public/userarea/mescole.php index cb28fa0..8589440 100644 --- a/public/userarea/mescole.php +++ b/public/userarea/mescole.php @@ -92,6 +92,10 @@ white-space: nowrap; } + #tabellaMescole td:nth-child(1) { + overflow: visible; + } + /* ID */ #tabellaMescole th:nth-child(1), #tabellaMescole td:nth-child(1) { @@ -99,18 +103,25 @@ max-width: 70px; } + /* Stato (pallino) */ + #tabellaMescole th:nth-child(1), + #tabellaMescole td:nth-child(1) { + width: 42px; + max-width: 42px; + padding-left: 4px; + padding-right: 4px; + } + /* Nome (interno) */ #tabellaMescole th:nth-child(2), #tabellaMescole td:nth-child(2) { - width: 240px; - max-width: 240px; + width: 22%; } /* Nome Uscita */ #tabellaMescole th:nth-child(3), #tabellaMescole td:nth-child(3) { - width: 300px; - max-width: 300px; + width: 26%; } #tabellaMescole td:nth-child(3) a { @@ -127,39 +138,60 @@ /* Q.tà totale */ #tabellaMescole th:nth-child(4), #tabellaMescole td:nth-child(4) { - width: 130px; - max-width: 130px; + width: 110px; + max-width: 110px; } /* Linee */ #tabellaMescole th:nth-child(5), #tabellaMescole td:nth-child(5) { - width: 220px; - max-width: 220px; + width: auto; } /* Certificati */ #tabellaMescole th:nth-child(6), #tabellaMescole td:nth-child(6) { - width: 120px; - max-width: 120px; - } - - /* Stato */ - #tabellaMescole th:nth-child(7), - #tabellaMescole td:nth-child(7) { - width: 120px; - max-width: 120px; + width: 80px; + max-width: 80px; } /* Azioni */ - #tabellaMescole th:nth-child(8), - #tabellaMescole td:nth-child(8) { + #tabellaMescole th:nth-child(7), + #tabellaMescole td:nth-child(7) { width: 190px; max-width: 190px; white-space: normal; } + /* ---------- PALLINO STATO ---------- */ + .dot-status { + display: inline-block; + width: 12px; + height: 12px; + border-radius: 50%; + vertical-align: middle; + } + + .dot-active { + background: #16a34a; + box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); + } + + .dot-inactive { + background: #f59e0b; + box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); + } + + /* Testo dello stato: invisibile ma ricercabile da DataTables */ + .dot-sr { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + white-space: nowrap; + } + .azioni-cell { display: flex; justify-content: center; @@ -403,13 +435,12 @@ - + - - + @@ -470,7 +501,6 @@ - "; } else { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { @@ -478,9 +508,9 @@ $qtyTot = number_format((float)$row['qty_totale'], 3, ',', '.'); $isActive = (int)$row['is_active'] === 1; - $badge = $isActive - ? "Attiva" - : "Inattiva"; + $statoLabel = $isActive ? 'Attiva' : 'Inattiva'; + $badge = "" + . "{$statoLabel}"; $toggleText = $isActive ? "Disattiva" : "Attiva"; $toggleClass = $isActive ? "btn-outline-warning" : "btn-outline-success"; @@ -492,21 +522,20 @@ $nCert = (int)($row['n_certificati'] ?? 0); $certBadge = $nCert > 0 - ? "📄 {$nCert}" - : "— nessuno"; + ? "📄 {$nCert}" + : "0"; echo " - + -
ID Nome Nome Uscita Q.tà Totale Linee AssociateCertificatiStatoCert. Azioni
- - --
{$row['id']}{$badge} {$nomeSafe} - + {$nomeUscitaSafe} {$qtyTot} {$linee} {$certBadge}{$badge}