update mescole and photo diagram
This commit is contained in:
@@ -51,7 +51,31 @@ $statusNome = $r['status_nome'];
|
||||
<div class="summary-grid">
|
||||
<div><strong>Linea</strong> <span><?= htmlspecialchars($r['linea']) ?></span></div>
|
||||
<div><strong>Matrice</strong> <span><?= htmlspecialchars($r['matrice']) ?></span></div>
|
||||
<div><strong>Mescola</strong> <span><?= htmlspecialchars($r['mescola']) ?></span></div>
|
||||
<?php
|
||||
// Ricostruzione mescole con nuova struttura
|
||||
$mescRaw = $r['mescole_list'] ?? ''; // il campo viene da GROUP_CONCAT
|
||||
$mescArray = $mescRaw !== '' ? explode(' | ', $mescRaw) : [];
|
||||
$mescCount = count($mescArray);
|
||||
?>
|
||||
|
||||
<div>
|
||||
<strong>Mescola</strong>
|
||||
|
||||
<?php if ($mescCount === 0): ?>
|
||||
<span style="color:#999;">N/A</span>
|
||||
|
||||
<?php elseif ($mescCount === 1): ?>
|
||||
<span><?= htmlspecialchars($mescArray[0]) ?></span>
|
||||
|
||||
<?php else: ?>
|
||||
<button
|
||||
class="btn btn-sm btn-warning showMescole"
|
||||
data-list="<?= htmlspecialchars(json_encode($mescArray), ENT_QUOTES) ?>"
|
||||
style="padding:3px 8px;font-size:0.8rem;">
|
||||
Multi (<?= $mescCount ?>)
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div><strong>Cliente</strong> <span><?= htmlspecialchars($r['cliente'] ?? '-') ?></span></div>
|
||||
<div><strong>Zibo</strong> <span><?= $dataZibo ?></span></div>
|
||||
<div><strong>Data Cl.</strong> <span><?= $dataCliente ?></span></div>
|
||||
@@ -77,6 +101,29 @@ $statusNome = $r['status_nome'];
|
||||
<span class="timer">00:00:00</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 🔥 Carica i parametri della linea passati dall’AJAX
|
||||
$paramsLinea = $r['params_linea'] ?? [];
|
||||
|
||||
// 🔥 Carica già anche eventuali foto di slot parametri
|
||||
// (necessario perché param_grid.php usa $photosSlots)
|
||||
$photosSlots = [];
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT param_position, filename
|
||||
FROM production_photos
|
||||
WHERE production_id = ?
|
||||
AND photo_type = 'parametri_macchina'
|
||||
");
|
||||
$stmt->execute([$r['id']]);
|
||||
foreach ($stmt->fetchAll() as $p) {
|
||||
$photosSlots[(int)$p['param_position']] = $p['filename'];
|
||||
}
|
||||
|
||||
// 👉 Include la griglia parametri con le variabili già disponibili
|
||||
$paramsLinea = $r['param_slots'] ?? [];
|
||||
include __DIR__ . "/components/param_grid.php";
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- Teorici nascosti (per modale finale) -->
|
||||
|
||||
Reference in New Issue
Block a user