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/credit_card/_overview.html.erb

28 lines
955 B
Text
Raw Normal View History

<%# locals: (account:) %>
<div class="grid grid-cols-3 gap-2">
<%= summary_card title: t(".amount_owed") do %>
<%= format_money(account.balance) %>
<% end %>
<%= summary_card title: t(".available_credit") do %>
<%= format_money(account.credit_card.available_credit) || t(".unknown") %>
<% end %>
<%= summary_card title: t(".minimum_payment") do %>
<%= format_money(account.credit_card.minimum_payment) || t(".unknown") %>
<% end %>
<%= summary_card title: t(".apr") do %>
<%= account.credit_card.apr ? number_to_percentage(account.credit_card.apr, precision: 2) : t(".unknown") %>
<% end %>
<%= summary_card title: t(".expiration_date") do %>
<%= account.credit_card.expiration_date ? l(account.credit_card.expiration_date, format: :long) : t(".unknown") %>
<% end %>
<%= summary_card title: t(".annual_fee") do %>
<%= format_money(account.credit_card.annual_fee) || t(".unknown") %>
<% end %>
</div>