ticket-article-object-attributes.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { ObjectManagerFrontendAttributesPayload } from '#shared/graphql/types.ts'
  3. export default (): ObjectManagerFrontendAttributesPayload => ({
  4. attributes: [
  5. {
  6. name: 'type_id',
  7. display: 'Type',
  8. dataType: 'select',
  9. dataOption: {
  10. relation: 'TicketArticleType',
  11. nulloption: false,
  12. multiple: false,
  13. null: false,
  14. default: 10,
  15. translate: true,
  16. maxlength: 255,
  17. belongs_to: 'type',
  18. },
  19. isInternal: true,
  20. screens: {
  21. create_middle: {},
  22. edit: {
  23. null: false,
  24. },
  25. },
  26. __typename: 'ObjectManagerFrontendAttribute',
  27. },
  28. {
  29. name: 'internal',
  30. display: 'Visibility',
  31. dataType: 'select',
  32. dataOption: {
  33. options: {
  34. true: 'internal',
  35. false: 'public',
  36. },
  37. nulloption: false,
  38. multiple: false,
  39. null: true,
  40. default: false,
  41. translate: true,
  42. maxlength: 255,
  43. },
  44. isInternal: true,
  45. screens: {
  46. create_middle: {},
  47. edit: {
  48. null: false,
  49. },
  50. },
  51. __typename: 'ObjectManagerFrontendAttribute',
  52. },
  53. {
  54. name: 'to',
  55. display: 'To',
  56. dataType: 'input',
  57. dataOption: {
  58. type: 'text',
  59. maxlength: 1000,
  60. null: true,
  61. },
  62. isInternal: true,
  63. screens: {
  64. create_middle: {},
  65. edit: {
  66. null: true,
  67. },
  68. },
  69. __typename: 'ObjectManagerFrontendAttribute',
  70. },
  71. {
  72. name: 'cc',
  73. display: 'CC',
  74. dataType: 'input',
  75. dataOption: {
  76. type: 'text',
  77. maxlength: 1000,
  78. null: true,
  79. },
  80. isInternal: true,
  81. screens: {
  82. create_top: {},
  83. create_middle: {},
  84. edit: {
  85. null: true,
  86. },
  87. },
  88. __typename: 'ObjectManagerFrontendAttribute',
  89. },
  90. {
  91. name: 'body',
  92. display: 'Text',
  93. dataType: 'richtext',
  94. dataOption: {
  95. type: 'richtext',
  96. maxlength: 150000,
  97. upload: true,
  98. rows: 8,
  99. null: true,
  100. },
  101. isInternal: true,
  102. screens: {
  103. create_top: {
  104. null: false,
  105. },
  106. edit: {
  107. null: true,
  108. },
  109. },
  110. __typename: 'ObjectManagerFrontendAttribute',
  111. },
  112. ],
  113. screens: [
  114. {
  115. name: 'create_middle',
  116. attributes: [],
  117. __typename: 'ObjectManagerScreenAttributes',
  118. },
  119. {
  120. name: 'edit',
  121. attributes: ['type_id', 'internal', 'to', 'cc', 'body'],
  122. __typename: 'ObjectManagerScreenAttributes',
  123. },
  124. {
  125. name: 'create_top',
  126. attributes: ['body'],
  127. __typename: 'ObjectManagerScreenAttributes',
  128. },
  129. ],
  130. __typename: 'ObjectManagerFrontendAttributesPayload',
  131. })