Files
leadchat/app/views/api/v2/accounts/reports/inboxes.csv.erb
Pranav Raj S c607f09be0 feat: Improve the rendering of CSV exports (#8914)
Improve the rendering of the datestamp
2024-02-12 20:01:58 -08:00

15 lines
532 B
Plaintext

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