small tweak for notifications

This commit is contained in:
Harry Bomrah 2015-10-02 15:34:33 +08:00
parent e11e82ad9f
commit 2256f04683
1 changed files with 2 additions and 2 deletions

View File

@ -50,13 +50,13 @@ class Admin::TicketsController < OrbitAdminController
end
def tagged_tickets
tqrs = TicketQueryResponse.where(:user_tags.in => [current_user.id.to_s], :read_by.nin => [current_user.id.to_s])
tqrs = TicketQueryResponse.where(:user_tags.in => [current_user.id.to_s], :read_by.nin => [current_user.id.to_s], :status.ne => "closed")
@unread_tickets = []
@read_tickets = []
tqrs.each do |tqr|
@unread_tickets << tqr.ticket_query.ticket if !tqr.ticket_query.nil? && !tqr.ticket_query.ticket.nil?
end
tqrs = TicketQueryResponse.where(:user_tags.in => [current_user.id.to_s], :read_by.in => [current_user.id.to_s])
tqrs = TicketQueryResponse.where(:user_tags.in => [current_user.id.to_s], :read_by.in => [current_user.id.to_s], :status.ne => "closed")
tqrs.each do |tqr|
@read_tickets << tqr.ticket_query.ticket if !tqr.ticket_query.nil? && !tqr.ticket_query.ticket.nil?
end