1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00
Maybe/app/views/accounts/accountables/property/_overview.html.erb

41 lines
1.6 KiB
Text
Raw Normal View History

<%# locals: (account:) %>
<div class="grid grid-cols-3 gap-2">
<div class="rounded-xl bg-white shadow-xs border border-alpha-black-25 p-4">
<h4 class="text-gray-500 text-sm"><%= t(".market_value") %></h4>
<p class="text-xl font-medium text-gray-900"><%= format_money(account.balance_money) %></p>
</div>
<div class="rounded-xl bg-white shadow-xs border border-alpha-black-25 p-4">
<h4 class="text-gray-500 text-sm"><%= t(".purchase_price") %></h4>
<p class="text-xl font-medium text-gray-900">
<%= account.property.purchase_price ? format_money(account.property.purchase_price) : t(".unknown") %>
</p>
</div>
<div class="rounded-xl bg-white shadow-xs border border-alpha-black-25 p-4">
<h4 class="text-gray-500 text-sm flex items-center gap-1"><%= t(".trend") %></h4>
<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>
</div>
<div class="rounded-xl bg-white shadow-xs border border-alpha-black-25 p-4">
<h4 class="text-gray-500 text-sm"><%= t(".year_built") %></h4>
<p class="text-xl font-medium text-gray-900">
<%= account.property.year_built || t(".unknown") %>
</p>
</div>
<div class="rounded-xl bg-white shadow-xs border border-alpha-black-25 p-4">
<h4 class="text-gray-500 text-sm"><%= t(".living_area") %></h4>
<p class="text-xl font-medium text-gray-900">
<%= account.property.area || t(".unknown") %>
</p>
</div>
</div>