-
Notifications
You must be signed in to change notification settings - Fork 2
/
appointment.js
29 lines (25 loc) · 1.37 KB
/
appointment.js
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
let conf = new URLSearchParams(location.search);
const name = conf.get('name')
const phone = conf.get('phone')
const file_case = conf.get('file_case')
const date = conf.get('date')
const slot = conf.get('slot')
document.getElementById("name").innerHTML = name === "" ? "xyz" : name;
document.getElementById("phone").innerHTML = phone === "" ? "1234567890" : phone;
document.getElementById("case").innerHTML = file_case === "" ? "Newcase" : file_case;
document.getElementById("date").innerHTML = date === "" ? "01/01/2021" : date;
document.getElementById("time").innerHTML = slot === "" ? "5PM - 5:30PM" : slot;
function sendMail(params){
emailjs.send("service_u8rx2xh","template_r8ey57d",{
patient_name: name,
patient_number: phone,
case: file_case,
appointment_date: date,
time_slot: slot,
})
swal({
title: "Appointment Status",
text: "SUCCESS! Your Appointment has been successfully booked. Please reach the hospital within the appointed time. To check waiting status, contact +91 9408218912",
button: "Exit"
});
}