diff --git a/app/controllers/case_court_reports_controller.rb b/app/controllers/case_court_reports_controller.rb new file mode 100644 index 0000000000..d2dab81a45 --- /dev/null +++ b/app/controllers/case_court_reports_controller.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +class CaseCourtReportsController < ApplicationController + before_action :authenticate_user! + + def index + @assigned_cases = CasaCase.actively_assigned_to(current_user) + end +end diff --git a/app/views/case_court_reports/index.html.erb b/app/views/case_court_reports/index.html.erb new file mode 100644 index 0000000000..b5497a7d06 --- /dev/null +++ b/app/views/case_court_reports/index.html.erb @@ -0,0 +1,44 @@ +

Report Categories

+ +
+
+
Generate Court Report
+

+ The Court Report is pre-filled with information for your case. You can select among currently active cases assigned to you. The document is in Microsoft Word format (.docx). +

+ +
+ + <%= form_with do |form| %> +
+ <%= label_tag :case_number, "Case Number:" %> + <%= select_tag :case_number, + options_from_collection_for_select(@assigned_cases, :case_number, :case_number, 0), + prompt: "Select a case to generate report", + include_blank: false, + id: "case-selection", + class: "custom-select" %> +
+ +
+ <%= button_tag "Generate Report",type: :submit, + data: { + button_name: "Generate Report", + disable_with: "Court report generating. Do not refresh or leave this page...", + ready_with: "Your report is ready" + }, + id: "btnGenerateReport", + class: "btn btn-primary" %> + + <%= link_to "Download Court Report", + "#", + id: "btnDownloadReport", + class: "btn btn-outline-primary" %> +
+ <% end %> + +
+
diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb index 7f15bf90f6..0778f89532 100644 --- a/app/views/layouts/_sidebar.html.erb +++ b/app/views/layouts/_sidebar.html.erb @@ -36,7 +36,7 @@