a
This commit is contained in:
parent
1d1308f784
commit
eda0bc8fdf
52
Controleur/ControleurAjaxdemanderdv.php
Normal file
52
Controleur/ControleurAjaxdemanderdv.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Rendezvous.php';
|
||||
|
||||
class ControleurAjaxdemanderdv extends Controleur {
|
||||
private $rendezvous;
|
||||
|
||||
public function __construct() {
|
||||
$this->rendezvous = new Rendezvous();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$d1 = $this->requete->getParametreDate("d1");
|
||||
$d2 = $this->requete->getParametreDate("d2");
|
||||
$codeEtatRdv = $this->requete->getParametreFormulaire("codeEtatRdv");
|
||||
|
||||
$_SESSION['codeEtatRdv'] = $codeEtatRdv;
|
||||
|
||||
$demandes = $this->rendezvous->getPrisesRdv($d1, $d2, $codeEtatRdv);
|
||||
|
||||
$this->genererVueAjax(array('demandes' => $demandes));
|
||||
}
|
||||
|
||||
|
||||
public function selectionner()
|
||||
{
|
||||
$idDemande = $this->requete->getParametreFormulaire("idDemande");
|
||||
|
||||
$_SESSION['idDemandeRdv'] = $idDemande;
|
||||
}
|
||||
|
||||
public function valider()
|
||||
{
|
||||
$numeroDemandeRdv = $this->requete->getParametreFormulaire("numeroDemandeRdv");
|
||||
$codeEtatRdv = $this->requete->getParametreFormulaire("codeEtatRdv");
|
||||
|
||||
$motifReponseRdv = $this->requete->getParametreFormulaire("motifReponseRdv");
|
||||
|
||||
|
||||
if($codeEtatRdv=="1"){
|
||||
|
||||
$dateRdvAccordee = $this->requete->getParametreDate("dateRdvAccordee");
|
||||
$heureRdvAccordee = $this->requete->getParametreFormulaire("heureRdvAccordee");
|
||||
|
||||
//var_dump($numeroDemandeRdv, $codeEtatRdv, $motifReponseRdv, $dateRdvAccordee, $heureRdvAccordee); die();
|
||||
$this->rendezvous->accorderrdv($numeroDemandeRdv, $dateRdvAccordee, $heureRdvAccordee, $motifReponseRdv);
|
||||
}else{
|
||||
$this->rendezvous->refuserrdv($numeroDemandeRdv, $motifReponseRdv);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Controleur/ControleurHistoriquerdv.php
Normal file
31
Controleur/ControleurHistoriquerdv.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Rendezvous.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
class ControleurHistoriquerdv extends Controleur {
|
||||
private $menuvue;
|
||||
private $rendezvous;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue('Historiquerdv');
|
||||
|
||||
$this->rendezvous = new Rendezvous();
|
||||
|
||||
$_SESSION['idDemandeRdv'] = '0';
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$d1 = $_SESSION['p_debutMois_C'];
|
||||
$d2 = date('Y-m-d');
|
||||
$codeEtatRdv = $_SESSION['codeEtatRdv'] ?? "";
|
||||
|
||||
$demandes = $this->rendezvous->getPrisesRdv($d1, $d2, $codeEtatRdv);
|
||||
|
||||
$reponsedemande = $this->rendezvous->getEtatRdv();
|
||||
|
||||
$this->genererVue(array('demandes' => $demandes, 'reponsedemande' => $reponsedemande));
|
||||
}
|
||||
}
|
||||
63
Vue/Ajaxdemanderdv/index.php
Normal file
63
Vue/Ajaxdemanderdv/index.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style='text-align:center' width="8%"> <?= _("N° RDV") ?> </th>
|
||||
<th rowspan="2" style='text-align:center' width="10%"> Date </th>
|
||||
<th rowspan="2" colspan="2" style='text-align:center' width="30%"> <?= _("Bénéficiaire") ?> </th>
|
||||
|
||||
<th rowspan="2"> <?= _("Prestataire") ?> </th>
|
||||
<th rowspan="2"> <?= _("Spécialité") ?> </th>
|
||||
|
||||
<th colspan="2" style='text-align:center'> <?= _("Répondu") ?> </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style='text-align:center'> <?= _("Etat") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Motif") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($demandes as $v):
|
||||
$idDemande = $this->nettoyer($v['id']);
|
||||
$numeroDemandeRdv = $this->nettoyer($v['numeroDemandeRdv']);
|
||||
$dateSysteme = $this->nettoyer($v['dateSysteme']);
|
||||
|
||||
$codeEtatRdv = $this->nettoyer($v['codeEtatRdv']);
|
||||
|
||||
$prestataire = $this->nettoyer($v['prestataire']);
|
||||
$specialite = $this->nettoyer($v['specialite']);
|
||||
$etatRdv = $this->nettoyer($v['etatRdv']);
|
||||
|
||||
if (est_anglophone()){
|
||||
$specialite = $this->nettoyer($v['specialiteEng']);
|
||||
$etatRdv = $this->nettoyer($v['etatRdvEng']);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align="center">
|
||||
<input class="form-control btn btn-primary" type="button" value="<?= $numeroDemandeRdv ?>"
|
||||
onClick="javascript:selectionner_rdv('<?= $idDemande ?>');">
|
||||
</td>
|
||||
<td align='center'><?= dateheureLang($dateSysteme, $_SESSION['p_lang']) ?></td>
|
||||
<td align='center' width="10%"><?= $this->nettoyer($v['numeroBeneficiaire']) ?></td>
|
||||
<td ><?= $this->nettoyer($v['beneficiaire']) ?></td>
|
||||
|
||||
<td><?= $prestataire ?></td>
|
||||
<td><?= $specialite ?></td>
|
||||
|
||||
<td align='center' width="10%">
|
||||
<?php if($codeEtatRdv == "1"):?>
|
||||
<span class="badge bg-success"><?= $etatRdv; ?></span>
|
||||
<?php elseif($codeEtatRdv == "0"): ?>
|
||||
<span class="badge bg-warning text-dark"><?= $etatRdv; ?></span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-danger"><?= $etatRdv; ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td align='center'><?= $this->nettoyer($v['motifReponseRdv']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
96
Vue/Historiquerdv/index.php
Normal file
96
Vue/Historiquerdv/index.php
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
$this->titre = "Intersanté - Historique prises Rendez-vous";
|
||||
|
||||
$codeEtatRdv = $_SESSION['codeEtatRdv'] ?? "";
|
||||
?>
|
||||
|
||||
<legend> <?= _("Historique des prises de rendez-vous") ?> </legend>
|
||||
|
||||
<input class="sr-only" id="nomForm" name="nomForm" value="histordv">
|
||||
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="10%" class="required"> <?= _("Période du") ?> </td>
|
||||
<td width="20%" ><INPUT style='text-align:center; font-size:10pt;' class="form-control datepicker" TYPE="text" id="d1" NAME="d1" value="<?= dateLang($_SESSION['p_debutMois_C'], $_SESSION['p_lang']) ?>" required></td>
|
||||
|
||||
<td width="10%" align="center" class="required"> <?= _("au") ?> </td>
|
||||
<td width="20%" ><INPUT style='text-align:center; font-size:10pt;' class="form-control datepicker" TYPE="text" id="d2" NAME="d2" value="<?= dateCouranteLang($_SESSION['p_lang'], $_SESSION['p_lang']) ?>" required></td>
|
||||
|
||||
<td width="5%" align="center"> <?= _("Etat") ?> </td>
|
||||
<td>
|
||||
<select class="form-select" id="codeEtatRdv" NAME="codeEtatRdv" style='font-size:10pt;'>
|
||||
<?php liste_options_consultation($reponsedemande, $codeEtatRdv); ?>
|
||||
</SELECT>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:listerrdv();"><?= _("Actualiser") ?>...</button> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="div_dossiers">
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" style='text-align:center' width="5%"> <?= _("N° RDV") ?> </th>
|
||||
<th rowspan="2" style='text-align:center' width="10%"> Date </th>
|
||||
<th rowspan="2" colspan="2" style='text-align:center' width="30%"> <?= _("Bénéficiaire") ?> </th>
|
||||
|
||||
<th rowspan="2"> <?= _("Prestataire") ?> </th>
|
||||
<th rowspan="2"> <?= _("Spécialité") ?> </th>
|
||||
|
||||
<th colspan="2" style='text-align:center'> <?= _("Répondu") ?> </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style='text-align:center'> <?= _("Etat") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Motif") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($demandes as $v):
|
||||
$idDemande = $this->nettoyer($v['id']);
|
||||
$numeroDemandeRdv = $this->nettoyer($v['numeroDemandeRdv']);
|
||||
$dateSysteme = $this->nettoyer($v['dateSysteme']);
|
||||
|
||||
$codeEtatRdv = $this->nettoyer($v['codeEtatRdv']);
|
||||
|
||||
$prestataire = $this->nettoyer($v['prestataire']);
|
||||
$specialite = $this->nettoyer($v['specialite']);
|
||||
$etatRdv = $this->nettoyer($v['etatRdv']);
|
||||
|
||||
if (est_anglophone()){
|
||||
$specialite = $this->nettoyer($v['specialiteEng']);
|
||||
$etatRdv = $this->nettoyer($v['etatRdvEng']);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align="center">
|
||||
<input class="form-control btn btn-primary" type="button" value="<?= $numeroDemandeRdv ?>"
|
||||
onClick="javascript:selectionner_rdv('<?= $idDemande ?>');">
|
||||
</td>
|
||||
<td align='center'><?= dateheureLang($dateSysteme, $_SESSION['p_lang']) ?></td>
|
||||
<td align='center' width="8%"><?= $this->nettoyer($v['numeroBeneficiaire']) ?></td>
|
||||
<td ><?= $this->nettoyer($v['beneficiaire']) ?></td>
|
||||
|
||||
<td><?= $prestataire ?></td>
|
||||
<td><?= $specialite ?></td>
|
||||
|
||||
<td align='center' width="8%">
|
||||
<?php if($codeEtatRdv == "1"):?>
|
||||
<span class="badge bg-success"><?= $etatRdv; ?></span>
|
||||
<?php elseif($codeEtatRdv == "0"): ?>
|
||||
<span class="badge bg-warning text-dark"><?= $etatRdv; ?></span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-danger"><?= $etatRdv; ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td align='center'><?= $this->nettoyer($v['motifReponseRdv']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user