From dbc900a7f32efca269e83f1562bdfac2943271ad Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 31 Jan 2024 03:01:52 -0600 Subject: [PATCH] Completely changed Participant show page to reflect a different stylistic approach to the Part details --- app/views/layouts/application.html.erb | 35 ++++---- app/views/participants/show.html.erb | 111 +++++++++++-------------- 2 files changed, 68 insertions(+), 78 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e3e2c3b..2440158 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,32 +16,33 @@ <%= render 'layouts/navbar' %> -
<%= yield %>
- + +
<% if notice %> -
-
-
- +
+
+
+ +
-
-<% end %> + <% end %> + + <% if alert %> +
+
+
+ +
+
+
+ <% end %> -<% if alert %> -
-
-
- -
-
-
-<% end %> diff --git a/app/views/participants/show.html.erb b/app/views/participants/show.html.erb index eec09f9..e608dd0 100644 --- a/app/views/participants/show.html.erb +++ b/app/views/participants/show.html.erb @@ -1,68 +1,55 @@
-
-
+
+

Participant Details

+
-
-
- -

- Name: - <%= @participant.first_name %> <%= @participant.last_name %> -

- -

- Address: - <%= [@participant.address_line_1, @participant.address_line_2, @participant.city, @participant.state, @participant.zip].reject(&:blank?).join(', ') %> -

- -

- Phone: - <%= @participant.phone %> -

- -

- Email: - <%= @participant.email %> -

- -

- MCI: - <%= @participant.mci %> -

- -

- DOB: - <%= @participant.dob.strftime('%B %d, %Y') if @participant.dob.present? %> -

- - -

- SSN: - <%= @participant.ssn %> -

- -

- Gender: - <%= @participant.gender %> -

- - - -
-
- -
- <%= link_to 'Edit', edit_participant_path(@participant), class: "btn btn-dark" %> - <%= link_to 'Back to List', participants_path, class: "btn btn-secondary" %> -
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name<%= @participant.first_name %> <%= @participant.last_name %>
Address<%= [@participant.address_line_1, @participant.address_line_2, @participant.city, @participant.state, @participant.zip].reject(&:blank?).join(', ') %>
Phone<%= @participant.phone %>
Email<%= @participant.email %>
MCI<%= @participant.mci %>
DOB<%= @participant.dob.strftime('%B %d, %Y') if @participant.dob.present? %>
-
+ +
+
+ <%= link_to 'Edit', edit_participant_path(@participant), class: "btn btn-dark" %> + <%= link_to 'Back to List', participants_path, class: "btn btn-secondary" %> +
+
-

Linked Workers

-<% if @employments.present? %> +
+
+

Linked Workers

+ <% if @employments.present? %> + @@ -96,7 +83,6 @@
- <%= form_with(model: [@participant, @employment], url: link_worker_participant_path(@participant), method: :post, class: 'row g-3') do |form| %>
<%= form.label :worker_name, "Add New Worker", class: 'form-label' %> @@ -150,9 +136,11 @@ $(document).ready(function() { }); +
-

Linked Vendors

-<% if @service_contracts.present? %> +
+

Linked Vendors

+ <% if @service_contracts.present? %>
@@ -232,4 +220,5 @@ $(document).ready(function() { }); +