gf
This commit is contained in:
parent
276bee7865
commit
cf75dbed1a
|
|
@ -5,126 +5,138 @@
|
|||
<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é") ?>
|
||||
<div class="card shadow-sm border-0 mb-4" style="border-radius: var(--radius-md); background: #ffffff;">
|
||||
<div class="card-header bg-transparent py-3 border-bottom-0">
|
||||
<h5 class="mb-0 fw-bold d-flex align-items-center" style="color: var(--color-primary);">
|
||||
<span class="icon-shape bg-primary-ghost text-primary rounded-circle me-2" style="width: 35px; height: 35px; display: flex; align-items: center; justify-content: center;">
|
||||
<i class="fas fa-search fs-6"></i>
|
||||
</span>
|
||||
<?= _("Critères de recherche") ?>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body pt-0">
|
||||
<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">
|
||||
<label class="form-label small fw-bold text-dark mb-1"><?= _("Numéro Bénéficiaire") ?></label>
|
||||
<div class="input-group input-group-merge">
|
||||
<span class="input-group-text bg-light border-end-0 text-muted"><i class="fas fa-id-card small"></i></span>
|
||||
<input class="form-control border-start-0 ps-0" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus autocomplete="off" placeholder="Ex: 100234...">
|
||||
</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">
|
||||
<label class="form-label small fw-bold text-dark mb-1"><?= _("Numéro Famille") ?></label>
|
||||
<div class="input-group input-group-merge">
|
||||
<span class="input-group-text bg-light border-end-0 text-muted"><i class="fas fa-users small"></i></span>
|
||||
<input class="form-control border-start-0 ps-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">
|
||||
<label class="form-label small fw-bold text-dark mb-1"><?= _("Nom") ?></label>
|
||||
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire" placeholder="Ex: DOE" style="text-transform: uppercase;">
|
||||
</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">
|
||||
<label class="form-label small fw-bold text-dark mb-1"><?= _("Prénoms") ?></label>
|
||||
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<label class="form-label small fw-bold text-dark"><?= _("Téléphone") ?></label>
|
||||
<label class="form-label small fw-bold text-dark mb-1"><?= _("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">
|
||||
<span class="input-group-text bg-light border-end-0 text-muted"><i class="fas fa-phone-alt small"></i></span>
|
||||
<input class="form-control border-start-0 ps-0" type="tel" id="telephonePortable" name="telephonePortable">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<label class="form-label small fw-bold text-dark">E-mail</label>
|
||||
<label class="form-label small fw-bold text-dark mb-1">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">
|
||||
<span class="input-group-text bg-light border-end-0 text-muted"><i class="fas fa-at small"></i></span>
|
||||
<input class="form-control border-start-0 ps-0" type="email" id="email" name="email">
|
||||
</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 type="submit" id="lancerrecherche" name="lancerrecherche" class="btn btn-primary w-100 fw-bold py-2 shadow-sm transition-all" style="background-color: var(--color-primary); border: none;">
|
||||
<i class="fas fa-filter me-2"></i> <?= _("Lancer la recherche") ?>
|
||||
</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>
|
||||
<?php if (isset($derniernumerobeneficiaires) && is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau']>0): ?>
|
||||
<div class="alert alert-custom-urgent d-flex align-items-center mb-4 p-3 shadow-sm" role="alert">
|
||||
<div class="icon-circle bg-danger text-white me-3">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
</div>
|
||||
<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>
|
||||
<h6 class="alert-heading fw-bold mb-1 text-danger"><?= _("Carte déclarée perdue") ?></h6>
|
||||
<span class="text-dark">L'ancien numéro <strong><?= $derniernumerobeneficiaires['ancien'] ?></strong> a été remplacé par <strong><?= $derniernumerobeneficiaires['nouveau'] ?></strong>.</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") ?>
|
||||
<div class="card shadow-sm border-0 overflow-hidden" style="border-radius: var(--radius-md);">
|
||||
<div class="card-header bg-white py-3 d-flex justify-content-between align-items-center border-bottom">
|
||||
<h6 class="mb-0 fw-bold text-dark">
|
||||
<i class="fas fa-th-list me-2 text-primary"></i><?= _("Liste des assurés trouvés") ?>
|
||||
</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 if (isset($beneficiaires) && is_array($beneficiaires)): ?>
|
||||
<span class="badge bg-primary-ghost text-primary border-0 rounded-pill"><?= count($beneficiaires) ?> <?= _("résultats") ?></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">
|
||||
<?php if (isset($beneficiaires) && is_array($beneficiaires) && count($beneficiaires) > 0): ?>
|
||||
<table class="table table-hover align-middle mb-0 custom-table">
|
||||
<thead class="bg-light-gray text-muted 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="ps-4 border-0 text-center"><?= _("Matricule") ?></th>
|
||||
<th class="border-0"><?= _("Identité") ?></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>
|
||||
<th class="border-0 text-center"><?= _("Date Naissance") ?></th>
|
||||
<th class="border-0 text-center"><?= _("Sexe") ?></th>
|
||||
<th class="border-0"><?= _("Souscripteur / Entreprise") ?></th>
|
||||
<th class="border-0 text-center pe-4"><?= _("Statut") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($beneficiaires as $beneficiaire):
|
||||
$idBeneficiaire=$this->nettoyer($beneficiaire['id']);
|
||||
$numeroBeneficiaire=$this->nettoyer($beneficiaire['numeroBeneficiaire']);
|
||||
$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';
|
||||
|
||||
// Style des badges d'état
|
||||
$statusBadge = ($etatCode == 'ACTIF') ? 'badge-success-ghost' : 'badge-secondary-ghost';
|
||||
?>
|
||||
<tr style="cursor: pointer; transition: var(--transition-fast);"
|
||||
<tr class="beneficiaire-row"
|
||||
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 class="text-center ps-4">
|
||||
<span class="fw-bold text-primary"><?= $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>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="avatar-sm bg-light text-primary rounded-circle me-2 d-flex align-items-center justify-content-center fw-bold" style="width: 32px; height: 32px; font-size: 0.7rem;">
|
||||
<?= substr($beneficiaire['nomBeneficiaire'], 0, 1) ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="fw-bold text-dark mb-0"><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></div>
|
||||
<div class="small text-muted"><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire']) ?></div>
|
||||
</div>
|
||||
</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 class="text-center small"><?= ($this->nettoyer($beneficiaire['sexe']) == 'M') ? 'Masc.' : 'Fém.' ?></td>
|
||||
<td class="small text-truncate" style="max-width: 200px;"><?= $this->nettoyer($beneficiaire['nomClient']) ?></td>
|
||||
<td class="text-center pe-4">
|
||||
<span class="badge <?= $statusBadge ?> rounded-pill"><?= $etatCode ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
|
@ -132,8 +144,11 @@
|
|||
</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 class="mb-3">
|
||||
<i class="fas fa-user-slash fa-3x text-light-gray"></i>
|
||||
</div>
|
||||
<h5 class="text-muted"><?= _("Aucun résultat") ?></h5>
|
||||
<p class="small text-muted px-4"><?= _("Vérifiez l'orthographe ou essayez avec un numéro partiel.") ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user