From 5404a8ba2d5b7ad5383b8c3a7f80bf423b34c630 Mon Sep 17 00:00:00 2001 From: NitinPSingh <71833171+NitinPSingh@users.noreply.github.com> Date: Fri, 16 Aug 2024 19:01:04 +0530 Subject: [PATCH 1/8] fixes #6499 alignment issue on workspace switcher (#6589) fix #6499 - fix the size of workspace switcher to 32px from 40px ![Screenshot 2024-08-09 140212](https://github.com/user-attachments/assets/425c9089-8969-4d59-82ef-10572cfa7027) - fix alignment issues ![Screenshot 2024-08-09 142357](https://github.com/user-attachments/assets/2e3e76f2-8a81-48e9-86ff-691c11215583) --------- Co-authored-by: Lucas Bordeau --- packages/twenty-front/src/hooks/useIsMatchingLocation.ts | 2 +- .../src/loading/components/LeftPanelSkeletonLoader.tsx | 2 +- .../emails/components/MessageThreadSubscribersChip.tsx | 2 +- .../utils/generateDefaultRecordChipData.ts | 2 +- .../input/components/MultiSelectFieldInput.tsx | 4 ++-- .../components/RecordDetailRelationSection.tsx | 2 +- .../utils/findUnmatchedRequiredFields.ts | 9 ++++----- .../src/modules/ui/input/components/Toggle.tsx | 2 +- .../navigation-drawer/components/NavigationDrawer.tsx | 2 +- .../components/NavigationDrawerHeader.tsx | 2 -- 10 files changed, 13 insertions(+), 16 deletions(-) diff --git a/packages/twenty-front/src/hooks/useIsMatchingLocation.ts b/packages/twenty-front/src/hooks/useIsMatchingLocation.ts index 044a344068a3..aa57dbb432e3 100644 --- a/packages/twenty-front/src/hooks/useIsMatchingLocation.ts +++ b/packages/twenty-front/src/hooks/useIsMatchingLocation.ts @@ -9,7 +9,7 @@ export const useIsMatchingLocation = () => { return useCallback( (path: string, basePath?: AppBasePath) => { const constructedPath = basePath - ? new URL(basePath + path, document.location.origin).pathname ?? '' + ? (new URL(basePath + path, document.location.origin).pathname ?? '') : path; return !!matchPath(constructedPath, location.pathname); diff --git a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx index 9a94373cef34..38803c9efecf 100644 --- a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx +++ b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx @@ -17,7 +17,7 @@ const StyledItemsContainer = styled.div` align-items: center; display: flex; flex-direction: column; - gap: 12px; + gap: 14px; height: calc(100dvh - 32px); margin-bottom: auto; max-width: 204px; diff --git a/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx b/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx index d10827215835..6ef97d07b28f 100644 --- a/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx +++ b/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx @@ -45,7 +45,7 @@ export const MessageThreadSubscribersChip = ({ ? `+${numberOfMessageThreadSubscribers - MAX_NUMBER_OF_AVATARS}` : null; - const label = isPrivateThread ? privateLabel : moreAvatarsLabel ?? ''; + const label = isPrivateThread ? privateLabel : (moreAvatarsLabel ?? ''); return ( { const name = isFieldFullNameValue(record.name) ? record.name.firstName + ' ' + record.name.lastName - : record.name ?? ''; + : (record.name ?? ''); return { name, diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx index d36b2b9fbfc4..c6134f911a2d 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx @@ -42,8 +42,8 @@ export const MultiSelectFieldInput = ({ const [searchFilter, setSearchFilter] = useState(''); const containerRef = useRef(null); - const selectedOptions = fieldDefinition.metadata.options.filter( - (option) => fieldValues?.includes(option.value), + const selectedOptions = fieldDefinition.metadata.options.filter((option) => + fieldValues?.includes(option.value), ); const optionsInDropDown = fieldDefinition.metadata.options; diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx index e59ca3be75fe..426078f807b4 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx @@ -69,7 +69,7 @@ export const RecordDetailRelationSection = ({ const relationRecords: ObjectRecord[] = fieldValue && isToOneObject ? [fieldValue as ObjectRecord] - : (fieldValue as ObjectRecord[]) ?? []; + : ((fieldValue as ObjectRecord[]) ?? []); const relationRecordIds = relationRecords.map(({ id }) => id); diff --git a/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts b/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts index e7219f70bddf..71af1840263d 100644 --- a/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts +++ b/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts @@ -6,11 +6,10 @@ export const findUnmatchedRequiredFields = ( columns: Columns, ) => fields - .filter( - (field) => - field.fieldValidationDefinitions?.some( - (validation) => validation.rule === 'required', - ), + .filter((field) => + field.fieldValidationDefinitions?.some( + (validation) => validation.rule === 'required', + ), ) .filter( (field) => diff --git a/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx b/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx index 9aadab0eb028..f723e93e1c5a 100644 --- a/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx @@ -16,7 +16,7 @@ type ContainerProps = { const StyledContainer = styled.div` align-items: center; background-color: ${({ theme, isOn, color }) => - isOn ? color ?? theme.color.blue : theme.background.quaternary}; + isOn ? (color ?? theme.color.blue) : theme.background.quaternary}; border-radius: 10px; cursor: pointer; display: flex; diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx index 406402377646..92b020a7dc7b 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx @@ -32,7 +32,7 @@ const StyledContainer = styled.div<{ isSubMenu?: boolean }>` box-sizing: border-box; display: flex; flex-direction: column; - gap: ${({ theme }) => theme.spacing(3)}; + gap: ${({ theme }) => theme.spacing(3.5)}; height: 100%; min-width: ${DESKTOP_NAV_DRAWER_WIDTHS.menu}px; padding: ${({ theme }) => theme.spacing(3, 2, 4)}; diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx index d6bbf810089b..03ae1fcd0ada 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx @@ -15,8 +15,6 @@ const StyledContainer = styled.div<{ isMultiWorkspace: boolean }>` display: flex; gap: ${({ theme, isMultiWorkspace }) => !isMultiWorkspace ? theme.spacing(2) : null}; - padding: ${({ theme, isMultiWorkspace }) => - !isMultiWorkspace ? theme.spacing(1) : null}; height: ${({ theme }) => theme.spacing(8)}; user-select: none; `; From 20d84755bb37366c449e3890e48cbafa17bc7c56 Mon Sep 17 00:00:00 2001 From: Nabhag Motivaras <65061890+Nabhag8848@users.noreply.github.com> Date: Fri, 16 Aug 2024 19:48:45 +0530 Subject: [PATCH 2/8] fix: exclude tabler/icons-react from optimizeDeps to avoid crashing performance CI (#6621) ## ISSUE (Warning) - Fixes #6437 ### Things needed to investigate : - [x] Can we exclude @tabler-icons from Babel / wyw-in-js / the vite config of Storybook ? > Yes we can - [ ] Is there a reproducible difference between non-Linaria components loading time and Linaria components loading times ? > Couldn't find anything related to this, yet. but changes fix the problem. --- packages/twenty-front/vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts index 924f9c9d7ee0..a711d05916f1 100644 --- a/packages/twenty-front/vite.config.ts +++ b/packages/twenty-front/vite.config.ts @@ -104,5 +104,8 @@ export default defineConfig(({ command, mode }) => { localsConvention: 'camelCaseOnly', }, }, + optimizeDeps: { + exclude: ['@tabler/icons-react'], + }, }; }); From db54469c8a70d4dd02de0c80242c751bc2696d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20M?= Date: Fri, 16 Aug 2024 21:20:02 +0200 Subject: [PATCH 3/8] feat: soft delete (#6576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement soft delete on standards and custom objects. This is a temporary solution, when we drop `pg_graphql` we should rely on the `softDelete` functions of TypeORM. --------- Co-authored-by: FĂ©lix Malfait Co-authored-by: Lucas Bordeau --- packages/twenty-front/.storybook/main.ts | 11 + .../src/generated-metadata/graphql.ts | 22 +- .../twenty-front/src/generated/graphql.tsx | 24 ++- .../components/EventIconDynamicComponent.tsx | 5 +- .../components/EventRowMainObject.tsx | 11 + .../components/InformationBanner.tsx | 28 +-- .../InformationBannerDeletedRecord.tsx | 37 ++++ .../constants/InformationBannerHeight.ts | 1 + .../hooks/useDeleteManyRecords.ts | 4 +- .../hooks/useDestroyManyRecordMutation.ts | 41 ++++ .../hooks/useDestroyManyRecords.ts | 115 ++++++++++ .../object-record/hooks/useFindOneRecord.ts | 3 + .../hooks/useFindOneRecordQuery.ts | 12 ++ .../hooks/useRestoreManyRecords.ts | 94 ++++++++ .../hooks/useRestoreManyRecordsMutation.ts | 41 ++++ .../object-filter-dropdown/types/Filter.ts | 1 + .../hooks/useHandleToggleTrashColumnFilter.ts | 67 ++++++ .../RecordIndexOptionsDropdownContent.tsx | 15 ++ .../components/RecordShowContainer.tsx | 55 +++-- ...ordForShowPageOperationSignatureFactory.ts | 2 +- .../record-show/hooks/useRecordShowPage.ts | 1 + ...DestroyManyRecordsMutationResponseField.ts | 5 + ...RestoreManyRecordsMutationResponseField.ts | 5 + .../SettingsNavigationDrawerItems.tsx | 3 +- .../components/SettingsPageContainer.tsx | 18 +- .../objects/SettingsObjectCoverImage.tsx | 3 +- ...grationDatabaseConnectionShowContainer.tsx | 3 +- ...tegrationEditDatabaseConnectionContent.tsx | 5 +- .../twenty-front/src/modules/types/AppPath.ts | 2 +- .../ui/input/button/components/Button.tsx | 1 + .../button/components/FloatingButton.tsx | 12 +- .../src/modules/ui/layout/page/PageHeader.tsx | 19 +- .../src/modules/ui/layout/page/PagePanel.tsx | 12 +- .../ui/layout/page/SubMenuTopBarContainer.tsx | 15 +- .../components/ShowPageMoreButton.tsx | 59 ++++- .../bread-crumb/components/Breadcrumb.tsx | 10 +- .../views/components/SortOrFilterChip.tsx | 52 ++++- .../views/components/VariantFilterChip.tsx | 30 +++ .../views/components/ViewBarDetails.tsx | 47 +++- .../src/modules/views/types/ViewFilter.ts | 1 + .../src/pages/settings/Releases.tsx | 4 +- .../src/pages/settings/SettingsProfile.tsx | 10 +- .../src/pages/settings/SettingsWorkspace.tsx | 10 +- .../settings/SettingsWorkspaceMembers.tsx | 9 +- .../settings/accounts/SettingsAccounts.tsx | 7 +- .../accounts/SettingsAccountsCalendars.tsx | 11 +- .../accounts/SettingsAccountsEmails.tsx | 11 +- .../settings/accounts/SettingsNewAccount.tsx | 11 +- .../crm-migration/SettingsCRMMigration.tsx | 11 +- .../settings/data-model/SettingsNewObject.tsx | 43 ++-- .../SettingsObjectDetailPageContent.tsx | 18 +- .../data-model/SettingsObjectEdit.tsx | 36 ++-- .../data-model/SettingsObjectFieldEdit.tsx | 28 +-- .../SettingsObjectNewFieldStep1.tsx | 45 ++-- .../data-model/SettingsObjectOverview.tsx | 17 +- .../settings/data-model/SettingsObjects.tsx | 39 ++-- .../developers/SettingsDevelopers.tsx | 14 +- .../SettingsDevelopersApiKeyDetail.tsx | 25 +-- .../api-keys/SettingsDevelopersApiKeysNew.tsx | 45 ++-- .../SettingsDevelopersWebhookDetail.tsx | 39 ++-- .../SettingsDevelopersWebhooksNew.tsx | 39 ++-- .../SettingsIntegrationDatabase.tsx | 8 +- ...tingsIntegrationEditDatabaseConnection.tsx | 13 +- ...ttingsIntegrationNewDatabaseConnection.tsx | 51 ++--- .../integrations/SettingsIntegrations.tsx | 7 +- .../components/SettingsAppearance.tsx | 10 +- .../ResetServerlessFunctionStatesEffect.tsx | 4 +- .../SettingsServerlessFunctionDetail.tsx | 47 ++-- .../SettingsServerlessFunctions.tsx | 37 ++-- .../SettingsServerlessFunctionsNew.tsx | 53 ++--- .../twenty-front/src/utils/title-utils.ts | 4 - packages/twenty-front/vite.config.ts | 3 - packages/twenty-server/package.json | 3 +- .../migrations/1723038077987-addSoftDelete.ts | 17 ++ .../factories/args-string.factory.ts | 9 + .../factories/fields-string.factory.ts | 11 +- .../factories/find-many-query.factory.ts | 1 + .../factories/find-one-query.factory.ts | 2 + .../factories/relation-field-alias.factory.ts | 9 +- .../interfaces/record.interface.ts | 1 + ...rkspace-query-builder-options.interface.ts | 1 + .../listeners/entity-events-to-db.listener.ts | 9 +- .../utils/with-soft-deleted.util.ts | 29 +++ .../types/workspace-query-hook.type.ts | 8 +- .../workspace-query-runner.service.ts | 201 ++++++++++++++++-- .../destroy-many-resolver.factory.ts | 42 ++++ .../factories/factories.ts | 6 + .../restore-many-resolver.factory.ts | 42 ++++ .../workspace-resolvers-builder.interface.ts | 14 +- .../workspace-resolver.factory.ts | 6 + .../factories/root-type.factory.ts | 22 +- .../utils/__tests__/get-resolver-args.spec.ts | 6 + .../utils/get-resolver-args.util.ts | 14 ++ .../interfaces/object-metadata.interface.ts | 1 + .../object-metadata/object-metadata.entity.ts | 3 + .../twenty-orm/base.workspace-entity.ts | 19 +- .../twenty-orm/custom.workspace-entity.ts | 6 +- ...s => workspace-custom-entity.decorator.ts} | 9 +- .../decorators/workspace-entity.decorator.ts | 2 + .../workspace-is-primary-field.decorator.ts | 2 +- .../factories/entity-schema-column.factory.ts | 6 + .../factories/entity-schema.factory.ts | 1 + ...orkspace-entity-metadata-args.interface.ts | 7 +- ...extended-entity-metadata-args.interface.ts | 5 + .../utils/__tests__/get-resolver-name.spec.ts | 2 + .../engine/utils/get-resolver-name.util.ts | 4 + .../constants/standard-field-ids.ts | 1 + .../factories/standard-field.factory.ts | 8 + .../factories/standard-object.factory.ts | 1 + .../company.workspace-entity.ts | 1 + .../note-target.workspace-entity.ts | 1 + .../standard-objects/note.workspace-entity.ts | 1 + .../opportunity.workspace-entity.ts | 1 + .../person.workspace-entity.ts | 1 + .../task-target.workspace-entity.ts | 1 + .../standard-objects/task.workspace-entity.ts | 1 + .../src/display/banner/components/Banner.tsx | 17 +- .../display/icon/components/TablerIcons.ts | 2 + 118 files changed, 1670 insertions(+), 487 deletions(-) create mode 100644 packages/twenty-front/src/modules/information-banner/components/deleted-record/InformationBannerDeletedRecord.tsx create mode 100644 packages/twenty-front/src/modules/information-banner/constants/InformationBannerHeight.ts create mode 100644 packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecordMutation.ts create mode 100644 packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecords.ts create mode 100644 packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecords.ts create mode 100644 packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecordsMutation.ts create mode 100644 packages/twenty-front/src/modules/object-record/record-index/hooks/useHandleToggleTrashColumnFilter.ts create mode 100644 packages/twenty-front/src/modules/object-record/utils/getDestroyManyRecordsMutationResponseField.ts create mode 100644 packages/twenty-front/src/modules/object-record/utils/getRestoreManyRecordsMutationResponseField.ts create mode 100644 packages/twenty-front/src/modules/views/components/VariantFilterChip.tsx create mode 100644 packages/twenty-server/src/database/typeorm/metadata/migrations/1723038077987-addSoftDelete.ts create mode 100644 packages/twenty-server/src/engine/api/graphql/workspace-query-runner/utils/with-soft-deleted.util.ts create mode 100644 packages/twenty-server/src/engine/api/graphql/workspace-resolver-builder/factories/destroy-many-resolver.factory.ts create mode 100644 packages/twenty-server/src/engine/api/graphql/workspace-resolver-builder/factories/restore-many-resolver.factory.ts rename packages/twenty-server/src/engine/twenty-orm/decorators/{workspace-custom-object.decorator.ts => workspace-custom-entity.decorator.ts} (63%) 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} -