plane/web/store/root.store.ts

38 lines
1.1 KiB
TypeScript
Raw Normal View History

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";
import { ProjectRootStore } from "./project";
import { CycleStore } from "./cycle.store";
import { ProjectViewsStore } from "./project-view.store";
import { ModulesStore } from "./module.store";
2023-12-11 18:02:21 +00:00
import { UserStore, IUserStore } from "./user";
import { LabelStore, ILabelStore } from "./label.store";
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;
// workspace;
2023-12-11 09:25:05 +00:00
project;
cycle;
module;
projectView;
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);
// this.workspace = new WorkspaceRootStore();
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);
// this.state = new stateStore();
2023-12-11 09:25:05 +00:00
}
}