598 remove favorites actions from pinned actions on workflows and add see runs (#10946)

Closes https://github.com/twentyhq/core-team-issues/issues/598
- Add export single run action
- Add export single version action
This commit is contained in:
Raphaël Bosi
2025-03-17 15:45:20 +01:00
committed by GitHub
parent a2ea831b9b
commit 428499e222
3 changed files with 44 additions and 12 deletions

View File

@ -130,7 +130,7 @@ export const WORKFLOW_ACTIONS_CONFIG: Record<
key: WorkflowSingleRecordActionKeys.SEE_RUNS, key: WorkflowSingleRecordActionKeys.SEE_RUNS,
label: msg`See runs`, label: msg`See runs`,
shortLabel: msg`See runs`, shortLabel: msg`See runs`,
isPinned: false, isPinned: true,
position: 5, position: 5,
Icon: IconHistoryToggle, Icon: IconHistoryToggle,
type: ActionMenuEntryType.Standard, type: ActionMenuEntryType.Standard,
@ -198,7 +198,7 @@ export const WORKFLOW_ACTIONS_CONFIG: Record<
label: msg`Add to favorites`, label: msg`Add to favorites`,
shortLabel: msg`Add to favorites`, shortLabel: msg`Add to favorites`,
position: 10, position: 10,
isPinned: true, isPinned: false,
Icon: IconHeart, Icon: IconHeart,
availableOn: [ availableOn: [
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION, ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
@ -212,7 +212,7 @@ export const WORKFLOW_ACTIONS_CONFIG: Record<
key: SingleRecordActionKeys.REMOVE_FROM_FAVORITES, key: SingleRecordActionKeys.REMOVE_FROM_FAVORITES,
label: msg`Remove from favorites`, label: msg`Remove from favorites`,
shortLabel: msg`Remove from favorites`, shortLabel: msg`Remove from favorites`,
isPinned: true, isPinned: false,
position: 11, position: 11,
Icon: IconHeartOff, Icon: IconHeartOff,
availableOn: [ availableOn: [

View File

@ -32,12 +32,12 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG: Record<
> = { > = {
addToFavoritesSingleRecord: { addToFavoritesSingleRecord: {
type: ActionMenuEntryType.Standard, type: ActionMenuEntryType.Standard,
scope: ActionMenuEntryScope.Object, scope: ActionMenuEntryScope.RecordSelection,
key: SingleRecordActionKeys.ADD_TO_FAVORITES, key: SingleRecordActionKeys.ADD_TO_FAVORITES,
label: msg`Add to favorites`, label: msg`Add to favorites`,
shortLabel: msg`Add to favorites`, shortLabel: msg`Add to favorites`,
position: 0, position: 0,
isPinned: true, isPinned: false,
Icon: IconHeart, Icon: IconHeart,
availableOn: [ availableOn: [
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION, ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
@ -51,7 +51,7 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG: Record<
key: SingleRecordActionKeys.REMOVE_FROM_FAVORITES, key: SingleRecordActionKeys.REMOVE_FROM_FAVORITES,
label: msg`Remove from favorites`, label: msg`Remove from favorites`,
shortLabel: msg`Remove from favorites`, shortLabel: msg`Remove from favorites`,
isPinned: true, isPinned: false,
position: 1, position: 1,
Icon: IconHeartOff, Icon: IconHeartOff,
availableOn: [ availableOn: [
@ -82,13 +82,29 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG: Record<
availableOn: [ActionViewType.SHOW_PAGE], availableOn: [ActionViewType.SHOW_PAGE],
useAction: useNavigateToNextRecordSingleRecordAction, useAction: useNavigateToNextRecordSingleRecordAction,
}, },
exportSingleRecord: {
type: ActionMenuEntryType.Standard,
scope: ActionMenuEntryScope.RecordSelection,
key: SingleRecordActionKeys.EXPORT,
label: msg`Export run`,
shortLabel: msg`Export`,
position: 4,
Icon: IconDatabaseExport,
accent: 'default',
isPinned: false,
availableOn: [
ActionViewType.SHOW_PAGE,
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
],
useAction: useExportMultipleRecordsAction,
},
exportMultipleRecords: { exportMultipleRecords: {
type: ActionMenuEntryType.Standard, type: ActionMenuEntryType.Standard,
scope: ActionMenuEntryScope.RecordSelection, scope: ActionMenuEntryScope.RecordSelection,
key: MultipleRecordsActionKeys.EXPORT, key: MultipleRecordsActionKeys.EXPORT,
label: msg`Export runs`, label: msg`Export runs`,
shortLabel: msg`Export`, shortLabel: msg`Export`,
position: 4, position: 5,
Icon: IconDatabaseExport, Icon: IconDatabaseExport,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,
@ -101,7 +117,7 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.EXPORT_VIEW, key: NoSelectionRecordActionKeys.EXPORT_VIEW,
label: msg`Export view`, label: msg`Export view`,
shortLabel: msg`Export`, shortLabel: msg`Export`,
position: 5, position: 6,
Icon: IconDatabaseExport, Icon: IconDatabaseExport,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,
@ -114,7 +130,7 @@ export const WORKFLOW_RUNS_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.SEE_DELETED_RECORDS, key: NoSelectionRecordActionKeys.SEE_DELETED_RECORDS,
label: msg`See deleted runs`, label: msg`See deleted runs`,
shortLabel: msg`Deleted runs`, shortLabel: msg`Deleted runs`,
position: 6, position: 7,
Icon: IconRotate2, Icon: IconRotate2,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,

View File

@ -130,13 +130,29 @@ export const WORKFLOW_VERSIONS_ACTIONS_CONFIG: Record<
], ],
useAction: useRemoveFromFavoritesSingleRecordAction, useAction: useRemoveFromFavoritesSingleRecordAction,
}, },
exportSingleRecord: {
type: ActionMenuEntryType.Standard,
scope: ActionMenuEntryScope.RecordSelection,
key: SingleRecordActionKeys.EXPORT,
label: msg`Export version`,
shortLabel: msg`Export`,
position: 8,
Icon: IconDatabaseExport,
accent: 'default',
isPinned: false,
availableOn: [
ActionViewType.SHOW_PAGE,
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
],
useAction: useExportMultipleRecordsAction,
},
exportMultipleRecords: { exportMultipleRecords: {
type: ActionMenuEntryType.Standard, type: ActionMenuEntryType.Standard,
scope: ActionMenuEntryScope.RecordSelection, scope: ActionMenuEntryScope.RecordSelection,
key: MultipleRecordsActionKeys.EXPORT, key: MultipleRecordsActionKeys.EXPORT,
label: msg`Export versions`, label: msg`Export versions`,
shortLabel: msg`Export`, shortLabel: msg`Export`,
position: 8, position: 9,
Icon: IconDatabaseExport, Icon: IconDatabaseExport,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,
@ -149,7 +165,7 @@ export const WORKFLOW_VERSIONS_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.EXPORT_VIEW, key: NoSelectionRecordActionKeys.EXPORT_VIEW,
label: msg`Export view`, label: msg`Export view`,
shortLabel: msg`Export`, shortLabel: msg`Export`,
position: 9, position: 10,
Icon: IconDatabaseExport, Icon: IconDatabaseExport,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,
@ -162,7 +178,7 @@ export const WORKFLOW_VERSIONS_ACTIONS_CONFIG: Record<
key: NoSelectionRecordActionKeys.SEE_DELETED_RECORDS, key: NoSelectionRecordActionKeys.SEE_DELETED_RECORDS,
label: msg`See deleted versions`, label: msg`See deleted versions`,
shortLabel: msg`Deleted versions`, shortLabel: msg`Deleted versions`,
position: 10, position: 11,
Icon: IconRotate2, Icon: IconRotate2,
accent: 'default', accent: 'default',
isPinned: false, isPinned: false,