Chatwoot/app/views/api/v2/accounts/reports/agents.csv.erb

13 lines
475 B
Text
Raw Normal View History

<% headers = [
I18n.t('reports.agent_csv.agent_name'),
I18n.t('reports.agent_csv.conversations_count'),
I18n.t('reports.agent_csv.avg_first_response_time'),
I18n.t('reports.agent_csv.avg_resolution_time')
]
%>
<%= CSV.generate_line headers -%>
<% @report_data.each do |row| %>
<%= CSV.generate_line row -%>
<% end %>
<%= CSV.generate_line [I18n.t('reports.period', since: Date.strptime(params[:since], '%s'), until: Date.strptime(params[:until], '%s'))] %>