diff --git a/Controleur/ControleurRendezvous.php b/Controleur/ControleurRendezvous.php index f5a474f..3a0e24d 100755 --- a/Controleur/ControleurRendezvous.php +++ b/Controleur/ControleurRendezvous.php @@ -30,23 +30,22 @@ class ControleurRendezvous extends Controleur { $prestataires = $this->prestataire->getprestatairerdvmobile(); - /* - var_dump - ( - array - ( - "idDemandeRdv" => $idDemandeRdv, - "benficiaires" => $benficiaires, - "demande" => $demande, - "specialites" => $specialites, - "prestataires" => $prestataires, - ) - ); - exit(); - */ - $this->genererVue(array('benficiaires' => $benficiaires, 'demande' => $demande, 'specialites' => $specialites, 'prestataires' => $prestataires)); } + public function rdvpossible() + { + $codePrestataire= $this->requete->getParametreFormulaire("codePrestataire"); + + $rdvPossible = $this->prestataire->rdvPossible($codePrestataire); + + $this->genererVueAjax + ( + array + ( + 'rdvPossible' => $rdvPossible + ) + ); + } } \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 9d19fda..fbe41fd 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -17988,7 +17988,6 @@ function affichelisteprestataires(libelle) function selectPrestataire(code, libelle, rdvPossible){ nomForm = $("#nomForm").val(); - alert("rdvPossible => "+rdvPossible); $("#searchInputPrestataire").val(libelle); $("#div_selection_prestataire").hide(); $("#codePrestataire").val(code); @@ -18849,3 +18848,26 @@ function afficherhistoriquefactures() }); } + +function selectPrestataireMobile(codePrestataire){ + + donnees = 'codePrestataire='+codePrestataire; + + alert("selectPrestataireMobile => "+donnees); + + $("#div_rdvPossible").html('
' + '' + '
'); + + $.ajax({ + url: $("#racineWeb").val()+"Rendezvous/rdvpossible/", + type : 'post', + data: donnees, + error: function(errorData) { + }, + success: function(data) { + $('#div_test_gabarit').html(data); + $("#div_rdvPossible").html(data); + }, + complete: function() { + } + }); +} diff --git a/Modele/Prestataire.php b/Modele/Prestataire.php index c3ff6e1..5227330 100755 --- a/Modele/Prestataire.php +++ b/Modele/Prestataire.php @@ -400,5 +400,12 @@ class Prestataire extends Modele { return $resultat->fetchAll(PDO::FETCH_ASSOC); } - + + public function rdvPossible($codePrestataire) + { + $sql = 'SELECT fn_rdv_possible(?) AS rdvPossible;'; + $resultat = $this->executerRequete($sql, array($codePrestataire)); + $ligne = $resultat->fetch(PDO::FETCH_ASSOC); + return $ligne['rdvPossible']; + } } \ No newline at end of file diff --git a/Vue/Rendezvous/index.php b/Vue/Rendezvous/index.php index 4ae52d5..ac9ac1a 100755 --- a/Vue/Rendezvous/index.php +++ b/Vue/Rendezvous/index.php @@ -184,7 +184,8 @@
- + +
+ \ No newline at end of file diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 16ea4d7..b14e411 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -548,7 +548,7 @@ - +