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

@@ -35,7 +35,7 @@ RSpec.describe 'Conversation Assignment API', type: :request do
end
it 'assigns a team to the conversation' do
team_member = create(:user, account: account, role: :agent)
team_member = create(:user, account: account, role: :agent, auto_offline: false)
create(:inbox_member, inbox: conversation.inbox, user: team_member)
create(:team_member, team: team, user: team_member)
params = { team_id: team.id }

View File

@@ -220,7 +220,7 @@ RSpec.describe 'Conversations API', type: :request do
end
context 'when it is an authenticated user' do
let(:agent) { create(:user, account: account, role: :agent) }
let(:agent) { create(:user, account: account, role: :agent, auto_offline: false) }
let(:team) { create(:team, account: account) }
it 'will not create a new conversation if agent does not have access to inbox' do