[WEB-373] chore: new dashboard updates (#3849)

* chore: replaced marimekko graph with a bar graph

* chore: add bar onClick handler

* chore: custom date filter for widgets

* style: priority graph

* chore: workspace profile activity pagination

* chore: profile activity pagination

* chore: user profile activity pagination

* chore: workspace user activity csv download

* chore: download activity button added

* chore: workspace user pagination

* chore: collabrator pagination

* chore: field change

* chore: recent collaborators pagination

* chore: changed the collabrators

* chore: collabrators list changed

* fix: distinct users

* chore: search filter in collaborators

* fix: import error

* chore: update priority graph x-axis values

* chore: admin and member request validation

* chore: update csv download request method

* chore: search implementation for the collaborators widget

* refactor: priority distribution card

* chore: add enum for duration filters

* chore: update inbox types

* chore: add todos for refactoring

---------

Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
Aaryan Khandelwal
2024-03-06 14:24:36 +05:30
committed by GitHub
parent 126d01bdc5
commit 5a32d10f96
61 changed files with 1568 additions and 845 deletions

View File

@@ -7,7 +7,7 @@ import OverdueIssuesLight from "public/empty-state/dashboard/light/overdue-issue
import CompletedIssuesDark from "public/empty-state/dashboard/dark/completed-issues.svg";
import CompletedIssuesLight from "public/empty-state/dashboard/light/completed-issues.svg";
// types
import { TDurationFilterOptions, TIssuesListTypes, TStateGroups } from "@plane/types";
import { EDurationFilters, TIssuesListTypes, TStateGroups } from "@plane/types";
import { Props } from "components/icons/types";
// constants
import { EUserWorkspaceRoles } from "./workspace";
@@ -118,29 +118,33 @@ export const STATE_GROUP_GRAPH_COLORS: Record<TStateGroups, string> = {
// filter duration options
export const DURATION_FILTER_OPTIONS: {
key: TDurationFilterOptions;
key: EDurationFilters;
label: string;
}[] = [
{
key: "none",
key: EDurationFilters.NONE,
label: "None",
},
{
key: "today",
key: EDurationFilters.TODAY,
label: "Due today",
},
{
key: "this_week",
label: " Due this week",
key: EDurationFilters.THIS_WEEK,
label: "Due this week",
},
{
key: "this_month",
key: EDurationFilters.THIS_MONTH,
label: "Due this month",
},
{
key: "this_year",
key: EDurationFilters.THIS_YEAR,
label: "Due this year",
},
{
key: EDurationFilters.CUSTOM,
label: "Custom",
},
];
// random background colors for project cards

View File

@@ -164,7 +164,7 @@ export const USER_ISSUES = (workspaceSlug: string, params: any) => {
return `USER_ISSUES_${workspaceSlug.toUpperCase()}_${paramsKey}`;
};
export const USER_ACTIVITY = "USER_ACTIVITY";
export const USER_ACTIVITY = (params: { cursor?: string }) => `USER_ACTIVITY_${params?.cursor}`;
export const USER_WORKSPACE_DASHBOARD = (workspaceSlug: string) =>
`USER_WORKSPACE_DASHBOARD_${workspaceSlug.toUpperCase()}`;
export const USER_PROJECT_VIEW = (projectId: string) => `USER_PROJECT_VIEW_${projectId.toUpperCase()}`;
@@ -284,8 +284,13 @@ export const getPaginatedNotificationKey = (index: number, prevData: any, worksp
// profile
export const USER_PROFILE_DATA = (workspaceSlug: string, userId: string) =>
`USER_PROFILE_ACTIVITY_${workspaceSlug.toUpperCase()}_${userId.toUpperCase()}`;
export const USER_PROFILE_ACTIVITY = (workspaceSlug: string, userId: string) =>
`USER_WORKSPACE_PROFILE_ACTIVITY_${workspaceSlug.toUpperCase()}_${userId.toUpperCase()}`;
export const USER_PROFILE_ACTIVITY = (
workspaceSlug: string,
userId: string,
params: {
cursor?: string;
}
) => `USER_WORKSPACE_PROFILE_ACTIVITY_${workspaceSlug.toUpperCase()}_${userId.toUpperCase()}_${params?.cursor}`;
export const USER_PROFILE_PROJECT_SEGREGATION = (workspaceSlug: string, userId: string) =>
`USER_PROFILE_PROJECT_SEGREGATION_${workspaceSlug.toUpperCase()}_${userId.toUpperCase()}`;
export const USER_PROFILE_ISSUES = (workspaceSlug: string, userId: string, params: any) => {

View File

@@ -63,4 +63,9 @@ export const PROFILE_ADMINS_TAB = [
label: "Subscribed",
selected: "/[workspaceSlug]/profile/[userId]/subscribed",
},
{
route: "activity",
label: "Activity",
selected: "/[workspaceSlug]/profile/[userId]/activity",
},
];