fix: core store import fixes

This commit is contained in:
sriram veeraghanta 2024-06-14 03:50:25 +05:30
parent 78d4d981d1
commit 9145234a6c
14 changed files with 40 additions and 43 deletions

View File

@ -2,10 +2,10 @@ 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 { CoreRootStore } from "@/store/root.store";
type TErrorCodes = {
status: string;
@ -44,7 +44,7 @@ export class EstimatePoint implements IEstimatePoint {
error: TErrorCodes | undefined = undefined;
constructor(
private store: RootStore,
private store: CoreRootStore,
private projectEstimate: IEstimate,
private data: IEstimatePointType
) {

View File

@ -11,12 +11,11 @@ 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 { CoreRootStore } from "@/store/root.store";
type TErrorCodes = {
status: string;
@ -73,7 +72,7 @@ export class Estimate implements IEstimate {
estimatePoints: Record<string, IEstimatePoint> = {};
constructor(
private store: RootStore,
private store: CoreRootStore,
private data: IEstimateType
) {
makeObservable(this, {

View File

@ -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";
// store
import { CoreRootStore } from "../root.store";
export interface IInboxIssueStore {
isLoading: boolean;
@ -48,7 +48,7 @@ export class InboxIssueStore implements IInboxIssueStore {
workspaceSlug: string,
projectId: string,
data: TInboxIssue,
private store: RootStore
private store: CoreRootStore
) {
this.id = data.id;
this.status = data.status;

View File

@ -6,13 +6,13 @@ 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 { IRouterStore } from "@/store/router.store";
import { IUserStore } from "@/store/user";
// store
import { CoreRootStore } from "../root.store";
import { IMemberRootStore } from ".";
interface IProjectMemberDetails {
@ -61,7 +61,7 @@ export class ProjectMemberStore implements IProjectMemberStore {
// services
projectMemberService;
constructor(_memberRoot: IMemberRootStore, _rootStore: RootStore) {
constructor(_memberRoot: IMemberRootStore, _rootStore: CoreRootStore) {
makeObservable(this, {
// observables
projectMemberMap: observable,

View File

@ -6,13 +6,13 @@ 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 { IRouterStore } from "@/store/router.store";
import { IUserStore } from "@/store/user";
// store
import { CoreRootStore } from "../root.store";
import { IMemberRootStore } from ".";
export interface IWorkspaceMembership {
@ -63,7 +63,7 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore {
// services
workspaceService;
constructor(_memberRoot: IMemberRootStore, _rootStore: RootStore) {
constructor(_memberRoot: IMemberRootStore, _rootStore: CoreRootStore) {
makeObservable(this, {
// observables
workspaceMemberMap: observable,

View File

@ -5,10 +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";
// store
import { CoreRootStore } from "../root.store";
export type TLoader = "submitting" | "submitted" | "saved";
@ -73,7 +73,7 @@ export class Page implements IPage {
pageService: ProjectPageService;
constructor(
private store: RootStore,
private store: CoreRootStore,
page: TPage
) {
this.id = page?.id || undefined;

View File

@ -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 { CoreRootStore } from "../root.store";
export interface IProjectStore {
// observables
@ -53,7 +53,7 @@ export class ProjectStore implements IProjectStore {
[projectId: string]: IProject; // projectId: project Info
} = {};
// root store
rootStore: RootStore;
rootStore: CoreRootStore;
// service
projectService;
projectArchiveService;
@ -61,7 +61,7 @@ export class ProjectStore implements IProjectStore {
issueService;
stateService;
constructor(_rootStore: RootStore) {
constructor(_rootStore: CoreRootStore) {
makeObservable(this, {
// observables
loader: observable.ref,

View File

@ -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";
// plane web store
import { RootStore } from "@/plane-web/store/root.store";
// store
import { CoreRootStore } from "../root.store";
export interface IProjectFilterStore {
// observables
@ -32,9 +32,9 @@ export class ProjectFilterStore implements IProjectFilterStore {
filters: Record<string, TProjectFilters> = {};
searchQuery: string = "";
// root store
rootStore: RootStore;
rootStore: CoreRootStore;
constructor(_rootStore: RootStore) {
constructor(_rootStore: CoreRootStore) {
makeObservable(this, {
// observables
displayFilters: observable,

View File

@ -1,6 +1,4 @@
import { action, observable, makeObservable } from "mobx";
// plane web store
import { RootStore } from "@/plane-web/store/root.store";
export interface IThemeStore {
// observables

View File

@ -2,10 +2,10 @@ 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";
// store
import { CoreRootStore } from "../root.store";
export interface IAccountStore {
// observables
@ -25,7 +25,7 @@ export class AccountStore implements IAccountStore {
// service
userService: UserService;
constructor(
private store: RootStore,
private store: CoreRootStore,
private _account: IUserAccount
) {
makeObservable(this, {

View File

@ -3,10 +3,10 @@ import set from "lodash/set";
import { action, makeObservable, observable, runInAction } from "mobx";
// types
import { IUserTheme, TUserProfile } from "@plane/types";
// plane web store
import { RootStore } from "@/plane-web/store/root.store";
// services
import { UserService } from "@/services/user.service";
// store
import { CoreRootStore } from "../root.store";
type TError = {
status: string;
@ -63,7 +63,7 @@ export class ProfileStore implements IUserProfileStore {
// services
userService: UserService;
constructor(public store: RootStore) {
constructor(public store: CoreRootStore) {
makeObservable(this, {
// observables
isLoading: observable.ref,

View File

@ -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";
// plane web store
import { CoreRootStore } from "../root.store";
export interface IUserMembershipStore {
// observables
@ -68,7 +68,7 @@ export class UserMembershipStore implements IUserMembershipStore {
workspaceService;
projectMemberService;
constructor(_rootStore: RootStore) {
constructor(_rootStore: CoreRootStore) {
makeObservable(this, {
// observables
workspaceMemberInfo: observable,

View File

@ -2,10 +2,10 @@ import { action, observable, makeObservable, runInAction } from "mobx";
import { computedFn } from "mobx-utils";
// 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";
// store
import { CoreRootStore } from "../root.store";
export interface IApiTokenStore {
// observables
@ -28,7 +28,7 @@ export class ApiTokenStore implements IApiTokenStore {
// root store
rootStore;
constructor(_rootStore: RootStore) {
constructor(_rootStore: CoreRootStore) {
makeObservable(this, {
// observables
apiTokens: observable,

View File

@ -3,10 +3,10 @@ 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";
// store
import { CoreRootStore } from "../root.store";
export interface IWebhookStore {
// observables
@ -43,7 +43,7 @@ export class WebhookStore implements IWebhookStore {
// root store
rootStore;
constructor(_rootStore: RootStore) {
constructor(_rootStore: CoreRootStore) {
makeObservable(this, {
// observables
webhooks: observable,