Completely changed Participant show page to reflect a different stylistic approach to the Part details
This commit is contained in:
parent
405125df6c
commit
dbc900a7f3
|
@ -16,32 +16,33 @@
|
|||
|
||||
<%= render 'layouts/navbar' %>
|
||||
|
||||
|
||||
<div class="container mt-4">
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<% if notice %>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<div class="alert alert-info" role="alert"><%= notice %></div>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<div class="alert alert-info" role="alert"><%= notice %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if alert %>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<div class="alert alert-warning" role="alert"><%= alert %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if alert %>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<div class="alert alert-warning" role="alert"><%= alert %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
|
||||
|
|
|
@ -1,68 +1,55 @@
|
|||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1 class="mb-4 text-center">Participant Details</h1>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<p class="card-text">
|
||||
<strong>Name:</strong>
|
||||
<%= @participant.first_name %> <%= @participant.last_name %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>Address:</strong>
|
||||
<%= [@participant.address_line_1, @participant.address_line_2, @participant.city, @participant.state, @participant.zip].reject(&:blank?).join(', ') %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>Phone:</strong>
|
||||
<%= @participant.phone %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>Email:</strong>
|
||||
<%= @participant.email %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>MCI:</strong>
|
||||
<%= @participant.mci %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>DOB:</strong>
|
||||
<%= @participant.dob.strftime('%B %d, %Y') if @participant.dob.present? %>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="card-text">
|
||||
<strong>SSN:</strong>
|
||||
<%= @participant.ssn %>
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<strong>Gender:</strong>
|
||||
<%= @participant.gender %>
|
||||
</p>
|
||||
|
||||
<!-- Repeat this pattern for other attributes like phone, email, etc. -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 d-flex justify-content-between">
|
||||
<%= link_to 'Edit', edit_participant_path(@participant), class: "btn btn-dark" %>
|
||||
<%= link_to 'Back to List', participants_path, class: "btn btn-secondary" %>
|
||||
</div>
|
||||
<!-- Participant Information Table -->
|
||||
<div class="col-12 mb-4">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><%= @participant.first_name %> <%= @participant.last_name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<td><%= [@participant.address_line_1, @participant.address_line_2, @participant.city, @participant.state, @participant.zip].reject(&:blank?).join(', ') %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Phone</th>
|
||||
<td><%= @participant.phone %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td><%= @participant.email %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MCI</th>
|
||||
<td><%= @participant.mci %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DOB</th>
|
||||
<td><%= @participant.dob.strftime('%B %d, %Y') if @participant.dob.present? %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex justify-content-between mb-4">
|
||||
<%= link_to 'Edit', edit_participant_path(@participant), class: "btn btn-dark" %>
|
||||
<%= link_to 'Back to List', participants_path, class: "btn btn-secondary" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="mt-4">Linked Workers</h2>
|
||||
<% if @employments.present? %>
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">Linked Workers</h2>
|
||||
<% if @employments.present? %>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
|
@ -96,7 +83,6 @@
|
|||
|
||||
<br>
|
||||
|
||||
|
||||
<%= form_with(model: [@participant, @employment], url: link_worker_participant_path(@participant), method: :post, class: 'row g-3') do |form| %>
|
||||
<div class="col-md-6">
|
||||
<%= form.label :worker_name, "Add New Worker", class: 'form-label' %>
|
||||
|
@ -150,9 +136,11 @@ $(document).ready(function() {
|
|||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="mt-4">Linked Vendors</h2>
|
||||
<% if @service_contracts.present? %>
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">Linked Vendors</h2>
|
||||
<% if @service_contracts.present? %>
|
||||
<table class="table table-striped">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
|
@ -232,4 +220,5 @@ $(document).ready(function() {
|
|||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue