1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/staffs/passports/passport_confirmations/index.html.erb

45 lines
1.3 KiB
Text

<div class="container">
<%= render partial: 'staffs/passports/nav_tabs',
locals: { passport: @passport,
tab: :confirmations } %>
<% if @passport.can_have_confirmations? && current_account %>
<div class="mb-3">
<% if @passport.passport_confirmations.where(account: current_account).exists? %>
<%= translate '.already_confirmed' %>
<% else %>
<%= link_to translate('.new_confirmation'),
'#', # new_staff_passport_passport_confirmation_path(@passport),
role: :button,
class: 'btn btn-success' %>
<% end %>
</div>
<% end %>
<table class="table">
<thead>
<tr>
<th scope="col">
<%= PassportConfirmation.human_attribute_name :id %>
</th>
<th scope="col">
<%= PassportConfirmation.human_attribute_name :account %>
</th>
</tr>
</thead>
<tbody>
<% @passport_confirmations.each do |passport_confirmation| %>
<tr>
<td scope="row">
<%= passport_confirmation.id %>
</td>
<td>
<%= truncate passport_confirmation.account.user&.email,
length: 50 %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>