cannot cancel ticket before one hour of departure
This commit is contained in:
parent
19f8dac642
commit
95945ed3cb
|
@ -27,7 +27,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<% if ((@bus.departure_time - 1.hour) > Time.now rescue true) %>
|
||||||
<a href="<%= admin_bus_booking_cancel_path(booking) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?"><%= t("bus_booking.cancel_reservation") %></a>
|
<a href="<%= admin_bus_booking_cancel_path(booking) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?"><%= t("bus_booking.cancel_reservation") %></a>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= form_for @bus_booking, url: "/admin/bus_bookings/bookbus", html: {class: "form-horizontal main-forms"} do |f|%>
|
<%= form_for @bus_booking, url: "/admin/bus_bookings/bookbus", html: {class: "form-horizontal main-forms"} do |f|%>
|
||||||
|
|
Loading…
Reference in New Issue