assure/Vue/Ajaxdiagnosticsbeneficiaire/index.php
2025-12-05 09:34:39 +00:00

102 lines
3.8 KiB
PHP
Executable File

<?php
// $actVisible = $_SESSION['actVisible'];
?>
<div id="div_dianostics" class="table-responsive">
<div class="card shadow-sm">
<div class="card-header bg-light py-3 d-flex justify-content-between align-items-center">
<h5 class="mb-0 text-dark"><i class="fas fa-list me-2"></i><?= _("Liste des diagnostics")?></h5>
<span class="badge bg-secondary" id="counter"><?= count($diagnostics).' '._("diagnostic(s)") ?> </span>
</div>
<div class="d-none d-md-block">
<!-- Tableau desktop (affiché sur les écrans moyens et grands) -->
<table class="table table-striped table-bordered table-condensed table-responsive" style="font-size:10pt;">
<thead class="table-dark">
<tr>
<th width="15%" style="text-align:center"> Date </th>
<th style='text-align:center'> <?= _("Prestataire") ?> </th>
<th style='text-align:center'> <?= _("Médecin") ?> </th>
<th style="text-align:center"> Diagnostic </th>
</tr>
</thead>
<tbody>
<?php foreach ($diagnostics as $diagnostic):
$idDiagnostic = $this->nettoyer($diagnostic['id']);
$supprime = $this->nettoyer($diagnostic['supprime']);
$codeAffection = $this->nettoyer($diagnostic['codeAffection']);
$medecin = $this->nettoyer($diagnostic['medecin']);
$prestataire = $this->nettoyer($diagnostic['prestataire']);
if (isset($_SESSION['lang']) && $_SESSION['lang']=="en_US")
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection;
}
else
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection;
}
?>
<tr valign="top">
<td align='center'><?= dateheureLang($this->nettoyer($diagnostic['dateSysteme']), $_SESSION['lang']) ?></td>
<td align='center'> <?= $prestataire ?> </td>
<td align='center'> <?= $medecin ?> </td>
<td align='center'> <?= $libelleAffection ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Affichage mobile (cartes) -->
<div class="d-md-none">
<?php foreach ($diagnostics as $diagnostic):
$idDiagnostic = $this->nettoyer($diagnostic['id']);
$supprime = $this->nettoyer($diagnostic['supprime']);
$codeAffection = $this->nettoyer($diagnostic['codeAffection']);
$medecin = $this->nettoyer($diagnostic['medecin']);
$prestataire = $this->nettoyer($diagnostic['prestataire']);
if (isset($_SESSION['lang']) && $_SESSION['lang']=="en_US")
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection;
}
else
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection;
}
?>
<div class="card-header bg-light d-flex justify-content-between align-items-center">
<strong>
<span class="badge bg-success"><?= $idDiagnostic ?></span>
</strong>
<small class="text-muted"><?= dateheureLang($this->nettoyer($diagnostic['dateSysteme']), $_SESSION['lang']) ?></small>
</div>
<div class="card-body">
<div class="row">
<div class="col-12 mb-2">
<small class="text-muted"><?= _("Prestataire") ?></small><br>
<span class="fw-bold"><?= $this->nettoyer($diagnostic['prestataire']) ?></span>
</div>
<div class="col-12 mb-2">
<small class="text-muted"><?= _("Médecin") ?></small><br>
<span class="fw-bold"><?= $this->nettoyer($diagnostic['medecin']) ?></span>
</div>
<div class="col-12 mb-2">
<small class="text-muted"><?= _("Diagnostic") ?></small><br>
<span class="fw-bold"><?= $libelleAffection ?></span>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>