This commit is contained in:
KONE SOREL 2026-03-17 16:47:53 +00:00
parent c9ef0a3a97
commit 1120e0a1e8

View File

@ -1,128 +1,162 @@
<?php
$this->titre = "INTER SANTE - Liste Prestataires réseau";
$codeReseau = $this->nettoyer($reseau['codeReseau']);
$idReseau = $this->nettoyer($reseau['id']);
$nomReseau = $this->nettoyer($reseau['libelle']);
$codeReseau = $this->nettoyer($reseau['codeReseau']);
$idReseau = $this->nettoyer($reseau['id']);
$nomReseau = $this->nettoyer($reseau['libelle']);
?>
<div class="page-content animate__animated animate__fadeIn">
<div class="header-section mb-4">
<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-hospital-symbol fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Affectation des Prestataires") ?></h4>
<p class="text-muted small mb-0"><?= _("Réseau :") ?> <span class="fw-bold text-primary"><?= $nomReseau ?></span> (<?= $codeReseau ?>)</p>
</div>
</div>
<div class="d-flex gap-2">
<button class="btn btn-light rounded-pill px-3 fw-bold shadow-xs border btn-sm" onclick="retour_liste_reseaus();">
<i class="fas fa-arrow-left me-1"></i> <?= _("Retour") ?>
</button>
<button class="btn btn-primary rounded-pill px-4 fw-bold shadow-sm btn-sm" onclick="afficher_prestataires_reseau();">
<i class="fas fa-sync-alt me-1"></i> <?= _("Actualiser") ?>
</button>
</div>
</div>
</div>
<input class="sr-only" type="text" id="codeReseau" name="codeReseau" value="<?= $codeReseau ?>" >
<input class="sr-only" type="text" id="idReseau" name="idReseau" value="<?= $idReseau ?>" >
<input type="hidden" id="codeReseau" name="codeReseau" value="<?= $codeReseau ?>">
<input type="hidden" id="idReseau" name="idReseau" value="<?= $idReseau ?>">
<div class="row g-4">
<div class="col-lg-5">
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-white py-3 border-bottom">
<div class="d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-muted text-uppercase small">
<i class="fas fa-list-ul me-2"></i><?= _("Prestataires Disponibles") ?>
</h6>
<span class="badge bg-light text-primary border rounded-pill">
<?= format_N(count($prestatairesdispo)) ?> <?= _("unités") ?>
</span>
</div>
<?php if(count($prestatairesdispo) > 0): ?>
<button class="btn btn-primary-ghost btn-sm w-100 mt-3 rounded-pill fw-bold" onclick="ajouter_tous_prestataires_reseau();">
<?= _("Tout ajouter") ?> <i class="fas fa-angle-double-right ms-1"></i>
</button>
<?php endif; ?>
</div>
<div class="card-body p-0">
<div class="table-responsive" style="max-height: 550px; overflow-y: auto;">
<table class="table table-hover align-middle mb-0" style="font-size: 8.5pt;">
<thead class="bg-light sticky-top">
<tr>
<th class="ps-3 py-2"><?= _("Nom & Ville") ?></th>
<th class="text-center py-2" width="50px"></th>
</tr>
</thead>
<tbody>
<?php foreach ($prestatairesdispo as $v):
$idPres = $v['id'];
$codePres = $v['codePrestataire'];
?>
<tr class="cursor-pointer" ondblclick="prestatairereseausoins_id(<?= $idPres ?>);">
<td class="ps-3">
<div class="fw-bold text-dark"><?= $this->nettoyer($v['libelle']) ?></div>
<div class="text-muted smaller">
<i class="fas fa-map-marker-alt me-1"></i><?= $this->nettoyer($v['localite']) ?>
<span class="mx-1"></span>
<span class="text-primary"><?= $this->nettoyer($v['typeprestataire']) ?></span>
</div>
</td>
<td class="text-center pe-3">
<button class="btn btn-sm btn-primary-ghost rounded-circle action-icon" onclick="ajouter_un_prestataire_reseau('<?=$codePres?>');">
<i class="fas fa-chevron-right"></i>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-lg-7">
<div class="card border-0 shadow-sm h-100 border-start border-success border-4">
<div class="card-header bg-white py-3 border-bottom">
<div class="d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-success text-uppercase small">
<i class="fas fa-check-double me-2"></i><?= _("Prestataires du réseau") ?>
</h6>
<span class="badge bg-success-light text-success rounded-pill px-3">
<?= format_N(count($prestatairesreseau)) ?> <?= _("prestataires") ?>
</span>
</div>
<?php if(count($prestatairesreseau) > 0): ?>
<button class="btn btn-danger-light btn-sm w-100 mt-3 rounded-pill fw-bold" onclick="retirer_tous_prestataires_du_site();">
<i class="fas fa-angle-double-left me-1"></i> <?= _("Retirer tous les prestataires") ?>
</button>
<?php endif; ?>
</div>
<div class="card-body p-0">
<div class="table-responsive" style="max-height: 550px; overflow-y: auto;">
<table class="table table-hover align-middle mb-0" style="font-size: 8.5pt;">
<thead class="bg-success-light text-success sticky-top">
<tr>
<th class="ps-3 py-2" width="50px"></th>
<th class="py-2"><?= _("Nom du Prestataire") ?></th>
<th class="py-2 pe-3"><?= _("Ville / Localité") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($prestatairesreseau as $v):
$codePres = $v['codePrestataire'];
?>
<tr>
<td class="ps-3 text-center">
<button class="btn btn-sm btn-danger-light rounded-circle action-icon" onclick="retirer_un_prestataire_reseau('<?=$codePres?>');">
<i class="fas fa-chevron-left"></i>
</button>
</td>
<td>
<div class="fw-bold text-dark text-uppercase"><?= $this->nettoyer($v['libelle']) ?></div>
</td>
<td class="pe-3">
<span class="text-muted"><i class="fas fa-city me-1"></i><?= $this->nettoyer($v['localite']) ?></span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<legend> <?= _("Prestataires du Réseau de soins").": ".$nomReseau ?> </legend>
</div>
</div>
<div id="div_prestataires_reseau" class="col-lg-12">
<div id="div_prestataire_1" class="table-responsive col-lg-4">
<table id="tab_ent_prestataire_1" class="table table-condensed table-responsive">
<tbody>
<tr valign="top">
<td align='center' colspan="2">
<button type="button" style="font-size:10pt;" class="form-control btn btn-primary"
onclick="javascript:afficher_prestataires_reseau();" > <?= _("Actualiser...") ?>
</button>
</td>
</tr>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;"><?= _("Prestataires disponibles") ?></td>
<td>
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne1" name="nbligne1" value="Nbre Lignes :<?= format_N(count($prestatairesdispo));?>" readonly>
</td>
</tr>
</tbody>
</table>
<table id="tab_prestataire_1" class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <?= _("Nom") ?> </th>
<th style='text-align:center'> <?= _("Type") ?> </th>
<th style='text-align:center'> <?= _("Ville") ?> </th>
<th style='text-align:center'> => </th>
</tr>
<tr>
<td colspan="4">
<button type="button" style="font-size:10pt; width:100%;" class="form-control btn btn-primary"
onclick="javascript:ajouter_tous_prestataires_reseau();" >
<?= "============================ "._("Ajouter Tous")." ============================>" ?>
</button>
</td>
</tr>
</thead>
<style>
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
.btn-primary-ghost { color: var(--bs-primary); background-color: rgba(33, 46, 83, 0.1); border: none; }
.btn-primary-ghost:hover { background-color: rgba(33, 46, 83, 0.2); }
.bg-success-light { background-color: rgba(25, 135, 84, 0.08) !important; }
.btn-danger-light { color: var(--bs-danger); background-color: rgba(220, 53, 69, 0.1); border: none; }
.btn-danger-light:hover { background-color: rgba(220, 53, 69, 0.2); }
<tbody>
<?php foreach ($prestatairesdispo as $v):
$idPrestataire = $v['id'];
$codePrestataire = $v['codePrestataire'];
?>
<tr ondblclick="javascript:prestatairereseausoins_id(<?= $idPrestataire ?>);" valign="top">
<td><?= $this->nettoyer($v['libelle']) ?></td>
<td><?= $this->nettoyer($v['typeprestataire']) ?></td>
<td><?= $this->nettoyer($v['localite']) ?></td>
<td align='center'>
<input type="button" value="=>" onClick="javascript:ajouter_un_prestataire_reseau('<?=$codePrestataire?>');"
style="font-size:10pt; width:30px;" >
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_prestataire_2" class="table-responsive col-lg-8">
<table class="table table-condensed table-responsive">
<tbody>
<tr>
<td align='center' colspan="2"><INPUT style="font-size:12pt;" class="form-control text-center" TYPE="text" value="" disabled ></td>
</tr>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;">
<?= _("Prestataires ajoutés") ?>
</td>
<td >
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne2" name="nbligne2"
value="Nbre Lignes : <?= Format_N(count($prestatairesreseau))?>" readonly>
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Nom") ?> </th>
<th style='text-align:center'> <?= _("Ville") ?> </th>
</tr>
<tr>
<td colspan="4">
<button type="button" style="font-size:10pt; width:100%;" class="form-control btn btn-danger" onclick="javascript:retirer_tous_prestataires_du_site();" >
<?= "<================== " . _("Retirer Tous")." ==================" ?>
</button>
</td>
</tr>
</thead>
<tbody>
<?php foreach ($prestatairesreseau as $v):
$idPrestataire = $v['id'];
$codePrestataire = $v['codePrestataire'];
?>
<tr valign="top">
<td align='center'>
<input type="button" value="<=" onclick="javascript:retirer_un_prestataire_reseau('<?=$codePrestataire?>');"
style="font-size:10pt; width:30px;">
</td>
<td><?= $this->nettoyer($v['libelle']) ?></td>
<td><?= $this->nettoyer($v['localite']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
.action-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; }
.action-icon:hover { transform: scale(1.15); }
.smaller { font-size: 0.85em; }
.cursor-pointer { cursor: pointer; }
/* Scrollbar personnalisée */
.table-responsive::-webkit-scrollbar { width: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
</style>