Skip to content

Commit 316f547

Browse files
proof3AdityaPimpalkar
authored andcommitted
Closes twentyhq#710: Add the number of opportunities on each stage (twentyhq#1011)
* Add the number of oppurtunities on each stage * Remove excess css properties in Boardcolumn.tsx and use theme * Remove padding from oppurnities counters
1 parent 41d428c commit 316f547

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

front/src/modules/pipeline/components/EntityBoardColumn.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export function EntityBoardColumn({
104104
pipelineStageId={column.pipelineStageId}
105105
totalAmount={boardColumnTotal}
106106
isFirstColumn={column.index === 0}
107+
numChildren={column.pipelineProgressIds.length}
107108
>
108109
<BoardColumnCardsContainer droppableProvided={droppableProvided}>
109110
{column.pipelineProgressIds.map((pipelineProgressId, index) => (

front/src/modules/ui/board/components/BoardColumn.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ const StyledAmount = styled.div`
6060
margin-left: ${({ theme }) => theme.spacing(2)};
6161
`;
6262

63+
const StyledNumChildren = styled.div`
64+
align-items: center;
65+
background-color: ${({ theme }) => theme.background.tertiary};
66+
border-radius: ${({ theme }) => theme.border.radius.rounded};
67+
color: ${({ theme }) => theme.font.color.tertiary};
68+
display: flex;
69+
height: 20px;
70+
justify-content: center;
71+
line-height: ${({ theme }) => theme.text.lineHeight.lg};
72+
margin-left: auto;
73+
width: 16px;
74+
`;
75+
6376
type OwnProps = {
6477
color?: string;
6578
title: string;
@@ -69,6 +82,7 @@ type OwnProps = {
6982
totalAmount?: number;
7083
children: React.ReactNode;
7184
isFirstColumn: boolean;
85+
numChildren: number;
7286
};
7387

7488
export function BoardColumn({
@@ -79,6 +93,7 @@ export function BoardColumn({
7993
totalAmount,
8094
children,
8195
isFirstColumn,
96+
numChildren,
8297
}: OwnProps) {
8398
const [isBoardColumnMenuOpen, setIsBoardColumnMenuOpen] =
8499
React.useState(false);
@@ -112,6 +127,7 @@ export function BoardColumn({
112127
<StyledHeader>
113128
<Tag onClick={handleTitleClick} color={color} text={title} />
114129
{!!totalAmount && <StyledAmount>${totalAmount}</StyledAmount>}
130+
<StyledNumChildren>{numChildren}</StyledNumChildren>
115131
</StyledHeader>
116132
{isBoardColumnMenuOpen && (
117133
<BoardColumnMenu

0 commit comments

Comments
 (0)