From bac24293392d1ec8bbdb0d5854091c96f210c3bd Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sat, 4 Apr 2026 10:30:44 +0000 Subject: [PATCH] a --- Controleur/ControleurAjaxdemanderdv.php | 11 ++++++ .../ControleurConsultationsinitiees.php | 7 +--- Js/fonctions.js | 38 ++++++++++++++++--- Modele/Rendezvous.php | 9 +++++ Vue/Consultationsinitiees/index.php | 20 +++------- Vue/gabarit.php | 2 +- 6 files changed, 60 insertions(+), 27 deletions(-) diff --git a/Controleur/ControleurAjaxdemanderdv.php b/Controleur/ControleurAjaxdemanderdv.php index 6a35993..cf226a3 100755 --- a/Controleur/ControleurAjaxdemanderdv.php +++ b/Controleur/ControleurAjaxdemanderdv.php @@ -71,4 +71,15 @@ class ControleurAjaxdemanderdv extends Controleur { var_dump(array("idDemandeConsultation" => $_SESSION['idDemandeConsultation'])); } + public function listerdemandesconsultation() + { + $idAdherent = $_SESSION['idAdherent_C']; + $d1 = $this->requete->getParametreDate("d1"); + $d2 = $this->requete->getParametreDate("d2"); + + $demandes = $this->rendezvous->getDemandesConsultation($idAdherent, $d1, $d2); + + $this->genererVueAjax(array('demandes' => $demandes)); + } + } \ No newline at end of file diff --git a/Controleur/ControleurConsultationsinitiees.php b/Controleur/ControleurConsultationsinitiees.php index c2b2e56..ed9a4f8 100755 --- a/Controleur/ControleurConsultationsinitiees.php +++ b/Controleur/ControleurConsultationsinitiees.php @@ -20,13 +20,10 @@ class ControleurConsultationsinitiees extends Controleur { $idAdherent = $_SESSION['idAdherent_C']; $d1 = $_SESSION['debutMois_C']; $d2 = date('Y-m-d'); - $codeEtatRdv = $_SESSION['codeEtatRdv'] ?? ""; - $demandes = $this->rendezvous->getPrisesRdv($idAdherent, $d1, $d2, $codeEtatRdv); + $demandes = $this->rendezvous->getDemandesConsultation($idAdherent, $d1, $d2); - $reponsedemande = $this->rendezvous->getEtatRdv(); - - $this->genererVue(array('demandes' => $demandes, 'reponsedemande' => $reponsedemande)); + $this->genererVue(array('demandes' => $demandes)); } } \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index f86a645..0c404af 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -18899,14 +18899,12 @@ function enregistrer_demande_consultation() error: function(errorData) { }, success: function(data) { - alert(data); - $('#div_test_gabarit').html(data); - + // alert(data); + // $('#div_test_gabarit').html(data); }, complete: function() { historique_demande_consultation(); } - }); } else { @@ -19032,7 +19030,35 @@ function modifier_demande_consultation() function historique_demande_consultation() { - alert("historique_demande_consultation"); - window.location.assign($("#racineWeb" ).val()+"Consultationsinitiees/"); } + + +function listerdemandesconsultation() +{ + alert("listerdemandesconsultation"); + return; + + d1 = $("#d1").val(); + d2 = $("#d2").val(); + + donnees = 'd1='+ d1+'&d2='+d2; + + $("#div_dossiers").html('
' + '' + '
'); + + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxdemanderdv/listerdemandesconsultation/", + type: 'POST', + data: donnees, + error: function(errorData) { + }, + success: function(data) { + // alert(data); + $('#div_dossiers').html(data); + }, + complete: function() { + + } + }); +} diff --git a/Modele/Rendezvous.php b/Modele/Rendezvous.php index d1d5542..1f29105 100755 --- a/Modele/Rendezvous.php +++ b/Modele/Rendezvous.php @@ -105,5 +105,14 @@ class Rendezvous extends Modele { $_SESSION['idDemandeConsultation'] = $resultat['idDemandeConsultation']; } + + public function getDemandesConsultation($idAdherent, $d1, $d2) + { + $sql = 'call sp_a_get_demande_rdv_famille(?, ?, ?, ?)'; + + $resultat = $this->executerRequete($sql, array($idAdherent, $d1, $d2)); + + return $resultat->fetchAll(PDO::FETCH_ASSOC); + } } \ No newline at end of file diff --git a/Vue/Consultationsinitiees/index.php b/Vue/Consultationsinitiees/index.php index 4200bcf..fa9ad90 100755 --- a/Vue/Consultationsinitiees/index.php +++ b/Vue/Consultationsinitiees/index.php @@ -1,23 +1,21 @@ titre = "Intersanté - Historique prises Rendez-vous"; - - $codeEtatRdv = $_SESSION['codeEtatRdv'] ?? ""; + $this->titre = "Intersanté - Historique des demandes de consultation"; ?> -Consultationsinitiees +

- +

- +
@@ -49,18 +47,10 @@ Consultationsinitiees value="" required>
- -
- - -
-
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 3e98e67..033998b 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -522,7 +522,7 @@ - +