ticket-customer-object-attributes.ts 3.1 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: 'title',
  7. display: 'Title',
  8. dataType: 'input',
  9. dataOption: {
  10. type: 'text',
  11. maxlength: 200,
  12. null: false,
  13. translate: false,
  14. },
  15. isInternal: true,
  16. screens: {
  17. create_top: {
  18. null: false,
  19. },
  20. edit: {},
  21. },
  22. __typename: 'ObjectManagerFrontendAttribute',
  23. },
  24. {
  25. name: 'organization_id',
  26. display: 'Organization',
  27. dataType: 'autocompletion_ajax_customer_organization',
  28. dataOption: {
  29. relation: 'Organization',
  30. autocapitalize: false,
  31. multiple: false,
  32. null: true,
  33. translate: false,
  34. permission: ['ticket.agent', 'ticket.customer'],
  35. belongs_to: 'organization',
  36. },
  37. isInternal: true,
  38. screens: {
  39. create_top: {
  40. null: false,
  41. },
  42. edit: {},
  43. },
  44. __typename: 'ObjectManagerFrontendAttribute',
  45. },
  46. {
  47. name: 'group_id',
  48. display: 'Group',
  49. dataType: 'select',
  50. dataOption: {
  51. default: '',
  52. relation: 'Group',
  53. relation_condition: {
  54. access: 'full',
  55. },
  56. nulloption: true,
  57. multiple: false,
  58. null: false,
  59. translate: false,
  60. only_shown_if_selectable: true,
  61. permission: ['ticket.agent', 'ticket.customer'],
  62. maxlength: 255,
  63. belongs_to: 'group',
  64. },
  65. isInternal: true,
  66. screens: {
  67. create_middle: {
  68. null: false,
  69. item_class: 'column',
  70. },
  71. edit: {
  72. null: false,
  73. },
  74. },
  75. __typename: 'ObjectManagerFrontendAttribute',
  76. },
  77. {
  78. name: 'state_id',
  79. display: 'State',
  80. dataType: 'select',
  81. dataOption: {
  82. relation: 'TicketState',
  83. nulloption: true,
  84. multiple: false,
  85. null: false,
  86. default: 2,
  87. translate: true,
  88. filter: [2, 1, 3, 4, 6, 7],
  89. maxlength: 255,
  90. belongs_to: 'state',
  91. },
  92. isInternal: true,
  93. screens: {
  94. create_middle: {
  95. null: false,
  96. item_class: 'column',
  97. filter: [2, 1, 3, 4, 7],
  98. },
  99. edit: {
  100. nulloption: false,
  101. null: false,
  102. filter: [2, 3, 4, 7],
  103. },
  104. },
  105. __typename: 'ObjectManagerFrontendAttribute',
  106. },
  107. ],
  108. screens: [
  109. {
  110. name: 'create_top',
  111. attributes: ['title', 'organization_id'],
  112. __typename: 'ObjectManagerScreenAttributes',
  113. },
  114. {
  115. name: 'edit',
  116. attributes: ['group_id', 'state_id'],
  117. __typename: 'ObjectManagerScreenAttributes',
  118. },
  119. {
  120. name: 'create_middle',
  121. attributes: ['group_id', 'state_id'],
  122. __typename: 'ObjectManagerScreenAttributes',
  123. },
  124. {
  125. name: 'create_bottom',
  126. attributes: [],
  127. __typename: 'ObjectManagerScreenAttributes',
  128. },
  129. ],
  130. __typename: 'ObjectManagerFrontendAttributesPayload',
  131. })