forked from github/plane
Merge branch 'preview' of github.com:makeplane/plane into develop
This commit is contained in:
commit
850bf01d65
@ -30,6 +30,15 @@ interface ISubGroupSwimlaneHeader {
|
|||||||
kanbanFilters: TIssueKanbanFilters;
|
kanbanFilters: TIssueKanbanFilters;
|
||||||
handleKanbanFilters: (toggle: "group_by" | "sub_group_by", value: string) => void;
|
handleKanbanFilters: (toggle: "group_by" | "sub_group_by", value: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getSubGroupHeaderIssuesCount = (issueIds: TSubGroupedIssues, groupById: string) => {
|
||||||
|
let headerCount = 0;
|
||||||
|
Object.keys(issueIds).map((groupState) => {
|
||||||
|
headerCount = headerCount + (issueIds?.[groupState]?.[groupById]?.length || 0);
|
||||||
|
});
|
||||||
|
return headerCount;
|
||||||
|
};
|
||||||
|
|
||||||
const SubGroupSwimlaneHeader: React.FC<ISubGroupSwimlaneHeader> = ({
|
const SubGroupSwimlaneHeader: React.FC<ISubGroupSwimlaneHeader> = ({
|
||||||
issueIds,
|
issueIds,
|
||||||
sub_group_by,
|
sub_group_by,
|
||||||
@ -49,7 +58,7 @@ const SubGroupSwimlaneHeader: React.FC<ISubGroupSwimlaneHeader> = ({
|
|||||||
column_id={_list.id}
|
column_id={_list.id}
|
||||||
icon={_list.icon}
|
icon={_list.icon}
|
||||||
title={_list.name}
|
title={_list.name}
|
||||||
count={(issueIds as TGroupedIssues)?.[_list.id]?.length || 0}
|
count={getSubGroupHeaderIssuesCount(issueIds as TSubGroupedIssues, _list?.id)}
|
||||||
kanbanFilters={kanbanFilters}
|
kanbanFilters={kanbanFilters}
|
||||||
handleKanbanFilters={handleKanbanFilters}
|
handleKanbanFilters={handleKanbanFilters}
|
||||||
issuePayload={_list.payload}
|
issuePayload={_list.payload}
|
||||||
|
Loading…
Reference in New Issue
Block a user