diff --git a/packages/twenty-front/.storybook/main.ts b/packages/twenty-front/.storybook/main.ts index 633df49b3dae..3bd4d16b2a57 100644 --- a/packages/twenty-front/.storybook/main.ts +++ b/packages/twenty-front/.storybook/main.ts @@ -45,5 +45,16 @@ const config: StorybookConfig = { name: '@storybook/react-vite', options: {}, }, + viteFinal: async (config) => { + // Merge custom configuration into the default config + const { mergeConfig } = await import('vite'); + + return mergeConfig(config, { + // Add dependencies to pre-optimization + optimizeDeps: { + exclude: ['@tabler/icons-react'], + }, + }); + }, }; export default config; diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index f3c3f0e781f2..f5e61e07afd5 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -344,9 +344,9 @@ export type FieldConnection = { /** Type of the field */ export enum FieldMetadataType { + Actor = 'ACTOR', Address = 'ADDRESS', Boolean = 'BOOLEAN', - Actor = 'ACTOR', Currency = 'CURRENCY', Date = 'DATE', DateTime = 'DATE_TIME', @@ -452,13 +452,13 @@ export type Mutation = { generateTransientToken: TransientToken; impersonate: Verify; renewToken: AuthTokens; + runWorkflowVersion: WorkflowTriggerResult; sendInviteLink: SendInviteLink; signUp: LoginToken; skipSyncEmailOnboardingStep: OnboardingStepSuccess; syncRemoteTable: RemoteTable; syncRemoteTableSchemaChanges: RemoteTable; track: Analytics; - triggerWorkflow: WorkflowTriggerResult; unsyncRemoteTable: RemoteTable; updateBillingSubscription: UpdateBillingEntity; updateOneField: Field; @@ -610,6 +610,11 @@ export type MutationRenewTokenArgs = { }; +export type MutationRunWorkflowVersionArgs = { + input: RunWorkflowVersionInput; +}; + + export type MutationSendInviteLinkArgs = { emails: Array; }; @@ -639,11 +644,6 @@ export type MutationTrackArgs = { }; -export type MutationTriggerWorkflowArgs = { - workflowVersionId: Scalars['String']['input']; -}; - - export type MutationUnsyncRemoteTableArgs = { input: RemoteTableInput; }; @@ -1001,6 +1001,13 @@ export enum RemoteTableStatus { Synced = 'SYNCED' } +export type RunWorkflowVersionInput = { + /** Execution result in JSON format */ + payload?: InputMaybe; + /** Workflow version ID */ + workflowVersionId: Scalars['String']['input']; +}; + export type SendInviteLink = { __typename?: 'SendInviteLink'; /** Boolean that confirms query was dispatched */ @@ -1400,6 +1407,7 @@ export type WorkspaceFeatureFlagsArgs = { export enum WorkspaceActivationStatus { Active = 'ACTIVE', Inactive = 'INACTIVE', + OngoingCreation = 'ONGOING_CREATION', PendingCreation = 'PENDING_CREATION' } diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index ce20dd81f9d7..cb973a45cf52 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -1,5 +1,5 @@ -import * as Apollo from '@apollo/client'; import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -249,9 +249,9 @@ export type FieldConnection = { /** Type of the field */ export enum FieldMetadataType { + Actor = 'ACTOR', Address = 'ADDRESS', Boolean = 'BOOLEAN', - Actor = 'ACTOR', Currency = 'CURRENCY', Date = 'DATE', DateTime = 'DATE_TIME', @@ -344,11 +344,11 @@ export type Mutation = { generateTransientToken: TransientToken; impersonate: Verify; renewToken: AuthTokens; + runWorkflowVersion: WorkflowTriggerResult; sendInviteLink: SendInviteLink; signUp: LoginToken; skipSyncEmailOnboardingStep: OnboardingStepSuccess; track: Analytics; - triggerWorkflow: WorkflowTriggerResult; updateBillingSubscription: UpdateBillingEntity; updateOneObject: Object; updateOneServerlessFunction: ServerlessFunction; @@ -457,6 +457,11 @@ export type MutationRenewTokenArgs = { }; +export type MutationRunWorkflowVersionArgs = { + input: RunWorkflowVersionInput; +}; + + export type MutationSendInviteLinkArgs = { emails: Array; }; @@ -476,11 +481,6 @@ export type MutationTrackArgs = { }; -export type MutationTriggerWorkflowArgs = { - workflowVersionId: Scalars['String']; -}; - - export type MutationUpdateOneObjectArgs = { input: UpdateOneObjectInput; }; @@ -743,6 +743,13 @@ export enum RemoteTableStatus { Synced = 'SYNCED' } +export type RunWorkflowVersionInput = { + /** Execution result in JSON format */ + payload?: InputMaybe; + /** Workflow version ID */ + workflowVersionId: Scalars['String']; +}; + export type SendInviteLink = { __typename?: 'SendInviteLink'; /** Boolean that confirms query was dispatched */ @@ -1087,6 +1094,7 @@ export type WorkspaceFeatureFlagsArgs = { export enum WorkspaceActivationStatus { Active = 'ACTIVE', Inactive = 'INACTIVE', + OngoingCreation = 'ONGOING_CREATION', PendingCreation = 'PENDING_CREATION' } diff --git a/packages/twenty-front/src/modules/activities/timelineActivities/rows/components/EventIconDynamicComponent.tsx b/packages/twenty-front/src/modules/activities/timelineActivities/rows/components/EventIconDynamicComponent.tsx index d1b35d7f2293..ecb7bc90d51f 100644 --- a/packages/twenty-front/src/modules/activities/timelineActivities/rows/components/EventIconDynamicComponent.tsx +++ b/packages/twenty-front/src/modules/activities/timelineActivities/rows/components/EventIconDynamicComponent.tsx @@ -1,4 +1,4 @@ -import { IconCirclePlus, IconEditCircle, useIcons } from 'twenty-ui'; +import { IconCirclePlus, IconEditCircle, IconTrash, useIcons } from 'twenty-ui'; import { TimelineActivity } from '@/activities/timelineActivities/types/TimelineActivity'; import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; @@ -19,6 +19,9 @@ export const EventIconDynamicComponent = ({ if (eventAction === 'updated') { return ; } + if (eventAction === 'deleted') { + return ; + } const IconComponent = getIcon(linkedObjectMetadataItem?.icon); diff --git a/packages/twenty-front/src/modules/activities/timelineActivities/rows/main-object/components/EventRowMainObject.tsx b/packages/twenty-front/src/modules/activities/timelineActivities/rows/main-object/components/EventRowMainObject.tsx index f2dcc69055fa..053e9217bb66 100644 --- a/packages/twenty-front/src/modules/activities/timelineActivities/rows/main-object/components/EventRowMainObject.tsx +++ b/packages/twenty-front/src/modules/activities/timelineActivities/rows/main-object/components/EventRowMainObject.tsx @@ -45,6 +45,17 @@ export const EventRowMainObject = ({ /> ); } + case 'deleted': { + return ( + + + {labelIdentifierValue} + + was deleted by + {authorFullName} + + ); + } default: return null; } diff --git a/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx b/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx index 2581dd48934c..39d2437bf6f7 100644 --- a/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx +++ b/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx @@ -1,6 +1,6 @@ import { Button } from '@/ui/input/button/components/Button'; import styled from '@emotion/styled'; -import { Banner, IconComponent } from 'twenty-ui'; +import { Banner, BannerVariant, IconComponent } from 'twenty-ui'; const StyledBanner = styled(Banner)` position: absolute; @@ -14,26 +14,30 @@ const StyledText = styled.div` export const InformationBanner = ({ message, + variant = 'default', buttonTitle, buttonIcon, buttonOnClick, }: { message: string; - buttonTitle: string; + variant?: BannerVariant; + buttonTitle?: string; buttonIcon?: IconComponent; - buttonOnClick: () => void; + buttonOnClick?: () => void; }) => { return ( - + {message} -