Skip to content

Commit

Permalink
Merge pull request Project-Based-Learning-IT#50 from Project-Based-Le…
Browse files Browse the repository at this point in the history
…arning-IT/Sidhant

Scrollbar for doctor and patient's previous appointments
  • Loading branch information
sidhant-khamankar committed Apr 12, 2021
2 parents 95b0765 + 35dda64 commit 53f2dae
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 35 deletions.
41 changes: 24 additions & 17 deletions frontend/src/Doctor/PaymentHistory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from "react";
import Axios from "axios";
import jwt_decode from "jwt-decode";
import Scrollbar from "react-scrollbars-custom";

import Navbar from "../Basic/Navbar";
import "../Dashbaord/dashboard.css";
Expand Down Expand Up @@ -43,31 +44,37 @@ const DocAppointments = () => {
<Leftside />
</div>
<div
className="col-9 col-md-9 p-4"
className="col-9 col-md-9 p-3"
style={{
border: "15px solid yellow ",
height: "80vh",
backgroundColor: "#6c757d",
}}
>
<table className="table table-hover table-dark">
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Patient Name</th>
</tr>
</thead>
<tbody>
{Appointments.map((Appointment) => (
<Scrollbar
noScrollX
style={{ position: "", height: "73vh", width: "150vh" }}
className="col-12 col-md-12"
>
<table className="table table-hover table-dark">
<thead>
<tr>
<th scope="row">{Appointment.date}</th>
<th scope="row">{Appointment.slotTime}</th>
<th scope="row">{Appointment.patientName}</th>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Patient Name</th>
</tr>
))}
</tbody>
</table>
</thead>
<tbody>
{Appointments.map((Appointment) => (
<tr>
<th scope="row">{Appointment.date}</th>
<th scope="row">{Appointment.slotTime}</th>
<th scope="row">{Appointment.patientName}</th>
</tr>
))}
</tbody>
</table>
</Scrollbar>
</div>
</div>
</div>
Expand Down
43 changes: 25 additions & 18 deletions frontend/src/Patient/PerviousAppointments.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from "react";
import Axios from "axios";
import jwt_decode from "jwt-decode";
import Scrollbar from "react-scrollbars-custom";

import Navbar from "../Basic/Navbar";
import "../Dashbaord/dashboard.css";
Expand Down Expand Up @@ -40,31 +41,37 @@ const PatientAppointments = () => {
<Leftside />
</div>
<div
className="col-9 col-md-9 p-4"
className="col-9 col-md-9 p-3"
style={{
border: "15px solid yellow ",
height: "80vh",
backgroundColor: "#6c757d",
}}
>
<table className="table table-hover table-dark">
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Doctor Name</th>
</tr>
</thead>
<tbody>
{Appointments.map((Appointment) => (
<tr key={Appointment._id} >
<th scope="row">{Appointment.date}</th>
<th scope="row">{Appointment.slotTime}</th>
<th scope="row">{Appointment.doctorName}</th>
<Scrollbar
noScrollX
style={{ position: "", height: "73vh", width: "150vh" }}
className="col-12 col-md-12"
>
<table className="table table-hover table-dark">
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Doctor Name</th>
</tr>
))}
</tbody>
</table>
</thead>
<tbody>
{Appointments.map((Appointment) => (
<tr key={Appointment._id}>
<th scope="row">{Appointment.date}</th>
<th scope="row">{Appointment.slotTime}</th>
<th scope="row">{Appointment.doctorName}</th>
</tr>
))}
</tbody>
</table>
</Scrollbar>
</div>
</div>
</div>
Expand Down

0 comments on commit 53f2dae

Please sign in to comment.