diff --git a/app/views/admin/bus_bookings/reserve.html.erb b/app/views/admin/bus_bookings/reserve.html.erb index c37cca1..30ae531 100644 --- a/app/views/admin/bus_bookings/reserve.html.erb +++ b/app/views/admin/bus_bookings/reserve.html.erb @@ -27,7 +27,9 @@ - <%= t("bus_booking.cancel_reservation") %> + <% if ((@bus.departure_time - 1.hour) > Time.now rescue true) %> + <%= t("bus_booking.cancel_reservation") %> + <% end %> <% else %> <%= form_for @bus_booking, url: "/admin/bus_bookings/bookbus", html: {class: "form-horizontal main-forms"} do |f|%>