diff --git a/public/adminpanel.php b/public/adminpanel.php index c5a13795..648e082f 100644 --- a/public/adminpanel.php +++ b/public/adminpanel.php @@ -64,7 +64,7 @@ if (!empty($scheduleIds)) { FROM bookingclass LEFT JOIN auth_users ON bookingclass.iduser = auth_users.id WHERE bookingclass.idserviceschedule IN ($ph) - AND bookingclass.status = 'booked' + AND bookingclass.status IN ('booked', 'pending') ORDER BY auth_users.last_name, auth_users.first_name"; $stmtBookings = $pdo->prepare($sqlBookings); $stmtBookings->execute(array_values($scheduleIds)); @@ -508,8 +508,12 @@ $italianMonths = [ $monthIt = $italianMonths[$dateObj->format("F")]; $whenFmt = $dateObj->format("d-m-Y H:i"); $scheduleId = (int) $sch['idserviceschedule']; - $bookings = $bookingsBySchedule[$scheduleId] ?? []; - $countPersons = count($bookings); + $allRows = $bookingsBySchedule[$scheduleId] ?? []; + // separa confermati (booked) da in attesa (pending) + $bookings = array_filter($allRows, fn($b) => $b['status'] === 'booked'); + $pendings = array_filter($allRows, fn($b) => $b['status'] === 'pending'); + $countPersons = count($bookings); // contatore = solo confermati + $countPending = count($pendings); $maxcap = (int) $sch['maxcapacity']; $isFull = $maxcap > 0 && $countPersons >= $maxcap; $colorclass = $sch['colorclass'] ?: '#e6f3ff'; @@ -526,6 +530,12 @@ $italianMonths = [ / + 0) : ?> + + + in attesa + +

via Valassina 62/B Seregno - Sala Contesto Yoga

@@ -577,6 +587,32 @@ $italianMonths = [ + 0) : ?> +
+ In attesa di conferma () +
+
+ +
+
+
+ + In attesa +
+
+ + +
+
+ +
+ +
Aggiungi partecipante