newdesigngestionnaire/Vue/Ajaxbaremelettrecle/detailactes.php
2026-04-09 13:25:11 +00:00

111 lines
5.7 KiB
PHP

<?php
$adminProd = $_SESSION['adminProd'];
$lettreCle = $_SESSION['lettreCle'];
?>
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
<div class="modal-content shadow-lg border-0">
<div class="modal-header bg-light border-bottom-0 py-3">
<h5 class="modal-title d-flex align-items-center fw-bold">
<span class="badge bg-info me-2 px-3 py-2"><?= $lettreCle ?></span>
<span class="text-light small text-uppercase"><?= _("Détail des actes impactés") ?></span>
</h5>
<button type="button" class="btn p-2 border-0 shadow-none d-flex align-items-center justify-content-center"
data-bs-dismiss="modal" aria-label="Close"
style="background: transparent; transition: transform 0.2s ease;">
<i class="fas fa-times text-white fs-4"></i>
</button>
</div>
<div class="modal-body p-4">
<div class="mb-4 border-start border-4 border-primary ps-3 py-1 bg-primary bg-opacity-10 rounded-end">
<p class="text-primary small mb-0 fw-bold">
<i class="fas fa-info-circle me-1"></i> <?= _("Utilisez la barre de recherche pour filtrer un acte spécifique.") ?>
</p>
</div>
<?php if(count($detailactes) > 0): ?>
<div class="table-responsive p-1">
<table id="table_detail_actes" class="table table-sm table-hover align-middle border shadow-sm" style="width:100%;">
<thead class="table-dark">
<tr class="text-center small">
<th class="py-2 ps-3 text-start"><?= _("Libellé de l'Acte") ?></th>
<th><?= _("Coefficient") ?></th>
<th><?= _("Plafond Acte") ?></th>
<th><?= _("Ticket Mod.") ?></th>
<th><?= _("Statut") ?></th>
<th class="pe-3"><?= _("Actions") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($detailactes as $v):
$idActe = $this->nettoyer($v['id']);
$supprime = $v['supprime'];
$libelle = est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
$isActif = ($this->nettoyer($v['actif']) == "1");
?>
<tr class="text-center <?= ($supprime == '1') ? 'table-danger opacity-50 text-decoration-line-through' : ''; ?>">
<td class="text-start ps-3 fw-bold text-dark border-end"><?= $libelle ?></td>
<td class="fw-bold"><?= $this->nettoyer($v['coefficient']); ?></td>
<td class="text-primary fw-bold"><?= format_N($this->nettoyer($v['forfaitPlafond']));?></td>
<td class="text-danger fw-bold"><?= $this->nettoyer($v['ticketModerateur']);?>%</td>
<td>
<span class="badge <?= $isActif ? 'bg-success' : 'bg-secondary' ?> rounded-pill">
<?= $isActif ? _("Oui") : _("Non") ?>
</span>
</td>
<td class="pe-3">
<?php if($supprime == '0'): ?>
<button type="button" class="btn btn-sm text-danger border-0 p-0"
onClick="javascript:supprimer_baremeacte_lettre_cle_detail('<?= $adminProd?>', <?= $idActe ?>);"
title="<?= _("Supprimer") ?>">
<i class="fas fa-trash-alt"></i>
</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="alert alert-warning text-center p-5 border-dashed">
<i class="fas fa-search fa-3x mb-3 opacity-25"></i>
<p class="mb-0 fw-bold"><?= _("Aucun acte trouvé.") ?></p>
</div>
<?php endif; ?>
</div>
<div class="modal-footer bg-light border-top-0">
<button type="button" class="btn btn-secondary px-4 fw-bold shadow-sm" data-bs-dismiss="modal">
<i class="fas fa-times me-2"></i><?= _("Fermer") ?>
</button>
</div>
</div>
</div>
<style>
.opacity-50 { text-decoration: line-through rgba(220, 53, 69, 0.3); }
/* Correction de la largeur DataTables en modale */
#table_detail_actes { width: 100% !important; border-collapse: collapse !important; }
/* Design du champ de recherche */
.dataTables_filter input {
border: 1px solid #0d6efd;
border-radius: 5px;
padding: 4px 10px;
font-size: 0.85rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* Pagination personnalisée */
.dataTables_paginate .paginate_button.current {
background: #0d6efd !important;
color: white !important;
border: none;
border-radius: 4px;
}
.border-dashed { border: 2px dashed #dee2e6 !important; background: none; }
.modal-xl { max-width: 90% !important; }
</style>