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

SAW - Auto-refresh bug for Modified Rate, Add/Delete Services #2176

Merged
merged 9 commits into from
Feb 5, 2020
5 changes: 5 additions & 0 deletions app/views/dashboard/clinical_line_items/create.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ loadServiceCalendar()

$("#modalContainer").modal('hide')
$("#flashContainer").replaceWith("<%= j render 'layouts/flash' %>")

# Re-render Admin Edit SSR header to update costs
if $("#subServiceRequestSummary").length
$("#subServiceRequestSummary").replaceWith("<%= j render 'dashboard/sub_service_requests/header', sub_service_request: @sub_service_request %>")

<% end %>
5 changes: 5 additions & 0 deletions app/views/dashboard/clinical_line_items/destroy.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ loadServiceCalendar()

$("#modalContainer").modal('hide')
$("#flashContainer").replaceWith("<%= j render 'layouts/flash' %>")

# Re-render Admin Edit SSR header to update costs
if $("#subServiceRequestSummary").length
$("#subServiceRequestSummary").replaceWith("<%= j render 'dashboard/sub_service_requests/header', sub_service_request: @sub_service_request %>")

<% end %>
6 changes: 6 additions & 0 deletions app/views/dashboard/study_level_activities/create.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ $('#studyLevelActivitiesTab').html('<%= j render "dashboard/sub_service_requests
<% else %>
$('#studyLevelActivitiesTable').bootstrapTable('refresh')
<% end %>

$("#modalContainer").modal('hide')
$("#flashContainer").replaceWith("<%= j render 'layouts/flash' %>")

# Re-render Admin Edit SSR header to update costs
if $("#subServiceRequestSummary").length
$("#subServiceRequestSummary").replaceWith("<%= j render 'dashboard/sub_service_requests/header', sub_service_request: @sub_service_request %>")

<% end %>
6 changes: 6 additions & 0 deletions app/views/dashboard/study_level_activities/destroy.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ $('#studyLevelActivitiesTab').html('<%= j render "dashboard/sub_service_requests
$('#studyLevelActivitiesTable').bootstrapTable('refresh')
<% end %>

# Re-render Admin Edit SSR header to update costs
if $("#subServiceRequestSummary").length
$("#subServiceRequestSummary").replaceWith("<%= j render 'dashboard/sub_service_requests/header', sub_service_request: @sub_service_request %>")

$("#flashContainer").replaceWith("<%= j render 'layouts/flash' %>")

$(document).trigger('ajax:complete') # rails-ujs element replacement bug fix
5 changes: 5 additions & 0 deletions app/views/line_items/update.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ $(".line-item-<%= @line_item.id %>:visible .total-per-study").replaceWith("<%= j
$('.one-time-fees-container:visible .max-total-direct').replaceWith("<%= j render 'service_calendars/master_calendar/otf/totals/max_total_direct_one_time_fee', service_request: @service_request %>")
$('.one-time-fees-container:visible .max-total-per-study').replaceWith("<%= j render 'service_calendars/master_calendar/otf/totals/total_cost_per_study', service_request: @service_request %>")
<% end %>

# Re-render Admin Edit SSR header to update costs
if $("#subServiceRequestSummary").length
$("#subServiceRequestSummary").replaceWith("<%= j render 'dashboard/sub_service_requests/header', sub_service_request: @sub_service_request %>")

<% end %>