added images

This commit is contained in:
Claudio 2025-12-03 11:47:00 +01:00
parent 7a2cac27cd
commit 5b7a8b57d5
2 changed files with 27 additions and 0 deletions

View File

@ -268,6 +268,7 @@ if (!empty($_GET['ajax'])) {
$sql = "SELECT
p.*,
m.nome AS matrice,
m.photo AS matrice_photo,
(
SELECT GROUP_CONCAT(m.nome ORDER BY m.nome SEPARATOR ' | ')
FROM productiondata_mescole pm
@ -313,6 +314,7 @@ if (!empty($_GET['ajax'])) {
$sql2 = "SELECT
p.*,
m.nome AS matrice,
m.photo AS matrice_photo,
(
SELECT GROUP_CONCAT(m2.nome ORDER BY m2.nome SEPARATOR ' | ')
FROM productiondata_mescole pm

View File

@ -37,6 +37,15 @@ $startTime = ($isInProduction || $isPaused)
$badgeColor = $r['badge_color'] ?? '#6c757d';
$lineColor = $r['line_color'] ?? '#e9ecef';
$statusNome = $r['status_nome'];
$matricePhoto = $r['matrice_photo'] ?? '';
$placeholder = 'assets/images/no-photo.png';
if ($matricePhoto) {
$matricePath = 'photos/matrici/' . $matricePhoto;
} else {
$matricePath = $placeholder;
}
?>
<div class="record-card <?= $isInProduction || $isPaused ? 'in-production expanded' : 'programmed' ?>"
@ -49,6 +58,22 @@ $statusNome = $r['status_nome'];
<!-- RIGA VISIBILE -->
<div class="record-summary">
<div class="summary-grid">
<!-- FOTO MATRICE -->
<div>
<strong>Foto</strong>
<?php if ($matricePhoto): ?>
<div class="photo-thumb"
data-full="<?= htmlspecialchars($matricePath, ENT_QUOTES) ?>"
style="width:80px;height:60px;border-radius:8px;overflow:hidden;
border:1px solid #e2e8f0;cursor:pointer;background:#f8fafc;">
<img src="<?= htmlspecialchars($matricePath, ENT_QUOTES) ?>"
alt="Foto matrice"
style="width:100%;height:100%;object-fit:cover;">
</div>
<?php else: ?>
<span style="color:#94a3b8;">Nessuna foto</span>
<?php endif; ?>
</div>
<div>
<strong>Conf. Ord.</strong>
<span data-field="conferma_ordine">