Added "Add record" button in kanban view column headers dropdown (#6649)

Closes #4629 
Refactored `RecordBoardColumnNewOpportunityButton` and
`RecordBoardColumnNewButton` to use the same logic in dropdown.

I kept those hooks inside `record-board-column` where these buttons are.
Let me know if it should be placed somewhere else.

Also Added navigation state preservation when clicked on `edit from
settings`

Thanks :)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
nitin
2024-08-28 19:46:37 +05:30
committed by GitHub
parent ff1adb06b2
commit e2eaffcf53
9 changed files with 212 additions and 103 deletions

View File

@ -1,4 +1,4 @@
import { IconPencil } from 'twenty-ui';
import { IconSettings } from 'twenty-ui';
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
import {
@ -42,8 +42,8 @@ export const computeRecordBoardColumnDefinitionsFromObjectMetadata = (
actions: [
{
id: 'edit',
label: 'Edit from settings',
icon: IconPencil,
label: 'Edit from Settings',
icon: IconSettings,
position: 0,
callback: navigateToSelectSettings,
},