GH-3183 Add sub actions to quick actions in ActionBar (#3339)

* convert quick action into a dropdown

* GH-3183 import icons

* GH-3183 display dummy sub-actions in dropdown

* Migrate to new Dropdown API

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Deepak Kumar
2024-01-11 18:19:36 +05:30
committed by GitHub
parent e142e4ec79
commit c8aec95325
5 changed files with 69 additions and 10 deletions

View File

@ -14,11 +14,13 @@ import { RecordTableScopeInternalContext } from '@/object-record/record-table/sc
import { getRecordTableScopeInjector } from '@/object-record/record-table/utils/getRecordTableScopeInjector';
import {
IconCheckbox,
IconClick,
IconHeart,
IconHeartOff,
IconMail,
IconNotes,
IconPuzzle,
IconTrash,
IconWand,
} from '@/ui/display/icon';
import { actionBarEntriesState } from '@/ui/navigation/action-bar/states/actionBarEntriesState';
import { contextMenuEntriesState } from '@/ui/navigation/context-menu/states/contextMenuEntriesState';
@ -218,9 +220,19 @@ export const useRecordTableContextMenuEntries = (
...(dataExecuteQuickActionOnmentEnabled
? [
{
label: 'Quick Action',
Icon: IconWand,
onClick: () => handleExecuteQuickActionOnClick(),
label: 'Actions',
Icon: IconClick,
subActions: [
{
label: 'Enrich',
Icon: IconPuzzle,
onClick: () => handleExecuteQuickActionOnClick(),
},
{
label: 'Send to mailjet',
Icon: IconMail,
},
],
},
]
: []),