organization-object-attributes.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. __typename: 'ObjectManagerFrontendAttribute',
  7. name: 'name',
  8. display: 'Name',
  9. dataType: 'input',
  10. dataOption: {
  11. type: 'text',
  12. maxlength: 150,
  13. null: false,
  14. item_class: 'formGroup--halfSize',
  15. },
  16. screens: {},
  17. isInternal: true,
  18. },
  19. {
  20. __typename: 'ObjectManagerFrontendAttribute',
  21. name: 'shared',
  22. display: 'Shared organization',
  23. dataType: 'boolean',
  24. dataOption: {
  25. null: true,
  26. default: true,
  27. note: "Customers in the organization can view each other's items.",
  28. item_class: 'formGroup--halfSize',
  29. options: {
  30. true: 'yes',
  31. false: 'no',
  32. },
  33. translate: true,
  34. permission: ['admin.organization'],
  35. },
  36. screens: {},
  37. isInternal: true,
  38. },
  39. {
  40. __typename: 'ObjectManagerFrontendAttribute',
  41. name: 'domain_assignment',
  42. display: 'Domain based assignment',
  43. dataType: 'boolean',
  44. dataOption: {
  45. null: true,
  46. default: false,
  47. note: 'Assign users based on user domain.',
  48. item_class: 'formGroup--halfSize',
  49. options: {
  50. true: 'yes',
  51. false: 'no',
  52. },
  53. translate: true,
  54. permission: ['admin.organization'],
  55. },
  56. screens: {},
  57. isInternal: true,
  58. },
  59. {
  60. __typename: 'ObjectManagerFrontendAttribute',
  61. name: 'domain',
  62. display: 'Domain',
  63. dataType: 'input',
  64. dataOption: {
  65. type: 'text',
  66. maxlength: 150,
  67. null: true,
  68. item_class: 'formGroup--halfSize',
  69. },
  70. screens: {},
  71. isInternal: true,
  72. },
  73. {
  74. __typename: 'ObjectManagerFrontendAttribute',
  75. name: 'note',
  76. display: 'Note',
  77. dataType: 'richtext',
  78. dataOption: {
  79. type: 'text',
  80. maxlength: 5000,
  81. null: true,
  82. note: 'Notes are visible to agents only, never to customers.',
  83. no_images: true,
  84. },
  85. screens: {},
  86. isInternal: true,
  87. },
  88. {
  89. __typename: 'ObjectManagerFrontendAttribute',
  90. name: 'active',
  91. display: 'Active',
  92. dataType: 'active',
  93. dataOption: {
  94. null: true,
  95. default: true,
  96. permission: ['admin.organization'],
  97. },
  98. screens: {},
  99. isInternal: true,
  100. },
  101. {
  102. __typename: 'ObjectManagerFrontendAttribute',
  103. name: 'vip',
  104. display: 'VIP',
  105. dataType: 'boolean',
  106. dataOption: {
  107. options: {
  108. true: 'yes',
  109. false: 'no',
  110. },
  111. null: true,
  112. default: false,
  113. permission: ['admin.organization'],
  114. },
  115. screens: {},
  116. isInternal: true,
  117. },
  118. {
  119. __typename: 'ObjectManagerFrontendAttribute',
  120. name: 'test',
  121. display: 'Test Field',
  122. dataType: 'input',
  123. dataOption: {
  124. default: '',
  125. type: 'text',
  126. maxlength: 120,
  127. linktemplate: '',
  128. null: true,
  129. options: {},
  130. relation: '',
  131. },
  132. screens: {},
  133. isInternal: false,
  134. },
  135. {
  136. __typename: 'ObjectManagerFrontendAttribute',
  137. name: 'textarea',
  138. display: 'Textarea Field',
  139. dataType: 'textarea',
  140. dataOption: {
  141. default: '',
  142. maxlength: 500,
  143. rows: 4,
  144. null: true,
  145. options: {},
  146. relation: '',
  147. },
  148. screens: {},
  149. isInternal: false,
  150. },
  151. ],
  152. screens: [
  153. {
  154. name: 'view',
  155. attributes: [
  156. 'name',
  157. 'shared',
  158. 'domain_assignment',
  159. 'domain',
  160. 'note',
  161. 'active',
  162. 'vip',
  163. 'test',
  164. 'textarea',
  165. ],
  166. },
  167. {
  168. name: 'edit',
  169. attributes: [
  170. 'name',
  171. 'shared',
  172. 'domain_assignment',
  173. 'domain',
  174. 'note',
  175. 'active',
  176. 'vip',
  177. 'test',
  178. 'textarea',
  179. ],
  180. },
  181. ],
  182. })