feat: API to Filter reports by teams (#3066)

Add API to Filter reports by teams

Fixes: #2916
This commit is contained in:
Aswin Dev P.S
2021-09-27 21:12:08 +05:30
committed by GitHub
parent 8b7f6c691a
commit 15aaa8883c
10 changed files with 88 additions and 9 deletions

View File

@@ -40,4 +40,12 @@ class Team < ApplicationRecord
def remove_member(user_id)
team_members.find_by(user_id: user_id)&.destroy
end
def messages
account.messages.where(conversation_id: conversations.pluck(:id))
end
def events
account.events.where(conversation_id: conversations.pluck(:id))
end
end