split.ts 590 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { TicketArticleActionPlugin, TicketArticleAction } from './types.ts'
  3. const actionPlugin: TicketArticleActionPlugin = {
  4. order: 700,
  5. addActions(_ticket, article) {
  6. const action: TicketArticleAction = {
  7. apps: ['desktop'],
  8. label: __('Split'),
  9. name: 'split',
  10. icon: 'split',
  11. view: {
  12. agent: ['read'],
  13. },
  14. link: `/tickets/create?splitTicketArticleId=${encodeURIComponent(article.id)}`,
  15. }
  16. return [action]
  17. },
  18. }
  19. export default actionPlugin