Fixed and updated Participant Module.

This commit is contained in:
Ben 2024-01-30 16:45:30 -06:00
parent d8fe866b68
commit bdfdf6942a
2 changed files with 20 additions and 10 deletions

View File

@ -83,9 +83,25 @@ class ParticipantsController < ApplicationController
end end
def participant_params def participant_params
params.require(:participant).permit(:first_name, :last_name, :address, :phone, :email, :mci, :dob, :ssn, :gender, :employer_id) params.require(:participant).permit(
:first_name,
:last_name,
:address_line_1,
:address_line_2,
:city,
:state,
:zip,
:phone,
:email,
:mci,
:dob,
:ssn,
:gender,
:employer_id
)
end end
def employer_params_from_participant(participant) def employer_params_from_participant(participant)
{ {
first_name: participant.first_name, first_name: participant.first_name,
@ -103,10 +119,6 @@ class ParticipantsController < ApplicationController
} }
end end
def employment_params def employment_params
params.require(:employment).permit(:worker_id, :start_date, :end_date) params.require(:employment).permit(:worker_id, :start_date, :end_date)
end end

View File

@ -38,8 +38,6 @@
<%= link_to participant, class: 'btn btn-sm btn-secondary' do %> <%= link_to participant, class: 'btn btn-sm btn-secondary' do %>
<i class="bi bi-eye"></i><!-- Eyeball icon for 'Show' --> <i class="bi bi-eye"></i><!-- Eyeball icon for 'Show' -->
<% end %> <% end %>
<%= link_to edit_participant_path(participant), class: 'btn btn-sm btn-info' do %> <%= link_to edit_participant_path(participant), class: 'btn btn-sm btn-info' do %>
<i class="bi bi-pencil-fill" style="color: white;"></i> <!-- Pencil icon for 'Edit' with white color --> <i class="bi bi-pencil-fill" style="color: white;"></i> <!-- Pencil icon for 'Edit' with white color -->
<% end %> <% end %>