Skip to content

The open alternative to Salesforce, designed for AI.

1.3 KB
Raw Blame
import {
  AggregateOperations,
  definePageLayoutTab,
  PageLayoutTabLayoutMode,
  STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS,
} from 'twenty-sdk/define';

import { POST_CARD_UNIVERSAL_IDENTIFIER } from '../objects/post-card.object';

export default definePageLayoutTab({
  universalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000010',
  pageLayoutUniversalIdentifier:
    STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.companyRecordPage
      .universalIdentifier,
  title: 'Extra Tab',
  position: 1000,
  icon: 'IconLayout',
  layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,
  widgets: [
    {
      universalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000012',
      title: 'Total Priority',
      type: 'GRAPH',
      objectUniversalIdentifier: POST_CARD_UNIVERSAL_IDENTIFIER,
      configuration: {
        configurationType: 'AGGREGATE_CHART',
        aggregateFieldMetadataUniversalIdentifier:
          '7b57bd63-5a4c-46ca-9d52-42c8f02d1df6',
        aggregateOperation: AggregateOperations.SUM,
      },
    },
    {
      universalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000011',
      title: 'Extra Widget',
      type: 'FRONT_COMPONENT',
      heightBehavior: 'TAB_VIEWPORT',
      configuration: {
        configurationType: 'FRONT_COMPONENT',
        frontComponentUniversalIdentifier:
          '370ae182-743f-4ecb-b625-7ac48e21f0e5',
      },
    },
  ],
});