This commit is contained in:
KONE SOREL 2026-03-30 18:15:17 +00:00
parent 01bb5b1c5d
commit 1a20289f00
5 changed files with 173 additions and 5 deletions

View File

@ -0,0 +1,20 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Ged.php';
class ControleurAjaxgedassuremvt extends Controleur {
private $ged;
public function __construct() {
$this->ged = new Ged();
}
public function index() {
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
$geds = $this->ged->getgedassuremvt($idBeneficiaire);
$this->genererVueAjax(array('geds' => $geds));
}
}

View File

@ -44715,3 +44715,39 @@ function recapituler_reincorporer()
}
});
}
function consulter_ged_assure_mvt(idBeneficiaire){
$("#div_patienter").html(`
<div class="d-flex flex-column align-items-center justify-content-center" style="padding-top:80px;">
<div class="spinner-border text-primary" role="status" style="width:3rem; height:3rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="mt-3 fs-5 fw-bold">
Veuillez patienter... / Please wait...
</span>
</div>
`);
donnees = 'idBeneficiaire='+idBeneficiaire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgedassuremvt/",
type : 'post',
data: donnees,
error: function(errorData){
alert("Erreur : "+errorData);
},
success: function(data) {
//alert("Success : "+data);
$("#div_patienter").html('');
$('#div_ged').html(data);
//appliquerDataTable();
$('#div_ged').modal("show");
},
complete: function() {
}
});
}

View File

