ticket_overview_updates.rb 560 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Subscriptions
  3. class TicketOverviewUpdates < BaseSubscription
  4. description 'Updates to overviews'
  5. field :ticket_overviews, Gql::Types::OverviewType.connection_type, description: 'Current ticket overviews for the user.'
  6. def authorized?
  7. context.current_user.permissions?(['ticket.agent', 'ticket.customer'])
  8. end
  9. def update
  10. {
  11. ticket_overviews: ::Ticket::Overviews.all(current_user: context.current_user)
  12. }
  13. end
  14. end
  15. end