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

78 lines
3.2 KiB
PHP
Executable File

<div id="div_notes" 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 notes")?></h5>
<span class="badge bg-secondary" id="counter"><?= count($notesfeuillemaladie).' '._("note(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="8%" style="text-align:center"> Date </th>
<th style="text-align:center"> Notes </th>
<th width="15%" colspan="2" style="text-align:center"> <?= _("Auteur") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($notesfeuillemaladie as $notefeuillemaladie):
$idNote = $this->nettoyer($notefeuillemaladie['idNote']);
$source = $this->nettoyer($notefeuillemaladie['source']);
?>
<tr valign="top">
<td align='center'><?= dateheureLang($this->nettoyer($notefeuillemaladie['dateSysteme'])) ?></td>
<td> <textarea style="font-size:12pt;" rows="6" cols="115" readonly > <?= $this->nettoyer($notefeuillemaladie['notes']) ?> </textarea> </td>
<td align='center'>
<?php if($source=='C'): ?>
<?= $this->nettoyer($_SESSION['adherent_C']) ?>
<?php else: ?>
<?= $this->nettoyer($notefeuillemaladie['redacteur']) ?>
<?php endif; ?>
</td>
<td width="2%" align='center'> <?= $this->nettoyer($notefeuillemaladie['source']) ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Affichage mobile (cartes) -->
<div class="d-md-none">
<?php foreach ($notesfeuillemaladie as $notefeuillemaladie):
$idNote = $this->nettoyer($notefeuillemaladie['idNote']);
$source = $this->nettoyer($notefeuillemaladie['source']);
?>
<div class="card-body py-2" style="border-bottom: 1px solid #000;">
<div class="row">
<div class="col-12">
<div class="text-center">
<span class="badge bg-primary me-2"><?= "ID :".$idNote ?></span>
</div>
</div>
<div class="col-12">
<textarea readonly class="message-text w-100"><?= $this->nettoyer($notefeuillemaladie['notes']) ?></textarea>
</div>
<div class="col-8">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Auteur") ?></span>
<?php if($source=='C'): ?>
<span class="fw-bold"><?= $this->nettoyer($_SESSION['adherent_C']) ?></span>
<?php else: ?>
<span class="fw-bold"><?= $this->nettoyer($notefeuillemaladie['redacteur']) ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-4">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Source") ?></span>
<span class="fw-bold"><?= $this->nettoyer($notefeuillemaladie['source']) ?></span>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>