-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add responders history date search, csv
Issue #301: Built-in report pages, to replace dependency on external query dashboards.
- Loading branch information
Frank Duncan
committed
Feb 24, 2021
1 parent
2dc1deb
commit 7c01324
Showing
3 changed files
with
38 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<%- headers = ['Name', 'Last Contacted', 'Responses', 'Not Available'] -%> | ||
<%= CSV.generate_line headers -%> | ||
<%- responders.each do |responder, assignments| | ||
recent = assignments.first | ||
-%> | ||
<%= CSV.generate_line([ | ||
responder.full_name, | ||
recent && recent.incident.date.to_s(:mdy), | ||
assignments.select(&:was_available).count, | ||
assignments.reject{|r| r.was_available || r.was_flex }.count | ||
]).html_safe -%> | ||
<%- end -%> |
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