feat: Download Agent wise report (#1517)

This commit is contained in:
Pranav Raj S
2020-12-15 23:35:03 +05:30
committed by GitHub
parent e6f7f5530b
commit 0619894560
8 changed files with 61 additions and 3 deletions

View File

@@ -8,5 +8,6 @@
until: params[:until]
}).summary %>
<% row = [ agent.name, agent_report[:conversations_count], (agent_report[:avg_first_response_time]/60).to_i, (agent_report[:avg_resolution_time]/60).to_i ] %>
<%= CSV.generate_line row %>
<% end %>
<%= CSV.generate_line row %>
<% end %>
<%= CSV.generate_line [I18n.t('reports.period', { since: Date.strptime(params[:since], '%s'), until: Date.strptime(params[:until], '%s') })] %>