added foto matrice everywhere

This commit is contained in:
2025-12-03 12:21:26 +01:00
parent 5b7a8b57d5
commit 9447f3cf00
3 changed files with 92 additions and 15 deletions
@@ -385,6 +385,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
$sql = "SELECT
p.*,
m.nome AS matrice,
m.photo AS matrice_photo,
GROUP_CONCAT(ms.nome SEPARATOR ', ') AS mescola,
GROUP_CONCAT(ms.id SEPARATOR ',') AS mescole_ids,
l.name AS linea,
@@ -454,7 +455,20 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
<td><?= htmlspecialchars($r['conferma_ordine']) ?></td>
<td><?= htmlspecialchars($r['matrice']) ?></td>
<td>
<?= htmlspecialchars($r['matrice']) ?>
<?php if (!empty($r['matrice_photo'])): ?>
<br>
<img src="photos/matrici/<?= htmlspecialchars($r['matrice_photo']) ?>"
data-full="photos/matrici/<?= htmlspecialchars($r['matrice_photo']) ?>"
class="photo-thumb"
style="width:42px;height:42px;object-fit:cover;
border-radius:6px;border:1px solid #ced4da;
cursor:pointer;margin-top:3px;">
<?php endif; ?>
</td>
<td><?= htmlspecialchars($r['mescola']) ?></td>
<td data-line-id="<?= $r['id_linea'] ?>"><?= htmlspecialchars($r['linea']) ?></td>
<td><?= htmlspecialchars($r['cliente']) ?></td>
@@ -513,7 +527,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
<thead>
<tr>
<th style="width:30px;"></th>
<th>Priority</th>
<th>P.</th>
<th>Conf. Ord.</th>
<th>Matrice</th>
<th>Mescola</th>
@@ -1100,18 +1114,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['action'])) {
$("#imagePreviewModal").css("display", "flex");
});
// Chiudi con X
$("#previewCloseX").on("click", function() {
// Chiudi con X (delegato)
$(document).on("click", "#previewCloseX", function() {
$("#imagePreviewModal").hide();
});
// Chiudi cliccando fuori
$("#imagePreviewModal").on("click", function(e) {
// Chiudi cliccando fuori (delegato)
$(document).on("click", "#imagePreviewModal", function(e) {
if (e.target.id === "imagePreviewModal") {
$("#imagePreviewModal").hide();
}
});
$(document).on("click", ".view-mescole-btn", function() {
let names = $(this).data("names");