feat: Enable Capacity Config UI (#5164)

- Enables Capacity Config in UI
- Rewrite auto assignment Logic to consider only online agents

fixes: #4990
This commit is contained in:
Sojan Jose
2022-08-16 16:58:23 +05:30
committed by GitHub
parent 287f0a6de0
commit 2ecb2ca0f0
20 changed files with 225 additions and 216 deletions

View File

@@ -23,8 +23,8 @@ module AssignmentHandler
def find_assignee_from_team
return if team&.allow_auto_assign.blank?
team_members = inbox.members.ids & team.members.ids
::RoundRobin::AssignmentService.new(conversation: self, allowed_member_ids: team_members).find_assignee
team_members_with_capacity = inbox.member_ids_with_assignment_capacity & team.members.ids
::AutoAssignment::AgentAssignmentService.new(conversation: self, allowed_agent_ids: team_members_with_capacity).find_assignee
end
def notify_assignment_change