feat: Add CSAT reports (#2608)

This commit is contained in:
Pranav Raj S
2021-07-14 10:20:06 +05:30
committed by GitHub
parent b7806fc210
commit cb44eb2964
34 changed files with 1120 additions and 57 deletions

View File

@@ -0,0 +1,3 @@
json.total_count @total_count
json.ratings_count @ratings_count
json.total_sent_messages_count @total_sent_messages_count

View File

@@ -3,7 +3,15 @@ json.rating resource.rating
json.feedback_message resource.feedback_message
json.account_id resource.account_id
json.message_id resource.message_id
json.contact resource.contact
if resource.contact
json.contact do
json.partial! 'api/v1/models/contact.json.jbuilder', resource: resource.contact
end
end
json.conversation_id resource.conversation.display_id
json.assigned_agent resource.assigned_agent
if resource.assigned_agent
json.assigned_agent do
json.partial! 'api/v1/models/agent.json.jbuilder', resource: resource.assigned_agent
end
end
json.created_at resource.created_at