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; background-color: var(--rowcolor) !important;
} }
.line-separator td {
border-top: 2px solid #343a40;
background-color: #ffffff !important;
height: 4px;
padding: 0;
}
/* FULLSCREEN BACKDROP */ /* FULLSCREEN BACKDROP */
#photoModal { #photoModal {
display: none; display: none;
@ -436,8 +444,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
</thead> </thead>
<tbody> <tbody>
<?php foreach ($rows_special as $r): ?> <?php
<?php if (!empty($r['start_time'])) { $lastLine = null;
foreach ($rows_special as $r):
if (!empty($r['start_time'])) {
// Calcolo differenza tra adesso e lo start_time // Calcolo differenza tra adesso e lo start_time
$start = strtotime($r['start_time']); $start = strtotime($r['start_time']);
$now = time(); $now = time();
@ -445,15 +457,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
} else { } else {
$sec = 0; $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" <tr class="special-row"
data-id="<?= $r['id'] ?>" data-id="<?= $r['id'] ?>"
data-seconds="<?= $sec ?>" data-seconds="<?= $sec ?>"
style="--rowcolor: <?= $r['line_color'] ?>;"> style="--rowcolor: <?= $r['line_color'] ?>;">
<td><?= htmlspecialchars($r['conferma_ordine']) ?></td> <td><?= htmlspecialchars($r['conferma_ordine']) ?></td>
<td> <td>
<?= htmlspecialchars($r['matrice']) ?> <?= htmlspecialchars($r['matrice']) ?>
@ -464,8 +480,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
data-full="photos/matrici/<?= htmlspecialchars($r['matrice_photo']) ?>" data-full="photos/matrici/<?= htmlspecialchars($r['matrice_photo']) ?>"
class="photo-thumb" class="photo-thumb"
style="width:42px;height:42px;object-fit:cover; style="width:42px;height:42px;object-fit:cover;
border-radius:6px;border:1px solid #ced4da; border-radius:6px;border:1px solid #ced4da;
cursor:pointer;margin-top:3px;"> cursor:pointer;margin-top:3px;">
<?php endif; ?> <?php endif; ?>
</td> </td>
@ -475,19 +491,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
<td><?= htmlspecialchars($r['data_zibo']) ?></td> <td><?= htmlspecialchars($r['data_zibo']) ?></td>
<td><?= htmlspecialchars($r['data_cliente']) ?></td> <td><?= htmlspecialchars($r['data_cliente']) ?></td>
<!-- TIMER -->
<td class="timer" id="timer-<?= $r['id'] ?>"> <td class="timer" id="timer-<?= $r['id'] ?>">
<?= gmdate("H:i:s", $sec) ?> <?= gmdate("H:i:s", $sec) ?>
</td> </td>
<!-- BADGE -->
<td> <td>
<span class="badge" style="background: <?= $r['badge_color'] ?>;"> <span class="badge" style="background: <?= $r['badge_color'] ?>;">
<?= htmlspecialchars($r['status_nome']) ?> <?= htmlspecialchars($r['status_nome']) ?>
</span> </span>
</td> </td>
<!-- FOTO ICONS -->
<td class="text-center" style="white-space: nowrap;"> <td class="text-center" style="white-space: nowrap;">
<i class="bi bi-camera-fill photo-btn me-2" <i class="bi bi-camera-fill photo-btn me-2"
data-type="lotto_mescola" data-type="lotto_mescola"
@ -508,6 +521,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<hr class="my-4"> <hr class="my-4">