2024-10-08 17:16:37 -04:00
|
|
|
<%# locals: (account:) %>
|
|
|
|
|
|
|
|
<div class="grid grid-cols-3 gap-2">
|
|
|
|
<%= summary_card title: t(".amount_owed") do %>
|
2024-10-09 17:20:38 -04:00
|
|
|
<%= format_money(account.balance_money) %>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= summary_card title: t(".available_credit") do %>
|
2024-10-09 17:20:38 -04:00
|
|
|
<%= format_money(account.credit_card.available_credit_money) || t(".unknown") %>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= summary_card title: t(".minimum_payment") do %>
|
2024-10-10 16:14:05 +02:00
|
|
|
<%= format_money(account.credit_card.minimum_payment_money || Money.new(0, account.currency)) %>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% 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 %>
|
2024-10-10 16:14:05 +02:00
|
|
|
<%= format_money(account.credit_card.annual_fee_money || Money.new(0, account.currency)) %>
|
2024-10-08 17:16:37 -04:00
|
|
|
<% end %>
|
|
|
|
</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_credit_card_path(account), class: "btn btn--ghost", data: { turbo_frame: :modal } %>
|
2024-10-18 18:25:17 -04:00
|
|
|
</div>
|