From a490afda018d2b4185ff97b142937583502a3319 Mon Sep 17 00:00:00 2001 From: Steven Vargas Date: Fri, 9 Aug 2024 10:23:14 -0400 Subject: [PATCH] Add base due date display to required report name for admins and library reviewers --- .../concerns/hyrax/works_controller_behavior.rb | 4 ++++ app/views/hyrax/base/show.html.erb | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/app/controllers/concerns/hyrax/works_controller_behavior.rb b/app/controllers/concerns/hyrax/works_controller_behavior.rb index 53855ff9..b996b7ba 100644 --- a/app/controllers/concerns/hyrax/works_controller_behavior.rb +++ b/app/controllers/concerns/hyrax/works_controller_behavior.rb @@ -76,6 +76,10 @@ def create def show @user_collections = user_collections + if user_signed_in? && (current_user.admin? || current_user.library_reviewers?) && @presenter.required_report_name.first != 'Not Required' + @required_report_base_due_date = RequiredReportDueDate.find_by(submission_id: @presenter.id)&.base_due_date.to_s + end + respond_to do |wants| wants.html { presenter && parent_presenter } wants.json do diff --git a/app/views/hyrax/base/show.html.erb b/app/views/hyrax/base/show.html.erb index aab21699..cb455f45 100644 --- a/app/views/hyrax/base/show.html.erb +++ b/app/views/hyrax/base/show.html.erb @@ -40,3 +40,16 @@ +<% if @required_report_base_due_date.present? %> + +<% end %>