<.back_to_link
navigate={~p"/admin/dashboard"}
value="Back to Dashboard"
/>
<%!-- Title and stats --%>
<%!-- Filters --%>
<%= if @pending_page.count == 0 && @history_page.count == 0 do %>
Manage Bookings
Review reservations and booking history. Pending requests require approval.
Pending
{@pending_page.count}
<.icon name="hero-inbox" class="w-16 h-16 text-slate-400 mx-auto mb-4" />
<% end %>
<%!-- Pending Bookings Table --%>
<%= if @pending_page.count > 0 do %>
<.bookings_table
title="Pending Requests"
bookings={@pending_page.results}
page={@pending_page}
current_page={@pending_page_number}
event_prefix="pending"
expanded_booking_ids={@expanded_booking_ids}
show_actions={true}
show_cancellation_details={false}
/>
<% end %>
<%!-- Past Bookings Table --%>
<%= if @history_page.count > 0 do %>
<.bookings_table
title="Booking History"
bookings={@history_page.results}
page={@history_page}
current_page={@history_page_number}
event_prefix="history"
expanded_booking_ids={@expanded_booking_ids}
show_actions={false}
show_cancellation_details={true}
/>
<% end %>
No bookings found