note.ts 728 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import type { TicketArticleActionPlugin, TicketArticleType } from './types'
  3. const actionPlugin: TicketArticleActionPlugin = {
  4. order: 100,
  5. addTypes(ticket, { view, config }) {
  6. let internal = false
  7. if (view.isTicketAgent)
  8. internal = !!config.ui_ticket_zoom_article_note_new_internal
  9. const type: TicketArticleType = {
  10. apps: ['mobile'],
  11. value: 'note',
  12. label: __('Note'),
  13. icon: {
  14. mobile: 'mobile-note',
  15. },
  16. view: {
  17. agent: ['read'],
  18. customer: ['read'],
  19. },
  20. attributes: ['attachments'],
  21. internal,
  22. }
  23. return [type]
  24. },
  25. }
  26. export default actionPlugin