Show Property
<%= if @live_action in [:edit] do %>
<%= live_modal @socket, RealEstateWeb.PropertyLive.FormComponent,
id: @property.id,
title: @page_title,
action: @live_action,
property: @property,
return_to: Routes.property_show_path(@socket, :show, @property) %>
<% end %>
-
Name:
<%= @property.name %>
-
Price:
<%= @property.price %>
-
Description:
<%= @property.description %>
<%= if Roles.can?(@current_user, @property, :edit) do %>
<%= live_patch "Edit", to: Routes.property_show_path(@socket, :edit, @property), class: "button" %>
<% end %>
<%= if Roles.can?(@current_user, @property, :index) do %>
<%= live_redirect "Back", to: Routes.property_index_path(@socket, :index) %>
<% end %>