2024-01-19 18:25:59 -06:00
|
|
|
<div class="container mt-5">
|
2024-02-02 17:40:57 -06:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2024-01-19 18:25:59 -06:00
|
|
|
<h1 class="mb-4 text-center">Vendor Details</h1>
|
2024-02-02 17:40:57 -06:00
|
|
|
</div>
|
2024-01-17 01:44:36 -06:00
|
|
|
|
2024-02-02 17:40:57 -06:00
|
|
|
<!-- 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, @vendor.city, @vendor.state, @vendor.zip].reject(&:blank?).join(', ') %></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>
|
2024-01-17 01:44:36 -06:00
|
|
|
|
2024-02-02 17:40:57 -06:00
|
|
|
<!-- 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" %>
|
2024-01-19 18:25:59 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-02 17:13:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row mt-4">
|
2024-02-02 17:40:57 -06:00
|
|
|
<div class="col-12">
|
2024-02-02 17:13:06 -06:00
|
|
|
<h2 class="mt-4">Linked Participants</h2>
|
2024-02-05 17:06:56 -06:00
|
|
|
<% if @sorted_participants.any? %>
|
2024-02-02 17:13:06 -06:00
|
|
|
<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>
|
2024-02-05 17:06:56 -06:00
|
|
|
<% @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 %>
|
2024-02-02 17:13:06 -06:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<% else %>
|
|
|
|
<p>No linked participants.</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-05 17:06:56 -06:00
|
|
|
|