forked from BrahimiRayan/Shifa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreserverP.ejs
145 lines (135 loc) · 4.91 KB
/
reserverP.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
integrity="correct-integrity-value"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="/css/patient.css" />
<link rel="stylesheet" href="/css/patientReserve.css" />
<title>shifa</title>
</head>
<body>
<div class="liner">
<aside>
<div class="user">
<img src="/iconsP/icons8-user-50.png" alt="User image">
<div>
<h2><%= nom %> <%= prenom %></h2>
<p><%= email.substring(0, 20) + '...' %></p>
</div>
</div>
<ul class="UL_aside">
<a href="/patient/accueil"><li><img src="/iconsP/icons8-dashboard-layout-48.png" alt="">Accueil</li></a>
<a href="/patient/reserver"><li><img src="/iconsP/icons8-reservation-50.png" alt="">Réserver</li></a>
<a href="/patient/myreservations"><li><img src="/iconsP/icons8-bookmark-48.png" alt="">Mes Réservations</li></a>
<a href="/patient/Settings"><li><img src="/iconsP/icons8-settings-50.png" alt="">Settings</li></a>
</ul>
<form action="/logout" method="post">
<button type="submit" class="Logout"><i class="fas fa-power-off"></i> <p>Logout</p></button>
</form>
<div class="spacer"></div>
</aside>
<main>
<header>
<h2>Réserver</h2>
</header>
<div class="Codeholder">
<div class="informations_services">
<section class="section_logo">
<h1 class="logo">Shifa logo</h1>
<span>votre sante en ligne</span>
</section>
<div class="paragraphes">
<p class="p1">Sélectionnez un service que vous souhaitez consulter !</p>
<p class="p2">
</p>
</div>
</div>
<div class="services">
<div class="service service1">
<p>Ophtalmologie</p>
<div></div>
</div>
<div class="service service2">
<p>Cardiologie</p>
<div></div>
</div>
<div class="service service3">
<p>Orthopédie</p>
<div></div>
</div>
<div class="service service4">
<p>Radiologie</p>
<div></div>
</div>
<div class="service service5">
<p>Pédiatrie</p>
<div></div>
</div>
<div class="service service6">
<p>Consultation générale</p>
<div></div>
</div>
<div class="service service7">
<p>Neurologie</p>
<div></div>
</div>
<div class="service service8">
<p>Dermatologie</p>
<div></div>
</div>
<div class="service service9">
<p>Odontologie</p>
<div></div>
</div>
<div class="service service10">
<p>Psychiatrie</p>
<div></div>
</div>
</div>
<form action="/patient/reserver" method="post" >
<input type="hidden" id="hiddenserv" name="hiddenserv">
<button class="btn" type="submit">
choisir une date
<div></div>
</button>
</form>
<div class="separator"></div>
</div>
</main>
</div>
<script>
const hiddenDate = document.getElementById("hiddenserv")
const services = document.getElementsByClassName("services")[0];
services.addEventListener("click", (e) => {
var target = e.target;
if (
target.classList.contains("service") ||
target.parentElement.classList.contains("service")
) {
for (let i = 0; i < services.children.length; i++) {
if (services.children[i].classList.contains("service_checked")) {
services.children[i].classList.remove("service_checked");
}
}
if (target.parentElement.classList.contains("service")) {
target = target.parentElement;
}
target.classList.toggle("service_checked");
}
if(target.classList.contains("service")){
hiddenDate.value = target.textContent.trim()
console.log(hiddenDate.value);
}else if( target.parentElement.classList.contains("service")){
hiddenDate.value = target.parentElement.textContent.trim()
console.log(hiddenDate.value);
}
});
</script>
</body>
</html>