This commit is contained in:
KONE SOREL 2026-01-06 13:49:45 +00:00
parent 460a825303
commit 99050f4b7d
3 changed files with 118 additions and 84 deletions

View File

@ -1,89 +1,123 @@
<?php
$this->titre = "INTER-SANTE - GED Police";
<?php $this->titre = "INTER-SANTE - GED Police"; ?>
/*
var_dump
(
array(
"cheminGed" => $_SESSION['cheminGed'],
"lienRh" => $_SESSION['lienRh_C'],
"dossierGed" => $_SESSION['dossierGed'],
)
);
*/
?>
<div id="div_police" class="container-fluid py-4 animate__animated animate__fadeIn">
<div class="d-flex align-items-center justify-content-between mb-4">
<h4 class="fw-bold text-secondary mb-0">
<i class="fas fa-folder-open text-primary me-2"></i>
<?= _("Gestion Électronique des Documents (GED)") ?>
</h4>
<span class="badge bg-warning-subtle text-warning border border-warning-subtle px-3 py-2">
<i class="fas fa-info-circle me-1"></i> <?= _("Limité aux 50 derniers documents") ?>
</span>
</div>
<legend> <?= _("GED Police => Limité à 50 documents => Filtrer sur période pour obtenir le résultat souhaité") ?> </legend>
<?php if((isset($msgErreur)) && ($msgErreur > " ")) : ?>
<div class="alert alert-danger shadow-sm d-flex align-items-center" role="alert">
<i class="fas fa-exclamation-triangle me-2 fs-4"></i>
<div><?= $msgErreur ?></div>
</div>
<?php endif; ?>
<div class="row g-4">
<div class="col-xl-4">
<div class="card shadow-sm border-0 h-100">
<div class="card-header bg-white py-3">
<h6 class="mb-0 fw-bold"><i class="fas fa-filter me-2"></i><?= _("Actions & Filtres") ?></h6>
</div>
<div class="card-body">
<div class="mb-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Période de recherche") ?></label>
<div class="input-group mb-2">
<span class="input-group-text small"><?= _("Du") ?></span>
<input type="text" id="d1" name="d1" class="form-control datepicker text-center"
value="<?= dateLang($_SESSION['dUneSemaineAvant_C'], $_SESSION['lang']) ?>" required>
</div>
<div class="input-group mb-3">
<span class="input-group-text small"><?= _("Au") ?></span>
<input type="text" id="d2" name="d2" class="form-control datepicker text-center"
value="<?= dateCouranteLang($_SESSION['lang']) ?>" required>
</div>
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Nom du document") ?></label>
<input type="text" id="nomOrigine" name="nomOrigine" class="form-control mb-3" placeholder="Ex: Contrat...">
<button type="button" class="btn btn-primary w-100 fw-bold" onclick="lister_ged_police();">
<i class="fas fa-sync-alt me-2"></i><?= _("Actualiser la liste") ?>
</button>
</div>
<form enctype="multipart/form-data" action="Gedpolice" method="post">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="7%" > <?= _("Période du") ?> </td>
<td width="15%" ><INPUT style='text-align:center; font-size:10pt;' class="form-control datepicker" TYPE="text" id="d1" NAME="d1" value="<?= dateLang($_SESSION['dUneSemaineAvant_C'], $_SESSION['lang']) ?>" required></td>
<hr class="text-muted opacity-25">
<td width="7%" align="center" > <?= _("au") ?> </td>
<td width="15%" ><INPUT style='text-align:center; font-size:10pt;' class="form-control datepicker" TYPE="text" id="d2" NAME="d2" value="<?= dateCouranteLang($_SESSION['lang']) ?>" required></td>
<form enctype="multipart/form-data" action="Gedpolice" method="post" class="mt-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Nouveau document") ?></label>
<div class="mb-3">
<input class="form-control" name="fichier_upload" type="file" id="fichier_upload" required>
<div class="form-text x-small"><?= _("Sélectionnez un fichier pour l'ajouter à cette police.") ?></div>
</div>
<button type="submit" name="submit" class="btn btn-success w-100 fw-bold">
<i class="fas fa-cloud-upload-alt me-2"></i><?= _("Envoyer le fichier") ?>
</button>
</form>
</div>
</div>
</div>
<td align="center" width="4%" > Doc </td>
<td colspan="1"> <INPUT style='font-size:10pt;' class="form-control" type="text" id="nomOrigine" name="nomOrigine" > </td>
<div class="col-xl-8">
<div class="card shadow-sm border-0 h-100">
<div id="div_ged" class="table-responsive">
<table class="table table-hover align-middle mb-0" style="font-size:0.85rem;">
<thead class="bg-light text-muted">
<tr>
<th class="ps-3"><?= _("Date") ?></th>
<th><?= _("Source") ?></th>
<th><?= _("Police / Bénéficiaire") ?></th>
<th><?= _("Document") ?></th>
<th class="text-center pe-3"><?= _("Action") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($geds as $ged):
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
?>
<tr>
<td class="ps-3">
<div class="fw-bold"><?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?></div>
<div class="text-muted x-small"><?= $this->nettoyer($ged['souscripteur']) ?></div>
</td>
<td>
<span class="badge bg-secondary-subtle text-secondary"><?= $this->nettoyer($ged['source']) ?></span>
</td>
<td>
<div class="small"><i class="fas fa-file-contract me-1 opacity-50"></i> <?= $this->nettoyer($ged['numeroPolice']) ?></div>
<div class="fw-bold text-primary">
<?= $this->nettoyer($ged['numeroBeneficiaire']) ?> - <?= $this->nettoyer($ged['beneficiaire']) ?>
</div>
<div class="x-small text-muted italic"><?= $this->nettoyer($ged['adherent']) ?></div>
</td>
<td>
<div class="text-truncate" style="max-width: 200px;" title="<?= $this->nettoyer($ged['nomOrigine']) ?>">
<i class="far fa-file-pdf text-danger me-1"></i> <?= $this->nettoyer($ged['nomOrigine']) ?>
</div>
</td>
<td class="text-center pe-3">
<a href="<?= $cheminFichier ?>" target="_blank" class="btn btn-sm btn-outline-primary rounded-pill px-3">
<i class="fas fa-download me-1"></i> <?= _("Ouvrir") ?>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<td width="2%"> </td>
<td > <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:lister_ged_police();"><?= _("Actualiser...") ?></button> </td>
</tr>
<tr>
<td> <?= _("Document") ?> </td>
<td colspan="5"> <input style="font-size: 15px; height: 40px" class="form-control btn btn-info" name="fichier_upload" type="file" id="fichier_upload" /> </td>
<td> </td>
<td> <input style='font-size:10pt;' class="form-control btn btn-primary" type="submit" name="submit" value="<?= _("Envoyer") ?>" /> </td>
</tr>
</tbody>
</table>
</form>
<div id="div_ged">
<?php if((isset($msgErreur)) && ($msgErreur>" ")) : ?>
<INPUT style='font-size:14pt; color:red; text-align:center;' class="form-control" type="text" value="<?= $msgErreur ?>" readonly >
<?php endif; ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th style='text-align:center'> Date </th>
<th style='text-align:center'> Src </th>
<th> <?= _("Souscripteur") ?> </th>
<th style='text-align:center'> <?= _("Police") ?> </th>
<th> <?= _("Prestataire") ?> </th>
<th> <?= _("Adhérent") ?> </th>
<th style='text-align:center' colspan="2"> <?= _("Bénéficiaire") ?> </th>
<th> Document </th>
<th style='text-align:center'> <?= _("Télécharger") ?> </th>
</thead>
<tbody>
<?php foreach ($geds as $ged):
$idGed=$this->nettoyer($ged['idGed']);
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
?>
<tr valign="top">
<td align='center'><?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?></td>
<td align='center'><?= $this->nettoyer($ged['source']) ?></td>
<td><?= $this->nettoyer($ged['souscripteur']) ?></td>
<td align='center'><?= $this->nettoyer($ged['numeroPolice']) ?></td>
<td><?= $this->nettoyer($ged['prestataire']) ?></td>
<td><?= $this->nettoyer($ged['adherent']) ?></td>
<td align='center'><?= $this->nettoyer($ged['numeroBeneficiaire']) ?></td>
<td><?= $this->nettoyer($ged['beneficiaire']) ?></td>
<td><?= $this->nettoyer($ged['nomOrigine']) ?></td>
<td align="center">
<a style="font-size:8pt;" href="<?= $cheminFichier ?>" target="_blank" > <?= _("Télécharger") ?> </a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<style>
.x-small { font-size: 0.75rem; }
.italic { font-style: italic; }
.table-responsive { max-height: 700px; overflow-y: auto; }
.bg-warning-subtle { background-color: #fff3cd !important; }
</style>

View File

@ -1,6 +1,6 @@
<?php $this->titre = "INTER-SANTE - Rapport S/P police"; ?>
<div id="div_liste_adherent" class="container-fluid py-4 animate__animated animate__fadeIn">
<div id="div_police" class="container-fluid py-4 animate__animated animate__fadeIn">
<h1 class="text-primary"><i class="fas fa-chart-line me-2"></i></i> <?= _("Rapport S / P") ?></h1>

View File

@ -1,4 +1,4 @@
<div id="div_liste_adherent" class="container-fluid py-4 animate__animated animate__fadeIn">
<div id="div_police" class="container-fluid py-4 animate__animated animate__fadeIn">
<h1 class="text-primary"><i class="fas fa-microscope me-2"></i><?= _('Synthèse des Consommations') ?></h1>