From efbd23838efba1b5678f4a815d1add93d1e88591 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal Date: Thu, 13 Jun 2024 12:53:56 +0530 Subject: [PATCH] chore: create extended root store --- web/ce/store/root.store.ts | 8 ++++++++ web/core/lib/store-context.tsx | 4 ++-- web/core/store/cycle.store.ts | 4 ++-- web/core/store/cycle_filter.store.ts | 4 ++-- web/core/store/dashboard.store.ts | 4 ++-- web/core/store/estimates/estimate-point.ts | 5 +++-- web/core/store/estimates/estimate.ts | 4 +++- web/core/store/estimates/project-estimate.store.ts | 4 +++- web/core/store/event-tracker.store.ts | 3 ++- web/core/store/global-view.store.ts | 4 ++-- web/core/store/inbox/inbox-issue.store.ts | 11 ++++++++--- web/core/store/inbox/project-inbox.store.ts | 3 ++- web/core/store/issue/issue_kanban_view.store.ts | 8 +++++--- web/core/store/issue/root.store.ts | 3 ++- web/core/store/label.store.ts | 4 ++-- web/core/store/member/index.ts | 3 ++- web/core/store/member/project-member.store.ts | 3 ++- web/core/store/member/workspace-member.store.ts | 3 ++- web/core/store/module.store.ts | 4 ++-- web/core/store/module_filter.store.ts | 4 ++-- web/core/store/pages/page.store.ts | 3 ++- web/core/store/pages/project-page.store.ts | 3 ++- web/core/store/project-view.store.ts | 3 ++- web/core/store/project/index.ts | 3 ++- web/core/store/project/project.store.ts | 4 ++-- web/core/store/project/project_filter.store.ts | 4 ++-- web/core/store/state.store.ts | 12 ++++++------ web/core/store/theme.store.ts | 4 ++-- web/core/store/user/account.store.ts | 5 +++-- web/core/store/user/index.ts | 3 ++- web/core/store/user/profile.store.ts | 7 ++++--- web/core/store/user/user-membership.store.ts | 4 ++-- web/core/store/workspace/api-token.store.ts | 9 +++++---- web/core/store/workspace/index.ts | 7 ++++--- web/core/store/workspace/webhook.store.ts | 5 ++++- 35 files changed, 102 insertions(+), 64 deletions(-) create mode 100644 web/ce/store/root.store.ts diff --git a/web/ce/store/root.store.ts b/web/ce/store/root.store.ts new file mode 100644 index 000000000..da859a585 --- /dev/null +++ b/web/ce/store/root.store.ts @@ -0,0 +1,8 @@ +// store +import { RootStore as CoreRootStore } from "@/store/root.store"; + +export class RootStore extends CoreRootStore { + constructor() { + super(); + } +} diff --git a/web/core/lib/store-context.tsx b/web/core/lib/store-context.tsx index 8b523455f..cbee8b2da 100644 --- a/web/core/lib/store-context.tsx +++ b/web/core/lib/store-context.tsx @@ -1,8 +1,8 @@ "use client"; import { ReactElement, createContext } from "react"; -// mobx store -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export let rootStore = new RootStore(); diff --git a/web/core/store/cycle.store.ts b/web/core/store/cycle.store.ts index 1c72170a9..c781fbc40 100644 --- a/web/core/store/cycle.store.ts +++ b/web/core/store/cycle.store.ts @@ -8,13 +8,13 @@ import { ICycle, CycleDateCheckData, TCyclePlotType } from "@plane/types"; // helpers import { orderCycles, shouldFilterCycle } from "@/helpers/cycle.helper"; import { getDate } from "@/helpers/date-time.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { CycleService } from "@/services/cycle.service"; import { CycleArchiveService } from "@/services/cycle_archive.service"; import { IssueService } from "@/services/issue"; import { ProjectService } from "@/services/project"; -// store -import { RootStore } from "@/store/root.store"; export interface ICycleStore { // loaders diff --git a/web/core/store/cycle_filter.store.ts b/web/core/store/cycle_filter.store.ts index 12b06c4cf..675027a4f 100644 --- a/web/core/store/cycle_filter.store.ts +++ b/web/core/store/cycle_filter.store.ts @@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f import { computedFn } from "mobx-utils"; // types import { TCycleDisplayFilters, TCycleFilters, TCycleFiltersByState } from "@plane/types"; -// store -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export interface ICycleFilterStore { // observables diff --git a/web/core/store/dashboard.store.ts b/web/core/store/dashboard.store.ts index 36d2a303b..46c376e48 100644 --- a/web/core/store/dashboard.store.ts +++ b/web/core/store/dashboard.store.ts @@ -10,10 +10,10 @@ import { TWidgetKeys, TWidgetStatsRequestParams, } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { DashboardService } from "@/services/dashboard.service"; -// stores -import { RootStore } from "@/store/root.store"; export interface IDashboardStore { // error states diff --git a/web/core/store/estimates/estimate-point.ts b/web/core/store/estimates/estimate-point.ts index 3b4bf48b7..58b70d943 100644 --- a/web/core/store/estimates/estimate-point.ts +++ b/web/core/store/estimates/estimate-point.ts @@ -1,10 +1,11 @@ import set from "lodash/set"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; +// types import { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import estimateService from "@/services/project/estimate.service"; -// store -import { RootStore } from "@/store/root.store"; type TErrorCodes = { status: string; diff --git a/web/core/store/estimates/estimate.ts b/web/core/store/estimates/estimate.ts index 8417386c9..eb130d39b 100644 --- a/web/core/store/estimates/estimate.ts +++ b/web/core/store/estimates/estimate.ts @@ -3,6 +3,7 @@ import set from "lodash/set"; import unset from "lodash/unset"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; +// types import { IEstimate as IEstimateType, IEstimatePoint as IEstimatePointType, @@ -10,11 +11,12 @@ import { IEstimateFormData, TEstimatePointsObject, } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import estimateService from "@/services/project/estimate.service"; // store import { IEstimatePoint, EstimatePoint } from "@/store/estimates/estimate-point"; -import { RootStore } from "@/store/root.store"; type TErrorCodes = { status: string; diff --git a/web/core/store/estimates/project-estimate.store.ts b/web/core/store/estimates/project-estimate.store.ts index 1ac77dce3..8626abead 100644 --- a/web/core/store/estimates/project-estimate.store.ts +++ b/web/core/store/estimates/project-estimate.store.ts @@ -4,12 +4,14 @@ import unset from "lodash/unset"; import update from "lodash/update"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; +// types import { IEstimate as IEstimateType, IEstimateFormData } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import estimateService from "@/services/project/estimate.service"; // store import { IEstimate, Estimate } from "@/store/estimates/estimate"; -import { RootStore } from "@/store/root.store"; type TEstimateLoader = "init-loader" | "mutation-loader" | undefined; type TErrorCodes = { diff --git a/web/core/store/event-tracker.store.ts b/web/core/store/event-tracker.store.ts index 3b2622078..e9c4b0e41 100644 --- a/web/core/store/event-tracker.store.ts +++ b/web/core/store/event-tracker.store.ts @@ -14,7 +14,8 @@ import { getWorkspaceEventPayload, getPageEventPayload, } from "@/constants/event-tracker"; -import { RootStore } from "./root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export interface IEventTrackerStore { // properties diff --git a/web/core/store/global-view.store.ts b/web/core/store/global-view.store.ts index d5a7f6204..bc1574f05 100644 --- a/web/core/store/global-view.store.ts +++ b/web/core/store/global-view.store.ts @@ -7,10 +7,10 @@ import { computedFn } from "mobx-utils"; import { IIssueFilterOptions, IWorkspaceView } from "@plane/types"; // constants import { EIssueFilterType } from "@/constants/issue"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { WorkspaceService } from "@/services/workspace.service"; -// types -import { RootStore } from "@/store/root.store"; export interface IGlobalViewStore { // observables diff --git a/web/core/store/inbox/inbox-issue.store.ts b/web/core/store/inbox/inbox-issue.store.ts index a76e58ab6..4671aa967 100644 --- a/web/core/store/inbox/inbox-issue.store.ts +++ b/web/core/store/inbox/inbox-issue.store.ts @@ -4,11 +4,11 @@ import { makeObservable, observable, runInAction, action } from "mobx"; import { TIssue, TInboxIssue, TInboxIssueStatus, TInboxDuplicateIssueDetails } from "@plane/types"; // helpers import { EInboxIssueStatus } from "@/helpers/inbox.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { InboxIssueService } from "@/services/inbox"; import { IssueService } from "@/services/issue"; -// root store -import { RootStore } from "@/store/root.store"; export interface IInboxIssueStore { isLoading: boolean; @@ -44,7 +44,12 @@ export class InboxIssueStore implements IInboxIssueStore { inboxIssueService; issueService; - constructor(workspaceSlug: string, projectId: string, data: TInboxIssue, private store: RootStore) { + constructor( + workspaceSlug: string, + projectId: string, + data: TInboxIssue, + private store: RootStore + ) { this.id = data.id; this.status = data.status; this.issue = data?.issue; diff --git a/web/core/store/inbox/project-inbox.store.ts b/web/core/store/inbox/project-inbox.store.ts index 0e80143d5..163f59dd1 100644 --- a/web/core/store/inbox/project-inbox.store.ts +++ b/web/core/store/inbox/project-inbox.store.ts @@ -15,11 +15,12 @@ import { } from "@plane/types"; // helpers import { EInboxIssueCurrentTab, EInboxIssueStatus, EPastDurationFilters, getCustomDates } from "@/helpers/inbox.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { InboxIssueService } from "@/services/inbox"; // root store import { IInboxIssueStore, InboxIssueStore } from "@/store/inbox/inbox-issue.store"; -import { RootStore } from "@/store/root.store"; type TLoader = | "init-loading" diff --git a/web/core/store/issue/issue_kanban_view.store.ts b/web/core/store/issue/issue_kanban_view.store.ts index 5331f911b..79f88f817 100644 --- a/web/core/store/issue/issue_kanban_view.store.ts +++ b/web/core/store/issue/issue_kanban_view.store.ts @@ -1,9 +1,11 @@ import { action, computed, makeObservable, observable } from "mobx"; import { computedFn } from "mobx-utils"; -import { IssueRootStore } from "./root.store"; -import { TIssueGroupByOptions } from "@plane/types"; -import { DRAG_ALLOWED_GROUPS } from "@/constants/issue"; // types +import { TIssueGroupByOptions } from "@plane/types"; +// constants +import { DRAG_ALLOWED_GROUPS } from "@/constants/issue"; +// store +import { IssueRootStore } from "./root.store"; export interface IIssueKanBanViewStore { kanBanToggle: { diff --git a/web/core/store/issue/root.store.ts b/web/core/store/issue/root.store.ts index 08faff721..ae1a24154 100644 --- a/web/core/store/issue/root.store.ts +++ b/web/core/store/issue/root.store.ts @@ -1,9 +1,10 @@ import isEmpty from "lodash/isEmpty"; import { autorun, makeObservable, observable } from "mobx"; import { ICycle, IIssueLabel, IModule, IProject, IState, IUserLite } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // root store import { IWorkspaceMembership } from "@/store/member/workspace-member.store"; -import { RootStore } from "../root.store"; import { IStateStore, StateStore } from "../state.store"; // issues data store import { IArchivedIssuesFilter, ArchivedIssuesFilter, IArchivedIssues, ArchivedIssues } from "./archived"; diff --git a/web/core/store/label.store.ts b/web/core/store/label.store.ts index 474feab23..0a1c71d21 100644 --- a/web/core/store/label.store.ts +++ b/web/core/store/label.store.ts @@ -6,10 +6,10 @@ import { computedFn } from "mobx-utils"; import { IIssueLabel, IIssueLabelTree } from "@plane/types"; // helpers import { buildTree } from "@/helpers/array.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { IssueLabelService } from "@/services/issue"; -// store -import { RootStore } from "@/store/root.store"; export interface ILabelStore { //Loaders diff --git a/web/core/store/member/index.ts b/web/core/store/member/index.ts index 958fb7ead..db4b80a19 100644 --- a/web/core/store/member/index.ts +++ b/web/core/store/member/index.ts @@ -1,7 +1,8 @@ import { action, makeObservable, observable } from "mobx"; // types import { IUserLite } from "@plane/types"; -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; import { IProjectMemberStore, ProjectMemberStore } from "./project-member.store"; import { IWorkspaceMemberStore, WorkspaceMemberStore } from "./workspace-member.store"; diff --git a/web/core/store/member/project-member.store.ts b/web/core/store/member/project-member.store.ts index d18964c9b..0efe9f768 100644 --- a/web/core/store/member/project-member.store.ts +++ b/web/core/store/member/project-member.store.ts @@ -6,10 +6,11 @@ import { computedFn } from "mobx-utils"; import { IProjectBulkAddFormData, IProjectMember, IProjectMembership, IUserLite } from "@plane/types"; // constants import { EUserProjectRoles } from "@/constants/project"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ProjectMemberService } from "@/services/project"; // store -import { RootStore } from "@/store/root.store"; import { IRouterStore } from "@/store/router.store"; import { IUserStore } from "@/store/user"; import { IMemberRootStore } from "."; diff --git a/web/core/store/member/workspace-member.store.ts b/web/core/store/member/workspace-member.store.ts index cb24aae52..03ca5e66a 100644 --- a/web/core/store/member/workspace-member.store.ts +++ b/web/core/store/member/workspace-member.store.ts @@ -6,10 +6,11 @@ import { computedFn } from "mobx-utils"; import { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types"; // constants import { EUserWorkspaceRoles } from "@/constants/workspace"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { WorkspaceService } from "@/services/workspace.service"; // types -import { RootStore } from "@/store/root.store"; import { IRouterStore } from "@/store/router.store"; import { IUserStore } from "@/store/user"; import { IMemberRootStore } from "."; diff --git a/web/core/store/module.store.ts b/web/core/store/module.store.ts index 845b7edf2..81e734dbc 100644 --- a/web/core/store/module.store.ts +++ b/web/core/store/module.store.ts @@ -8,12 +8,12 @@ import { computedFn } from "mobx-utils"; import { IModule, ILinkDetails, TModulePlotType } from "@plane/types"; // helpers import { orderModules, shouldFilterModule } from "@/helpers/module.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ModuleService } from "@/services/module.service"; import { ModuleArchiveService } from "@/services/module_archive.service"; import { ProjectService } from "@/services/project"; -// store -import { RootStore } from "@/store/root.store"; export interface IModuleStore { //Loaders diff --git a/web/core/store/module_filter.store.ts b/web/core/store/module_filter.store.ts index 44f53821d..9812ef9b1 100644 --- a/web/core/store/module_filter.store.ts +++ b/web/core/store/module_filter.store.ts @@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f import { computedFn } from "mobx-utils"; // types import { TModuleDisplayFilters, TModuleFilters, TModuleFiltersByState } from "@plane/types"; -// store -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export interface IModuleFilterStore { // observables diff --git a/web/core/store/pages/page.store.ts b/web/core/store/pages/page.store.ts index 7878ce83d..ed52a1825 100644 --- a/web/core/store/pages/page.store.ts +++ b/web/core/store/pages/page.store.ts @@ -5,9 +5,10 @@ import { TLogoProps, TPage } from "@plane/types"; // constants import { EPageAccess } from "@/constants/page"; import { EUserProjectRoles } from "@/constants/project"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ProjectPageService } from "@/services/page"; -import { RootStore } from "../root.store"; export type TLoader = "submitting" | "submitted" | "saved"; diff --git a/web/core/store/pages/project-page.store.ts b/web/core/store/pages/project-page.store.ts index 46369dcd4..e7b96ca75 100644 --- a/web/core/store/pages/project-page.store.ts +++ b/web/core/store/pages/project-page.store.ts @@ -6,11 +6,12 @@ import { computedFn } from "mobx-utils"; import { TPage, TPageFilters, TPageNavigationTabs } from "@plane/types"; // helpers import { filterPagesByPageType, getPageName, orderPages, shouldFilterPage } from "@/helpers/page.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ProjectPageService } from "@/services/page"; // store import { IPageStore, PageStore } from "@/store/pages/page.store"; -import { RootStore } from "../root.store"; type TLoader = "init-loader" | "mutation-loader" | undefined; diff --git a/web/core/store/project-view.store.ts b/web/core/store/project-view.store.ts index 92b8719c1..073032a97 100644 --- a/web/core/store/project-view.store.ts +++ b/web/core/store/project-view.store.ts @@ -3,9 +3,10 @@ import { observable, action, makeObservable, runInAction, computed } from "mobx" import { computedFn } from "mobx-utils"; // types import { IProjectView } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ViewService } from "@/services/view.service"; -import { RootStore } from "@/store/root.store"; export interface IProjectViewStore { //Loaders diff --git a/web/core/store/project/index.ts b/web/core/store/project/index.ts index 77102b115..fe5683b7d 100644 --- a/web/core/store/project/index.ts +++ b/web/core/store/project/index.ts @@ -1,4 +1,5 @@ -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; import { IProjectPublishStore, ProjectPublishStore } from "./project-publish.store"; import { IProjectStore, ProjectStore } from "./project.store"; import { IProjectFilterStore, ProjectFilterStore } from "./project_filter.store"; diff --git a/web/core/store/project/project.store.ts b/web/core/store/project/project.store.ts index 0f09bfdb1..6fb7c306a 100644 --- a/web/core/store/project/project.store.ts +++ b/web/core/store/project/project.store.ts @@ -6,11 +6,11 @@ import { computedFn } from "mobx-utils"; import { IProject } from "@plane/types"; // helpers import { orderProjects, shouldFilterProject } from "@/helpers/project.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { IssueLabelService, IssueService } from "@/services/issue"; import { ProjectService, ProjectStateService, ProjectArchiveService } from "@/services/project"; -// store -import { RootStore } from "../root.store"; export interface IProjectStore { // observables diff --git a/web/core/store/project/project_filter.store.ts b/web/core/store/project/project_filter.store.ts index 1ffd336a4..6e909652e 100644 --- a/web/core/store/project/project_filter.store.ts +++ b/web/core/store/project/project_filter.store.ts @@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f import { computedFn } from "mobx-utils"; // types import { TProjectDisplayFilters, TProjectFilters, TProjectAppliedDisplayFilterKeys } from "@plane/types"; -// store -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export interface IProjectFilterStore { // observables diff --git a/web/core/store/state.store.ts b/web/core/store/state.store.ts index 7a4e20ad4..985a43fd2 100644 --- a/web/core/store/state.store.ts +++ b/web/core/store/state.store.ts @@ -2,14 +2,14 @@ import groupBy from "lodash/groupBy"; import set from "lodash/set"; import { makeObservable, observable, computed, action, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; -import { IState } from "@plane/types"; -// store -import { sortStates } from "@/helpers/state.helper"; -import { ProjectStateService } from "@/services/project"; -import { RootStore } from "./root.store"; // types -// services +import { IState } from "@plane/types"; // helpers +import { sortStates } from "@/helpers/state.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; +// services +import { ProjectStateService } from "@/services/project"; export interface IStateStore { //Loaders diff --git a/web/core/store/theme.store.ts b/web/core/store/theme.store.ts index 33537fe79..637a179f9 100644 --- a/web/core/store/theme.store.ts +++ b/web/core/store/theme.store.ts @@ -1,6 +1,6 @@ import { action, observable, makeObservable } from "mobx"; -// store types -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; export interface IThemeStore { // observables diff --git a/web/core/store/user/account.store.ts b/web/core/store/user/account.store.ts index af42b90e3..3a2a3944e 100644 --- a/web/core/store/user/account.store.ts +++ b/web/core/store/user/account.store.ts @@ -1,10 +1,11 @@ import set from "lodash/set"; import { makeObservable, observable } from "mobx"; +// types import { IUserAccount } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { UserService } from "@/services/user.service"; -// stores -import { RootStore } from "@/store/root.store"; export interface IAccountStore { // observables diff --git a/web/core/store/user/index.ts b/web/core/store/user/index.ts index 82839805e..f973f8e64 100644 --- a/web/core/store/user/index.ts +++ b/web/core/store/user/index.ts @@ -5,11 +5,12 @@ import { action, makeObservable, observable, runInAction } from "mobx"; import { IUser } from "@plane/types"; // helpers import { API_BASE_URL } from "@/helpers/common.helper"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { AuthService } from "@/services/auth.service"; import { UserService } from "@/services/user.service"; // stores -import { RootStore } from "@/store/root.store"; import { IAccountStore } from "@/store/user/account.store"; import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store"; import { IUserMembershipStore, UserMembershipStore } from "@/store/user/user-membership.store"; diff --git a/web/core/store/user/profile.store.ts b/web/core/store/user/profile.store.ts index d3669399e..666b2cad6 100644 --- a/web/core/store/user/profile.store.ts +++ b/web/core/store/user/profile.store.ts @@ -1,11 +1,12 @@ import cloneDeep from "lodash/cloneDeep"; import set from "lodash/set"; import { action, makeObservable, observable, runInAction } from "mobx"; -// services -import { UserService } from "@/services/user.service"; // types import { IUserTheme, TUserProfile } from "@plane/types"; -import { RootStore } from "@/store/root.store"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; +// services +import { UserService } from "@/services/user.service"; type TError = { status: string; diff --git a/web/core/store/user/user-membership.store.ts b/web/core/store/user/user-membership.store.ts index 2989762f3..c67d334e6 100644 --- a/web/core/store/user/user-membership.store.ts +++ b/web/core/store/user/user-membership.store.ts @@ -5,12 +5,12 @@ import { IWorkspaceMemberMe, IProjectMember, IUserProjectsRole } from "@plane/ty // constants import { EUserProjectRoles } from "@/constants/project"; import { EUserWorkspaceRoles } from "@/constants/workspace"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services import { ProjectMemberService } from "@/services/project"; import { UserService } from "@/services/user.service"; import { WorkspaceService } from "@/services/workspace.service"; -// store -import { RootStore } from "../root.store"; export interface IUserMembershipStore { // observables diff --git a/web/core/store/workspace/api-token.store.ts b/web/core/store/workspace/api-token.store.ts index 8cc25034e..e8d03850b 100644 --- a/web/core/store/workspace/api-token.store.ts +++ b/web/core/store/workspace/api-token.store.ts @@ -1,10 +1,11 @@ -// mobx import { action, observable, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; -import { APITokenService } from "@/services/api_token.service"; -import { IApiToken } from "@plane/types"; -import { RootStore } from "../root.store"; // types +import { IApiToken } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; +// services +import { APITokenService } from "@/services/api_token.service"; export interface IApiTokenStore { // observables diff --git a/web/core/store/workspace/index.ts b/web/core/store/workspace/index.ts index 9ce4b8e87..87d61baba 100644 --- a/web/core/store/workspace/index.ts +++ b/web/core/store/workspace/index.ts @@ -1,10 +1,11 @@ import set from "lodash/set"; import { action, computed, observable, makeObservable, runInAction } from "mobx"; -import { IWorkspace } from "@plane/types"; -import { WorkspaceService } from "@/services/workspace.service"; -import { RootStore } from "../root.store"; // types +import { IWorkspace } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; // services +import { WorkspaceService } from "@/services/workspace.service"; // sub-stores import { ApiTokenStore, IApiTokenStore } from "./api-token.store"; import { IWebhookStore, WebhookStore } from "./webhook.store"; diff --git a/web/core/store/workspace/webhook.store.ts b/web/core/store/workspace/webhook.store.ts index 4e6db9f74..0f2d8fd12 100644 --- a/web/core/store/workspace/webhook.store.ts +++ b/web/core/store/workspace/webhook.store.ts @@ -1,9 +1,12 @@ // mobx import { action, observable, makeObservable, computed, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; +// types import { IWebhook } from "@plane/types"; +// plane web store +import { RootStore } from "@/plane-web/store/root.store"; +// services import { WebhookService } from "@/services/webhook.service"; -import { RootStore } from "../root.store"; export interface IWebhookStore { // observables