Edit Service Contract

<%= form_with(model: @service_contract, url: service_contract_path(@service_contract), method: :patch, local: true, html: { class: 'needs-validation', novalidate: true }) do |form| %> <% if @service_contract.errors.any? %> <% end %>
<%= form.label :start_date, class: 'form-label' %> <%= form.date_field :start_date, class: 'form-control' %>
<%= form.label :end_date, class: 'form-label' %> <%= form.date_field :end_date, class: 'form-control' %>
<%= form.submit "Update Service Contract", class: 'btn btn-dark' %>
<% end %>
<%= link_to 'Back to Participant', participant_path(@service_contract.participant), class: 'btn btn-secondary' %> <%= link_to 'Delete Service Contract', service_contract_path(@service_contract), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>