109 lines
3.5 KiB
Plaintext
109 lines
3.5 KiB
Plaintext
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="demographicsDropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Demographics
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="demographicsDropdown">
|
|
<li><a class="dropdown-item" href="<%= vendor_bank_accounts_path(@vendor) %>">Bank Information</a></li>
|
|
<li><a class="dropdown-item" href="<%= polymorphic_path([@vendor, :onboardings]) %>">Onboarding</a></li>
|
|
<!-- Add other links as needed -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container mt-5">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h1 class="mb-4 text-center">Vendor Details</h1>
|
|
</div>
|
|
|
|
<!-- Vendor Information Table -->
|
|
<div class="col-12 mb-4">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td><%= @vendor.name %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>DBA</th>
|
|
<td><%= @vendor.dba %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Address</th>
|
|
<td>
|
|
<%= @vendor.address_line_1 %><%= ', ' + @vendor.address_line_2 unless @vendor.address_line_2.blank? %>
|
|
<br>
|
|
<%= "#{@vendor.city}, #{@vendor.state} #{@vendor.zip}" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Phone</th>
|
|
<td><%= @vendor.phone %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Email</th>
|
|
<td><%= @vendor.email %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>TIN</th>
|
|
<td><%= @vendor.tin %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Contact Name</th>
|
|
<td><%= @vendor.contact %></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="row">
|
|
<div class="col-12 d-flex justify-content-between mb-4">
|
|
<%= link_to 'Edit', edit_vendor_path(@vendor), class: "btn btn-dark" %>
|
|
<%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container mt-5">
|
|
<div class="col-12">
|
|
<h2 class="mt-4">Linked Participants</h2>
|
|
<% if @sorted_participants.any? %>
|
|
<table class="table table-striped">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Participant Name</th>
|
|
<th>Start Date</th>
|
|
<th>End Date</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @sorted_participants.each do |participant| %>
|
|
<% participant.service_contracts.each do |contract| %>
|
|
<tr>
|
|
<td><%= "#{participant.first_name} #{participant.last_name}" %></td>
|
|
<td><%= contract.start_date.strftime('%B %d, %Y') if contract.start_date %></td>
|
|
<td><%= contract.end_date.strftime('%B %d, %Y') if contract.end_date %></td>
|
|
<td>
|
|
<%= link_to participant_path(participant), class: 'btn btn-sm btn-secondary' do %>
|
|
<i class="bi bi-eye"></i> <!-- Eyeball icon for 'Show' -->
|
|
<% end %>
|
|
<%= link_to edit_service_contract_path(contract), class: 'btn btn-sm btn-info' do %>
|
|
<i class="bi bi-pencil-fill" style="color: white;"></i> <!-- Pencil icon for 'Edit' with white color -->
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<p>No linked participants.</p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|