File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 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>
Original file line number Diff line number Diff line change 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>
2929 < % }if (! bookings){ % >
3030 No Bookings Found!
3131 < % } %>
32- %> -->
32+ %>
3333</div >
3434</body >
3535<% - include (' ../partials/footer.ejs' ) %>
You can’t perform that action at this time.
0 commit comments