mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: core store import fixes
This commit is contained in:
parent
78d4d981d1
commit
9145234a6c
@ -2,10 +2,10 @@ import set from "lodash/set";
|
|||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
// types
|
// types
|
||||||
import { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types";
|
import { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import estimateService from "@/services/project/estimate.service";
|
import estimateService from "@/services/project/estimate.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
status: string;
|
status: string;
|
||||||
@ -44,7 +44,7 @@ export class EstimatePoint implements IEstimatePoint {
|
|||||||
error: TErrorCodes | undefined = undefined;
|
error: TErrorCodes | undefined = undefined;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: RootStore,
|
private store: CoreRootStore,
|
||||||
private projectEstimate: IEstimate,
|
private projectEstimate: IEstimate,
|
||||||
private data: IEstimatePointType
|
private data: IEstimatePointType
|
||||||
) {
|
) {
|
||||||
|
@ -11,12 +11,11 @@ import {
|
|||||||
IEstimateFormData,
|
IEstimateFormData,
|
||||||
TEstimatePointsObject,
|
TEstimatePointsObject,
|
||||||
} from "@plane/types";
|
} from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import estimateService from "@/services/project/estimate.service";
|
import estimateService from "@/services/project/estimate.service";
|
||||||
// store
|
// store
|
||||||
import { IEstimatePoint, EstimatePoint } from "@/store/estimates/estimate-point";
|
import { IEstimatePoint, EstimatePoint } from "@/store/estimates/estimate-point";
|
||||||
|
import { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
status: string;
|
status: string;
|
||||||
@ -73,7 +72,7 @@ export class Estimate implements IEstimate {
|
|||||||
estimatePoints: Record<string, IEstimatePoint> = {};
|
estimatePoints: Record<string, IEstimatePoint> = {};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: RootStore,
|
private store: CoreRootStore,
|
||||||
private data: IEstimateType
|
private data: IEstimateType
|
||||||
) {
|
) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
|
@ -4,11 +4,11 @@ import { makeObservable, observable, runInAction, action } from "mobx";
|
|||||||
import { TIssue, TInboxIssue, TInboxIssueStatus, TInboxDuplicateIssueDetails } from "@plane/types";
|
import { TIssue, TInboxIssue, TInboxIssueStatus, TInboxDuplicateIssueDetails } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { EInboxIssueStatus } from "@/helpers/inbox.helper";
|
import { EInboxIssueStatus } from "@/helpers/inbox.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { InboxIssueService } from "@/services/inbox";
|
import { InboxIssueService } from "@/services/inbox";
|
||||||
import { IssueService } from "@/services/issue";
|
import { IssueService } from "@/services/issue";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IInboxIssueStore {
|
export interface IInboxIssueStore {
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
@ -48,7 +48,7 @@ export class InboxIssueStore implements IInboxIssueStore {
|
|||||||
workspaceSlug: string,
|
workspaceSlug: string,
|
||||||
projectId: string,
|
projectId: string,
|
||||||
data: TInboxIssue,
|
data: TInboxIssue,
|
||||||
private store: RootStore
|
private store: CoreRootStore
|
||||||
) {
|
) {
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.status = data.status;
|
this.status = data.status;
|
||||||
|
@ -6,13 +6,13 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IProjectBulkAddFormData, IProjectMember, IProjectMembership, IUserLite } from "@plane/types";
|
import { IProjectBulkAddFormData, IProjectMember, IProjectMembership, IUserLite } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ProjectMemberService } from "@/services/project";
|
import { ProjectMemberService } from "@/services/project";
|
||||||
// store
|
// store
|
||||||
import { IRouterStore } from "@/store/router.store";
|
import { IRouterStore } from "@/store/router.store";
|
||||||
import { IUserStore } from "@/store/user";
|
import { IUserStore } from "@/store/user";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
import { IMemberRootStore } from ".";
|
import { IMemberRootStore } from ".";
|
||||||
|
|
||||||
interface IProjectMemberDetails {
|
interface IProjectMemberDetails {
|
||||||
@ -61,7 +61,7 @@ export class ProjectMemberStore implements IProjectMemberStore {
|
|||||||
// services
|
// services
|
||||||
projectMemberService;
|
projectMemberService;
|
||||||
|
|
||||||
constructor(_memberRoot: IMemberRootStore, _rootStore: RootStore) {
|
constructor(_memberRoot: IMemberRootStore, _rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
projectMemberMap: observable,
|
projectMemberMap: observable,
|
||||||
|
@ -6,13 +6,13 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types";
|
import { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
import { WorkspaceService } from "@/services/workspace.service";
|
||||||
// types
|
// types
|
||||||
import { IRouterStore } from "@/store/router.store";
|
import { IRouterStore } from "@/store/router.store";
|
||||||
import { IUserStore } from "@/store/user";
|
import { IUserStore } from "@/store/user";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
import { IMemberRootStore } from ".";
|
import { IMemberRootStore } from ".";
|
||||||
|
|
||||||
export interface IWorkspaceMembership {
|
export interface IWorkspaceMembership {
|
||||||
@ -63,7 +63,7 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore {
|
|||||||
// services
|
// services
|
||||||
workspaceService;
|
workspaceService;
|
||||||
|
|
||||||
constructor(_memberRoot: IMemberRootStore, _rootStore: RootStore) {
|
constructor(_memberRoot: IMemberRootStore, _rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
workspaceMemberMap: observable,
|
workspaceMemberMap: observable,
|
||||||
|
@ -5,10 +5,10 @@ import { TLogoProps, TPage } from "@plane/types";
|
|||||||
// constants
|
// constants
|
||||||
import { EPageAccess } from "@/constants/page";
|
import { EPageAccess } from "@/constants/page";
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ProjectPageService } from "@/services/page";
|
import { ProjectPageService } from "@/services/page";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export type TLoader = "submitting" | "submitted" | "saved";
|
export type TLoader = "submitting" | "submitted" | "saved";
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ export class Page implements IPage {
|
|||||||
pageService: ProjectPageService;
|
pageService: ProjectPageService;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: RootStore,
|
private store: CoreRootStore,
|
||||||
page: TPage
|
page: TPage
|
||||||
) {
|
) {
|
||||||
this.id = page?.id || undefined;
|
this.id = page?.id || undefined;
|
||||||
|
@ -6,11 +6,11 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IProject } from "@plane/types";
|
import { IProject } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { orderProjects, shouldFilterProject } from "@/helpers/project.helper";
|
import { orderProjects, shouldFilterProject } from "@/helpers/project.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { IssueLabelService, IssueService } from "@/services/issue";
|
import { IssueLabelService, IssueService } from "@/services/issue";
|
||||||
import { ProjectService, ProjectStateService, ProjectArchiveService } from "@/services/project";
|
import { ProjectService, ProjectStateService, ProjectArchiveService } from "@/services/project";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IProjectStore {
|
export interface IProjectStore {
|
||||||
// observables
|
// observables
|
||||||
@ -53,7 +53,7 @@ export class ProjectStore implements IProjectStore {
|
|||||||
[projectId: string]: IProject; // projectId: project Info
|
[projectId: string]: IProject; // projectId: project Info
|
||||||
} = {};
|
} = {};
|
||||||
// root store
|
// root store
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
// service
|
// service
|
||||||
projectService;
|
projectService;
|
||||||
projectArchiveService;
|
projectArchiveService;
|
||||||
@ -61,7 +61,7 @@ export class ProjectStore implements IProjectStore {
|
|||||||
issueService;
|
issueService;
|
||||||
stateService;
|
stateService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { TProjectDisplayFilters, TProjectFilters, TProjectAppliedDisplayFilterKeys } from "@plane/types";
|
import { TProjectDisplayFilters, TProjectFilters, TProjectAppliedDisplayFilterKeys } from "@plane/types";
|
||||||
// plane web store
|
// store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IProjectFilterStore {
|
export interface IProjectFilterStore {
|
||||||
// observables
|
// observables
|
||||||
@ -32,9 +32,9 @@ export class ProjectFilterStore implements IProjectFilterStore {
|
|||||||
filters: Record<string, TProjectFilters> = {};
|
filters: Record<string, TProjectFilters> = {};
|
||||||
searchQuery: string = "";
|
searchQuery: string = "";
|
||||||
// root store
|
// root store
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
displayFilters: observable,
|
displayFilters: observable,
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { action, observable, makeObservable } from "mobx";
|
import { action, observable, makeObservable } from "mobx";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
|
|
||||||
export interface IThemeStore {
|
export interface IThemeStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -2,10 +2,10 @@ import set from "lodash/set";
|
|||||||
import { makeObservable, observable } from "mobx";
|
import { makeObservable, observable } from "mobx";
|
||||||
// types
|
// types
|
||||||
import { IUserAccount } from "@plane/types";
|
import { IUserAccount } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IAccountStore {
|
export interface IAccountStore {
|
||||||
// observables
|
// observables
|
||||||
@ -25,7 +25,7 @@ export class AccountStore implements IAccountStore {
|
|||||||
// service
|
// service
|
||||||
userService: UserService;
|
userService: UserService;
|
||||||
constructor(
|
constructor(
|
||||||
private store: RootStore,
|
private store: CoreRootStore,
|
||||||
private _account: IUserAccount
|
private _account: IUserAccount
|
||||||
) {
|
) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
|
@ -3,10 +3,10 @@ import set from "lodash/set";
|
|||||||
import { action, makeObservable, observable, runInAction } from "mobx";
|
import { action, makeObservable, observable, runInAction } from "mobx";
|
||||||
// types
|
// types
|
||||||
import { IUserTheme, TUserProfile } from "@plane/types";
|
import { IUserTheme, TUserProfile } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
type TError = {
|
type TError = {
|
||||||
status: string;
|
status: string;
|
||||||
@ -63,7 +63,7 @@ export class ProfileStore implements IUserProfileStore {
|
|||||||
// services
|
// services
|
||||||
userService: UserService;
|
userService: UserService;
|
||||||
|
|
||||||
constructor(public store: RootStore) {
|
constructor(public store: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
isLoading: observable.ref,
|
isLoading: observable.ref,
|
||||||
|
@ -5,12 +5,12 @@ import { IWorkspaceMemberMe, IProjectMember, IUserProjectsRole } from "@plane/ty
|
|||||||
// constants
|
// constants
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ProjectMemberService } from "@/services/project";
|
import { ProjectMemberService } from "@/services/project";
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
import { WorkspaceService } from "@/services/workspace.service";
|
||||||
|
// plane web store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IUserMembershipStore {
|
export interface IUserMembershipStore {
|
||||||
// observables
|
// observables
|
||||||
@ -68,7 +68,7 @@ export class UserMembershipStore implements IUserMembershipStore {
|
|||||||
workspaceService;
|
workspaceService;
|
||||||
projectMemberService;
|
projectMemberService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
workspaceMemberInfo: observable,
|
workspaceMemberInfo: observable,
|
||||||
|
@ -2,10 +2,10 @@ import { action, observable, makeObservable, runInAction } from "mobx";
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { IApiToken } from "@plane/types";
|
import { IApiToken } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { APITokenService } from "@/services/api_token.service";
|
import { APITokenService } from "@/services/api_token.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IApiTokenStore {
|
export interface IApiTokenStore {
|
||||||
// observables
|
// observables
|
||||||
@ -28,7 +28,7 @@ export class ApiTokenStore implements IApiTokenStore {
|
|||||||
// root store
|
// root store
|
||||||
rootStore;
|
rootStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
apiTokens: observable,
|
apiTokens: observable,
|
||||||
|
@ -3,10 +3,10 @@ import { action, observable, makeObservable, computed, runInAction } from "mobx"
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { IWebhook } from "@plane/types";
|
import { IWebhook } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { WebhookService } from "@/services/webhook.service";
|
import { WebhookService } from "@/services/webhook.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
export interface IWebhookStore {
|
export interface IWebhookStore {
|
||||||
// observables
|
// observables
|
||||||
@ -43,7 +43,7 @@ export class WebhookStore implements IWebhookStore {
|
|||||||
// root store
|
// root store
|
||||||
rootStore;
|
rootStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
webhooks: observable,
|
webhooks: observable,
|
||||||
|
Loading…
Reference in New Issue
Block a user