This commit is contained in:
KANE LAZENI 2026-04-04 11:02:04 +00:00
parent 7f4327e604
commit a76af47096
3 changed files with 212 additions and 2 deletions

View File

@ -18359,7 +18359,6 @@ function selectionner_rdv(idDemande)
});
}
function ouvrir_rdv()
{
window.location.assign($("#racineWeb" ).val()+"Rendezvous/");
@ -19062,3 +19061,8 @@ function listerdemandesconsultation()
}
});
}
function selectionner_demande_consultation(idDemande)
{
alert("selectionner_demande_consultation");
}

View File

@ -0,0 +1,204 @@
<div class="card shadow-sm">
<div class="card-header bg-light py-2 d-flex justify-content-between align-items-center">
<h5 class="mb-0 text-dark">
<i class="fas fa-list me-2"></i>
<span class="hide-on-mobile"><?= _("Liste des demandes de consultation")?></span>
<span class="badge bg-primary view-end"><?= format_N(count($demandes)).' '._("Demandes") ?> </span>
</h5>
</div>
<div class="d-none d-md-block">
<div class="card-body p-0">
<table class="table table-striped table-hover mb-0" style="font-size:9pt; white-space: nowrap;">
<thead class="table-dark">
<tr>
<th class="text-center"><?= _("N° Demande") ?></th>
<th class="text-center">Date</th>
<th class="text-center"><?= _("Bénéficiaire") ?></th>
<th class="d-none d-lg-table-cell"><?= _("Nom") ?></th>
<th class="d-none d-xl-table-cell"><?= _("Prestataire") ?></th>
<th class="d-none d-xl-table-cell"><?= _("Spécialité") ?></th>
<th class="text-center"><?= _("Etat") ?></th>
<th class="text-center"><?= _("Motif") ?></th>
<th class="text-center"><?= _("Expiration") ?></th>
</tr>
</thead>
<tbody>
<?php if (count($demandes) > 0): ?>
<?php foreach ($demandes as $v):
$idDemande = $this->nettoyer($v['id']);
$numeroDemandeConsultation = $this->nettoyer($v['numeroDemandeConsultation']);
$dateSysteme = $this->nettoyer($v['dateSysteme']);
$effectuee = $this->nettoyer($v['effectuee']);
$prestataire = $this->nettoyer($v['prestataire']);
$specialite = $this->nettoyer($v['specialite']);
if($effectuee=="1"){
if (est_anglophone()){
$demandeEffectuee = "Yes";
}else{
$demandeEffectuee = "Oui";
}
}else{
if (est_anglophone()){
$demandeEffectuee = "No";
}else{
$demandeEffectuee = "Non";
}
}
if (est_anglophone()){
$specialite = $this->nettoyer($v['specialiteEng']);
$etatRdv = $this->nettoyer($v['etatRdvEng']);
}
?>
<tr>
<td class="text-center">
<button class="btn btn-sm btn-outline-primary w-100"
onClick="javascript:selectionner_demande_consultation('<?= $idDemande ?>');"
title="<?=_("Voir les détails du rendez-vous")?>">
<?= $numeroDemandeConsultation ?>
</button>
</td>
<td class="text-center"><?= dateheureLang($dateSysteme, $_SESSION['lang']) ?></td>
<td class="text-center"><?= $this->nettoyer($v['numeroBeneficiaire']) ?></td>
<td class="d-none d-lg-table-cell"><?= $this->nettoyer($v['beneficiaire']) ?></td>
<td class="d-none d-xl-table-cell text-truncate" style="max-width: 150px;"
data-bs-toggle="tooltip" title="<?= $prestataire ?>">
<?= $prestataire ?>
</td>
<td class="d-none d-xl-table-cell text-truncate" style="max-width: 120px;"
data-bs-toggle="tooltip" title="<?= $specialite ?>">
<?= $specialite ?>
</td>
<td class="text-center">
<?php if($effectuee == "1"):?>
<span class="badge bg-success"><?= $demandeEffectuee; ?></span>
<?php else: ?>
<span class="badge bg-warning text-dark"><?= $demandeEffectuee; ?></span>
<?php endif; ?>
</td>
<td class="text-truncate" style="max-width: 200px;"
data-bs-toggle="tooltip" title="<?= $this->nettoyer($v['motifConsultation']) ?>">
<?= $this->nettoyer($v['motifConsultation']) ?>
</td>
<td class="text-center"><?= dateheureLang($this->nettoyer($v['heureExpiration'], $_SESSION['lang']) ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="8" class="text-center p-4 text-muted">
<div class="alert alert-info mt-3" style="margin-bottom:15px;">
<small>
<i class="fas fa-info-circle me-2"></i>
<?= _("Aucun demande trouvée pour les critères sélectionnés") ?>
</small>
</div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<!-- Affichage mobile (cartes) -->
<div class="d-md-none">
<?php foreach ($demandes as $v):
$idDemande = $this->nettoyer($v['id']);
$numeroDemandeConsultation = $this->nettoyer($v['numeroDemandeConsultation']);
$dateSysteme = $this->nettoyer($v['dateSysteme']);
$effectuee = $this->nettoyer($v['effectuee']);
$prestataire = $this->nettoyer($v['prestataire']);
$specialite = $this->nettoyer($v['specialite']);
if($effectuee=="1"){
if (est_anglophone()){
$demandeEffectuee = "Yes";
}else{
$demandeEffectuee = "Oui";
}
}else{
if (est_anglophone()){
$demandeEffectuee = "No";
}else{
$demandeEffectuee = "Non";
}
}
if (est_anglophone()){
$specialite = $this->nettoyer($v['specialiteEng']);
$etatRdv = $this->nettoyer($v['etatRdvEng']);
}
?>
<div class="card-body py-2">
<div class="row mb-2">
<div class="col-12 mb-2">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small me-3"><?= _("N° RDV") ?></span>
<button type="button"
onClick="javascript:selectionner_demande_consultation('<?= $idDemande ?>');"
class="btn btn-info w-100 py-4 fs-3 fw-bold rounded-3 shadow-sm"
title="Appuyer pour sélectionner un RDV">
<?= $numeroDemandeConsultation ?>
<small class="ms-2 fs-6 text-white-50"><?=_("(Cliquer pour voir plus)")?></small>
</button>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="fw-bold me-2"><?= dateheureLang($dateSysteme, $_SESSION['lang']) ?></span>
</div>
</div>
<div class="col-12">
<div class="d-flex justify-content-between align-items-center">
<span class="fw-bold text-truncate" style="max-width: 300px;"><?= $this->nettoyer($v['beneficiaire'])." (".$this->nettoyer($v['numeroBeneficiaire']).")" ?></span>
</div>
</div>
<div class="col-12 mb-2">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small me-3"><?= _("Prestataire") ?></span>
<span class="fw-bold text-truncate" style="max-width: 150px;">
<?= $prestataire ?>
</span>
</div>
</div>
<div class="col-12 mb-2">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small me-3"><?= _("Spécialité") ?></span>
<span class="fw-bold text-truncate" style="max-width: 120px;">
<?= $specialite ?>
</span>
</div>
</div>
<div class="col-12 mb-2">
<div class="d-flex justify-content-between align-items-center">
<?php if($codeEtatRdv == "1"):?>
<span class="badge bg-success w-100"><?= $demandeEffectuee; ?></span>
<?php else: ?>
<span class="badge bg-danger w-100"><?= $demandeEffectuee; ?></span>
<?php endif; ?>
</div>
</div>
<div class="col-12">
<textarea readonly class="message-text w-100"><?= $this->nettoyer($v['motifConsultation']) ?></textarea>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small me-3"><?= _("Expiration") ?></span>
<span class="fw-bold me-2"> <?= dateheureLang($this->nettoyer($v['heureExpiration'], $_SESSION['lang']) ?> </span>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@ -60,7 +60,9 @@
<!-- Résultats -->
<div id="div_dossiers" class="table-responsive">
<?php
require "Vue/Ajaxdemanderdv/listerdemandesconsultation.php";
?>
</div>
</div>
</div>