Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG - Only prompt SSR resubmission if there are SSRs to be resubmitted #2335

Merged
merged 1 commit into from
May 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/views/service_requests/navigation/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
= save_as_draft_button(@service_request)
.col.text-right
- if action_name == 'review'
= link_to confirmation_service_request_path(srid: @service_request.id), remote: @service_request.previously_submitted?, class: 'btn btn-lg btn-outline-success', id: 'submitRequest' do
-# If the request has SSRs to be resubmitted, send a remote request to prompt the SSR Resubmission Modal, else submit the request
= link_to confirmation_service_request_path(srid: @service_request.id), remote: @service_request.previously_submitted? && service_request.sub_service_requests.any?{ |ssr| ['draft', 'awaiting_pi_approval'].include?(ssr.status) }, class: 'btn btn-lg btn-outline-success', id: 'submitRequest' do
- succeed icon('fas', 'arrow-right ml-2') do
= t('proper.navigation.bottom.submit')
- else
Expand Down