mirror of
https://github.com/BreizhHardware/ProjetS4COMWEB.git
synced 2026-01-18 16:47:35 +01:00
Pas encore good mais j'avance
This commit is contained in:
@@ -1,48 +1,6 @@
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/search?type=Généraliste&location=35
|
||||
GET http://ajax.yanisrff/src/API/requests.php/api/rdv-praticient?id=1
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/search-postal?postal=44
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/search-type?type=Généraliste
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/rdv-available?id=1
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/rdv-date?date=2024-03-18&id=1
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/search?type=G%C3%A9n%C3%A9raliste&postal=35
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
|
||||
GET http://serveur-projet-s4.felix/src/API/requests.php/api/praticien?id=1
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
|
||||
PUT http://serveur-projet-s4.felix/src/API/requests.php/api/rdv
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
rdv_id = 46792 &
|
||||
patient_id = 1
|
||||
|
||||
###
|
||||
|
||||
PUT http://serveur-projet-s4.felix/src/API/requests.php/api/requests
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
test = "coucou"
|
||||
|
||||
###
|
||||
|
||||
POST http://serveur-projet-s4.felix/src/API/requests.php/api/requests
|
||||
|
||||
@@ -1,48 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title> RDV </title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Just+Me+Again+Down+Here&family=Open+Sans&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="src/css/styles.css">
|
||||
<link rel="icon" href="src/img/favicon.png" type="image/x-icon"/>
|
||||
<?php
|
||||
require('src/php/db/dbconnect.php');
|
||||
require('src/php/constants.php');
|
||||
require('src/php/db/Login.php');
|
||||
require('src/php/components/check.php');
|
||||
require('src/php/components/token.php');
|
||||
require('src/php/components/user-login.php');
|
||||
require('src/php/db/Medecin.php');
|
||||
require('src/php/db/Patient.php');
|
||||
require('src/php/db/Rdv-praticien.php');
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
$pdo = dbConnect();
|
||||
session_start();
|
||||
checkMedecin();
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="topbar" class="d-flex justify-content-between flex-row">
|
||||
<div>
|
||||
<a href="index.php">
|
||||
<p id="DoctISEN" class="top-0">
|
||||
Doct'ISEN
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="d-flex flex-row align-items-center gap-3 me-2">
|
||||
<div class="d-flex flex-row align-items-center gap-3 me-2">
|
||||
<?php
|
||||
loginUI($pdo);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-100">
|
||||
<div class="d-flex flex-row flex-wrap my-5 mx-5 gap-5 justify-content-center text-center">
|
||||
|
||||
|
||||
@@ -333,6 +333,7 @@ function DisplayRDVPraticient(rdv){
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < count; i++){
|
||||
date = Date(rdv[i].rdv_date).toDateString();
|
||||
if (rdv[i].p_mail !== "null")
|
||||
$('#content').append('' +
|
||||
'<div class="card rounded-4 mx-2 pointer">' +
|
||||
@@ -366,7 +367,7 @@ function DisplayRDVPraticient(rdv){
|
||||
|
||||
function ButtonShowRdvPraticient() {
|
||||
try {
|
||||
document.getElementById("CalendarPraticient").addEventListener("click", function () {
|
||||
document.getElementById("PraticientCalendar").addEventListener("click", function () {
|
||||
ajaxRequest('GET', "src/API/requests.php/api/rdv-praticient?id=" + 1, function (data) {
|
||||
DisplayRDVPraticient(data);
|
||||
});
|
||||
@@ -378,6 +379,32 @@ function ButtonShowRdvPraticient() {
|
||||
}
|
||||
}
|
||||
|
||||
function DisplayRDVPatient(rdv){
|
||||
$rdvPatient = rdv[0];
|
||||
$lieux = rdv[1];
|
||||
|
||||
let count = $rdvPatient.length;
|
||||
$('#content').empty();
|
||||
$('#content').html('<div class="h-100"> <div class="row"> <div class="col-3 border-end border-dark border-3 h-100 mt-2 text-center d-flex flex-column justify-content-center"> <div class="d-flex flex-column"> <div class="border-bottom pb-3 border-dark border-3 align-self-center"> <h5 class="text-center">Vos rendez-vous à venir</h5>');
|
||||
if(count === 0){
|
||||
$('#content').append('<h1>Bienvenue sur Doct\'ISEN, veuillez prendre un rendez-vous en allant à l\'acceuil et en recherchant un praticient!</h1>');
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < count; i++){
|
||||
if($rdvPatient !== "null")
|
||||
$('#content').append('' +
|
||||
'<div class="card rounded-4 mx-2 pointer">' +
|
||||
'<div class="card-header bg-danger">' +
|
||||
'<div class="d-flex flex-row justify-content-between text-white">' +
|
||||
'<p>' + $rdvPatient[i].rdv_date + '</p>' +
|
||||
'<p>' + $rdvPatient[i].rdv_time + '</p>' +
|
||||
'</div>' + '</div>' +
|
||||
'<div class="card-body">' +
|
||||
'<h5 class="card-title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//End Call
|
||||
|
||||
Reference in New Issue
Block a user