1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-18 20:59:39 +02:00
Maybe/app/views/vehicles/tabs/_overview.html.erb
Zach Gollwitzer 8c97c9d31a
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Consolidate and simplify account pages (#2462)
* Remove ScrollFocusable

* Consolidate and simplify account pages

* Lint fixes

* Fix tab param initialization

* Remove stale files

* Remove stale route, make accountable routes clearer
2025-07-18 05:52:18 -04:00

42 lines
1.2 KiB
Text

<%# locals: (account:) %>
<div class="grid grid-cols-3 gap-2">
<%= summary_card title: t(".make_model") do %>
<%= [account.vehicle.make, account.vehicle.model].compact.join(" ").presence || t(".unknown") %>
<% end %>
<%= summary_card title: t(".year") do %>
<%= account.vehicle.year || t(".unknown") %>
<% end %>
<%= summary_card title: t(".mileage") do %>
<%= account.vehicle.mileage || t(".unknown") %>
<% end %>
<%= summary_card title: t(".purchase_price") do %>
<%= format_money account.vehicle.purchase_price %>
<% end %>
<%= summary_card title: t(".current_price") do %>
<%= format_money account.balance_money %>
<% end %>
<%= summary_card title: t(".trend") do %>
<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>
<% end %>
</div>
<div class="flex justify-center py-8">
<%= render LinkComponent.new(
text: "Edit account details",
variant: "ghost",
href: edit_vehicle_path(account),
frame: :modal
) %>
</div>