Chatwoot/app/views/api/v2/accounts/reports/labels.csv.erb
Pranav Raj S 52fad886b8
feat: Add business hours in downloadable reports (#4674)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
2022-05-27 09:26:59 +05:30

12 lines
476 B
Text

<% headers = [
I18n.t('reports.label_csv.label_title'),
I18n.t('reports.label_csv.conversations_count'),
I18n.t('reports.label_csv.avg_first_response_time'),
I18n.t('reports.label_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'))] %>