The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add shortcut on dashboard workspace entity + add shortcuts (#15603)
nitin636c564168f9
diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DashboardActionsConfig.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DashboardActionsConfig.tsxindex e2d6f7d5dbb..590520b063c 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DashboardActionsConfig.tsx+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DashboardActionsConfig.tsx@@ -98,6 +98,13 @@ export const DASHBOARD_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({SingleRecordActionKeys.EXPORT_FROM_RECORD_SHOW,SingleRecordActionKeys.NAVIGATE_TO_PREVIOUS_RECORD,SingleRecordActionKeys.NAVIGATE_TO_NEXT_RECORD,+ NoSelectionRecordActionKeys.GO_TO_WORKFLOWS,+ NoSelectionRecordActionKeys.GO_TO_PEOPLE,+ NoSelectionRecordActionKeys.GO_TO_COMPANIES,+ NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES,+ NoSelectionRecordActionKeys.GO_TO_SETTINGS,+ NoSelectionRecordActionKeys.GO_TO_TASKS,+ NoSelectionRecordActionKeys.GO_TO_NOTES,],propertiesToOverwrite: {[NoSelectionRecordActionKeys.CREATE_NEW_RECORD]: {@@ -135,5 +142,26 @@ export const DASHBOARD_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({position: 9,label: msg`Navigate to next dashboard`,},+ [NoSelectionRecordActionKeys.GO_TO_WORKFLOWS]: {+ position: 10,+ },+ [NoSelectionRecordActionKeys.GO_TO_PEOPLE]: {+ position: 11,+ },+ [NoSelectionRecordActionKeys.GO_TO_COMPANIES]: {+ position: 12,+ },+ [NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES]: {+ position: 13,+ },+ [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {+ position: 14,+ },+ [NoSelectionRecordActionKeys.GO_TO_TASKS]: {+ position: 15,+ },+ [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ position: 16,+ },},});diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsxindex 959441dbaac..d0a083cd20b 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx@@ -46,6 +46,7 @@ import {IconHeart,IconHeartOff,IconLayout,+ IconLayoutDashboard,IconPlus,IconRefresh,IconRotate2,@@ -474,8 +475,8 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<type: ActionType.Navigation,scope: ActionScope.Global,key: NoSelectionRecordActionKeys.GO_TO_WORKFLOWS,- label: msg`Go to workflows`,- shortLabel: msg`See workflows`,+ label: msg`Go to Workflows`,+ shortLabel: msg`See Workflows`,position: 20,Icon: IconSettingsAutomation,accent: 'default',@@ -485,7 +486,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Workflow) === true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Workflow) &&(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Workflow ||viewType === ActionViewType.SHOW_PAGE),availableOn: [@@ -522,7 +523,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Person) === true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Person) &&(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Person ||viewType === ActionViewType.SHOW_PAGE),component: (@@ -553,7 +554,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Company) === true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Company) &&(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Company ||viewType === ActionViewType.SHOW_PAGE),component: (@@ -564,6 +565,37 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<),hotKeys: ['G', 'C'],},+ [NoSelectionRecordActionKeys.GO_TO_DASHBOARDS]: {+ type: ActionType.Navigation,+ scope: ActionScope.Global,+ key: NoSelectionRecordActionKeys.GO_TO_DASHBOARDS,+ label: msg`Go to Dashboards`,+ shortLabel: msg`Dashboards`,+ position: 24,+ Icon: IconLayoutDashboard,+ isPinned: false,+ availableOn: [+ ActionViewType.INDEX_PAGE_NO_SELECTION,+ ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,+ ActionViewType.INDEX_PAGE_BULK_SELECTION,+ ActionViewType.SHOW_PAGE,+ ],+ shouldBeRegistered: ({+ objectMetadataItem,+ viewType,+ getTargetObjectReadPermission,+ }) =>+ getTargetObjectReadPermission(CoreObjectNameSingular.Dashboard) &&+ (objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Dashboard ||+ viewType === ActionViewType.SHOW_PAGE),+ component: (+ <ActionLink+ to={AppPath.RecordIndexPage}+ params={{ objectNamePlural: CoreObjectNamePlural.Dashboard }}+ />+ ),+ hotKeys: ['G', 'D'],+ },[NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES]: {type: ActionType.Navigation,scope: ActionScope.Global,@@ -584,8 +616,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Opportunity) ===- true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Opportunity) &&(objectMetadataItem?.nameSingular !==CoreObjectNameSingular.Opportunity ||viewType === ActionViewType.SHOW_PAGE),@@ -603,7 +634,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<key: NoSelectionRecordActionKeys.GO_TO_SETTINGS,label: msg`Go to Settings`,shortLabel: msg`Settings`,- position: 24,+ position: 25,Icon: IconSettings,isPinned: false,availableOn: [@@ -629,7 +660,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<key: NoSelectionRecordActionKeys.GO_TO_TASKS,label: msg`Go to Tasks`,shortLabel: msg`Tasks`,- position: 25,+ position: 26,Icon: IconCheckbox,isPinned: false,availableOn: [@@ -643,7 +674,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Task) === true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Task) &&(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Task ||viewType === ActionViewType.SHOW_PAGE),component: (@@ -660,7 +691,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<key: NoSelectionRecordActionKeys.GO_TO_NOTES,label: msg`Go to Notes`,shortLabel: msg`Notes`,- position: 26,+ position: 27,Icon: IconCheckbox,isPinned: false,availableOn: [@@ -674,7 +705,7 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<viewType,getTargetObjectReadPermission,}) =>- getTargetObjectReadPermission(CoreObjectNameSingular.Note) === true &&+ getTargetObjectReadPermission(CoreObjectNameSingular.Note) &&(objectMetadataItem?.nameSingular !== CoreObjectNameSingular.Note ||viewType === ActionViewType.SHOW_PAGE),component: (diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsxindex c97542a7b22..4811b9c0900 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowActionsConfig.tsx@@ -267,6 +267,7 @@ export const WORKFLOW_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({NoSelectionRecordActionKeys.GO_TO_PEOPLE,NoSelectionRecordActionKeys.GO_TO_COMPANIES,NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES,+ NoSelectionRecordActionKeys.GO_TO_DASHBOARDS,NoSelectionRecordActionKeys.GO_TO_SETTINGS,NoSelectionRecordActionKeys.GO_TO_TASKS,NoSelectionRecordActionKeys.GO_TO_NOTES,@@ -345,14 +346,17 @@ export const WORKFLOW_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({[NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES]: {position: 26,},- [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {+ [NoSelectionRecordActionKeys.GO_TO_DASHBOARDS]: {position: 27,},- [NoSelectionRecordActionKeys.GO_TO_TASKS]: {+ [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {position: 28,},- [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ [NoSelectionRecordActionKeys.GO_TO_TASKS]: {position: 29,},+ [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ position: 30,+ },},});diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowRunsActionsConfig.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowRunsActionsConfig.tsxindex 7d4c721e6ad..2323879eda9 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowRunsActionsConfig.tsx+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowRunsActionsConfig.tsx@@ -90,6 +90,7 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({NoSelectionRecordActionKeys.GO_TO_PEOPLE,NoSelectionRecordActionKeys.GO_TO_COMPANIES,NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES,+ NoSelectionRecordActionKeys.GO_TO_DASHBOARDS,NoSelectionRecordActionKeys.GO_TO_SETTINGS,NoSelectionRecordActionKeys.GO_TO_TASKS,NoSelectionRecordActionKeys.GO_TO_NOTES,@@ -146,14 +147,17 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({[NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES]: {position: 15,},- [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {+ [NoSelectionRecordActionKeys.GO_TO_DASHBOARDS]: {position: 16,},- [NoSelectionRecordActionKeys.GO_TO_TASKS]: {+ [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {position: 17,},- [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ [NoSelectionRecordActionKeys.GO_TO_TASKS]: {position: 18,},+ [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ position: 19,+ },},});diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowVersionsActionsConfig.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowVersionsActionsConfig.tsxindex 117614d9c60..c2e57129414 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowVersionsActionsConfig.tsx+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/WorkflowVersionsActionsConfig.tsx@@ -128,6 +128,7 @@ export const WORKFLOW_VERSIONS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig(NoSelectionRecordActionKeys.GO_TO_PEOPLE,NoSelectionRecordActionKeys.GO_TO_COMPANIES,NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES,+ NoSelectionRecordActionKeys.GO_TO_DASHBOARDS,NoSelectionRecordActionKeys.GO_TO_SETTINGS,NoSelectionRecordActionKeys.GO_TO_TASKS,NoSelectionRecordActionKeys.GO_TO_NOTES,@@ -183,15 +184,18 @@ export const WORKFLOW_VERSIONS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig([NoSelectionRecordActionKeys.GO_TO_OPPORTUNITIES]: {position: 17,},- [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {+ [NoSelectionRecordActionKeys.GO_TO_DASHBOARDS]: {position: 18,},- [NoSelectionRecordActionKeys.GO_TO_TASKS]: {+ [NoSelectionRecordActionKeys.GO_TO_SETTINGS]: {position: 19,},- [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ [NoSelectionRecordActionKeys.GO_TO_TASKS]: {position: 20,},+ [NoSelectionRecordActionKeys.GO_TO_NOTES]: {+ position: 21,+ },},},);diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/no-selection/types/NoSelectionRecordActionsKeys.ts b/packages/twenty-front/src/modules/action-menu/actions/record-actions/no-selection/types/NoSelectionRecordActionsKeys.tsindex 96f96712e74..51506d7a55b 100644--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/no-selection/types/NoSelectionRecordActionsKeys.ts+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/no-selection/types/NoSelectionRecordActionsKeys.ts@@ -7,6 +7,7 @@ export enum NoSelectionRecordActionKeys {GO_TO_WORKFLOWS = 'go-to-workflows',GO_TO_PEOPLE = 'go-to-people',GO_TO_COMPANIES = 'go-to-companies',+ GO_TO_DASHBOARDS = 'go-to-dashboards',GO_TO_OPPORTUNITIES = 'go-to-opportunities',GO_TO_SETTINGS = 'go-to-settings',GO_TO_TASKS = 'go-to-tasks',diff --git a/packages/twenty-front/src/modules/object-metadata/types/CoreObjectNamePlural.ts b/packages/twenty-front/src/modules/object-metadata/types/CoreObjectNamePlural.tsindex c5a92ed2f09..ae720a244e0 100644--- a/packages/twenty-front/src/modules/object-metadata/types/CoreObjectNamePlural.ts+++ b/packages/twenty-front/src/modules/object-metadata/types/CoreObjectNamePlural.ts@@ -9,6 +9,7 @@ export enum CoreObjectNamePlural {Comment = 'comments',Company = 'companies',ConnectedAccount = 'connectedAccounts',+ Dashboard = 'dashboards',TimelineActivity = 'timelineActivities',Favorite = 'favorites',Message = 'messages',diff --git a/packages/twenty-server/src/modules/dashboard/standard-objects/dashboard.workspace-entity.ts b/packages/twenty-server/src/modules/dashboard/standard-objects/dashboard.workspace-entity.tsindex 190961c92a0..bb1b2e9ce6a 100644--- a/packages/twenty-server/src/modules/dashboard/standard-objects/dashboard.workspace-entity.ts+++ b/packages/twenty-server/src/modules/dashboard/standard-objects/dashboard.workspace-entity.ts@@ -41,6 +41,7 @@ export const SEARCH_FIELDS_FOR_DASHBOARD: FieldTypeAndNameMetadata[] = [labelPlural: msg`Dashboards`,description: msg`A dashboard`,icon: STANDARD_OBJECT_ICONS.dashboard,+ shortcut: 'D',labelIdentifierStandardId: DASHBOARD_STANDARD_FIELD_IDS.title,})@WorkspaceIsSearchable()