Skip to content

Commit 6b1e848

Browse files
committed
small updates in booking and dashboard page
1 parent 6c50edc commit 6b1e848

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

views/users/bookings.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
<h3>Your Bookings:</h3>
1717
<hr>
18-
<% for(let booking of bookings){ if(booking.status==="Completed"){continue;}%>
18+
<% for(let booking of bookings){%>
1919
<b>Status</b>-<%=booking.status%><br>
2020
<b>Start Time</b>-<%=new Date(booking.start_time*1000)%><br>
2121
<b>End Time</b>-<%=new Date(booking.end_time*1000)%><br>
22-
<% if(booking.status!=="Cancelled"){ %>
22+
<% if(booking.status!=="Cancelled" && booking.status!=="Completed"){ %>
2323
<form action="/booking/cancel/<%=booking._id%>" method="POST">
2424
<button type="submit" class="btn btn-danger">Cancel Booking</button>
2525
</form>

views/users/dashboard.ejs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<center><h1>Dashboard</h1>
1515
<h3>Welcome <%=body.name%></h3></center>
1616

17-
<!-- <h3>Your Bookings:</h3>
17+
<h3>Your Current Bookings:</h3>
1818
<hr>
19-
<% for(let booking of bookings){ if(booking.status==="Completed"){continue;}%>
19+
<% for(let booking of bookings){ if(booking.status==="Completed" || booking.status==="Cancelled"){continue;}%>
2020
<b>Status</b>-<%=booking.status%><br>
2121
<b>Start Time</b>-<%=new Date(booking.start_time*1000)%><br>
2222
<b>End Time</b>-<%=new Date(booking.end_time*1000)%><br>
@@ -29,7 +29,7 @@
2929
<% }if(!bookings){ %>
3030
No Bookings Found!
3131
<% } %>
32-
%> -->
32+
%>
3333
</div>
3434
</body>
3535
<%- include('../partials/footer.ejs') %>

0 commit comments

Comments
 (0)