mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: adding links to dashboard summary items
This commit is contained in:
parent
ff8008cbed
commit
54964924f0
@ -7,6 +7,7 @@ import { Info } from "lucide-react";
|
|||||||
// types
|
// types
|
||||||
import { IUserWorkspaceDashboard } from "types";
|
import { IUserWorkspaceDashboard } from "types";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
data: IUserWorkspaceDashboard | undefined;
|
data: IUserWorkspaceDashboard | undefined;
|
||||||
@ -19,61 +20,40 @@ export const IssuesStats: React.FC<Props> = ({ data }) => {
|
|||||||
<div className="grid grid-cols-1 rounded-[10px] border border-custom-border-200 bg-custom-background-100 lg:grid-cols-3">
|
<div className="grid grid-cols-1 rounded-[10px] border border-custom-border-200 bg-custom-background-100 lg:grid-cols-3">
|
||||||
<div className="grid grid-cols-1 divide-y divide-custom-border-200 border-b border-custom-border-200 lg:border-b-0 lg:border-r">
|
<div className="grid grid-cols-1 divide-y divide-custom-border-200 border-b border-custom-border-200 lg:border-b-0 lg:border-r">
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="basis-1/2 p-4">
|
<Link className="basis-1/2 p-4" href={`/${workspaceSlug}/workspace-views/assigned`}>
|
||||||
<h4 className="text-sm">Issues assigned to you</h4>
|
<div>
|
||||||
<h5 className="mt-2 text-2xl font-semibold">
|
<h4 className="text-sm">Issues assigned to you</h4>
|
||||||
{data ? (
|
<h5 className="mt-2 text-2xl font-semibold">
|
||||||
<div
|
<div className="cursor-pointer">{data?.assigned_issues_count}</div>
|
||||||
className="cursor-pointer"
|
</h5>
|
||||||
onClick={() => router.push(`/${workspaceSlug}/workspace-views/assigned`)}
|
</div>
|
||||||
>
|
</Link>
|
||||||
{data.assigned_issues_count}
|
<Link
|
||||||
</div>
|
className="basis-1/2 border-l border-custom-border-200 p-4"
|
||||||
) : (
|
href={`/${workspaceSlug}/workspace-views/all-issues`}
|
||||||
<Loader>
|
>
|
||||||
<Loader.Item height="25px" width="50%" />
|
<div>
|
||||||
</Loader>
|
<h4 className="text-sm">Pending issues</h4>
|
||||||
)}
|
<h5 className="mt-2 text-2xl font-semibold">{data?.pending_issues_count}</h5>
|
||||||
</h5>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
<div className="basis-1/2 border-l border-custom-border-200 p-4">
|
|
||||||
<h4 className="text-sm">Pending issues</h4>
|
|
||||||
<h5 className="mt-2 text-2xl font-semibold">
|
|
||||||
{data ? (
|
|
||||||
data.pending_issues_count
|
|
||||||
) : (
|
|
||||||
<Loader>
|
|
||||||
<Loader.Item height="25px" width="50%" />
|
|
||||||
</Loader>
|
|
||||||
)}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="basis-1/2 p-4">
|
<Link className="basis-1/2 p-4" href={`/${workspaceSlug}/workspace-views/all-issues`}>
|
||||||
<h4 className="text-sm">Completed issues</h4>
|
<div>
|
||||||
<h5 className="mt-2 text-2xl font-semibold">
|
<h4 className="text-sm">Completed issues</h4>
|
||||||
{data ? (
|
<h5 className="mt-2 text-2xl font-semibold">{data?.completed_issues_count}</h5>
|
||||||
data.completed_issues_count
|
</div>
|
||||||
) : (
|
</Link>
|
||||||
<Loader>
|
<Link
|
||||||
<Loader.Item height="25px" width="50%" />
|
className="basis-1/2 border-l border-custom-border-200 p-4"
|
||||||
</Loader>
|
href={`/${workspaceSlug}/workspace-views/all-issues`}
|
||||||
)}
|
>
|
||||||
</h5>
|
<div>
|
||||||
</div>
|
<h4 className="text-sm">Issues due by this week</h4>
|
||||||
<div className="basis-1/2 border-l border-custom-border-200 p-4">
|
<h5 className="mt-2 text-2xl font-semibold">{data?.issues_due_week_count}</h5>
|
||||||
<h4 className="text-sm">Issues due by this week</h4>
|
</div>
|
||||||
<h5 className="mt-2 text-2xl font-semibold">
|
</Link>
|
||||||
{data ? (
|
|
||||||
data.issues_due_week_count
|
|
||||||
) : (
|
|
||||||
<Loader>
|
|
||||||
<Loader.Item height="25px" width="50%" />
|
|
||||||
</Loader>
|
|
||||||
)}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-4 lg:col-span-2">
|
<div className="p-4 lg:col-span-2">
|
||||||
|
Loading…
Reference in New Issue
Block a user