mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix unassigned issues count in analytics page (#4542)
This commit is contained in:
parent
1c377163d2
commit
6eca4a1f1f
@ -45,7 +45,7 @@ export const ScopeAndDemand: React.FC<Props> = (props) => {
|
|||||||
|
|
||||||
// scope data
|
// scope data
|
||||||
const pendingIssues = defaultAnalytics?.pending_issue_user ?? [];
|
const pendingIssues = defaultAnalytics?.pending_issue_user ?? [];
|
||||||
const pendingUnAssignedIssues = pendingIssues?.filter((issue) => issue.assignees__id === null);
|
const pendingUnAssignedIssuesUser = pendingIssues?.find((issue) => issue.assignees__id === null);
|
||||||
const pendingAssignedIssues = pendingIssues?.filter((issue) => issue.assignees__id !== null);
|
const pendingAssignedIssues = pendingIssues?.filter((issue) => issue.assignees__id !== null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -56,7 +56,7 @@ export const ScopeAndDemand: React.FC<Props> = (props) => {
|
|||||||
<div className={`grid grid-cols-1 gap-5 ${fullScreen ? "md:grid-cols-2" : ""}`}>
|
<div className={`grid grid-cols-1 gap-5 ${fullScreen ? "md:grid-cols-2" : ""}`}>
|
||||||
<AnalyticsDemand defaultAnalytics={defaultAnalytics} />
|
<AnalyticsDemand defaultAnalytics={defaultAnalytics} />
|
||||||
<AnalyticsScope
|
<AnalyticsScope
|
||||||
pendingUnAssignedIssues={pendingUnAssignedIssues}
|
pendingUnAssignedIssuesUser={pendingUnAssignedIssuesUser}
|
||||||
pendingAssignedIssues={pendingAssignedIssues}
|
pendingAssignedIssues={pendingAssignedIssues}
|
||||||
/>
|
/>
|
||||||
<AnalyticsLeaderBoard
|
<AnalyticsLeaderBoard
|
||||||
|
@ -6,19 +6,21 @@ import emptyBarGraph from "public/empty-state/empty_bar_graph.svg";
|
|||||||
// types
|
// types
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
pendingUnAssignedIssues: IDefaultAnalyticsUser[];
|
pendingUnAssignedIssuesUser: IDefaultAnalyticsUser | undefined;
|
||||||
pendingAssignedIssues: IDefaultAnalyticsUser[];
|
pendingAssignedIssues: IDefaultAnalyticsUser[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AnalyticsScope: React.FC<Props> = ({ pendingUnAssignedIssues, pendingAssignedIssues }) => (
|
export const AnalyticsScope: React.FC<Props> = ({ pendingUnAssignedIssuesUser, pendingAssignedIssues }) => (
|
||||||
<div className="rounded-[10px] border border-custom-border-200 p-3">
|
<div className="rounded-[10px] border border-custom-border-200 p-3">
|
||||||
<div className="divide-y divide-custom-border-200">
|
<div className="divide-y divide-custom-border-200">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h6 className=" text-base font-medium">Pending issues</h6>
|
<h6 className=" text-base font-medium">Pending issues</h6>
|
||||||
|
{pendingUnAssignedIssuesUser && (
|
||||||
<div className="relative flex items-center py-1 px-3 rounded-md gap-2 text-xs text-custom-primary-100 bg-custom-primary-100/10">
|
<div className="relative flex items-center py-1 px-3 rounded-md gap-2 text-xs text-custom-primary-100 bg-custom-primary-100/10">
|
||||||
Unassigned: {pendingUnAssignedIssues.length}
|
Unassigned: {pendingUnAssignedIssuesUser.count}
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{pendingAssignedIssues && pendingAssignedIssues.length > 0 ? (
|
{pendingAssignedIssues && pendingAssignedIssues.length > 0 ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user