mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
3c2f5d12ed
* chore: add next theme and initial setup * chore: add dark mode colors to layouts * chore: user general setting page theming * chore: dashboard theming * chore: project page theming * chore: workspace setting page theming * chore: my issue page theming * chore: cmdk theming * chore: change hardcode bg and text color to theme * chore: change color name according to the design * style: fix card in the dashboard * style: fix merge conflict design issues * style: add light high contrast and dark high contrast * style: fix cmd k menu color and selection * feat: change theme from cmdk menu * chore: add multiple theme field to custom theme * chore: removed custom theming * fix: build error --------- Co-authored-by: Saheb Giri <iamsahebgiri@gmail.com>
75 lines
2.4 KiB
TypeScript
75 lines
2.4 KiB
TypeScript
// components
|
|
import { Loader } from "components/ui";
|
|
import { ActivityGraph } from "components/workspace";
|
|
// helpers
|
|
import { groupBy } from "helpers/array.helper";
|
|
// types
|
|
import { IUserWorkspaceDashboard } from "types";
|
|
|
|
type Props = {
|
|
data: IUserWorkspaceDashboard | undefined;
|
|
};
|
|
|
|
export const IssuesStats: React.FC<Props> = ({ data }) => (
|
|
<div className="grid grid-cols-1 rounded-[10px] border border-brand-base bg-brand-sidebar lg:grid-cols-3">
|
|
<div className="grid grid-cols-1 divide-y divide-brand-base border-b border-brand-base lg:border-r lg:border-b-0">
|
|
<div className="flex">
|
|
<div className="basis-1/2 p-4">
|
|
<h4 className="text-sm">Issues assigned to you</h4>
|
|
<h5 className="mt-2 text-2xl font-semibold">
|
|
{data ? (
|
|
data.assigned_issues_count
|
|
) : (
|
|
<Loader>
|
|
<Loader.Item height="25px" width="50%" />
|
|
</Loader>
|
|
)}
|
|
</h5>
|
|
</div>
|
|
<div className="basis-1/2 border-l border-brand-base 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 className="flex">
|
|
<div className="basis-1/2 p-4">
|
|
<h4 className="text-sm">Completed issues</h4>
|
|
<h5 className="mt-2 text-2xl font-semibold">
|
|
{data ? (
|
|
data.completed_issues_count
|
|
) : (
|
|
<Loader>
|
|
<Loader.Item height="25px" width="50%" />
|
|
</Loader>
|
|
)}
|
|
</h5>
|
|
</div>
|
|
<div className="basis-1/2 border-l border-brand-base p-4">
|
|
<h4 className="text-sm">Issues due by this week</h4>
|
|
<h5 className="mt-2 text-2xl font-semibold">
|
|
{data ? (
|
|
data.issues_due_week_count
|
|
) : (
|
|
<Loader>
|
|
<Loader.Item height="25px" width="50%" />
|
|
</Loader>
|
|
)}
|
|
</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div className="p-4 lg:col-span-2">
|
|
<h3 className="mb-2 font-semibold capitalize">Activity Graph</h3>
|
|
<ActivityGraph activities={data?.issue_activities} />
|
|
</div>
|
|
</div>
|
|
);
|