newdesigngestionnaire/Vue/Detailbaremepriseencharge/index.php
2026-03-19 08:51:53 +00:00

144 lines
9.4 KiB
PHP
Executable File

<?php
$idBareme = $_SESSION['idBaremePriseEnCharge'];
$libelleBareme = $this->nettoyer($bareme['libelle']);
$isAnglais = est_anglophone();
?>
<div class="page-content animate__animated animate__fadeIn">
<div class="header-section sticky-top mb-1">
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-cogs fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Configurer le barème modèle") ?></h4>
<p class="text-muted small mb-0"><?= _("Désignation :") ?> <span class="fw-bold text-primary"><?= $libelleBareme ?></span></p>
</div>
</div>
</div>
</div>
<input type="hidden" id="nomForm" name="nomForm" value="frmDetailBareme">
<input type="hidden" id="idBaremePriseEnCharge" name="idBaremePriseEnCharge" value="<?= $idBareme ?>">
<input type="hidden" id="ligne2" name="ligne2" value="<?= count($garantiesajoutees); ?>">
<input type="hidden" id="masquerBareme" name="masquerBareme" value="1">
<input type="hidden" id="maxDateEffetBareme" name="maxDateEffetBareme" value="<?= $maxDateEffetBareme ?>">
<div class="row g-2">
<div class="col-12">
<div class="card border-0 shadow-sm overflow-hidden">
<div class="card-header text-primary py-2">
<h6 class="mb-0 fw-bold text-uppercase"><i class="fas fa-globe me-2"></i><?= _("Paramètres applicables à l'ensemble des garanties") ?></h6>
</div>
<div class="card-body p-4 bg-light-subtle">
<div class="row g-3 align-items-end">
<div class="col-md-2">
<label class="form-label small fw-bold text-muted">ID</label>
<input type="text" class="form-control border-2 bg-white fw-bold text-center" value="<?= $idBareme ?>" readonly>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted required"><?= _("Date d'effet") ?></label>
<div class="input-group">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-calendar-alt text-primary"></i></span>
<input type="text" id="dateEffetBareme" name="dateEffetBareme"
class="form-control border-2 border-start-0 datepicker fw-bold text-center"
onchange="controleDateEffetBareme();" required>
</div>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted required"><?= _("Ticket Modérateur (%)") ?></label>
<input type="text" id="ticketModerateurBareme" name="ticketModerateurBareme"
class="form-control border-2 fw-bold text-center fs-5"
value="<?= $tmBareme ?>" onkeyup="controle_numerique(this);" required>
</div>
<div class="col-md-4">
<button type="button" id="btn_bareme" class="btn btn-primary w-100 py-2 fw-bold shadow-sm" onclick="inserer_bareme();">
<i class="fas fa-plus-circle me-1"></i> <?= _("Appliquer le Ticket Global") ?>
</button>
</div>
</div>
</div>
<div class="card-footer bg-white border-top-0 p-0">
<button class="btn btn-light w-100 rounded-0 py-2 fw-bold text-muted border-top" onclick="afficherDetailBareme();">
<i class="fas fa-history me-2"></i><?= _("Afficher l'historique des lignes globales") ?> <span id="span_bareme" class="fa fa-chevron-up"></span>
</button>
<div id="div_bareme" class="p-3 border-top" style="display:none;">
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card border-0 shadow-sm border-top border-primary border-4">
<div class="card-header bg-white py-3 d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-primary text-uppercase">
<i class="fas fa-list-ul me-2"></i><?= _("Paramètres applicables garantie par garantie") ?>
</h6>
<div id="div_patienter"></div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0" style="font-size: 10pt;">
<thead class="bg-light">
<tr>
<th class="ps-4 py-3" width="150px"><?= _("Code") ?></th>
<th class="py-3"><?= _("Désignation de la Garantie") ?></th>
<th class="text-center py-3"><?= _("Lignes Actives") ?></th>
<th class="text-center py-3"><?= _("Lignes Inactives") ?></th>
<th class="text-center py-3" width="100px"><?= _("Action") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($garantiesajoutees as $v):
$codeG = $this->nettoyer($v['codeGarantie']);
$nomG = $isAnglais ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
$actives = (int)$v['nbre_lignes_actives'];
$inactives = (int)$v['nbre_lignes_inactives'];
?>
<tr class="cursor-pointer" ondblclick="afficher_actes_garantiebareme(<?= $idBareme ?>,'<?= $codeG ?>');">
<td class="ps-4">
<span class="badge bg-primary-ghost text-primary px-3 py-2 fw-bold border border-primary-subtle w-100">
<?= $codeG ?>
</span>
</td>
<td>
<div class="fw-bold text-dark text-uppercase"><?= $nomG ?></div>
</td>
<td class="text-center">
<span class="badge <?= $actives > 0 ? 'bg-success' : 'bg-light text-muted border' ?> rounded-pill px-3 py-2 fs-6">
<?= str_pad($actives, 2, "0", STR_PAD_LEFT) ?>
</span>
</td>
<td class="text-center">
<span class="badge <?= $inactives > 0 ? 'bg-danger-light text-danger' : 'bg-light text-muted border' ?> rounded-pill px-3 py-2 fs-6">
<?= str_pad($inactives, 2, "0", STR_PAD_LEFT) ?>
</span>
</td>
<td class="text-center pe-4">
<button class="btn btn-sm btn-primary rounded-circle action-icon shadow-sm"
onclick="afficher_actes_garantiebareme(<?= $idBareme ?>,'<?= $codeG ?>');">
<i class="fas fa-chevron-right"></i>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="div_actesgarantiebareme" role="dialog" data-bs-backdrop="static" data-bs-keyboard="false"></div>
<style>
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
.btn-primary-ghost { background-color: rgba(33, 46, 83, 0.05); color: #212e53; border: 1px solid rgba(33, 46, 83, 0.1); }
.btn-danger-light { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; border: none; }
.action-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
.action-icon:hover { transform: scale(1.1); background-color: #0056b3; }
.cursor-pointer { cursor: pointer; }
</style>