[CW-53] feat: allow downloading heatmap report (#6683)
* feat: add control header slot * feat: add download API call * feat: add conversation traffic template * feat: allow downloading heatmap content * feat: wire up download * fix: grid layout for mobile * chore: revert formatting * revert: en.yml file * feat: add conversation traffic text * feat: disable rule for map block * test: conversation traffic * fix: timezone offset * feat: download report in UTC * feat: add UTC warning * chore: revert formatting * feat: add traffic text * chore: fix whitespace change
This commit is contained in:
12
app/views/api/v2/accounts/reports/conversation_traffic.erb
Normal file
12
app/views/api/v2/accounts/reports/conversation_traffic.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<% headers = [
|
||||
I18n.t('reports.conversation_traffic_csv.date'),
|
||||
I18n.t('reports.conversation_traffic_csv.conversations_count'),
|
||||
]
|
||||
%>
|
||||
<%= CSVSafe.generate_line headers -%>
|
||||
<% @report_data.each do |row| %>
|
||||
<%= CSVSafe.generate_line row -%>
|
||||
<% end %>
|
||||
|
||||
<%= CSVSafe.generate_line [I18n.t('reports.period', since: Date.strptime(params[:since], '%s'), until: Date.strptime(params[:until], '%s'))] %>
|
||||
<%= CSVSafe.generate_line [I18n.t('reports.utc_warning')] %>
|
||||
Reference in New Issue
Block a user