feat: better download for conversation traffic heatmap (#6755)
* feat: genearte report in a grid * refactor: update API usage * refactor: separate generate method * refactor: abstract transform_data * feat: annotate with comments * feat: add explicit timezone * feat: download data only in user timezone * fix: dates included in heatmap
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
<% headers = [
|
||||
I18n.t('reports.conversation_traffic_csv.date'),
|
||||
I18n.t('reports.conversation_traffic_csv.conversations_count'),
|
||||
]
|
||||
%>
|
||||
<%= CSVSafe.generate_line headers -%>
|
||||
<%= CSVSafe.generate_line [I18n.t('reports.conversation_traffic_csv.timezone'), @timezone] %>
|
||||
<% @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')] %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user