diff --git a/app/controllers/nsm/claim_details_controller.rb b/app/controllers/nsm/claim_details_controller.rb index 0cfe996cf..4c9708846 100644 --- a/app/controllers/nsm/claim_details_controller.rb +++ b/app/controllers/nsm/claim_details_controller.rb @@ -12,7 +12,7 @@ def show def provider_updates return nil if claim.data['further_information'].blank? - BaseViewModel.build(:further_information, claim, 'further_information').sort_by(&:requested_at) + BaseViewModel.build(:further_information, claim, 'further_information').sort_by(&:requested_at).reverse end def claim diff --git a/app/controllers/nsm/send_backs_controller.rb b/app/controllers/nsm/send_backs_controller.rb index e92c9524e..22785b8ec 100644 --- a/app/controllers/nsm/send_backs_controller.rb +++ b/app/controllers/nsm/send_backs_controller.rb @@ -2,6 +2,10 @@ module Nsm class SendBacksController < Nsm::BaseController include NameConstructable + def show + claim + end + def edit send_back = SendBackForm.new(claim: claim, send_back_comment: claim.data['send_back_comment']) render locals: { claim:, send_back: } @@ -14,7 +18,7 @@ def update send_back.stash redirect_to your_nsm_claims_path elsif send_back.save - redirect_to your_nsm_claims_path + redirect_to nsm_claim_send_back_path(claim) else render :edit, locals: { claim:, send_back: } end diff --git a/app/models/event/new_version.rb b/app/models/event/new_version.rb index fcdb560d6..9e6d80a81 100644 --- a/app/models/event/new_version.rb +++ b/app/models/event/new_version.rb @@ -4,5 +4,9 @@ def self.build(submission:) create(submission: submission, submission_version: submission.current_version) .tap(&:notify) end + + def body + t('updated_body') if submission_version > 1 + end end end diff --git a/app/models/nsm/event/send_back.rb b/app/models/nsm/event/send_back.rb index a5ae57f54..27568914b 100644 --- a/app/models/nsm/event/send_back.rb +++ b/app/models/nsm/event/send_back.rb @@ -4,6 +4,10 @@ class SendBack < ::Event::Decision def title t('title') end + + def body + t('body') + end end end end diff --git a/app/views/nsm/claim_details/show.html.erb b/app/views/nsm/claim_details/show.html.erb index 9efaa1a12..43f21a310 100644 --- a/app/views/nsm/claim_details/show.html.erb +++ b/app/views/nsm/claim_details/show.html.erb @@ -10,6 +10,7 @@ <% if claim.sent_back? || claim.expired? %>
<%= t(".sent_back", date: claim_summary.sent_back_on.to_fs(:stamp)) %>
+ <%= t(".further_information_request") %> <%= simple_format claim_summary.assessment_comment %><%= t('.sent_to_provider') %>
+