<% if @reservation.sales_agreement.present? %> <%= link_to "View Sales Agreement", rails_blob_url(@reservation.sales_agreement.document, disposition: "attachment"), class: "btn btn-primary rounded-pill px-4 py-2 shadow-sm" %> <% else %> <%= link_to "Preview Agreement", preview_agent_portal_reservation_path(@reservation), class: "btn btn-outline-primary rounded-pill px-4 py-2 shadow-sm" %> <% end %> <% if @reservation.approved? %> <%= button_to "Cancel Reservation", cancel_agent_portal_reservation_path(@reservation), method: :patch, data: { turbo: false, turbo_confirm: "Are you sure you want to cancel this reservation?" }, class: "btn btn-danger rounded-pill px-4 py-2 shadow-sm" %> <% end %>

Reservation Details

Reservation Number:
<%= @reservation.reservation_number %>
Property:
<%= @reservation.property&.property_number %>
Customer:
<%= @reservation.customer&.firstname %>
Agent:
<%= @reservation.created_by&.full_name || "N/A" %>
Status:
<% case @reservation.status %> <% when "pending" %> Pending <% when "approved" %> Approved <% when "sold" %> Sold <% when "expired" %> Expired <% when "cancelled" %> Cancelled <% end %>
Expires At:
<%= @reservation.expires_at.in_time_zone(current_user.timezone).strftime("%d-%b-%Y %H:%M") %>
Notes:
<%= @reservation.notes.presence || "N/A" %>
<%= link_to "Back to My Reservations", agent_portal_reservations_path, class: "btn btn-outline-primary rounded-pill px-4 py-2 shadow-sm" %>