-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from lsa-mis/LRA-963-room-ready-resource-stat…
…es-report Lra 963 room ready resource states report
- Loading branch information
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<h1>Resource States Report</h1> | ||
<h6>This report shows the repsonses to the Resource Questions in the Rover form.</h6> | ||
|
||
<div class="py-3"> | ||
<!-- turning off turbo for the form is necessary - otherwise the browser doesn't download the csv properly --> | ||
<%= form_with url: resource_states_report_reports_path, method: :get, data: { turbo: false }, class: "mb-3" do |form| %> | ||
<div> | ||
<label for="zone_id" class="">Select a Zone</label> | ||
<%= form.select :zone_id, options_for_select(@zones, selected: params[:zone_id]), {include_blank: "All Zones"}, class: "form-select" %> | ||
<div class="d-flex flex-row justify-content-start align-items-center gap-3"> | ||
<%= form.label :from, "From: "%> | ||
<%= form.date_field :from, value: params[:from], class: "form-control" %> | ||
<%= form.label :to, "To: "%> | ||
<%= form.date_field :to, value: params[:to], class: "form-control" %> | ||
</div> | ||
<%= form.label :resource_type, 'Select a Resource Type', class: 'form-label' %> | ||
<%= form.select :resource_type, options_for_select(@resource_types, selected: params[:resource_type]), {include_blank: "All Resource Types"}, class: "form-select" %> | ||
<div class="d-flex flex-row justify-content-start align-items-center"> | ||
<%= form.label :format, "Report Type: ", class: "form-label" %> | ||
<%= form.select :format, options_for_select([["Display in Browser", "html"], ["Export to CSV", "csv"]], | ||
selected: params[:format]), {}, class: "form-select" %> | ||
</div> | ||
</div> | ||
<div class="d-flex flex-row justify-content-start align-items-center gap-3"> | ||
<%= form.submit "Run Report" %> | ||
<%= link_to "Clear filters", resource_states_report_reports_path, class: "text-primary cancel-button" %> | ||
</div> | ||
<% end %> | ||
<% if params[:commit] && params[:format] == 'html' %> | ||
<%= render 'reports_table' %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters