branch waiting list with update
This commit is contained in:
+36
-5
@@ -172,23 +172,38 @@ if ($result_dayoff->num_rows > 0) {
|
||||
});
|
||||
}
|
||||
|
||||
// Funzione per confermare la cancellazione
|
||||
function confirmDelete(id, deletePageUrl) {
|
||||
// Funzione per confermare la cancellazione di un ordine e delle sue prenotazioni
|
||||
window.confirmDeleteOrder = function(id) {
|
||||
Swal.fire({
|
||||
title: "Sei sicuro?",
|
||||
text: "Questa prenotazione verrà cancellata definitivamente! Ricordati poi di riprogrammare la tua lezione!",
|
||||
text: "Verranno cancellati l'ordine e TUTTE le prenotazioni collegate a questa persona. L'azione è irreversibile!",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#d33",
|
||||
cancelButtonColor: "#3085d6",
|
||||
confirmButtonText: "Sì, cancella!",
|
||||
confirmButtonText: "Sì, cancella tutto!",
|
||||
cancelButtonText: "Annulla"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = `deleteclass.php?id=${id}`;
|
||||
window.location.href = `deleteorder.php?id=${id}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
Swal.fire({
|
||||
title: "Sei sicuro?",
|
||||
text: "Questa prenotazione verrà cancellata definitivamente! Ricordati poi di riprogrammare la tua lezione!",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#d33",
|
||||
cancelButtonColor: "#3085d6",
|
||||
confirmButtonText: "Sì, cancella!",
|
||||
cancelButtonText: "Annulla"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = `deleteclass.php?id=${id}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
@@ -371,6 +386,7 @@ if ($result_dayoff->num_rows > 0) {
|
||||
<th>Numero Ticket</th>
|
||||
<th>Scadenza</th>
|
||||
<th>Status</th>
|
||||
<th>Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -388,6 +404,12 @@ if ($result_dayoff->num_rows > 0) {
|
||||
<td><?php echo $order["nticket"]; ?></td>
|
||||
<td class="expiry-date" data-order-id="<?php echo $order['idorderbook']; ?>"><?php echo $order["expireon"]; ?></td>
|
||||
<td><?php echo $order["status"]; ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-danger"
|
||||
onclick="confirmDeleteOrder(<?php echo $order['idorderbook']; ?>)">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@@ -407,6 +429,15 @@ if ($result_dayoff->num_rows > 0) {
|
||||
<script src="assets/libs/simplebar/simplebar.min.js"></script>
|
||||
<script src="assets/libs/eva-icons/eva.min.js"></script>
|
||||
<script src="assets/js/app.js"></script>
|
||||
<?php if ($message == 'success_delete') { ?>
|
||||
<script>
|
||||
Swal.fire('Fatto!', 'Ordine e prenotazioni cancellati.', 'success');
|
||||
</script>
|
||||
<?php } elseif ($message == 'error_delete') { ?>
|
||||
<script>
|
||||
Swal.fire('Errore!', 'Errore durante la cancellazione.', 'error');
|
||||
</script>
|
||||
<?php } ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user