2024-01-30 08:56:59 +00:00
|
|
|
// services
|
2024-02-02 08:22:38 +00:00
|
|
|
|
|
|
|
import {
|
|
|
|
WorkspaceViewService,
|
|
|
|
WorkspaceMeViewService,
|
|
|
|
ProjectViewService,
|
|
|
|
ProjectViewMeService,
|
|
|
|
WorkspaceFiltersService,
|
|
|
|
ProjectFiltersService,
|
|
|
|
ModuleFiltersService,
|
|
|
|
CycleFiltersService,
|
|
|
|
// LocalStorageFiltersService,
|
|
|
|
} from "services/view";
|
2024-01-30 08:56:59 +00:00
|
|
|
// stores
|
2024-02-02 08:22:38 +00:00
|
|
|
import { ViewRootStore } from "./view-root.store";
|
|
|
|
import { userViewRootStore } from "./user/view-root.store";
|
2024-01-30 08:56:59 +00:00
|
|
|
// types
|
|
|
|
import { RootStore } from "store/root.store";
|
|
|
|
|
2024-02-02 08:22:38 +00:00
|
|
|
export class GlobalViewRootStore {
|
|
|
|
// views root
|
|
|
|
workspaceViewMeStore: ViewRootStore;
|
|
|
|
workspaceViewStore: ViewRootStore;
|
|
|
|
workspaceViewProjectStore: ViewRootStore;
|
|
|
|
projectViewStore: ViewRootStore;
|
|
|
|
projectViewMeStore: ViewRootStore;
|
|
|
|
|
|
|
|
// user views root
|
|
|
|
workspaceUserViewStore?: userViewRootStore;
|
|
|
|
projectUserViewStore?: userViewRootStore;
|
|
|
|
moduleUserViewStore?: userViewRootStore;
|
|
|
|
cycleUserViewStore?: userViewRootStore;
|
2024-01-30 08:56:59 +00:00
|
|
|
|
|
|
|
constructor(private store: RootStore) {
|
2024-02-02 08:22:38 +00:00
|
|
|
// views root
|
|
|
|
this.workspaceViewMeStore = new ViewRootStore(this.store, new WorkspaceMeViewService());
|
|
|
|
this.workspaceViewStore = new ViewRootStore(this.store, new WorkspaceViewService());
|
|
|
|
this.workspaceViewProjectStore = new ViewRootStore(this.store, new WorkspaceMeViewService());
|
|
|
|
this.projectViewStore = new ViewRootStore(this.store, new ProjectViewService());
|
|
|
|
this.projectViewMeStore = new ViewRootStore(this.store, new ProjectViewMeService());
|
|
|
|
|
|
|
|
// user views root
|
|
|
|
this.workspaceUserViewStore = new userViewRootStore(
|
|
|
|
new WorkspaceFiltersService(),
|
|
|
|
store.app?.router?.workspaceSlug,
|
|
|
|
undefined,
|
|
|
|
undefined
|
|
|
|
);
|
|
|
|
this.projectUserViewStore = new userViewRootStore(
|
|
|
|
new ProjectFiltersService(),
|
|
|
|
store.app?.router?.workspaceSlug,
|
|
|
|
store.app?.router?.projectId,
|
|
|
|
undefined
|
|
|
|
);
|
|
|
|
this.moduleUserViewStore = new userViewRootStore(
|
|
|
|
new ModuleFiltersService(),
|
|
|
|
store.app?.router?.workspaceSlug,
|
|
|
|
store.app?.router?.projectId,
|
|
|
|
store.app?.router?.moduleId
|
|
|
|
);
|
|
|
|
this.cycleUserViewStore = new userViewRootStore(
|
|
|
|
new CycleFiltersService(),
|
|
|
|
store.app?.router?.workspaceSlug,
|
|
|
|
store.app?.router?.projectId,
|
|
|
|
store.app?.router?.cycleId
|
|
|
|
);
|
|
|
|
// this.archivedUserViewStore = new userViewRootStore( new LocalStorageFiltersService());
|
|
|
|
// this.draftUserViewStore = new userViewRootStore( new LocalStorageFiltersService());
|
2024-01-30 08:56:59 +00:00
|
|
|
}
|
|
|
|
}
|