Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

chore: merge constants and services (#8623)

sriram veeraghanta7793febcf80a
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
index 5ab4ceb315..37bed71420 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
@@ -29,7 +29,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
// plane web hooks
import { EPageStoreType, usePage, usePageStore } from "@/plane-web/hooks/store";
// plane web services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// services
import { ProjectPageService, ProjectPageVersionService } from "@/services/page";
import type { Route } from "./+types/page";
diff --git a/apps/web/app/(all)/invitations/page.tsx b/apps/web/app/(all)/invitations/page.tsx
index 5543c492cb..3f7751ce6c 100644
--- a/apps/web/app/(all)/invitations/page.tsx
+++ b/apps/web/app/(all)/invitations/page.tsx
@@ -32,7 +32,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
// services
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
// plane web services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/app/(all)/onboarding/page.tsx b/apps/web/app/(all)/onboarding/page.tsx
index 2f400962ab..e2479d7d52 100644
--- a/apps/web/app/(all)/onboarding/page.tsx
+++ b/apps/web/app/(all)/onboarding/page.tsx
@@ -20,7 +20,7 @@ import { useUser } from "@/hooks/store/user";
// wrappers
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/app/(all)/workspace-invitations/page.tsx b/apps/web/app/(all)/workspace-invitations/page.tsx
index a70bf51aa7..eb9c92128d 100644
--- a/apps/web/app/(all)/workspace-invitations/page.tsx
+++ b/apps/web/app/(all)/workspace-invitations/page.tsx
@@ -22,7 +22,7 @@ import { useUser } from "@/hooks/store/user";
import { useAppRouter } from "@/hooks/use-app-router";
// wrappers
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// services
// service initialization
diff --git a/apps/web/ce/components/pages/editor/ai/menu.tsx b/apps/web/ce/components/pages/editor/ai/menu.tsx
index 02bed2cf2a..0aaa6f36dd 100644
--- a/apps/web/ce/components/pages/editor/ai/menu.tsx
+++ b/apps/web/ce/components/pages/editor/ai/menu.tsx
@@ -16,7 +16,7 @@ import { Tooltip } from "@plane/propel/tooltip";
import { cn } from "@plane/utils";
import { RichTextEditor } from "@/components/editor/rich-text";
// plane web constants
-import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@/plane-web/constants/ai";
+import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@/constants/ai";
// plane web services
import type { TTaskPayload } from "@/services/ai.service";
import { AIService } from "@/services/ai.service";
diff --git a/apps/web/ce/constants/project/index.ts b/apps/web/ce/constants/project/index.ts
deleted file mode 100644
index 5b516d9036..0000000000
--- a/apps/web/ce/constants/project/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./settings";
diff --git a/apps/web/ce/constants/project/settings/features.tsx b/apps/web/ce/constants/project/settings/features.tsx
deleted file mode 100644
index 06ebaaae3c..0000000000
--- a/apps/web/ce/constants/project/settings/features.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import type { ReactNode } from "react";
-// plane imports
-import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon } from "@plane/propel/icons";
-import type { IProject } from "@plane/types";
-
-export type TProperties = {
- key: string;
- property: string;
- title: string;
- description: string;
- icon: ReactNode;
- isPro: boolean;
- isEnabled: boolean;
- renderChildren?: (currentProjectDetails: IProject, workspaceSlug: string) => ReactNode;
- href?: string;
-};
-
-type TProjectBaseFeatureKeys = "cycles" | "modules" | "views" | "pages" | "inbox";
-
-type TBaseFeatureList = {
- [key in TProjectBaseFeatureKeys]: TProperties;
-};
-
-export const PROJECT_BASE_FEATURES_LIST: TBaseFeatureList = {
- cycles: {
- key: "cycles",
- property: "cycle_view",
- title: "Cycles",
- description: "Timebox work as you see fit per project and change frequency from one period to the next.",
- icon: <CycleIcon className="h-5 w-5 flex-shrink-0 rotate-180 text-tertiary" />,
- isPro: false,
- isEnabled: true,
- },
- modules: {
- key: "modules",
- property: "module_view",
- title: "Modules",
- description: "Group work into sub-project-like set-ups with their own leads and assignees.",
- icon: <ModuleIcon width={20} height={20} className="flex-shrink-0 text-tertiary" />,
- isPro: false,
- isEnabled: true,
- },
- views: {
- key: "views",
- property: "issue_views_view",
- title: "Views",
- description: "Save sorts, filters, and display options for later or share them.",
- icon: <ViewsIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
- isPro: false,
- isEnabled: true,
- },
- pages: {
- key: "pages",
- property: "page_view",
- title: "Pages",
- description: "Write anything like you write anything.",
- icon: <PageIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
- isPro: false,
- isEnabled: true,
- },
- inbox: {
- key: "intake",
- property: "inbox_view",
- title: "Intake",
- description: "Consider and discuss work items before you add them to your project.",
- icon: <IntakeIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
- isPro: false,
- isEnabled: true,
- },
-};
-
-type TProjectFeatures = {
- project_features: {
- key: string;
- title: string;
- description: string;
- featureList: TBaseFeatureList;
- };
-};
-
-export const PROJECT_FEATURES_LIST: TProjectFeatures = {
- project_features: {
- key: "projects_and_issues",
- title: "Projects and work items",
- description: "Toggle these on or off this project.",
- featureList: PROJECT_BASE_FEATURES_LIST,
- },
-};
diff --git a/apps/web/ce/constants/project/settings/index.ts b/apps/web/ce/constants/project/settings/index.ts
deleted file mode 100644
index e9201fe43a..0000000000
--- a/apps/web/ce/constants/project/settings/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./features";
diff --git a/apps/web/ce/services/index.ts b/apps/web/ce/services/index.ts
deleted file mode 100644
index 998e3e9a46..0000000000
--- a/apps/web/ce/services/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./project";
-export * from "@/services/workspace.service";
diff --git a/apps/web/ce/services/project/index.ts b/apps/web/ce/services/project/index.ts
deleted file mode 100644
index 870a66a181..0000000000
--- a/apps/web/ce/services/project/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./estimate.service";
-export * from "@/services/view.service";
diff --git a/apps/web/ce/services/project/project-state.service.ts b/apps/web/ce/services/project/project-state.service.ts
deleted file mode 100644
index 74aa51083c..0000000000
--- a/apps/web/ce/services/project/project-state.service.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "@/services/project/project-state.service";
diff --git a/apps/web/ce/store/estimates/estimate.ts b/apps/web/ce/store/estimates/estimate.ts
index d85b1ef6e2..805c00df8d 100644
--- a/apps/web/ce/store/estimates/estimate.ts
+++ b/apps/web/ce/store/estimates/estimate.ts
@@ -14,7 +14,7 @@ import type {
TEstimateSystemKeys,
} from "@plane/types";
// plane web services
-import estimateService from "@/plane-web/services/project/estimate.service";
+import estimateService from "@/services/estimate.service";
// store
import type { IEstimatePoint } from "@/store/estimates/estimate-point";
import { EstimatePoint } from "@/store/estimates/estimate-point";
diff --git a/apps/web/core/components/account/auth-forms/auth-header.tsx b/apps/web/core/components/account/auth-forms/auth-header.tsx
index ef72b49cc1..239d658291 100644
--- a/apps/web/core/components/account/auth-forms/auth-header.tsx
+++ b/apps/web/core/components/account/auth-forms/auth-header.tsx
@@ -14,7 +14,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo";
// helpers
import { EAuthModes, EAuthSteps } from "@/helpers/authentication.helper";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
type TAuthHeader = {
workspaceSlug: string | undefined;
diff --git a/apps/web/core/components/editor/lite-text/editor.tsx b/apps/web/core/components/editor/lite-text/editor.tsx
index 97e41d6420..5dd50e0c2e 100644
--- a/apps/web/core/components/editor/lite-text/editor.tsx
+++ b/apps/web/core/components/editor/lite-text/editor.tsx
@@ -23,7 +23,7 @@ import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
// plane web hooks
import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
// plane web service
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
import { LiteToolbar } from "./lite-toolbar";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/core/components/editor/rich-text/description-input/root.tsx b/apps/web/core/components/editor/rich-text/description-input/root.tsx
index 188a1f046f..86c9741eed 100644
--- a/apps/web/core/components/editor/rich-text/description-input/root.tsx
+++ b/apps/web/core/components/editor/rich-text/description-input/root.tsx
@@ -19,7 +19,7 @@ import { RichTextEditor } from "@/components/editor/rich-text";
import { useEditorAsset } from "@/hooks/store/use-editor-asset";
import { useWorkspace } from "@/hooks/store/use-workspace";
// plane web services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// local imports
import { DescriptionInputLoader } from "./loader";
// services init
diff --git a/apps/web/core/components/home/widgets/recents/index.tsx b/apps/web/core/components/home/widgets/recents/index.tsx
index 172c3efd8a..988f079a17 100644
--- a/apps/web/core/components/home/widgets/recents/index.tsx
+++ b/apps/web/core/components/home/widgets/recents/index.tsx
@@ -15,7 +15,7 @@ import type { TActivityEntityData, THomeWidgetProps, TRecentActivityFilterKeys }
// components
import { ContentOverflowWrapper } from "@/components/core/content-overflow-HOC";
// plane web services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
import { RecentsEmptyState } from "../empty-states";
import { EWidgetKeys, WidgetLoader } from "../loaders";
import { FiltersDropdown } from "./filters";
diff --git a/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx b/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx
index 3f67c5002c..f67f9b25d4 100644
--- a/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx
+++ b/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx
@@ -21,7 +21,7 @@ import { useEditorAsset } from "@/hooks/store/use-editor-asset";
import { useProjectInbox } from "@/hooks/store/use-project-inbox";
import { usePlatformOS } from "@/hooks/use-platform-os";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/core/components/issues/issue-modal/components/description-editor.tsx b/apps/web/core/components/issues/issue-modal/components/description-editor.tsx
index fec4651dcd..5a20b6c1c5 100644
--- a/apps/web/core/components/issues/issue-modal/components/description-editor.tsx
+++ b/apps/web/core/components/issues/issue-modal/components/description-editor.tsx
@@ -29,7 +29,7 @@ import { useWorkspace } from "@/hooks/store/use-workspace";
import useKeypress from "@/hooks/use-keypress";
import { usePlatformOS } from "@/hooks/use-platform-os";
// plane web services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// services
import { AIService } from "@/services/ai.service";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/core/components/onboarding/create-workspace.tsx b/apps/web/core/components/onboarding/create-workspace.tsx
index 9ae8e16e63..1cf5d087cc 100644
--- a/apps/web/core/components/onboarding/create-workspace.tsx
+++ b/apps/web/core/components/onboarding/create-workspace.tsx
@@ -20,7 +20,7 @@ import { CustomSelect, Input, Spinner } from "@plane/ui";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserProfile, useUserSettings } from "@/hooks/store/user";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
type Props = {
stepChange: (steps: Partial<TOnboardingSteps>) => Promise<void>;
diff --git a/apps/web/core/components/onboarding/invitations.tsx b/apps/web/core/components/onboarding/invitations.tsx
index e9ed76f78e..e293b8851b 100644
--- a/apps/web/core/components/onboarding/invitations.tsx
+++ b/apps/web/core/components/onboarding/invitations.tsx
@@ -20,7 +20,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserSettings } from "@/hooks/store/user";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
type Props = {
invitations: IWorkspaceMemberInvitation[];
diff --git a/apps/web/core/components/onboarding/invite-members.tsx b/apps/web/core/components/onboarding/invite-members.tsx
index 01b5b1f15f..bf13c67e91 100644
--- a/apps/web/core/components/onboarding/invite-members.tsx
+++ b/apps/web/core/components/onboarding/invite-members.tsx
@@ -31,7 +31,7 @@ import type { IUser, IWorkspace } from "@plane/types";
// ui
import { Input, Spinner } from "@plane/ui";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// components
import { SwitchAccountDropdown } from "./switch-account-dropdown";
diff --git a/apps/web/core/components/onboarding/steps/team/root.tsx b/apps/web/core/components/onboarding/steps/team/root.tsx
index 12b3345f84..8ba63eb28a 100644
--- a/apps/web/core/components/onboarding/steps/team/root.tsx
+++ b/apps/web/core/components/onboarding/steps/team/root.tsx
@@ -30,7 +30,7 @@ import { Input, Spinner } from "@plane/ui";
// hooks
import { useWorkspace } from "@/hooks/store/use-workspace";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// components
import { CommonOnboardingHeader } from "../common";
diff --git a/apps/web/core/components/onboarding/steps/workspace/create.tsx b/apps/web/core/components/onboarding/steps/workspace/create.tsx
index 2f5669f144..c9906191ba 100644
--- a/apps/web/core/components/onboarding/steps/workspace/create.tsx
+++ b/apps/web/core/components/onboarding/steps/workspace/create.tsx
@@ -21,7 +21,7 @@ import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserProfile, useUserSettings } from "@/hooks/store/user";
// plane-web imports
import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper";
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// local components
import { CommonOnboardingHeader } from "../common";
diff --git a/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx b/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx
index 81286f4aed..ec50bb97ca 100644
--- a/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx
+++ b/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx
@@ -17,7 +17,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserSettings } from "@/hooks/store/user";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// local components
import { CommonOnboardingHeader } from "../common";
diff --git a/apps/web/core/components/power-k/ui/modal/search-menu.tsx b/apps/web/core/components/power-k/ui/modal/search-menu.tsx
index 9092d27729..b24f29b85f 100644
--- a/apps/web/core/components/power-k/ui/modal/search-menu.tsx
+++ b/apps/web/core/components/power-k/ui/modal/search-menu.tsx
@@ -15,7 +15,7 @@ import { usePowerK } from "@/hooks/store/use-power-k";
import useDebounce from "@/hooks/use-debounce";
// plane web imports
import { PowerKModalNoSearchResultsCommand } from "@/plane-web/components/command-palette/power-k/search/no-results-command";
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// local imports
import type { TPowerKContext, TPowerKPageType } from "../../core/types";
import { PowerKModalSearchResults } from "./search-results";
diff --git a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx
index 9dc9b4dabe..543c262364 100644
--- a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx
+++ b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx
@@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/
-import React, { useState, useEffect } from "react";
+import { useState, useEffect } from "react";
// plane imports
// import { useTranslation } from "@plane/i18n";
import type { TIssueEntityData, TIssueSearchResponse, TActivityEntityData } from "@plane/types";
@@ -18,7 +18,7 @@ import type { TIssueEntityData, TIssueSearchResponse, TActivityEntityData } from
// import { useAppRouter } from "@/hooks/use-app-router";
// plane web imports
// import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier";
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
const workspaceService = new WorkspaceService();
diff --git a/apps/web/core/components/project/settings/features-list.tsx b/apps/web/core/components/project/settings/features-list.tsx
index 1d15734a55..8605bf5080 100644
--- a/apps/web/core/components/project/settings/features-list.tsx
+++ b/apps/web/core/components/project/settings/features-list.tsx
@@ -10,6 +10,7 @@ import { useTranslation } from "@plane/i18n";
import { setPromiseToast } from "@plane/propel/toast";
import { Tooltip } from "@plane/propel/tooltip";
import type { IProject } from "@plane/types";
+import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon } from "@plane/propel/icons";
// components
import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item";
import { SettingsHeading } from "@/components/settings/heading";
@@ -17,7 +18,6 @@ import { SettingsHeading } from "@/components/settings/heading";
import { useProject } from "@/hooks/store/use-project";
// plane web imports
import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge";
-import { PROJECT_FEATURES_LIST } from "@/plane-web/constants/project/settings";
// local imports
import { ProjectFeatureToggle } from "./helper";
@@ -27,6 +27,54 @@ type Props = {
isAdmin: boolean;
};
+const PROJECT_FEATURES_LIST = {
+ cycles: {
+ key: "cycles",
+ property: "cycle_view",
+ title: "Cycles",
+ description: "Timebox work as you see fit per project and change frequency from one period to the next.",
+ icon: <CycleIcon className="h-5 w-5 flex-shrink-0 rotate-180 text-tertiary" />,
+ isPro: false,
+ isEnabled: true,
+ },
+ modules: {
+ key: "modules",
+ property: "module_view",
+ title: "Modules",
+ description: "Group work into sub-project-like set-ups with their own leads and assignees.",
+ icon: <ModuleIcon width={20} height={20} className="flex-shrink-0 text-tertiary" />,
+ isPro: false,
+ isEnabled: true,
+ },
+ views: {
+ key: "views",
+ property: "issue_views_view",
+ title: "Views",
+ description: "Save sorts, filters, and display options for later or share them.",
+ icon: <ViewsIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
+ isPro: false,
+ isEnabled: true,
+ },
+ pages: {
+ key: "pages",
+ property: "page_view",
+ title: "Pages",
+ description: "Write anything like you write anything.",
+ icon: <PageIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
+ isPro: false,
+ isEnabled: true,
+ },
+ inbox: {
+ key: "intake",
+ property: "inbox_view",
+ title: "Intake",
+ description: "Consider and discuss work items before you add them to your project.",
+ icon: <IntakeIcon className="h-5 w-5 flex-shrink-0 text-tertiary" />,
+ isPro: false,
+ isEnabled: true,
+ },
+};
+
export const ProjectFeaturesList = observer(function ProjectFeaturesList(props: Props) {
const { workspaceSlug, projectId, isAdmin } = props;
// store hooks
@@ -62,43 +110,41 @@ export const ProjectFeaturesList = observer(function ProjectFeaturesList(props:
return (
<>
- {Object.entries(PROJECT_FEATURES_LIST).map(([featureSectionKey, feature]) => (
- <div key={featureSectionKey}>
- <SettingsHeading title={t(feature.key)} description={t(`${feature.key}_description`)} />
- <div className="mt-6 flex flex-col gap-y-4">
- {Object.entries(feature.featureList).map(([featureItemKey, featureItem]) => (
- <div key={featureItemKey}>
- <SettingsBoxedControlItem
- title={
- <span className="flex items-center gap-2">
- {t(featureItem.key)}
- {featureItem.isPro && (
- <Tooltip tooltipContent="Pro feature" position="top">
- <UpgradeBadge className="rounded-sm" />
- </Tooltip>
- )}
- </span>
- }
- description={t(`${featureItem.key}_description`)}
- control={
- <ProjectFeatureToggle
- workspaceSlug={workspaceSlug}
- projectId={projectId}
- featureItem={featureItem}
- value={Boolean(currentProjectDetails?.[featureItem.property as keyof IProject])}
- handleSubmit={handleSubmit}
- disabled={!isAdmin}
- />
- }
- />
- {currentProjectDetails?.[featureItem.property as keyof IProject] && (
- <div className="pl-14">{featureItem.renderChildren?.(currentProjectDetails, workspaceSlug)}</div>
- )}
- </div>
- ))}
- </div>
+ <div>
+ <SettingsHeading title={t("projects_and_issues")} description={t("projects_and_issues_description")} />
+ <div className="mt-6 flex flex-col gap-y-4">
+ {Object.entries(PROJECT_FEATURES_LIST).map(([featureItemKey, featureItem]) => (
+ <div key={featureItemKey}>
+ <SettingsBoxedControlItem
+ title={
+ <span className="flex items-center gap-2">
+ {t(featureItem.key)}
+ {featureItem.isPro && (
+ <Tooltip tooltipContent="Pro feature" position="top">
+ <UpgradeBadge className="rounded-sm" />
+ </Tooltip>
+ )}
+ </span>
+ }
+ description={t(`${featureItem.key}_description`)}
+ control={
+ <ProjectFeatureToggle
+ workspaceSlug={workspaceSlug}
+ projectId={projectId}
+ featureItem={featureItem}
+ value={Boolean(currentProjectDetails?.[featureItem.property as keyof IProject])}
+ handleSubmit={handleSubmit}
+ disabled={!isAdmin}
+ />
+ }
+ />
+ {/* {currentProjectDetails?.[featureItem.property as keyof IProject] && (
+ <div className="pl-14">{featureItem.renderChildren?.(currentProjectDetails, workspaceSlug)}</div>
+ )} */}
+ </div>
+ ))}
</div>
- ))}
+ </div>
</>
);
});
diff --git a/apps/web/core/components/project/settings/helper.tsx b/apps/web/core/components/project/settings/helper.tsx
index 6be3106087..8911cc8c1a 100644
--- a/apps/web/core/components/project/settings/helper.tsx
+++ b/apps/web/core/components/project/settings/helper.tsx
@@ -10,12 +10,11 @@ import { ChevronRightIcon } from "@plane/propel/icons";
import { EPillVariant, Pill, EPillSize } from "@plane/propel/pill";
import { ToggleSwitch } from "@plane/ui";
import { joinUrlPath } from "@plane/utils";
-import type { TProperties } from "@/plane-web/constants/project/settings/features";
type Props = {
workspaceSlug: string;
projectId: string;
- featureItem: TProperties;
+ featureItem: any;
value: boolean;
handleSubmit: (featureKey: string, featureProperty: string) => void;
disabled?: boolean;
@@ -23,8 +22,8 @@ type Props = {
export function ProjectFeatureToggle(props: Props) {
const { workspaceSlug, projectId, featureItem, value, handleSubmit, disabled } = props;
- return featureItem.href ? (
- <Link href={joinUrlPath(workspaceSlug, "settings", "projects", projectId, "features", featureItem.href)}>
+ return featureItem?.href ? (
+ <Link href={joinUrlPath(workspaceSlug, "settings", "projects", projectId, "features", featureItem?.href)}>
<div className="flex items-center gap-2">
<Pill
variant={value ? EPillVariant.PRIMARY : EPillVariant.DEFAULT}
@@ -39,7 +38,7 @@ export function ProjectFeatureToggle(props: Props) {
) : (
<ToggleSwitch
value={value}
- onChange={() => handleSubmit(featureItem.key, featureItem.property)}
+ onChange={() => handleSubmit(featureItem?.key, featureItem?.property)}
disabled={disabled}
size="sm"
data-ph-element={PROJECT_TRACKER_ELEMENTS.TOGGLE_FEATURE}
diff --git a/apps/web/core/components/workspace/create-workspace-form.tsx b/apps/web/core/components/workspace/create-workspace-form.tsx
index de7bca392a..c1d7e983aa 100644
--- a/apps/web/core/components/workspace/create-workspace-form.tsx
+++ b/apps/web/core/components/workspace/create-workspace-form.tsx
@@ -19,7 +19,7 @@ import { CustomSelect, Input } from "@plane/ui";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useAppRouter } from "@/hooks/use-app-router";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
type Props = {
onSubmit?: (res: IWorkspace) => Promise<void>;
diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
index 8e30eb9141..10fda7ca15 100644
--- a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
+++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
@@ -10,7 +10,7 @@ import { PageIcon } from "@plane/propel/icons";
import type { IFavorite, TLogoProps } from "@plane/types";
// components
// plane web constants
-import { FAVORITE_ITEM_ICONS, FAVORITE_ITEM_LINKS } from "@/plane-web/constants/sidebar-favorites";
+import { FAVORITE_ITEM_ICONS, FAVORITE_ITEM_LINKS } from "@/constants/sidebar-favorites";
export const getFavoriteItemIcon = (type: string, logo?: TLogoProps) => {
const Icon = FAVORITE_ITEM_ICONS[type] || PageIcon;
diff --git a/apps/web/ce/constants/ai.ts b/apps/web/core/constants/ai.ts
similarity index 100%
rename from apps/web/ce/constants/ai.ts
rename to apps/web/core/constants/ai.ts
diff --git a/apps/web/ce/constants/gantt-chart.ts b/apps/web/core/constants/gantt-chart.ts
similarity index 85%
rename from apps/web/ce/constants/gantt-chart.ts
rename to apps/web/core/constants/gantt-chart.ts
index 142e5ce04b..708755f54c 100644
--- a/apps/web/ce/constants/gantt-chart.ts
+++ b/apps/web/core/constants/gantt-chart.ts
@@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/
-import type { TIssueRelationTypes } from "../types";
+import type { TIssueRelationTypes } from "../../ce/types";
export const REVERSE_RELATIONS: { [key in TIssueRelationTypes]: TIssueRelationTypes } = {
blocked_by: "blocking",
diff --git a/apps/web/ce/constants/sidebar-favorites.ts b/apps/web/core/constants/sidebar-favorites.ts
similarity index 100%
rename from apps/web/ce/constants/sidebar-favorites.ts
rename to apps/web/core/constants/sidebar-favorites.ts
diff --git a/apps/web/core/services/ai.service.ts b/apps/web/core/services/ai.service.ts
index d76fdc6c6d..4c7612dfe6 100644
--- a/apps/web/core/services/ai.service.ts
+++ b/apps/web/core/services/ai.service.ts
@@ -7,7 +7,7 @@
// helpers
import { API_BASE_URL } from "@plane/constants";
// plane web constants
-import type { AI_EDITOR_TASKS } from "@/plane-web/constants/ai";
+import type { AI_EDITOR_TASKS } from "@/constants/ai";
// services
import { APIService } from "@/services/api.service";
// types
diff --git a/apps/web/ce/services/project/estimate.service.ts b/apps/web/core/services/estimate.service.ts
similarity index 100%
rename from apps/web/ce/services/project/estimate.service.ts
rename to apps/web/core/services/estimate.service.ts
diff --git a/apps/web/core/store/estimates/estimate-point.ts b/apps/web/core/store/estimates/estimate-point.ts
index bb96c3ce3a..3671a02ca7 100644
--- a/apps/web/core/store/estimates/estimate-point.ts
+++ b/apps/web/core/store/estimates/estimate-point.ts
@@ -11,7 +11,7 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"
// types
import type { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types";
// plane web services
-import estimateService from "@/plane-web/services/project/estimate.service";
+import estimateService from "@/services/estimate.service";
// store
import type { CoreRootStore } from "@/store/root.store";
diff --git a/apps/web/core/store/estimates/project-estimate.store.ts b/apps/web/core/store/estimates/project-estimate.store.ts
index c48b04f93f..519e0805cf 100644
--- a/apps/web/core/store/estimates/project-estimate.store.ts
+++ b/apps/web/core/store/estimates/project-estimate.store.ts
@@ -10,7 +10,7 @@ import { computedFn } from "mobx-utils";
// types
import type { IEstimate as IEstimateType, IEstimateFormData, TEstimateSystemKeys } from "@plane/types";
// plane web services
-import estimateService from "@/plane-web/services/project/estimate.service";
+import estimateService from "@/services/estimate.service";
// plane web store
import type { IEstimate } from "@/plane-web/store/estimates/estimate";
import { Estimate } from "@/plane-web/store/estimates/estimate";
diff --git a/apps/web/core/store/global-view.store.ts b/apps/web/core/store/global-view.store.ts
index f5b0c12340..185604fa11 100644
--- a/apps/web/core/store/global-view.store.ts
+++ b/apps/web/core/store/global-view.store.ts
@@ -10,7 +10,7 @@ import { computedFn } from "mobx-utils";
// plane imports
import type { IWorkspaceView } from "@plane/types";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// store
import type { CoreRootStore } from "./root.store";
diff --git a/apps/web/core/store/issue/issue-details/relation.store.ts b/apps/web/core/store/issue/issue-details/relation.store.ts
index d3f29ca94f..f03b73cf3a 100644
--- a/apps/web/core/store/issue/issue-details/relation.store.ts
+++ b/apps/web/core/store/issue/issue-details/relation.store.ts
@@ -12,7 +12,7 @@ import type { TIssueRelationIdMap, TIssueRelationMap, TIssueRelation, TIssue } f
// components
import type { TRelationObject } from "@/components/issues/issue-detail-widgets/relations";
// Plane-web
-import { REVERSE_RELATIONS } from "@/plane-web/constants/gantt-chart";
+import { REVERSE_RELATIONS } from "@/constants/gantt-chart";
import type { TIssueRelationTypes } from "@/plane-web/types";
// services
import { IssueRelationService } from "@/services/issue";
diff --git a/apps/web/core/store/issue/project-views/filter.store.ts b/apps/web/core/store/issue/project-views/filter.store.ts
index c60ccca4dc..49c20d4111 100644
--- a/apps/web/core/store/issue/project-views/filter.store.ts
+++ b/apps/web/core/store/issue/project-views/filter.store.ts
@@ -24,7 +24,7 @@ import type {
import { EIssuesStoreType } from "@plane/types";
import { handleIssueQueryParamsByLayout } from "@plane/utils";
// services
-import { ViewService } from "@/plane-web/services";
+import { ViewService } from "@/services/view.service";
import type { IBaseIssueFilterStore } from "../helpers/issue-filter-helper.store";
import { IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
diff --git a/apps/web/core/store/issue/workspace/filter.store.ts b/apps/web/core/store/issue/workspace/filter.store.ts
index bec673bd32..5b56a363b4 100644
--- a/apps/web/core/store/issue/workspace/filter.store.ts
+++ b/apps/web/core/store/issue/workspace/filter.store.ts
@@ -24,7 +24,7 @@ import type {
import { EIssuesStoreType, EIssueLayoutTypes, STATIC_VIEW_TYPES } from "@plane/types";
import { handleIssueQueryParamsByLayout } from "@plane/utils";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// local imports
import type { IBaseIssueFilterStore, IIssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
import { IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
diff --git a/apps/web/core/store/issue/workspace/issue.store.ts b/apps/web/core/store/issue/workspace/issue.store.ts
index 5bca1cbfdd..eea2333974 100644
--- a/apps/web/core/store/issue/workspace/issue.store.ts
+++ b/apps/web/core/store/issue/workspace/issue.store.ts
@@ -15,7 +15,7 @@ import type {
ViewFlags,
} from "@plane/types";
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// types
import type { IBaseIssuesStore } from "../helpers/base-issues.store";
import { BaseIssuesStore } from "../helpers/base-issues.store";
diff --git a/apps/web/core/store/member/workspace/workspace-member.store.ts b/apps/web/core/store/member/workspace/workspace-member.store.ts
index 659569d88c..cad57f0aa2 100644
--- a/apps/web/core/store/member/workspace/workspace-member.store.ts
+++ b/apps/web/core/store/member/workspace/workspace-member.store.ts
@@ -12,7 +12,7 @@ import type { EUserPermissions } from "@plane/constants";
import type { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types";
// plane-web constants
// services
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
// types
import type { IRouterStore } from "@/store/router.store";
import type { IUserStore } from "@/store/user";
diff --git a/apps/web/core/store/project-view.store.ts b/apps/web/core/store/project-view.store.ts
index cd7d2d9876..f4e4007a13 100644
--- a/apps/web/core/store/project-view.store.ts
+++ b/apps/web/core/store/project-view.store.ts
@@ -13,7 +13,7 @@ import type { IProjectView, TViewFilters } from "@plane/types";
// helpers
import { getValidatedViewFilters, getViewName, orderViews, shouldFilterView } from "@plane/utils";
// services
-import { ViewService } from "@/plane-web/services";
+import { ViewService } from "@/services/view.service";
// store
import type { CoreRootStore } from "./root.store";
diff --git a/apps/web/core/store/state.store.ts b/apps/web/core/store/state.store.ts
index fa2b773e7f..1e2ad56732 100644
--- a/apps/web/core/store/state.store.ts
+++ b/apps/web/core/store/state.store.ts
@@ -13,7 +13,7 @@ import type { IIntakeState, IState } from "@plane/types";
// helpers
import { sortStates } from "@plane/utils";
// plane web
-import { ProjectStateService } from "@/plane-web/services/project/project-state.service";
+import { ProjectStateService } from "@/services/project/project-state.service";
import type { RootStore } from "@/plane-web/store/root.store";
export interface IStateStore {
diff --git a/apps/web/core/store/user/base-permissions.store.ts b/apps/web/core/store/user/base-permissions.store.ts
index bcc1e02d3b..8810ab26cd 100644
--- a/apps/web/core/store/user/base-permissions.store.ts
+++ b/apps/web/core/store/user/base-permissions.store.ts
@@ -17,7 +17,7 @@ import {
import type { EUserProjectRoles, IUserProjectsRole, IWorkspaceMemberMe, TProjectMembership } from "@plane/types";
import { EUserWorkspaceRoles } from "@plane/types";
// plane web imports
-import { WorkspaceService } from "@/plane-web/services";
+import { WorkspaceService } from "@/services/workspace.service";
import type { RootStore } from "@/plane-web/store/root.store";
// services
import projectMemberService from "@/services/project/project-member.service";