This commit is contained in:
KONE SOREL 2026-01-30 16:33:19 +00:00
parent 7bb760d492
commit d15892b7d8

View File

@ -1,80 +1,127 @@
<div class="card shadow-sm mb-4 border-0">
<?php
// $this->titre = "INTER SANTE - "._("Rechercher assuré") ;
?>
<div class="card shadow-sm border-0 mb-4">
<div class="card-body p-4">
<h5 class="card-title mb-4 text-primary fw-bold d-flex align-items-center">
<i class="bi bi-person-search fs-4 me-2"></i>
<?= _("Critères de recherche") ?>
<h5 class="card-title mb-4 text-primary fw-bold">
<i class="bi bi-search me-2"></i><?= _("Critères de recherche de l'assuré") ?>
</h5>
<form id="form_recherche" class="row g-3">
<div class="col-md-4">
<label for="nom_recherche" class="form-label small fw-bold text-secondary"><?= _("Nom ou Prénom") ?></label>
<input type="text" class="form-control shadow-none" id="nom_recherche" name="nom_recherche" placeholder="<?= _("Saisir un nom...") ?>">
</div>
<div class="col-md-3">
<label for="matricule_recherche" class="form-label small fw-bold text-secondary"><?= _("Matricule / Identifiant") ?></label>
<input type="text" class="form-control shadow-none" id="matricule_recherche" name="matricule_recherche">
</div>
<div class="col-md-3">
<label for="dn_recherche" class="form-label small fw-bold text-secondary"><?= _("Date de naissance") ?></label>
<div class="input-group">
<span class="input-group-text bg-light border-end-0"><i class="bi bi-calendar-event text-muted"></i></span>
<input type="text" class="form-control datepicker border-start-0 shadow-none" id="dn_recherche" name="dn_recherche">
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Numéro Bénéficiaire") ?></label>
<input class="form-control" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Numéro Famille") ?></label>
<input class="form-control" type="text" id="numeroAdherent" name="numeroAdherent" autocomplete="off">
</div>
</div>
<div class="col-md-4">
<label for="garant_recherche" class="form-label small fw-bold text-secondary"><?= _("Garant / Société") ?></label>
<select class="form-select select2" id="garant_recherche" name="garant_recherche">
<option value=""><?= _("Tous les garants") ?></option>
</select>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Nom") ?></label>
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Prénoms") ?></label>
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire" autocomplete="off">
</div>
<div class="col-md-3">
<label for="statut_recherche" class="form-label small fw-bold text-secondary"><?= _("Statut dossier") ?></label>
<select class="form-select select2" id="statut_recherche" name="statut_recherche">
<option value="ACTIF"><?= _("Assurés actifs") ?></option>
<option value="RADIE"><?= _("Assurés radiés") ?></option>
<option value="ALL"><?= _("Tous") ?></option>
</select>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("Tel") ?></label>
<input class="form-control" type="text" id="telephonePortable" name="telephonePortable" autocomplete="off">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted"><?= _("E-mail") ?></label>
<input class="form-control" type="text" id="email" name="email" autocomplete="off">
</div>
<div class="col-md-3 d-flex align-items-end">
<button type="button" class="btn btn-primary w-100 fw-bold py-2 shadow-sm" onclick="lancer_recherche_assure();">
<i class="bi bi-search me-2"></i> <?= _("Lancer la recherche") ?>
</button>
<div class="col-12">
<input id="lancerrecherche" name="lancerrecherche" class="visually-hidden" type="submit" value="<?= _("Rechercher") ?>">
<button type="submit" class="btn btn-primary px-4 shadow-sm float-end">
<i class="bi bi-search me-2"></i><?= _("Rechercher") ?>
</button>
</div>
</div>
</form>
</div>
</div>
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
<div class="alert alert-danger shadow-sm d-flex align-items-center mb-4" role="alert">
<i class="bi bi-exclamation-triangle-fill fs-4 me-3"></i>
<div>
<?= _("Cette carte")." => <strong>".$derniernumerobeneficiaires['ancien'] . "</strong> "._("a été déclarée perdue et remplacée par") ." => <strong>".$derniernumerobeneficiaires['nouveau'] ."</strong>. ". _("Veuillez ne pas le communiquer sans autorisation.") ?>
</div>
</div>
<?php endif; ?>
<div class="card shadow-sm border-0">
<div class="card-header bg-white py-3">
<h6 class="mb-0 fw-bold text-muted"><?= _("Résultats de la recherche") ?></h6>
<div class="card-header bg-white py-3 border-0">
<h5 class="mb-0 fw-bold text-muted"><?= _("Résultats de la recherche") ?></h5>
</div>
<div class="card-body p-0">
<?php if (is_array($beneficiaires) && count($beneficiaires) > 0): ?>
<div class="table-responsive">
<table id="table_resultats" class="table table-hover align-middle mb-0" style="width:100%">
<table id="table_resultats" class="table table-hover align-middle mb-0" style="font-size: 0.85rem;">
<thead class="table-light">
<tr class="small text-uppercase text-muted">
<th class="ps-4 border-0"><?= _("ID / Matricule") ?></th>
<th class="border-0"><?= _("Assuré") ?></th>
<th class="border-0"><?= _("Garant & Police") ?></th>
<th class="border-0"><?= _("Date Naissance") ?></th>
<th class="border-0"><?= _("Statut") ?></th>
<th class="text-end pe-4 border-0"><?= _("Actions") ?></th>
<tr class="text-muted small text-uppercase">
<th class="text-center border-0"><?= _("N° Bénéficiaire") ?></th>
<th class="text-center border-0"><?= _("N° Famille") ?></th>
<th class="border-0"><?= _("Nom") ?></th>
<th class="border-0"><?= _("Prénoms") ?></th>
<th class="text-center border-0"><?= _("Lien") ?></th>
<th class="text-center border-0"><?= _("Naissance") ?></th>
<th class="text-center border-0"><?= _("Genre") ?></th>
<th class="text-center border-0"><?= _("Tél") ?></th>
<th class="border-0"><?= _("Souscripteur") ?></th>
<th class="border-0"><?= _("Etat") ?></th>
</tr>
</thead>
<tbody id="body_resultats">
<tr>
<td colspan="6" class="text-center py-5 text-muted">
<i class="bi bi-info-circle me-2"></i> <?= _("Veuillez saisir un critère pour lancer la recherche") ?>
<tbody>
<?php foreach ($beneficiaires as $beneficiaire):
$idBeneficiaire = $this->nettoyer($beneficiaire['id']);
$numeroBeneficiaire = $this->nettoyer($beneficiaire['numeroBeneficiaire']);
?>
<tr style="cursor: pointer;"
onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');"
ondblclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>'); afficher_beneficiaire_id();">
<td class="text-center">
<button type="button" class="btn btn-sm btn-outline-primary fw-bold"
onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>'); afficher_beneficiaire_id();">
<?= $numeroBeneficiaire ?>
</button>
</td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['numeroAdherent']) ?></td>
<td class="fw-bold text-dark"><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></td>
<td><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
<td class="text-center small"><?= dateLang($this->nettoyer($beneficiaire['dateNaissance'])) ?></td>
<td class="text-center"><?= $this->nettoyer($beneficiaire['sexe']) ?></td>
<td class="text-center small"><?= $this->nettoyer($beneficiaire['telephonePortable']) ?></td>
<td class="small"><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
<td>
<?php
$etat = $this->nettoyer($beneficiaire['codeEtatBeneficiaire']);
$badgeClass = ($etat == 'ACTIF') ? 'bg-success' : 'bg-secondary';
?>
<span class="badge <?= $badgeClass ?>-light text-<?= str_replace('bg-','',$badgeClass) ?> rounded-pill">
<?= $etat ?>
</span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="p-5 text-center text-muted">
<i class="bi bi-info-circle fs-2 d-block mb-3"></i>
<?= _("Aucun résultat à afficher. Veuillez lancer une recherche.") ?>
</div>
<?php endif; ?>
</div>
</div>