feat: auditlog for team and inbox member updates (#7516)

- adds an audit log when an agent is added or removed from a team
- adds an audit log when an agent is added or removed from an inbox

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Vishnu Narayanan
2023-08-16 08:25:19 +05:30
committed by GitHub
parent 2df83276e0
commit 7b8a3fcae0
9 changed files with 248 additions and 15 deletions

View File

@@ -35,3 +35,5 @@ class InboxMember < ApplicationRecord
::AutoAssignment::InboxRoundRobinService.new(inbox: inbox).remove_agent_from_queue(user_id) if inbox.present?
end
end
InboxMember.include_mod_with('Audit::InboxMember')

View File

@@ -19,3 +19,5 @@ class TeamMember < ApplicationRecord
belongs_to :team
validates :user_id, uniqueness: { scope: :team_id }
end
TeamMember.include_mod_with('Audit::TeamMember')