This commit is contained in:
KONE SOREL 2026-03-18 15:05:33 +00:00
parent 1461a5c617
commit a063b723e8
3 changed files with 89 additions and 72 deletions

View File

@ -86927,7 +86927,12 @@ function filtreproduitbareme() {
data: { codeGcAssureur: codeGcAssureur }, data: { codeGcAssureur: codeGcAssureur },
success: function(data) { success: function(data) {
$('#div_produit').html(data); $('#div_produit').html(data);
actualiserSelectPicker('#codeProduit', true); if (typeof actualiserSelectPicker === 'function') {
actualiserSelectPicker('#codeProduit', true); // true pour donner le focus
} else {
// Fallback si la fonction n'est pas chargée
$('#codeProduit').selectpicker('refresh');
}
} }
}); });
} }

View File

@ -1,70 +1,58 @@
<?php <?php
$nbreTotal = count($baremes);
$this->titre = "INTER SANTE - Barème de prise en charge initial"; $displayTotal = ($nbreTotal < 10) ? '0'.$nbreTotal : format_N($nbreTotal);
$nbreTotal = count($baremes);
if($nbreTotal < 10){
$nbreTotal = '0'.$nbreTotal;
}else{
$nbreTotal = format_N($nbreTotal);
}
?> ?>
<table style="margin: auto" class="table-responsive"> <div class="d-flex justify-content-center mb-3">
<tbody> <span class="badge bg-primary-ghost text-primary px-4 py-2 rounded-pill border shadow-sm fs-6">
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="Total enregistré : <?= $nbreTotal; ?>" readonly> </td> <i class="fas fa-list-ol me-2"></i><?= _("Total enregistré :") ?> <span class="fw-bold"><?= $displayTotal; ?></span>
</tbody> </span>
</table> </div>
<input type="hidden" id="total" value="<?= $nbreTotal; ?>"> <div class="card border-0 shadow-sm overflow-hidden">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:10pt;"> <table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
<thead> <thead class="bg-light border-bottom">
<tr> <tr>
<th style="text-align:center" > <?= _("ID") ?> </th> <th class="text-center ps-3 py-3" width="80px">ID</th>
<th style="text-align:center" > <?= _("Libellé") ?> </th> <th><?= _("Libellé du Barème") ?></th>
<th style="text-align:center" > <?= _("Garant") ?> </th> <th><?= _("Garant") ?></th>
<th style="text-align:center" > <?= _("Taux") ?> </th> <th class="text-center"><?= _("Taux (%)") ?></th>
<th style="text-align:center" > <?= _("Territoire") ?> </th> <th class="text-center"><?= _("Territoire") ?></th>
<th style="text-align:center"> <?= _("Modifier") ?> </th> <th class="text-center py-3" width="220px"><?= _("Actions") ?></th>
<th style="text-align:center"> <?= _("Configurer") ?> </th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> <?php foreach ($baremes as $v):
<?php $id = $this->nettoyer($v['id']);
$i = 0; $libelle = !empty($v['observationBareme']) ? $v['observationBareme'] : $v['libelle'];
foreach ($baremes as $v): $territoire = est_anglophone() ? $v['territoireEng'] : $v['territoire'];
$idBaremes = $this->nettoyer($v['id']); ?>
<tr>
$observation = $this->nettoyer($v['observationBareme']); <td class="text-center"><span class="badge bg-light text-muted border"><?= $id ?></span></td>
<td class="fw-bold text-dark"><?= $this->nettoyer($libelle) ?></td>
if(!empty($observation)){ <td><span class="small text-muted"><?= $this->nettoyer($v['garant']) ?></span></td>
$libelle = $observation; <td class="text-center">
}else{ <span class="badge bg-success-light text-success fs-6 rounded-pill">
$libelle = $this->nettoyer($v['libelle']); <?= $this->nettoyer($v['tauxRemboursement']) ?> %
} </span>
</td>
$archiver = $this->nettoyer($v['archiver']); <td class="text-center">
$nbBaremeCollege = $this->nettoyer($v['nbBaremeCollege']); <span class="small"><i class="fas fa-globe-africa me-1 text-muted"></i><?= $this->nettoyer($territoire) ?></span>
</td>
$dansCollege = ($nbBaremeCollege=="0") ? "Non" : "Oui"; <td class="text-center">
$territoire = $this->nettoyer($v['territoire']); <div class="btn-group gap-2">
<button class="btn btn-sm btn-outline-primary rounded-pill px-3 fw-bold" onclick="modifier_baremepriseencharge(<?= $id ?>);">
if (est_anglophone()){ <i class="fas fa-edit me-1"></i> <?= _("Modifier") ?>
$territoire = $this->nettoyer($v['territoireEng']); </button>
} <button class="btn btn-sm btn-success rounded-pill px-3 fw-bold" onclick="detail_baremepriseencharge(<?= $id ?>);">
?> <i class="fas fa-cogs me-1"></i> <?= _("Configurer") ?>
<tr valign="top"> </button>
<td align="center"> <?= $idBaremes ?> </td> </div>
<td> <?= $libelle ?> </td> </td>
<td > <?= $this->nettoyer($v['garant']) ?> </td> </tr>
<td align="center"> <?= $this->nettoyer($v['tauxRemboursement']) ?> </td> <?php endforeach; ?>
<td align="center"> <?= $territoire ?> </td> </tbody>
<td align="center" width="10%"> <input class = "form-control btn btn-primary" style="font-size:10pt;" type="button" value="<?= _("Modifier") ?>" onclick="javascript:modifier_baremepriseencharge(<?= $idBaremes ?>);"> </td> </table>
<td align="center" width="10%"> <input class = "form-control btn btn-success" style="font-size:10pt;" type="button" value="<?= _("Configurer") ?>" onclick="javascript:detail_baremepriseencharge(<?= $idBaremes ?>);"> </td> </div>
</tr> </div>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -1,8 +1,32 @@
<?php <?php
// Récupération sécurisée du produit en session si existant
$codeProduit = isset($_SESSION['codeProduit']) ? $_SESSION['codeProduit']:""; $codeProduit = isset($_SESSION['codeProduit']) ? $_SESSION['codeProduit'] : "";
?> ?>
<SELECT style="font-size:10pt; height:30px;" class="form-control selectpicker" data-live-search="true" id="codeProduit" NAME="codeProduit" required autofocus onChange="javascript:afficher_bareme_produit();"> <select class="selectpicker form-control border-2 shadow-none"
<?php liste_options($produits, $codeProduit); ?> id="codeProduit"
</SELECT> name="codeProduit"
data-live-search="true"
data-container="body"
required
onchange="afficher_bareme_produit();">
<option value="" data-icon="fas fa-info-circle"><?= _("-- Choisir un produit --") ?></option>
<?php liste_options($produits, $codeProduit); ?>
</select>
<script>
/**
* On réinitialise le selectpicker immédiatement après l'injection AJAX
* pour appliquer les styles Neutral Pro (hauteur, police, recherche).
*/
$(document).ready(function() {
if (typeof actualiserSelectPicker === 'function') {
actualiserSelectPicker('#codeProduit', true); // true pour donner le focus
} else {
// Fallback si la fonction n'est pas chargée
$('#codeProduit').selectpicker('refresh');
}
});
</script>