45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
<div class="container mt-5">
|
|
<h1 class="mb-4 text-center">Bank Information</h1>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Institution Name</th>
|
|
<th>Type</th>
|
|
<th>Routing Number</th>
|
|
<th>Account Number</th>
|
|
<th>Start Date</th>
|
|
<th>End Date</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @bank_accounts.each do |account| %>
|
|
<tr>
|
|
<td><%= account.institution_name %></td>
|
|
<td><%= account.account_type.capitalize %></td>
|
|
<td><%= account.routing_number %></td>
|
|
<td><%= hide_account_number(account.account_number) %></td>
|
|
<td><%= account.start_date.strftime('%B %d, %Y') if account.start_date %></td>
|
|
<td><%= account.end_date.strftime('%B %d, %Y') if account.end_date %></td>
|
|
<td>
|
|
<%= link_to edit_polymorphic_path([@owner, account]), class: 'btn btn-info btn-sm' do %>
|
|
<i class="bi bi-pencil-fill" style="color: white;"></i>
|
|
<% end %>
|
|
<%= link_to polymorphic_path([@owner, account]), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger btn-sm' do %>
|
|
<i class="bi bi-trash-fill"></i>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= link_to 'Add New Bank Account', new_polymorphic_path([@owner, BankAccount.new]), class: 'btn btn-dark' %>
|
|
</div>
|
|
|
|
<div class="text-center mt-3">
|
|
<%= link_to 'Back', polymorphic_path(@owner), class: 'btn btn-secondary mt-3' %>
|
|
</div>
|
|
|
|
|