fixed pages

This commit is contained in:
2026-09-04 09:00:30 +02:00
parent 2dfbbad7d4
commit 83af2e2d17
9 changed files with 1008 additions and 641 deletions
+134 -38
View File
@@ -58,6 +58,23 @@ $stmtBooked->execute([
]);
$bookedRows = $stmtBooked->fetchAll();
// Lezioni in attesa di conferma (pending) dell'utente, nel mese visualizzato
$sqlPending = "SELECT bookingclass.*, service.servicename, service.colorclass, serviceschedule.dateschedule
FROM bookingclass
LEFT JOIN service ON bookingclass.idservice = service.idservice
LEFT JOIN serviceschedule ON bookingclass.idserviceschedule = serviceschedule.idserviceschedule
WHERE bookingclass.iduser = :iduser
AND bookingclass.status = 'pending'
AND serviceschedule.dateschedule BETWEEN :monthStart AND DATE_ADD(:monthEnd, INTERVAL 1 DAY)
ORDER BY serviceschedule.dateschedule";
$stmtPending = $pdo->prepare($sqlPending);
$stmtPending->execute([
':iduser' => $iduserlogin,
':monthStart' => $currentMonthStart,
':monthEnd' => $currentMonthEnd,
]);
$pendingRows = $stmtPending->fetchAll();
/* -------------------------------------------------------------------------
* 3) Somma dei ticket acquistati dall'utente
* ---------------------------------------------------------------------- */
@@ -175,67 +192,97 @@ $italianMonths = [
<style>
.custom-card {
margin: 10px auto;
display: flex;
width: 90%;
max-width: 700px;
background-color: white;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 8px;
background: #fff;
border-radius: 14px;
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
overflow: hidden;
margin-bottom: 18px;
display: flex;
cursor: pointer;
transition: transform 0.2s;
transition: box-shadow 0.2s;
}
.custom-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
}
.pending-card {
cursor: default;
}
.pending-card .custom-date-box {
flex: 0 0 90px;
padding: 10px;
}
.pending-card .custom-day {
font-size: 30px;
}
.pending-card .custom-month {
font-size: 14px;
}
.pending-card .custom-event-details {
padding: 12px 20px;
}
.pending-card .custom-heading {
font-size: 17px;
}
.custom-date-box {
flex: 1;
background-color: red;
color: white;
flex: 0 0 110px;
background: #1ebf73;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0;
font-size: 60px;
font-weight: bold;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
padding: 16px;
}
.custom-day {
font-size: 44px;
font-weight: 800;
line-height: 1;
}
.custom-month {
font-size: 28px;
font-size: 18px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.custom-event-details {
flex: 2;
flex: 1;
display: flex;
flex-direction: column;
padding: 10px 20px;
background-color: lightblue;
padding: 18px 22px;
background: #fff;
border-left: 20px solid #ccc;
/* colore impostato inline per ogni card */
}
.custom-heading {
margin-top: 0;
font-size: 24px;
font-size: 19px;
font-weight: 700;
color: #1f2937;
margin: 0 0 4px;
}
.custom-paragraph {
margin-bottom: 5px;
color: #6b7280;
font-size: 14px;
margin-bottom: 3px;
}
.custom-actions {
display: none;
flex-direction: row;
justify-content: space-between;
margin-top: 10px;
gap: 8px;
flex-wrap: wrap;
margin-top: 12px;
}
.custom-card.expanded .custom-actions {
@@ -243,16 +290,19 @@ $italianMonths = [
}
.custom-action-button {
background-color: #f0f0f0;
border: none;
padding: 8px 12px;
border-radius: 4px;
border-radius: 8px;
padding: 7px 14px;
font-size: 13px;
font-weight: 600;
background: #eef2f7;
color: #374151;
cursor: pointer;
transition: background-color 0.2s;
transition: filter 0.15s;
}
.custom-action-button:hover {
background-color: #e0e0e0;
filter: brightness(0.94);
}
@media (max-width: 768px) {
@@ -260,14 +310,20 @@ $italianMonths = [
flex-direction: column;
}
.custom-date-box,
.custom-event-details {
.custom-date-box {
flex: 0 0 auto;
width: 100%;
border-radius: 0;
flex-direction: row;
gap: 10px;
padding: 12px;
}
.custom-event-time {
font-size: 24px;
.custom-day {
font-size: 30px;
}
.custom-month {
font-size: 18px;
}
}
@@ -543,10 +599,50 @@ $italianMonths = [
</a>
</div>
<?php if (!empty($pendingRows)) : ?>
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<h5 style="color:#8a6d00;margin-bottom:14px;">
<i class="fas fa-hourglass-half me-1"></i> In attesa di conferma
</h5>
<?php foreach ($pendingRows as $prow) :
$pDateObj = new DateTime($prow['dateschedule']);
$pDay = $pDateObj->format("d");
$pMonth = $italianMonths[$pDateObj->format("F")];
$pWhen = $pDateObj->format("d-m-Y H:i");
$pColor = $prow['colorclass'] ?? '#1ebf73';
$pName = $prow['servicename'] ?? '';
?>
<div class="custom-card pending-card">
<div class="custom-date-box" style="background:#e0a800;">
<div class="custom-day"><?php echo e($pDay); ?></div>
<div class="custom-month"><?php echo e($pMonth); ?></div>
</div>
<div class="custom-event-details" style="border-left-color:<?php echo e($pColor); ?>">
<h2 class="custom-heading">
<?php echo e($pName); ?>
<span style="display:inline-block;background:#fff4d6;color:#8a6d00;font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px;margin-left:6px;vertical-align:middle;">In attesa</span>
</h2>
<p class="custom-paragraph">Quando: <?php echo e($pWhen); ?></p>
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<h5 style="color:#1a7f52;margin-bottom:14px;">
<i class="fas fa-check-circle me-1"></i> Prenotate
</h5>
<?php if (empty($bookedRows)) { ?>
<p>Prenotazioni non presenti per questo mese</p>
<?php
@@ -591,11 +687,11 @@ $italianMonths = [
$servicename = $row['servicename'] ?? '';
?>
<div class="custom-card" onclick="toggleCard(this)">
<div class="custom-date-box" style="background-color:#1ebf73">
<div class="custom-date-box">
<div class="custom-day"><?php echo e($dayInItalian); ?></div>
<div class="custom-month"><?php echo e($monthInItalian); ?></div>
</div>
<div class="custom-event-details" style="background-color:<?php echo e($colorclass); ?>">
<div class="custom-event-details" style="border-left-color:<?php echo e($colorclass); ?>">
<h2 class="custom-heading"><?php echo e($servicename); ?></h2>
<p class="custom-paragraph">Quando: <?php echo e($newDateFormat); ?></p>
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>