[WEB-1883] chore: moved workspace settings to respective folders for CE and EE (#5151)

* chore: moved workspace settings to respective folders for ce and ee

* chore: updated imports

* chore: updated imports for ee

* chore: resolved import error

* chore: resolved import error

* chore: ee imports in the issue sidebar

* chore: updated file structure

* chore: table UI

* chore: resolved build errors

* chore: added worklog on issue peekoverview
This commit is contained in:
guru_sainath 2024-07-18 14:45:30 +05:30 committed by GitHub
parent fff27c60e4
commit 482b363045
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 440 additions and 285 deletions

View file

@ -1 +1,2 @@
export * from "./bulk-operations";
export * from "./bulk-operations";
export * from "./worklog";

View file

@ -0,0 +1,2 @@
export * from "./root";
export * from "./worklog-create-button";

View file

@ -0,0 +1,13 @@
"use client";
import { FC } from "react";
import { TIssueActivityComment } from "@plane/types";
type TIssueActivityWorklog = {
workspaceSlug: string;
projectId: string;
issueId: string;
activityComment: TIssueActivityComment;
};
export const IssueActivityWorklog: FC<TIssueActivityWorklog> = () => <></>;

View file

@ -0,0 +1,12 @@
"use client";
import { FC } from "react";
type TIssueActivityWorklogCreateButton = {
workspaceSlug: string;
projectId: string;
issueId: string;
disabled: boolean;
};
export const IssueActivityWorklogCreateButton: FC<TIssueActivityWorklogCreateButton> = () => <></>;

View file

@ -0,0 +1,2 @@
export * from "./property";
export * from "./activity";

View file

@ -0,0 +1 @@
export * from "./root";

View file

@ -0,0 +1,12 @@
"use client";
import { FC } from "react";
type TIssueWorklogProperty = {
workspaceSlug: string;
projectId: string;
issueId: string;
disabled: boolean;
};
export const IssueWorklogProperty: FC<TIssueWorklogProperty> = () => <></>;

View file

@ -66,7 +66,7 @@ const useProjectColumns = () => {
{
key: "Joining Date",
content: "Joining Date",
tdRender: (rowData: RowData) => <div>{getFormattedDate(rowData.member.joining_date)}</div>,
tdRender: (rowData: RowData) => <div>{getFormattedDate(rowData?.member?.joining_date || "")}</div>,
},
];
return { columns, workspaceSlug, projectId, removeMemberModal, setRemoveMemberModal };

View file

@ -60,7 +60,7 @@ const useMemberColumns = () => {
{
key: "Joining Date",
content: "Joining Date",
tdRender: (rowData: RowData) => <div>{getFormattedDate(rowData.member.joining_date)}</div>,
tdRender: (rowData: RowData) => <div>{getFormattedDate(rowData?.member?.joining_date || "")}</div>,
},
];
return { columns, workspaceSlug, removeMemberModal, setRemoveMemberModal };

View file

@ -0,0 +1,23 @@
import { TIssueActivityComment } from "@plane/types";
export enum EActivityFilterType {
ACTIVITY = "activity",
COMMENT = "comment",
}
export type TActivityFilters = EActivityFilterType;
export const ACTIVITY_FILTER_TYPE_OPTIONS: Record<EActivityFilterType, { label: string }> = {
[EActivityFilterType.ACTIVITY]: {
label: "Updates",
},
[EActivityFilterType.COMMENT]: {
label: "Comments",
},
};
export const filterActivityOnSelectedFilters = (
activity: TIssueActivityComment[],
filter: TActivityFilters[]
): TIssueActivityComment[] =>
activity.filter((activity) => filter.includes(activity.activity_type as TActivityFilters));

View file

@ -0,0 +1,63 @@
// icons
import { SettingIcon } from "@/components/icons/attachment";
import { Props } from "@/components/icons/types";
// constants
import { EUserWorkspaceRoles } from "@/constants/workspace";
export const WORKSPACE_SETTINGS_LINKS: {
key: string;
label: string;
href: string;
access: EUserWorkspaceRoles;
highlight: (pathname: string, baseUrl: string) => boolean;
Icon: React.FC<Props>;
}[] = [
{
key: "general",
label: "General",
href: `/settings`,
access: EUserWorkspaceRoles.GUEST,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/`,
Icon: SettingIcon,
},
{
key: "members",
label: "Members",
href: `/settings/members`,
access: EUserWorkspaceRoles.GUEST,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/members/`,
Icon: SettingIcon,
},
{
key: "billing-and-plans",
label: "Billing and plans",
href: `/settings/billing`,
access: EUserWorkspaceRoles.ADMIN,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/billing/`,
Icon: SettingIcon,
},
{
key: "export",
label: "Exports",
href: `/settings/exports`,
access: EUserWorkspaceRoles.MEMBER,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/exports/`,
Icon: SettingIcon,
},
{
key: "webhooks",
label: "Webhooks",
href: `/settings/webhooks`,
access: EUserWorkspaceRoles.ADMIN,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/webhooks/`,
Icon: SettingIcon,
},
{
key: "api-tokens",
label: "API tokens",
href: `/settings/api-tokens`,
access: EUserWorkspaceRoles.ADMIN,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/settings/api-tokens/`,
Icon: SettingIcon,
},
];