defmodule MvWeb.PropertyLive.Show do use MvWeb, :live_view @impl true def render(assigns) do ~H""" <.header> Property {@property.id} <:subtitle>This is a property record from your database. <:actions> <.button navigate={~p"/properties"}> <.icon name="hero-arrow-left" /> <.button variant="primary" navigate={~p"/properties/#{@property}/edit?return_to=show"}> <.icon name="hero-pencil-square" /> Edit Property <.list> <:item title="Id">{@property.id} """ end @impl true def mount(%{"id" => id}, _session, socket) do {:ok, socket |> assign(:page_title, "Show Property") |> assign(:property, Ash.get!(Mv.Membership.Property, id))} end end