2024-08-23 08:47:08 -04:00
|
|
|
<%# locals: (account:) %>
|
|
|
|
|
|
|
|
<div class="grid grid-cols-3 gap-2">
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".market_value") do %>
|
|
|
|
<%= format_money(account.balance_money) %>
|
|
|
|
<% end %>
|
2024-08-23 08:47:08 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".purchase_price") do %>
|
|
|
|
<%= account.property.purchase_price ? format_money(account.property.purchase_price) : t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 08:47:08 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".trend") do %>
|
2024-08-23 08:47:08 -04:00
|
|
|
<div class="flex items-center gap-1" style="color: <%= account.property.trend.color %>">
|
|
|
|
<p class="text-xl font-medium">
|
|
|
|
<%= account.property.trend.value %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>(<%= account.property.trend.percent %>%)</p>
|
|
|
|
</div>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% end %>
|
2024-08-23 08:47:08 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".year_built") do %>
|
|
|
|
<%= account.property.year_built || t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 08:47:08 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".living_area") do %>
|
|
|
|
<%= account.property.area || t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 08:47:08 -04:00
|
|
|
</div>
|
2024-10-18 14:37:42 -04:00
|
|
|
|
|
|
|
<div class="flex justify-center py-8">
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render LinkComponent.new(
|
|
|
|
text: "Edit account details",
|
|
|
|
href: edit_property_path(account),
|
|
|
|
variant: "ghost",
|
|
|
|
frame: :modal
|
|
|
|
) %>
|
2024-10-18 14:37:42 -04:00
|
|
|
</div>
|