From fdfc26389a479b49a0d01a7c5380f66ce6fb5c4b Mon Sep 17 00:00:00 2001 From: Ronak Gupta Date: Thu, 23 May 2024 01:35:39 +0530 Subject: [PATCH] un nest generate court report for volunteers only --- app/views/layouts/_sidebar.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb index 2bdea65724..def4d9b208 100644 --- a/app/views/layouts/_sidebar.html.erb +++ b/app/views/layouts/_sidebar.html.erb @@ -42,7 +42,8 @@ <%= render(Sidebar::LinkComponent.new(title: "Emancipation Checklist(s)", icon: "list", path: emancipation_checklists_path, render_check: current_user.serving_transition_aged_youth?)) %> <%= render(Sidebar::LinkComponent.new(title: "Other Duties", icon: "agenda", path: other_duties_path, render_check: current_user.volunteer?)) %> <%= render(Sidebar::LinkComponent.new(title: "Banners", icon: "flag", path: banners_path, render_check: policy(:application).see_banner_page?)) %> - <%= render(Sidebar::GroupComponent.new(title: "Group Actions", icon: "list")) do |group| %> + <%= render(Sidebar::LinkComponent.new(title: "Generate Court Reports", icon: "paperclip", path: case_court_reports_path, render_check: policy(:application).see_court_reports_page? && current_user.volunteer?)) %> + <%= render(Sidebar::GroupComponent.new(title: "Group Actions", icon: "list", render_check: !current_user.volunteer?)) do |group| %> <% group.with_links([ { title: "Generate Court Reports", icon: "paperclip", path: case_court_reports_path, render_check: policy(:application).see_court_reports_page? }, { title: "Reimbursement Queue", icon: "money-location", path: reimbursements_path, render_check: policy(:reimbursement).index? },