143 lines
9.5 KiB
PHP
Executable File
143 lines
9.5 KiB
PHP
Executable File
<?php
|
|
// $this->titre = "INTER SANTE - "._("Rechercher assuré") ;
|
|
?>
|
|
|
|
<div class="page-content">
|
|
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
|
|
|
|
<div class="card shadow-sm border-0 mb-4" style="border-radius: var(--radius-md);">
|
|
<div class="card-header bg-white py-3 border-bottom-0">
|
|
<h5 class="mb-0 fw-bold" style="color: var(--color-primary);">
|
|
<i class="fas fa-search me-2"></i><?= _("Critères de recherche de l'assuré") ?>
|
|
</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row g-3">
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark"><?= _("Numéro Bénéficiaire") ?></label>
|
|
<div class="input-group">
|
|
<span class="input-group-text bg-light border-end-0"><i class="fas fa-id-card"></i></span>
|
|
<input class="form-control border-start-0" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus autocomplete="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark"><?= _("Numéro Famille") ?></label>
|
|
<div class="input-group">
|
|
<span class="input-group-text bg-light border-end-0"><i class="fas fa-users"></i></span>
|
|
<input class="form-control border-start-0" type="text" id="numeroAdherent" name="numeroAdherent" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark"><?= _("Nom") ?></label>
|
|
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire" placeholder="Ex: DOE" autocomplete="off">
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark"><?= _("Prénoms") ?></label>
|
|
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire" autocomplete="off">
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark"><?= _("Téléphone") ?></label>
|
|
<div class="input-group">
|
|
<span class="input-group-text bg-light border-end-0"><i class="fas fa-phone"></i></span>
|
|
<input class="form-control border-start-0" type="text" id="telephonePortable" name="telephonePortable" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 col-lg-3">
|
|
<label class="form-label small fw-bold text-dark">E-mail</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text bg-light border-end-0"><i class="fas fa-envelope"></i></span>
|
|
<input class="form-control border-start-0" type="email" id="email" name="email" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12 col-lg-6 d-flex align-items-end">
|
|
<button type="submit" id="lancerrecherche" name="lancerrecherche" class="btn btn-primary w-100 fw-bold py-2 shadow-primary" style="background-color: var(--color-primary); border: none; border-radius: var(--radius-sm);">
|
|
<i class="fas fa-search me-2"></i> <?= _("Rechercher") ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
|
|
<div class="alert alert-danger d-flex align-items-center mb-4 border-0 shadow-sm" role="alert" style="border-left: 4px solid var(--color-urgent) !important;">
|
|
<i class="fas fa-exclamation-triangle me-3 fs-4"></i>
|
|
<div>
|
|
<strong><?= _("Carte déclarée perdue") ?></strong><br>
|
|
<?= $derniernumerobeneficiaires['ancien'] . " remplacée par " . $derniernumerobeneficiaires['nouveau'] ?>.
|
|
<span class="small opacity-75"><?= _("Veuillez ne pas le communiquer sans autorisation.") ?></span>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="card shadow-sm border-0" style="border-radius: var(--radius-md);">
|
|
<div class="card-header bg-white py-3 border-bottom-0 d-flex justify-content-between align-items-center">
|
|
<h6 class="mb-0 fw-bold" style="color: var(--text-secondary);">
|
|
<i class="fas fa-list me-2"></i><?= _("Résultats de la recherche") ?>
|
|
</h6>
|
|
<?php if (is_array($beneficiaires)): ?>
|
|
<span class="badge bg-light text-dark rounded-pill border fw-normal"><?= count($beneficiaires) ?> résultat(s)</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<?php if (is_array($beneficiaires) && count($beneficiaires) > 0): ?>
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 0.85rem;">
|
|
<thead class="bg-light text-dark small text-uppercase">
|
|
<tr>
|
|
<th class="px-3 border-0 text-center"><?= _("N° Bénéf.") ?></th>
|
|
<th class="border-0"><?= _("Nom & Prénoms") ?></th>
|
|
<th class="border-0 text-center"><?= _("Parenté") ?></th>
|
|
<th class="border-0 text-center"><?= _("Naissance") ?></th>
|
|
<th class="border-0 text-center"><?= _("Genre") ?></th>
|
|
<th class="border-0"><?= _("Souscripteur") ?></th>
|
|
<th class="border-0 text-center"><?= _("Etat") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($beneficiaires as $beneficiaire):
|
|
$idBeneficiaire=$this->nettoyer($beneficiaire['id']);
|
|
$numeroBeneficiaire=$this->nettoyer($beneficiaire['numeroBeneficiaire']);
|
|
$etatCode = $this->nettoyer($beneficiaire['codeEtatBeneficiaire']);
|
|
// Définition de la pastille d'état
|
|
$statusClass = ($etatCode == 'ACTIF') ? 'bg-success' : 'bg-secondary';
|
|
?>
|
|
<tr style="cursor: pointer; transition: var(--transition-fast);"
|
|
onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');"
|
|
ondblclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();">
|
|
|
|
<td class="text-center px-3">
|
|
<span class="badge bg-light text-primary border px-3 py-2 fw-bold"><?= $numeroBeneficiaire ?></span>
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold text-dark"><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></div>
|
|
<div class="small text-dark"><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></div>
|
|
</td>
|
|
<td class="text-center small"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
|
|
<td class="text-center small"><?= dateLang($this->nettoyer($beneficiaire['dateNaissance'])) ?></td>
|
|
<td class="text-center small"><?= $this->nettoyer($beneficiaire['sexe']) ?></td>
|
|
<td class="small"><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
|
|
<td class="text-center">
|
|
<span class="badge <?= $statusClass ?> rounded-pill px-2" style="font-size: 0.7rem;"><?= $etatCode ?></span>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<div class="text-center py-5">
|
|
<i class="fas fa-search-minus fa-3x mb-3 text-light"></i>
|
|
<p class="text-dark"><?= _("Aucun bénéficiaire trouvé. Ajustez vos critères.") ?></p>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|