fix: Update report method to fix issues with special characters (#4697)
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
contact&.phone_number.present? ? contact&.phone_number: nil,
|
||||
conversation ? app_account_conversation_url(account_id: Current.account.id, id: conversation.display_id): nil,
|
||||
csat_response.created_at,
|
||||
])
|
||||
]).html_safe
|
||||
-%>
|
||||
<% end %>
|
||||
<%=
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
I18n.t('reports.agent_csv.avg_resolution_time')
|
||||
]
|
||||
%>
|
||||
<%= CSV.generate_line headers %>
|
||||
<%= CSV.generate_line headers -%>
|
||||
<% Current.account.users.each do |agent| %>
|
||||
<% agent_report = V2::ReportBuilder.new(Current.account, {
|
||||
type: :agent,
|
||||
@@ -14,6 +14,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 %>
|
||||
<%= CSV.generate_line row -%>
|
||||
<% end %>
|
||||
<%= CSV.generate_line [I18n.t('reports.period', since: Date.strptime(params[:since], '%s'), until: Date.strptime(params[:until], '%s'))] %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% headers = ['Inbox name', 'Conversations count', 'Avg first response time (Minutes)', 'Avg resolution time (Minutes)'] %>
|
||||
<%= CSV.generate_line headers %>
|
||||
<%= CSV.generate_line headers -%>
|
||||
<% Current.account.inboxes.each do |inbox| %>
|
||||
<% inbox_report = V2::ReportBuilder.new(Current.account, {
|
||||
type: :inbox,
|
||||
@@ -8,5 +8,5 @@
|
||||
until: params[:until]
|
||||
}).summary %>
|
||||
<% row = [ inbox.name, inbox_report[:conversations_count], (inbox_report[:avg_first_response_time]/60).to_i, (inbox_report[:avg_resolution_time]/60).to_i ] %>
|
||||
<%= CSV.generate_line row %>
|
||||
<% end %>
|
||||
<%= CSV.generate_line row -%>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% headers = ['Label Title', 'Conversations count', 'Avg first response time (Minutes)', 'Avg resolution time (Minutes)'] %>
|
||||
<%= CSV.generate_line headers %>
|
||||
<%= CSV.generate_line headers -%>
|
||||
<% Current.account.labels.each do |label| %>
|
||||
<% label_report = V2::ReportBuilder.new(Current.account, {
|
||||
type: :label,
|
||||
@@ -8,5 +8,5 @@
|
||||
until: params[:until]
|
||||
}).summary %>
|
||||
<% row = [ label.title, label_report[:conversations_count], (label_report[:avg_first_response_time]/60).to_i, (label_report[:avg_resolution_time]/60).to_i ] %>
|
||||
<%= CSV.generate_line row %>
|
||||
<%= CSV.generate_line row -%>
|
||||
<% end %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
I18n.t('reports.team_csv.avg_resolution_time')
|
||||
]
|
||||
%>
|
||||
<%= CSV.generate_line headers %>
|
||||
<%= CSV.generate_line headers -%>
|
||||
<% Current.account.teams.each do |team| %>
|
||||
<% team_report = V2::ReportBuilder.new(Current.account, {
|
||||
type: :team,
|
||||
@@ -14,6 +14,6 @@
|
||||
until: params[:until]
|
||||
}).summary %>
|
||||
<% row = [ team.name, team_report[:conversations_count], (team_report[:avg_first_response_time]/60).to_i, (team_report[:avg_resolution_time]/60).to_i ] %>
|
||||
<%= CSV.generate_line 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'))] %>
|
||||
|
||||
Reference in New Issue
Block a user