note.ts 784 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { TicketArticleActionPlugin, TicketArticleType } from './types.ts'
  3. const actionPlugin: TicketArticleActionPlugin = {
  4. order: 100,
  5. addTypes(ticket, { config }) {
  6. const isInternal = !!config.ui_ticket_zoom_article_note_new_internal
  7. const type: TicketArticleType = {
  8. apps: ['mobile', 'desktop'],
  9. value: 'note',
  10. label: __('Note'),
  11. buttonLabel: isInternal ? __('Add internal note') : __('Add note'),
  12. icon: 'note',
  13. fields: {
  14. attachments: {},
  15. body: {
  16. required: true,
  17. },
  18. },
  19. view: {
  20. agent: ['change'],
  21. },
  22. internal: isInternal,
  23. }
  24. return [type]
  25. },
  26. }
  27. export default actionPlugin