mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
b70047b1d5
* chore: updated the all the group_by and sub_group_by UI and functionality render in kanban * chore: kanban sorting in mobx and ui updates * chore: ui changes and drag and drop functionality changes in kanban * chore: issues count render in kanban default and swimlanes * chore: Added icons to the group_by and sub_group_by in kanban and swimlanes
81 lines
2.3 KiB
TypeScript
81 lines
2.3 KiB
TypeScript
// components
|
|
import { StateHeader } from "./state";
|
|
import { StateGroupHeader } from "./state-group";
|
|
import { AssigneesHeader } from "./assignee";
|
|
import { PriorityHeader } from "./priority";
|
|
import { LabelHeader } from "./label";
|
|
import { CreatedByHeader } from "./created_by";
|
|
// mobx
|
|
import { observer } from "mobx-react-lite";
|
|
// mobx
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
import { RootStore } from "store/root";
|
|
|
|
export interface IKanBanGroupByHeaderRoot {
|
|
column_id: string;
|
|
sub_group_by: string | null;
|
|
group_by: string | null;
|
|
issues_count: number;
|
|
}
|
|
|
|
export const KanBanGroupByHeaderRoot: React.FC<IKanBanGroupByHeaderRoot> = observer(
|
|
({ column_id, sub_group_by, group_by, issues_count }) => (
|
|
<>
|
|
{group_by && group_by === "state" && (
|
|
<StateHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
{group_by && group_by === "state_detail.group" && (
|
|
<StateGroupHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
{group_by && group_by === "priority" && (
|
|
<PriorityHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
{group_by && group_by === "labels" && (
|
|
<LabelHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
{group_by && group_by === "assignees" && (
|
|
<AssigneesHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
{group_by && group_by === "created_by" && (
|
|
<CreatedByHeader
|
|
column_id={column_id}
|
|
sub_group_by={sub_group_by}
|
|
group_by={group_by}
|
|
header_type={`group_by`}
|
|
issues_count={issues_count}
|
|
/>
|
|
)}
|
|
</>
|
|
)
|
|
);
|