Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ app.use("/pharmacist", pharmacistRoute);
app.use("/admin/appointment", appointmentRoute); //going to admin/apponitmentRoute
app.use("/insurer", insurerRoute);
app.use("/payment", paymentRoute);
app.use(
mongoSanitize({
replaceWith: "_",
})
);
// app.use(
// mongoSanitize({
// replaceWith: "_",
// })
// );
app.get("/", (req, res) => {
res.render("home");
});
Expand Down
212 changes: 106 additions & 106 deletions build/contracts/PrescriptionAndDiagnosisCard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion controllers/adminAppointmentControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@ module.exports.deleteAppointment = async (req, res) => {
console.error(error);
return res.status(500).json({ message: "Internal server error" });
}
};
};
2 changes: 1 addition & 1 deletion controllers/patientControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,4 @@ module.exports.makeTheAppointment = async (req, res) => {
newAppointmentPatient.save();

res.redirect(`/patient/${patientId}`);
};
};
4 changes: 2 additions & 2 deletions public/stylesheets/admin/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ body, h1, h2, ul, li {
}

.scrollable-div{
max-height: 60vh;
max-height: 55vh;
overflow-y: auto;
}
.scrollable-div-topDoc{
max-height:28vh;
max-height:35vh;
overflow-y: auto;
}

Expand Down
7 changes: 3 additions & 4 deletions views/admin/appointment.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@
<a href="/admin/appointment/<%=pastAppointment._id%>" class="btn btn-primary">Edit</a>
</span>
<span>
<a href="/admin/appointment/<%= pastAppointment._id %>" class="btn btn-danger"
data-action="delete">Delete</a>
<a href="/admin/appointment/<%= pastAppointment._id %>" class="btn btn-danger" data-action="delete">Delete</a>
</span>
</td>
</tr>
Expand Down Expand Up @@ -212,8 +211,8 @@
});

