[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:
parent
fff27c60e4
commit
482b363045
44 changed files with 440 additions and 285 deletions
|
|
@ -1 +1,2 @@
|
|||
export * from "./bulk-operations";
|
||||
export * from "./bulk-operations";
|
||||
export * from "./worklog";
|
||||
|
|
|
|||
2
web/ce/components/issues/worklog/activity/index.ts
Normal file
2
web/ce/components/issues/worklog/activity/index.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export * from "./root";
|
||||
export * from "./worklog-create-button";
|
||||
13
web/ce/components/issues/worklog/activity/root.tsx
Normal file
13
web/ce/components/issues/worklog/activity/root.tsx
Normal 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> = () => <></>;
|
||||
|
|
@ -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> = () => <></>;
|
||||
2
web/ce/components/issues/worklog/index.ts
Normal file
2
web/ce/components/issues/worklog/index.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export * from "./property";
|
||||
export * from "./activity";
|
||||
1
web/ce/components/issues/worklog/property/index.ts
Normal file
1
web/ce/components/issues/worklog/property/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./root";
|
||||
12
web/ce/components/issues/worklog/property/root.tsx
Normal file
12
web/ce/components/issues/worklog/property/root.tsx
Normal 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> = () => <></>;
|
||||
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
23
web/ce/constants/issues.ts
Normal file
23
web/ce/constants/issues.ts
Normal 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));
|
||||
63
web/ce/constants/workspace.ts
Normal file
63
web/ce/constants/workspace.ts
Normal 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,
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue