split.ts 763 B

1234567891011121314151617181920212223242526
  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. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  7. const action: TicketArticleAction = {
  8. apps: ['mobile'],
  9. label: __('Split'),
  10. name: 'split',
  11. icon: 'split',
  12. view: {
  13. agent: ['change'],
  14. },
  15. link: `/tickets/create?ticket_id=${ticket.id}&article_id=${article.id}`,
  16. }
  17. // TODO: Return an empty array until the support for splitting articles is implemented in the ticket create screen.
  18. return []
  19. },
  20. }
  21. export default actionPlugin