Add shortcut on dashboard workspace entity + add shortcuts (#15603)
syncmetadata required! closes https://discord.com/channels/1130383047699738754/1435260594176393256 --------- Co-authored-by: bosiraphael <raphael.bosi@gmail.com> Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
This commit is contained in:
+28
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
+43
-12
@@ -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: (
|
||||
|
||||
+7
-3
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
+7
-3
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
+7
-3
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
+1
@@ -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',
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum CoreObjectNamePlural {
|
||||
Comment = 'comments',
|
||||
Company = 'companies',
|
||||
ConnectedAccount = 'connectedAccounts',
|
||||
Dashboard = 'dashboards',
|
||||
TimelineActivity = 'timelineActivities',
|
||||
Favorite = 'favorites',
|
||||
Message = 'messages',
|
||||
|
||||
+1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user