@ -240,5 +240,16 @@ class Ged extends Modele {
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
public function getgedassuremvt($idBeneficiaire)
{
$lang = $_SESSION['lang'];
$sql = 'call sp_get_ged_assure_mvt(?, ?);';
$resultat = $this->executerRequete($sql, array($idBeneficiaire, $lang));
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
}

View File

@ -0,0 +1,78 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content shadow-lg border-0">
<div class="modal-header bg-light border-bottom">
<h5 class="modal-title fw-bold text-primary">
<i class="fas fa-check-circle me-2"></i><?= _('Consulter GED Assuré') ?>
</h5>
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
<div class="modal-body p-4">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0" style="font-size:8.5pt;">
<thead class="table-dark text-nowrap">
<tr>
<th class="text-center px-3">Date</th>
<th class="text-center">Src</th>
<th><?= _("Souscripteur / Police") ?></th>
<th><?= _("Bénéficiaire / Adhérent") ?></th>
<th><?= _("Type du Document") ?></th>
<th><?= _("Nom du Document") ?></th>
<th class="text-center no-export"><?= _("Action") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($geds as $ged):
$idGed = $this->nettoyer($ged['idGed']);
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
if($ged['codeNaturePiece'] == "AUT")
{
$libelleType = $this->nettoyer($ged['libelleAutre']);
} else
{
$libelleType = $this->nettoyer($ged['libelleType']);
}
?>
<tr class="text-nowrap">
<td class="text-center small text-muted"><?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?></td>
<td class="text-center">
<span class="badge bg-light text-dark border small fw-normal"><?= $this->nettoyer($ged['source']) ?></span>
</td>
<td>
<div class="fw-bold text-dark"><?= $this->nettoyer($ged['souscripteur']) ?></div>
<div class="small text-primary"> <?= $this->nettoyer($ged['numeroPolice']) ?></div>
</td>
<td>
<div class="fw-bold"><?= $this->nettoyer($ged['beneficiaire']) ?></div>
<div class="small text-muted italic">
<?= $this->nettoyer($ged['adherent']) ?> (<?= $this->nettoyer($ged['numeroBeneficiaire']) ?>)
</div>
</td>
<td class="small text-uppercase"><?= $libelleType; ?></td>
<td class="small">
<i class="far fa-file-pdf text-danger me-1"></i>
<span class="text-truncate d-inline-block" style="max-width: 180px;" title="<?= $this->nettoyer($ged['nomOrigine']) ?>">
<?= $this->nettoyer($ged['nomOrigine']) ?>
</span>
</td>
<td class="text-center">
<a href="<?= $cheminFichier ?>" target="_blank" class="btn btn-xs btn-outline-danger shadow-sm px-3 fw-bold border-2" style="font-size:9pt;">
<i class="fas fa-download me-1"></i><?= _("TELECHARGER") ?>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="modal-footer bg-light">
<button type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
<div class="table-responsive shadow-sm rounded border animate__animated animate__fadeIn">
<div id="div_patienter"></div>
<table class="table table-hover align-middle mb-0 tabliste compact" style="font-size: 0.85rem;">
<thead class="table-light text-secondary">
<tr>
@ -6,6 +7,7 @@
<th class="text-center border-0"><?= _("Mvt") ?></th>
<th class="border-0"><?= _("Bénéficiaire / Matricule") ?></th>
<th class="border-0"><?= _("Adhérent") ?></th>
<th class="border-0"><?= _("GED") ?></th>
<th class="text-center border-0"><?= _("Lien") ?></th>
<th class="text-center border-0"><?= _("Saisie / Par") ?></th>
<th class="text-center border-0"><?= _("Prime Ttc") ?></th>
@ -25,6 +27,9 @@
$idMvtTemp = $this->nettoyer($mvt['id']);
$sensMvt = $mvt['sensMouvement']; // On suppose que '0' = Entrée, '1' = Sortie
$libelleSensMouvement = est_anglophone() ? $mvt['libelleSensMouvementEng'] : $mvt['libelleSensMouvement'];
$nombreGed = $mvt['nombreGed'];
$idBeneficiaire = $mvt['idBeneficiaire'];
?>
<tr>
<td class="text-center fw-bold text-dark">
@ -33,11 +38,11 @@
<td class="text-center">
<?php if ($sensMvt == '1'): // Entrée ?>
<span class="badge rounded-pill bg-success-subtle text-success border border-success-subtle px-3">
<span class="badge rounded-pill bg-success border border-success-subtle px-3">
<i class="fas fa-sign-in-alt me-1"></i> <?= $libelleSensMouvement ?>
</span>
<?php else: // Sortie ?>
<span class="badge rounded-pill bg-danger-subtle text-danger border border-danger-subtle px-3">
<span class="badge rounded-pill bg-danger border border-danger-subtle px-3">
<i class="fas fa-sign-out-alt me-1"></i> <?= $libelleSensMouvement ?>
</span>
<?php endif; ?>
@ -56,6 +61,17 @@
<span class="badge bg-light text-secondary border"><?= $this->nettoyer($mvt['codeLienParente']) ?></span>
</td>
<td class="text-center">
<?php if ($nombreGed > '0'): ?>
<button class="btn btn-success btn-sm rounded-pill px-3 me-1" title="<?= _("Consulter") ?>"
onClick="consulter_ged_mvt('<?= $idBeneficiaire ?>');">
<i class="fas fa-folder-open">
</button>
<?php else: // Sortie ?>
<span class="text-muted opacity-50 small">-</span>
<?php endif; ?>
</td>
<td class="text-center">
<div class="small"><?= dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?></div>
<div class="x-small text-muted fw-bold"><?= $this->nettoyer($mvt['codeUtilisateur']) ?></div>
@ -66,10 +82,14 @@
</td>
<td colspan="2" class="text-center">
<?php if($choix=='1'): ?>
<input type="checkbox" checked value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<?php if ($nombreGed > '0'): ?>
<?php if($choix=='1'): ?>
<input type="checkbox" checked value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<?php else: ?>
<input type="checkbox" value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<?php endif; ?>
<?php else: ?>
<input type="checkbox" value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<span class="text-muted opacity-50 small">-</span>
<?php endif; ?>
</td>
</tr>
@ -78,6 +98,9 @@
</table>
</div>
<div id="div_ged" class="modal fade"></div>
<style>
.x-small { font-size: 0.7rem; }
.italic { font-style: italic; }