feat: use short_summary for downloading reports [CW-2962] (#8733)

This commit is contained in:
Shivam Mishra
2024-01-18 16:06:13 +05:30
committed by GitHub
parent 1f4d860d9d
commit 4bf23adcf5
2 changed files with 9 additions and 1 deletions

View File

@@ -46,6 +46,14 @@ class V2::ReportBuilder
}
end
def short_summary
{
conversations_count: conversations.count,
avg_first_response_time: avg_first_response_time_summary,
avg_resolution_time: avg_resolution_time_summary
}
end
def conversation_metrics
if params[:type].equal?(:account)
live_conversations

View File

@@ -37,7 +37,7 @@ module Api::V2::Accounts::ReportsHelper
business_hours: ActiveModel::Type::Boolean.new.cast(params[:business_hours])
}
)
).summary
).short_summary
end
private