Linked workers for participant show page have been bootstrapped!

This commit is contained in:
Ben 2024-01-22 23:48:37 -06:00
parent d817ae6992
commit b742c3bf78
1 changed files with 13 additions and 11 deletions

View File

@ -81,22 +81,24 @@
</tbody>
</table>
<%= form_with(model: [@participant, @employment], url: link_worker_participant_path(@participant), method: :post) do |form| %>
<div class="field">
<%= form.label :worker_id, "Select Worker" %>
<%= form.collection_select :worker_id, Worker.all, :id, :name, include_blank: true %>
<%= 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_id, "Select Worker", class: 'form-label' %>
<%= form.collection_select :worker_id, Worker.all, :id, :name, { include_blank: true }, { class: 'form-select' } %>
</div>
<div class="field">
<%= form.label :start_date %>
<%= form.date_field :start_date %>
<div class="col-md-3">
<%= form.label :start_date, class: 'form-label' %>
<%= form.date_field :start_date, class: 'form-control' %>
</div>
<div class="field">
<%= form.label :end_date %>
<%= form.date_field :end_date %>
<div class="col-md-3">
<%= form.label :end_date, class: 'form-label' %>
<%= form.date_field :end_date, class: 'form-control' %>
</div>
<%= form.submit "Link Worker" %>
<div class="col-12">
<%= form.submit "Link Worker", class: 'btn btn-dark' %>
</div>
<% end %>