if (response.ok) {
// Handle success (e.g., remove the appointment from the UI)
button.parentElement.parentElement.remove();
const appointmentRow = button.closest('tr');
appointmentRow.remove();
} else {
// Handle error (e.g., display an error message)
console.error('Failed to delete appointment');
Expand Down
5 changes: 3 additions & 2 deletions views/admin/patient.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@

<!-- use for render Patient -->
<section>
<div style="text-align: center;" class="scrollable-div m-3">
<div style="text-align: center;" class="m-3">
<h1>Patients Information</h1>

<div class="scrollable-div ">
<% if (patients && patients.length) { %>
<table class="table">
<thead>
Expand Down Expand Up @@ -259,6 +259,7 @@
<% } else { %>
<p>No patients found.</p>
<% } %>
</div>
</div>
</section>

Expand Down
12 changes: 6 additions & 6 deletions views/admin/pharmacist/pharmacist.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@
<div class="mb-3">
<label for="contactNumber" class="form-label">Contact Number:</label>
<input type="text" id="contactNumber" class="form-control" name="pharmacist[contactNumber]"
required><br>
required>
</div>

<label for="email" class="form-label">Email:</label>
<input type="email" id="email" class="form-control" name="pharmacist[email]" required><br>

</div>
<div class="col-5">

<label for="number" class="form-label">Number Of Address :</label>
<input type="number" id="number" class="form-control" name="pharmacist[address][number]"><br>


</div>

<div class="col-5">
<label for="street" class="form-label">Street:</label>
<input type="text" id="street" class="form-control" name="pharmacist[address][street]"><br>

Expand All @@ -114,7 +114,7 @@
<input type="text" id="pharmacistLicenseNumber" class="form-control"
name="pharmacist[pharmacistLicenseNumber]" required><br>

<br>


<div class="mb-3">
<button type="submit" class="btn btn-primary form-control">Register</button>
Expand Down
77 changes: 42 additions & 35 deletions views/doctor/show.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,49 @@
</div>
</section>

<section>
<div style="text-align: center" class="m-3">
<% if (patients && patients.length) { %>
<table class="table">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Date Of Birth</th>
<th>Gender</th>
<th></th>
</tr>
</thead>
<tbody>
<% for (let patient of patients) { %>
<tr class="table-row-style">
<td><%= patient.firstName %></td>
<td><%= patient.lastName %></td>
<td><%= patient.email %></td>
<td><%= patient.dateOfBirth %></td>
<td><%= patient.gender %></td>
<td>
<a
href="/doctor/<%= doctor.id %>/patients/<%= patient._id %>"
class="btn btn-primary"
>View Patient Details</a
>
</td>
</tr>
<section>
<div style="text-align: center;" class="m-3">
<div class="container">
<% if (patients && patients.length) { %>
<table class="table">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Date Of Birth</th>
<th>Gender</th>
<th></th>
</tr>
</thead>
<tbody>
<% for (let patient of patients) { %>
<tr class="table-row-style">
<td>
<%= patient.firstName %>
</td>
<td>
<%= patient.lastName %>
</td>
<td>
<%= patient.email %>
</td>
<td>
<%= patient._id %>
</td>
<td>
<%= patient.gender %>
</td>
<td><a href="/doctor/<%= doctor.id %>/patients/<%= patient._id %>" class="btn btn-primary">View Patient
Details</a></td>
</tr>
<% } %>
</tbody>
</table>
<% } %>
</tbody>
</table>
<% } %>
</div>
</section>
</div>
</div>
</section>

<!-- Future Appointments -->
<section>
Expand Down
8 changes: 4 additions & 4 deletions views/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@

<div class="col-lg-3 col-md-6 mt-5 mt-md-0">
<div class="count-box">
<i class="far fa-hospital"></i>
<i class="fas fa-users"></i>
<span data-purecounter-start="0" data-purecounter-end="18" data-purecounter-duration="1"
class="purecounter"></span>
<p>Medical Centres</p>
<p>Patients</p>
</div>
</div>

Expand All @@ -208,7 +208,7 @@
<i class="fas fa-flask"></i>
<span data-purecounter-start="0" data-purecounter-end="12" data-purecounter-duration="1"
class="purecounter"></span>
<p>Research Labs</p>
<p>Pharmacists</p>
</div>
</div>

Expand All @@ -217,7 +217,7 @@
<i class="fas fa-award"></i>
<span data-purecounter-start="0" data-purecounter-end="150" data-purecounter-duration="1"
class="purecounter"></span>
<p>Awards</p>
<p>Insurence</p>
</div>
</div>

Expand Down
5 changes: 2 additions & 3 deletions views/layouts/doctorboilerplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@
</div>
</div>

<a href="/logout" class="btn btn-danger">Logout</a>
<a href="/reset-password" class="btn btn-warning scrollto m-3 btn-text">Reset Password</a>

<a href="/reset-password" class="btn btn-primary scrollto m-3 btn-text" style="white-space: nowrap;">Reset Password</a>
<a href="/logout" class="btn btn-danger">Logout</a>
</div>
</header>

Expand Down
2 changes: 1 addition & 1 deletion views/layouts/logingboilerplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div id="topbar" class="d-flex align-items-center fixed-top">
<div class="container d-flex justify-content-between">
<div class="contact-info d-flex align-items-center">
<i class="bi bi-envelope"></i> <a href="medilab@medilab.com">madilab@madilab.com</a>
<i class="bi bi-envelope"></i> <a href="medilab@medilab.com">medilab@medilab.com</a>
<i class="bi bi-phone"></i> 075 5898 554
</div>
<div class="d-none d-lg-flex social-links align-items-center">
Expand Down
6 changes: 3 additions & 3 deletions views/layouts/patientboilerplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div id="topbar" class="d-flex align-items-center fixed-top">
<div class="container d-flex justify-content-between">
<div class="contact-info d-flex align-items-center">
<i class="bi bi-envelope"></i> <a href="mailto:contact@example.com">matlab@matlab.com</a>
<i class="bi bi-envelope"></i> <a href="mailto:contact@example.com">medilab@medilab.com</a>
<i class="bi bi-phone"></i> 075 5898 554
</div>
<div class="d-none d-lg-flex social-links align-items-center">
Expand Down Expand Up @@ -72,9 +72,9 @@
</div>
</div>
<div class="d-flex align-items-center">
<a href="/reset-password" class="btn btn-primary scrollto m-3" style="white-space: nowrap;">Reset Password</a>
<a href="/logout" class="btn btn-danger scrollto m-3">Logout</a>
<a href="/reset-password" class="btn btn-warning scrollto m-3 btn-text">Reset Password</a>
</div>
</div>
</div>
</header>

Expand Down
6 changes: 4 additions & 2 deletions views/patient/show.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<div class="text-center">
<h2 class="fw-bold text-center">Medical Reports</h2>
</div>
<div>
<div class="text-center">
<div class="container">
<% if (patient && patient.report.length) { %>

Expand Down Expand Up @@ -196,6 +196,7 @@
<div style="text-align: center;" class="mt-n4" >
<h1>Past Appointments</h1>
<br><br>
<div class="container">
<% if (pastAppointments && pastAppointments.length) { %>
<table class="table">
<thead>
Expand Down Expand Up @@ -244,11 +245,12 @@
<p>No Past Appointments</p>
<% } %>
</div>
</div>
</section>

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="/show.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>


15 changes: 3 additions & 12 deletions views/users/reset-password.ejs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Reset</title>
<!-- Include Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<% layout('layouts/logingboilerplate')%>
<section>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-6">
Expand Down Expand Up @@ -63,5 +55,4 @@
}
}
</script>
</body>
</html>
</section>