diff --git a/frontend/src/AdminPanel/Bookings.js b/frontend/src/AdminPanel/Bookings.js
index 2bbf23a8..9ab02879 100644
--- a/frontend/src/AdminPanel/Bookings.js
+++ b/frontend/src/AdminPanel/Bookings.js
@@ -68,17 +68,18 @@ class Bookings extends Component {
if (this.props.reservationData.length > 0) {
for (const [index, reservation] of this.props.reservationData.entries()) {
reservations.push(
-
- Name: {reservation.name}
- Start time: {reservation.startTime}
- Start time of day: {reservation.start_time_of_day}
- End date: {reservation.endTime}
- End time of day: {reservation.end_time_of_day}
- Email: {reservation.email}
-
-
-
-
+
+ {reservation.name} |
+ {reservation.model} |
+ {reservation.startTime.slice(0,10)} |
+ {reservation.start_time_of_day} |
+ {reservation.endTime.slice(0,10)} |
+ {reservation.end_time_of_day} |
+ {reservation.email} |
+
+
+ |
+
)
}
} else {
@@ -89,15 +90,15 @@ class Bookings extends Component {
if (this.props.bookingData && this.props.bookingData.length > 0) {
for (const booking of this.props.bookingData) {
bookings.push(
-
-
- Car: {booking.Vehicle.Vin}
- Reserved by: {booking.User.Name}
- Checked out: {booking.startTime}
- Returned: {booking.endTime}
- Odometer: {Math.floor(booking.Vehicle.Odometer * 0.000621371)} miles
- Health: {booking.health}
-
+
+ this.onClickBooking(booking)}>{booking.Id} |
+ {booking.Vehicle.Vin} |
+ {booking.User.Name} |
+ {booking.startTime} |
+ {booking.endTime} |
+ {Math.floor(booking.Vehicle.Odometer * 0.000621371)} miles |
+ {booking.health} |
+
)
}
} else {
@@ -107,13 +108,36 @@ class Bookings extends Component {
return (
<>
Booking requests
-
+
+
+ Name |
+ Model |
+ Start time: |
+ Start ToD: |
+ End time: |
+ End ToD: |
+ Email: |
+ Action: |
+
+
+ {reservations}
+
+
Booking history
-
+
+
+ ID |
+ Car |
+ Reserved by: |
+ Checked out: |
+ Returned: |
+ Odometer: |
+ Health: |
+
+
{bookings}
-
+
+
>
)
}
diff --git a/frontend/src/AdminPanel/index.js b/frontend/src/AdminPanel/index.js
index 7b78d51b..dd8d03c1 100644
--- a/frontend/src/AdminPanel/index.js
+++ b/frontend/src/AdminPanel/index.js
@@ -37,7 +37,11 @@ class AdminPanel extends Component {
showContent = () => {
if (this.state.contentToDisplay === "bookings") {
- return ()
+ return (
+
+
+
+ )
} else if (this.state.contentToDisplay === "vehicles") {
return ()
} else if (this.state.contentToDisplay === "users") {