2024-08-23 09:33:42 -04:00
|
|
|
<%# locals: (account:) %>
|
|
|
|
|
|
|
|
<div class="grid grid-cols-3 gap-2">
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".make_model") do %>
|
|
|
|
<%= [account.vehicle.make, account.vehicle.model].compact.join(" ").presence || t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".year") do %>
|
|
|
|
<%= account.vehicle.year || t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".mileage") do %>
|
|
|
|
<%= account.vehicle.mileage || t(".unknown") %>
|
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".purchase_price") do %>
|
|
|
|
<%= format_money account.vehicle.purchase_price %>
|
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".current_price") do %>
|
|
|
|
<%= format_money account.balance_money %>
|
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
|
2024-10-08 17:16:37 -04:00
|
|
|
<%= summary_card title: t(".trend") do %>
|
2024-08-23 09:33:42 -04:00
|
|
|
<div class="flex items-center gap-1" style="color: <%= account.vehicle.trend.color %>">
|
|
|
|
<p class="text-xl font-medium">
|
|
|
|
<%= account.vehicle.trend.value %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>(<%= account.vehicle.trend.percent %>%)</p>
|
|
|
|
</div>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% end %>
|
2024-08-23 09:33:42 -04:00
|
|
|
</div>
|
2024-10-18 14:37:42 -04:00
|
|
|
|
|
|
|
<div class="flex justify-center py-8">
|
2024-11-04 20:27:31 -05:00
|
|
|
<%= link_to "Edit account details", edit_vehicle_path(account), class: "btn btn--ghost", data: { turbo_frame: :modal } %>
|
2024-10-18 14:37:42 -04:00
|
|
|
</div>
|