2023-12-11 09:25:05 +00:00
|
|
|
import { enableStaticRendering } from "mobx-react-lite";
|
|
|
|
// root stores
|
2023-12-11 18:02:21 +00:00
|
|
|
import { AppRootStore, IAppRootStore } from "./application";
|
2023-12-12 10:20:14 +00:00
|
|
|
import { IProjectRootStore, ProjectRootStore } from "./project";
|
|
|
|
import { CycleStore, ICycleStore } from "./cycle.store";
|
|
|
|
import { IProjectViewsStore, ProjectViewsStore } from "./project-view.store";
|
|
|
|
import { IModuleStore, ModulesStore } from "./module.store";
|
|
|
|
import { IUserStore, UserStore } from "./user";
|
|
|
|
import { ILabelStore, LabelStore } from "./label.store";
|
|
|
|
import { IWorkspaceRootStore, WorkspaceRootStore } from "./workspace";
|
2023-12-11 09:25:05 +00:00
|
|
|
|
|
|
|
enableStaticRendering(typeof window === "undefined");
|
|
|
|
|
|
|
|
export class RootStore {
|
2023-12-11 18:02:21 +00:00
|
|
|
app: IAppRootStore;
|
|
|
|
user: IUserStore;
|
2023-12-12 10:20:14 +00:00
|
|
|
workspace: IWorkspaceRootStore;
|
|
|
|
project: IProjectRootStore;
|
|
|
|
cycle: ICycleStore;
|
|
|
|
module: IModuleStore;
|
|
|
|
projectView: IProjectViewsStore;
|
2023-12-11 18:02:21 +00:00
|
|
|
label: ILabelStore;
|
2023-12-11 09:25:05 +00:00
|
|
|
|
|
|
|
constructor() {
|
2023-12-11 14:45:07 +00:00
|
|
|
this.app = new AppRootStore(this);
|
|
|
|
this.user = new UserStore(this);
|
2023-12-12 10:20:14 +00:00
|
|
|
this.workspace = new WorkspaceRootStore(this);
|
2023-12-11 14:54:46 +00:00
|
|
|
this.project = new ProjectRootStore(this);
|
|
|
|
this.cycle = new CycleStore(this);
|
|
|
|
this.module = new ModulesStore(this);
|
|
|
|
this.projectView = new ProjectViewsStore(this);
|
|
|
|
// this.page = new PageRootStore();
|
|
|
|
// this.issue = new IssueRootStore();
|
2023-12-11 18:02:21 +00:00
|
|
|
// independent stores
|
|
|
|
this.label = new LabelStore(this);
|
2023-12-11 14:54:46 +00:00
|
|
|
// this.state = new stateStore();
|
2023-12-11 09:25:05 +00:00
|
|
|
}
|
|
|
|
}
|