newdesigngestionnaire/Vue/Ajaxinsererdetailbareme/index.php
2026-03-19 11:18:53 +00:00

67 lines
3.5 KiB
PHP
Executable File

<?php
$adminProd = $_SESSION['adminProd'];
$isAnglais = est_anglophone();
?>
<input type="hidden" id="maxDateEffetBareme" name="maxDateEffetBareme" value="<?= $maxDateEffetBareme; ?>">
<div class="table-responsive animate__animated animate__fadeIn">
<table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
<thead class="bg-light border-bottom">
<tr>
<th class="ps-3 py-3 text-center" width="25%"><?= _("Date d'Effet") ?></th>
<th class="text-center py-3" width="25%"><?= _("Part Patient (TM)") ?></th>
<th class="text-center py-3" width="25%"><?= _("État / Actif") ?></th>
<th class="text-center py-3 pe-3" width="15%"><?= _("Action") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($detailbareme as $v):
$idDetail = $v['id'];
$supprime = (int)$v['supprime'];
$isActif = ($v['actif'] == "1");
// Style spécifique pour les lignes supprimées
$rowStyle = ($supprime === 1) ? 'style="background-color: #fff5f5; opacity: 0.6; text-decoration: line-through text-decoration-color: #dc3545;"' : '';
?>
<tr <?= $rowStyle ?>>
<td class="text-center fw-bold text-dark">
<i class="fas fa-calendar-alt me-2 text-muted small"></i><?= datefr($this->nettoyer($v['dateEffet'])); ?>
</td>
<td class="text-center">
<span class="badge bg-primary-ghost text-primary px-3 py-2 rounded-pill fw-bold fs-6">
<?= $this->nettoyer($v['ticketModerateur']); ?> %
</span>
</td>
<td class="text-center">
<?php if ($supprime === 0): ?>
<span class="badge <?= $isActif ? 'bg-success' : 'bg-light text-muted border' ?> rounded-pill px-3 py-2 fw-bold">
<i class="fas <?= $isActif ? 'fa-check-circle' : 'fa-clock' ?> me-1"></i>
<?= $isActif ? _("En vigueur") : _("Futur / Passé") ?>
</span>
<?php else: ?>
<span class="badge bg-danger-light text-danger rounded-pill px-3 py-2 fw-bold small">
<?= _("Supprimé") ?>
</span>
<?php endif; ?>
</td>
<td class="text-center pe-3">
<?php if ($supprime === 0): ?>
<button type="button" class="btn btn-sm btn-danger-light rounded-circle action-icon shadow-none"
onclick="supprimer_detailbareme('<?= $adminProd ?>', <?= $idDetail ?>);"
title="<?= _('Supprimer cette révision') ?>">
<i class="fas fa-trash-alt"></i>
</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<style>
.bg-danger-light { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; }
.action-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
.action-icon:hover { background-color: #dc3545; color: white; transform: scale(1.1); }
</style>