123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
- import type { ObjectManagerFrontendAttributesPayload } from '#shared/graphql/types.ts'
- export default (): ObjectManagerFrontendAttributesPayload => ({
- attributes: [
- {
- name: 'title',
- display: 'Title',
- dataType: 'input',
- dataOption: {
- type: 'text',
- maxlength: 200,
- null: false,
- translate: false,
- },
- isInternal: true,
- screens: {
- create_top: {
- null: false,
- },
- edit: {},
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'customer_id',
- display: 'Customer',
- dataType: 'user_autocompletion',
- dataOption: {
- relation: 'User',
- autocapitalize: false,
- multiple: false,
- guess: true,
- null: false,
- limit: 200,
- placeholder: 'Enter Person or Organization/Company',
- minLengt: 2,
- translate: false,
- permission: ['ticket.agent'],
- belongs_to: 'customer',
- },
- isInternal: true,
- screens: {
- create_top: {
- null: false,
- },
- edit: {},
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'organization_id',
- display: 'Organization',
- dataType: 'autocompletion_ajax_customer_organization',
- dataOption: {
- relation: 'Organization',
- autocapitalize: false,
- multiple: false,
- null: true,
- translate: false,
- permission: ['ticket.agent', 'ticket.customer'],
- belongs_to: 'organization',
- },
- isInternal: true,
- screens: {
- create_top: {
- null: false,
- },
- edit: {},
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'group_id',
- display: 'Group',
- dataType: 'select',
- dataOption: {
- default: '',
- relation: 'Group',
- relation_condition: {
- access: 'full',
- },
- nulloption: true,
- multiple: false,
- null: false,
- translate: false,
- only_shown_if_selectable: true,
- permission: ['ticket.agent', 'ticket.customer'],
- maxlength: 255,
- belongs_to: 'group',
- },
- isInternal: true,
- screens: {
- create_middle: {
- null: false,
- item_class: 'column',
- },
- edit: {
- null: false,
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'owner_id',
- display: 'Owner',
- dataType: 'select',
- dataOption: {
- default: '',
- relation: 'User',
- relation_condition: {
- roles: 'Agent',
- },
- nulloption: true,
- multiple: false,
- null: true,
- translate: false,
- permission: ['ticket.agent'],
- maxlength: 255,
- belongs_to: 'owner',
- },
- isInternal: true,
- screens: {
- create_middle: {
- null: true,
- item_class: 'column',
- },
- edit: {
- null: true,
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'state_id',
- display: 'State',
- dataType: 'select',
- dataOption: {
- relation: 'TicketState',
- nulloption: true,
- multiple: false,
- null: false,
- default: 2,
- translate: true,
- filter: [2, 1, 3, 4, 6, 7],
- maxlength: 255,
- belongs_to: 'state',
- },
- isInternal: true,
- screens: {
- create_middle: {
- null: false,
- item_class: 'column',
- filter: [2, 1, 3, 4, 7],
- },
- edit: {
- nulloption: false,
- null: false,
- filter: [2, 3, 4, 7],
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'pending_time',
- display: 'Pending till',
- dataType: 'datetime',
- dataOption: {
- future: true,
- past: false,
- diff: null,
- null: true,
- translate: true,
- permission: ['ticket.agent'],
- },
- isInternal: true,
- screens: {
- create_middle: {
- null: false,
- item_class: 'column',
- },
- edit: {
- null: false,
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'priority_id',
- display: 'Priority',
- dataType: 'select',
- dataOption: {
- relation: 'TicketPriority',
- nulloption: false,
- multiple: false,
- null: false,
- default: 2,
- translate: true,
- maxlength: 255,
- belongs_to: 'priority',
- },
- isInternal: true,
- screens: {
- create_middle: {
- null: false,
- item_class: 'column',
- },
- edit: {
- null: false,
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'tags',
- display: 'Tags',
- dataType: 'tag',
- dataOption: {
- type: 'text',
- null: true,
- translate: false,
- },
- isInternal: true,
- screens: {
- create_bottom: {
- null: true,
- },
- edit: {},
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- ],
- screens: [
- {
- name: 'create_top',
- attributes: ['title', 'customer_id', 'organization_id'],
- __typename: 'ObjectManagerScreenAttributes',
- },
- {
- name: 'edit',
- attributes: [
- 'group_id',
- 'owner_id',
- 'state_id',
- 'pending_time',
- 'priority_id',
- ],
- __typename: 'ObjectManagerScreenAttributes',
- },
- {
- name: 'create_middle',
- attributes: [
- 'group_id',
- 'owner_id',
- 'state_id',
- 'pending_time',
- 'priority_id',
- ],
- __typename: 'ObjectManagerScreenAttributes',
- },
- {
- name: 'create_bottom',
- attributes: ['tags'],
- __typename: 'ObjectManagerScreenAttributes',
- },
- ],
- __typename: 'ObjectManagerFrontendAttributesPayload',
- })
|