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

@@ -30,8 +30,7 @@ class Api::V1::Accounts::CsatSurveyResponsesController < Api::V1::Accounts::Base
def set_csat_survey_responses
@csat_survey_responses = filtrate(
Current.account.csat_survey_responses.includes([:conversation, :assigned_agent, :contact])
)
@csat_survey_responses = @csat_survey_responses.where(created_at: range) if range.present?
).filter_by_created_at(range).filter_by_assigned_agent_id(params[:user_ids])
end
def set_current_page_surveys