123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
- import type { ObjectManagerFrontendAttributesPayload } from '#shared/graphql/types.ts'
- export default (): ObjectManagerFrontendAttributesPayload => ({
- attributes: [
- {
- name: 'firstname',
- display: 'First name',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'text',
- maxlength: 150,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'lastname',
- display: 'Last name',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'text',
- maxlength: 150,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'email',
- display: 'Email',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'email',
- maxlength: 150,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {
- signup: {
- '-all-': {
- null: false,
- },
- },
- invite_agent: {
- '-all-': {
- null: false,
- },
- },
- invite_customer: {
- '-all-': {
- null: false,
- },
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'web',
- display: 'Web',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'url',
- maxlength: 250,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'phone',
- display: 'Phone',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'tel',
- maxlength: 100,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'mobile',
- display: 'Mobile',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'tel',
- maxlength: 100,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'fax',
- display: 'Fax',
- dataType: 'input',
- isInternal: true,
- dataOption: {
- type: 'tel',
- maxlength: 100,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'organization_id',
- display: 'Organization',
- dataType: 'autocompletion_ajax',
- isInternal: true,
- dataOption: {
- multiple: false,
- nulloption: true,
- null: true,
- relation: 'Organization',
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'organization_ids',
- display: 'Secondary organizations',
- dataType: 'autocompletion_ajax',
- isInternal: true,
- dataOption: {
- multiple: true,
- nulloption: true,
- null: true,
- relation: 'Organization',
- item_class: 'formGroup--halfSize',
- display_limit: 3,
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'department',
- display: 'Department',
- dataType: 'input',
- isInternal: false,
- dataOption: {
- type: 'text',
- maxlength: 200,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'address',
- display: 'Address',
- dataType: 'textarea',
- isInternal: false,
- dataOption: {
- type: 'text',
- maxlength: 500,
- rows: 4,
- null: true,
- item_class: 'formGroup--halfSize',
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'note',
- display: 'Note',
- dataType: 'richtext',
- isInternal: true,
- dataOption: {
- type: 'text',
- maxlength: 5000,
- null: true,
- note: 'Notes are visible to agents only, never to customers.',
- no_images: true,
- },
- screens: {},
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'role_ids',
- display: 'Roles',
- dataType: 'user_permission',
- isInternal: true,
- dataOption: {
- null: false,
- item_class: 'checkbox',
- permission: ['admin.user'],
- relation: 'Role',
- },
- screens: {
- invite_agent: {
- '-all-': {
- null: false,
- },
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- {
- name: 'group_ids',
- display: 'Group permissions',
- dataType: 'group_permissions',
- isInternal: true,
- dataOption: {
- null: true,
- item_class: 'checkbox',
- permission: ['admin.user'],
- },
- screens: {
- invite_agent: {
- '-all-': {
- null: true,
- },
- },
- },
- __typename: 'ObjectManagerFrontendAttribute',
- },
- ],
- screens: [
- {
- name: 'view',
- attributes: [
- 'firstname',
- 'lastname',
- 'email',
- 'web',
- 'phone',
- 'mobile',
- 'fax',
- 'organization_id',
- 'organization_ids',
- 'department',
- 'address',
- 'note',
- ],
- },
- {
- name: 'edit',
- attributes: [
- 'firstname',
- 'lastname',
- 'email',
- 'web',
- 'phone',
- 'mobile',
- 'fax',
- 'organization_id',
- 'organization_ids',
- 'department',
- 'address',
- 'note',
- ],
- },
- {
- name: 'invite_agent',
- attributes: ['firstname', 'lastname', 'email', 'role_ids', 'group_ids'],
- },
- ],
- })
|