mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
8a95a41100
Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: Bavisetti Narayan <narayan@Bavisettis-MacBook-Pro.local> Co-authored-by: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Co-authored-by: M. Palanikannan <73993394+Palanikannan1437@users.noreply.github.com> Co-authored-by: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com> Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Co-authored-by: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com>
45 lines
1.7 KiB
TypeScript
45 lines
1.7 KiB
TypeScript
"use client";
|
|
|
|
// mobx react lite
|
|
import { observer } from "mobx-react-lite";
|
|
// components
|
|
import { IssueListHeader } from "components/issues/board-views/kanban/header";
|
|
import { IssueListBlock } from "components/issues/board-views/kanban/block";
|
|
// interfaces
|
|
import { IIssueState, IIssue } from "types/issue";
|
|
// mobx hook
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
import { RootStore } from "store/root";
|
|
|
|
export const IssueKanbanView = observer(() => {
|
|
const store: RootStore = useMobxStore();
|
|
|
|
return (
|
|
<div className="relative w-full h-full overflow-hidden overflow-x-auto flex gap-3">
|
|
{store?.issue?.states &&
|
|
store?.issue?.states.length > 0 &&
|
|
store?.issue?.states.map((_state: IIssueState) => (
|
|
<div key={_state.id} className="flex-shrink-0 relative w-[340px] h-full flex flex-col">
|
|
<div className="flex-shrink-0">
|
|
<IssueListHeader state={_state} />
|
|
</div>
|
|
<div className="w-full h-full overflow-hidden overflow-y-auto hide-vertical-scrollbar">
|
|
{store.issue.getFilteredIssuesByState(_state.id) &&
|
|
store.issue.getFilteredIssuesByState(_state.id).length > 0 ? (
|
|
<div className="space-y-3 pb-2 px-2">
|
|
{store.issue.getFilteredIssuesByState(_state.id).map((_issue: IIssue) => (
|
|
<IssueListBlock key={_issue.id} issue={_issue} />
|
|
))}
|
|
</div>
|
|
) : (
|
|
<div className="relative w-full h-full flex justify-center items-center p-10 text-center text-sm text-custom-text-200">
|
|
No Issues are available.
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
});
|