Updated Worker, Employer and Participant index pages to not display certain fields. Also fixed DOB field display and removed destory option from index pages.

This commit is contained in:
Ben 2024-01-21 22:43:27 -06:00
parent 14902e00f0
commit 4e02d7259f
5 changed files with 13 additions and 21 deletions

View File

@ -10,10 +10,7 @@
<th>Address</th>
<th>Phone</th>
<th>Email</th>
<th>DOB</th>
<th>Actions</th>
</tr>
</thead>
@ -24,10 +21,7 @@
<td><%= employer.address %></td>
<td><%= employer.phone %></td>
<td><%= employer.email %></td>
<td><%= employer.dob %></td>
<td><%= employer.dob.strftime('%B %d, %Y') if employer.dob %></td>
<td>
<%= link_to 'Show', employer, class: 'btn btn-sm btn-info' %>
<%= link_to 'Edit', edit_employer_path(employer), class: 'btn btn-sm btn-warning' %>

View File

@ -12,8 +12,6 @@
<th>Program</th>
<th>MCI</th>
<th>DOB</th>
<th>SSN</th>
<th>Gender</th>
<th colspan="3"></th>
</tr>
</thead>
@ -27,9 +25,8 @@
<td><%= participant.email %></td>
<td><%= participant.programs.map(&:name).join(", ") %></td>
<td><%= participant.mci %></td>
<td><%= participant.dob.strftime('%B, %d, %Y') if participant.dob %></td>
<td><%= participant.ssn %></td>
<td><%= participant.gender %></td>
<td><%= participant.dob.strftime('%B %d, %Y') if participant.dob %></td>
<td>
<%= link_to participant, class: 'btn btn-sm btn-info' do %>
<i class="bi bi-eye"></i><!-- Eyeball icon for 'Show' -->

View File

@ -9,8 +9,6 @@
<th>Phone</th>
<th>Email</th>
<th>DOB</th>
<th>SSN</th>
<th>Gender</th>
<th>Actions</th>
</tr>
</thead>
@ -21,13 +19,10 @@
<td><%= worker.address %></td>
<td><%= worker.phone %></td>
<td><%= worker.email %></td>
<td><%= worker.dob %></td>
<td><%= worker.ssn %></td>
<td><%= worker.gender %></td>
<td><%= worker.dob.strftime('%B %d, %Y') if worker.dob %></td>
<td>
<%= link_to 'Show', worker_path(worker), class: 'btn btn-sm btn-info' %> |
<%= link_to 'Edit', edit_worker_path(worker), class: 'btn btn-sm btn-primary' %> |
<%= link_to 'Destroy', worker_path(worker), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger' %>
<%= link_to 'Show', worker_path(worker), class: 'btn btn-sm btn-info' %>
<%= link_to 'Edit', edit_worker_path(worker), class: 'btn btn-sm btn-primary' %>
</td>
</tr>
<% end %>

View File

@ -0,0 +1,5 @@
class AddContactToVendors < ActiveRecord::Migration[7.1]
def change
add_column :vendors, :contact, :string
end
end

3
db/schema.rb generated
View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_01_20_060936) do
ActiveRecord::Schema[7.1].define(version: 2024_01_22_040719) do
create_table "employers", force: :cascade do |t|
t.string "name"
t.string "address"
@ -85,6 +85,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_01_20_060936) do
t.string "contact_name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "contact"
end
create_table "workers", force: :cascade do |t|