feat: Add agents filter in CSAT reports (#4106)

* add agents filter in csat reports
This commit is contained in:
Aswin Dev P.S
2022-03-04 17:19:26 +05:30
committed by GitHub
parent c76b588850
commit b94e67f5d7
9 changed files with 130 additions and 14 deletions

View File

@@ -40,4 +40,7 @@ class CsatSurveyResponse < ApplicationRecord
validates :account_id, presence: true
validates :contact_id, presence: true
validates :conversation_id, presence: true
scope :filter_by_created_at, ->(range) { where(created_at: range) if range.present? }
scope :filter_by_assigned_agent_id, ->(user_ids) { where(assigned_agent_id: user_ids) if user_ids.present? }
end