mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
87a606446f
* chore: global list layout and list item component added * chore: project view list layout consistency * chore: project view sub header consistency * chore: pages list layout consistency * chore: project view sub header improvement * chore: list layout item component improvement * chore: module list layout consistency * chore: cycle list layout consistency * chore: issue list layout consistency * chore: header height consistency * chore: sub header consistency * chore: list layout improvement * chore: inbox sidebar improvement * fix: cycle quick action * chore: inbox selected issue improvement * chore: label option removed from pages filter * chore: inbox create issue modal improvement
62 lines
2.1 KiB
TypeScript
62 lines
2.1 KiB
TypeScript
import { FC } from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
import { ChevronRight } from "lucide-react";
|
|
import { Disclosure } from "@headlessui/react";
|
|
// components
|
|
import { ListLayout } from "@/components/core/list";
|
|
import { CyclePeekOverview, CyclesListMap } from "@/components/cycles";
|
|
// helpers
|
|
import { cn } from "@/helpers/common.helper";
|
|
|
|
export interface ICyclesList {
|
|
completedCycleIds: string[];
|
|
cycleIds: string[];
|
|
workspaceSlug: string;
|
|
projectId: string;
|
|
isArchived?: boolean;
|
|
}
|
|
|
|
export const CyclesList: FC<ICyclesList> = observer((props) => {
|
|
const { completedCycleIds, cycleIds, workspaceSlug, projectId, isArchived = false } = props;
|
|
|
|
return (
|
|
<div className="h-full overflow-y-auto">
|
|
<div className="flex h-full w-full justify-between">
|
|
<ListLayout>
|
|
<CyclesListMap
|
|
cycleIds={cycleIds}
|
|
projectId={projectId}
|
|
workspaceSlug={workspaceSlug}
|
|
isArchived={isArchived}
|
|
/>
|
|
{completedCycleIds.length !== 0 && (
|
|
<Disclosure as="div" className="py-8 pl-3 space-y-4">
|
|
<Disclosure.Button className="bg-custom-background-80 font-semibold text-sm py-1 px-2 rounded ml-5 flex items-center gap-1">
|
|
{({ open }) => (
|
|
<>
|
|
Completed cycles ({completedCycleIds.length})
|
|
<ChevronRight
|
|
className={cn("h-3 w-3 transition-all", {
|
|
"rotate-90": open,
|
|
})}
|
|
/>
|
|
</>
|
|
)}
|
|
</Disclosure.Button>
|
|
<Disclosure.Panel>
|
|
<CyclesListMap
|
|
cycleIds={completedCycleIds}
|
|
projectId={projectId}
|
|
workspaceSlug={workspaceSlug}
|
|
isArchived={isArchived}
|
|
/>
|
|
</Disclosure.Panel>
|
|
</Disclosure>
|
|
)}
|
|
</ListLayout>
|
|
<CyclePeekOverview projectId={projectId} workspaceSlug={workspaceSlug} isArchived={isArchived} />
|
|
</div>
|
|
</div>
|
|
);
|
|
});
|