feat: delete pipeline stage (#1412)

* feat: delete pipeline stage

Closes #1396

* refactor: code review

- Use string literal instead of enum

* docs: disable CircularProgressBar Chromatic snapshots
This commit is contained in:
Thaïs
2023-09-04 16:39:01 +02:00
committed by GitHub
parent 1a71f61d24
commit 96a0f30e98
11 changed files with 205 additions and 45 deletions

View File

@ -50,11 +50,13 @@ const BoardColumnCardsContainer = ({
export function EntityBoardColumn({
column,
boardOptions,
onEditColumnTitle,
onDelete,
onTitleEdit,
}: {
column: BoardColumnDefinition;
boardOptions: BoardOptions;
onEditColumnTitle: (columnId: string, title: string, color: string) => void;
onDelete?: (columnId: string) => void;
onTitleEdit: (columnId: string, title: string, color: string) => void;
}) {
const boardColumnId = useContext(BoardColumnIdContext) ?? '';
@ -66,15 +68,16 @@ export function EntityBoardColumn({
boardCardIdsByColumnIdFamilyState(boardColumnId ?? ''),
);
function handleEditColumnTitle(title: string, color: string) {
onEditColumnTitle(boardColumnId, title, color);
function handleTitleEdit(title: string, color: string) {
onTitleEdit(boardColumnId, title, color);
}
return (
<Droppable droppableId={column.id}>
{(droppableProvided) => (
<BoardColumn
onTitleEdit={handleEditColumnTitle}
onTitleEdit={handleTitleEdit}
onDelete={onDelete}
title={column.title}
color={column.colorCode}
totalAmount={boardColumnTotal}