fixed line

This commit is contained in:
Claudio 2025-12-10 14:23:59 +01:00
parent 9649751ad8
commit d9cbaf8df1

View File

@ -302,6 +302,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
background-color: var(--rowcolor) !important;
}
.line-separator td {
border-top: 2px solid #343a40;
background-color: #ffffff !important;
height: 4px;
padding: 0;
}
/* FULLSCREEN BACKDROP */
#photoModal {
display: none;
@ -436,8 +444,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
</thead>
<tbody>
<?php foreach ($rows_special as $r): ?>
<?php if (!empty($r['start_time'])) {
<?php
$lastLine = null;
foreach ($rows_special as $r):
if (!empty($r['start_time'])) {
// Calcolo differenza tra adesso e lo start_time
$start = strtotime($r['start_time']);
$now = time();
@ -445,6 +457,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
} else {
$sec = 0;
}
// SE CAMBIA LA LINEA → INSERISCO SEPARATORE
if ($lastLine !== null && $lastLine != $r['id_linea']) {
echo '<tr class="line-separator"><td colspan="10"></td></tr>';
}
$lastLine = $r['id_linea'];
?>
<tr class="special-row"
@ -452,8 +470,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
data-seconds="<?= $sec ?>"
style="--rowcolor: <?= $r['line_color'] ?>;">
<td><?= htmlspecialchars($r['conferma_ordine']) ?></td>
<td>
<?= htmlspecialchars($r['matrice']) ?>
@ -475,19 +491,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
<td><?= htmlspecialchars($r['data_zibo']) ?></td>
<td><?= htmlspecialchars($r['data_cliente']) ?></td>
<!-- TIMER -->
<td class="timer" id="timer-<?= $r['id'] ?>">
<?= gmdate("H:i:s", $sec) ?>
</td>
<!-- BADGE -->
<td>
<span class="badge" style="background: <?= $r['badge_color'] ?>;">
<?= htmlspecialchars($r['status_nome']) ?>
</span>
</td>
<!-- FOTO ICONS -->
<td class="text-center" style="white-space: nowrap;">
<i class="bi bi-camera-fill photo-btn me-2"
data-type="lotto_mescola"
@ -508,6 +521,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
</tr>
<?php endforeach; ?>
</tbody>
</table>
<hr class="my-4">