ticket-article-object-attributes.ts 3.4 KB

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