feat: add board options dropdown and pipeline stage creation (#1399)

* feat: add board options dropdown and pipeline stage creation

Closes #1395

* refactor: code review

- remove useCallback
This commit is contained in:
Thaïs
2023-09-04 11:37:31 +02:00
committed by GitHub
parent 2ac32e42c5
commit f29d843db9
14 changed files with 351 additions and 67 deletions

View File

@ -30,6 +30,7 @@ import { useSetCardSelected } from '../hooks/useSetCardSelected';
import { useUpdateBoardCardIds } from '../hooks/useUpdateBoardCardIds';
import { boardColumnsState } from '../states/boardColumnsState';
import { BoardColumnRecoilScopeContext } from '../states/recoil-scope-contexts/BoardColumnRecoilScopeContext';
import type { BoardColumnDefinition } from '../types/BoardColumnDefinition';
import { BoardOptions } from '../types/BoardOptions';
import { EntityBoardColumn } from './EntityBoardColumn';
@ -44,12 +45,14 @@ export function EntityBoard({
boardOptions,
updateSorts,
onEditColumnTitle,
onStageAdd,
}: {
boardOptions: BoardOptions;
updateSorts: (
sorts: Array<SelectedSortType<PipelineProgressOrderByWithRelationInput>>,
) => void;
onEditColumnTitle: (columnId: string, title: string, color: string) => void;
onStageAdd?: (boardColumn: BoardColumnDefinition) => void;
}) {
const [boardColumns] = useRecoilState(boardColumnsState);
const setCardSelected = useSetCardSelected();
@ -130,6 +133,7 @@ export function EntityBoard({
viewIcon={<IconList size={theme.icon.size.md} />}
availableSorts={boardOptions.sorts}
onSortsUpdate={updateSorts}
onStageAdd={onStageAdd}
context={CompanyBoardRecoilScopeContext}
/>
<ScrollWrapper>