fix build errors

This commit is contained in:
rahulramesha 2023-12-12 18:35:17 +05:30
parent 97ca2a4f26
commit 540e78deb7
9 changed files with 23 additions and 23 deletions

View File

@ -132,7 +132,7 @@ export class ModuleService extends APIService {
workspaceSlug: string,
projectId: string,
moduleId: string,
data: ModuleLink
data: Partial<ModuleLink>
): Promise<ILinkDetails> {
return this.post(`/api/workspaces/${workspaceSlug}/projects/${projectId}/modules/${moduleId}/module-links/`, data)
.then((response) => response?.data)
@ -146,7 +146,7 @@ export class ModuleService extends APIService {
projectId: string,
moduleId: string,
linkId: string,
data: ModuleLink
data: Partial<ModuleLink>
): Promise<ILinkDetails> {
return this.patch(
`/api/workspaces/${workspaceSlug}/projects/${projectId}/modules/${moduleId}/module-links/${linkId}/`,

View File

@ -1,5 +1,5 @@
import { action, computed, observable, makeObservable, runInAction } from "mobx";
import { set } from "lodash";
import set from "lodash/set";
// types
import { ICycle, TCycleView, CycleDateCheckData } from "types";
// mobx

View File

@ -1,6 +1,6 @@
import { makeObservable, observable, action, runInAction, computed } from "mobx";
import keyBy from "lodash/keyBy";
import { set } from "lodash";
import set from "lodash/set";
// services
import { IssueLabelService } from "services/issue";
// types

View File

@ -1,5 +1,5 @@
import { action, computed, observable, makeObservable, runInAction } from "mobx";
import { set } from "lodash";
import set from "lodash/set";
// services
import { ProjectService } from "services/project";
import { ModuleService } from "services/module.service";

View File

@ -1,4 +1,4 @@
import { set } from "lodash";
import set from "lodash/set";
import { observable, action, makeObservable, runInAction } from "mobx";
// services
import { ViewService } from "services/view.service";

View File

@ -1,5 +1,5 @@
import { observable, action, makeObservable, runInAction } from "mobx";
import { set } from "lodash";
import set from "lodash/set";
// types
import { ProjectRootStore } from "./";
// services

View File

@ -1,4 +1,4 @@
import { set } from "lodash";
import set from "lodash/set";
import { observable, action, computed, makeObservable, runInAction } from "mobx";
//types
import { RootStore } from "../root.store";
@ -54,7 +54,7 @@ export class ProjectsStore implements IProjectsStore {
[workspaceSlug: string]: {
[projectId: string]: IProject; // projectId: project Info
};
};
} = {};
// root store
rootStore: RootStore;
@ -129,7 +129,7 @@ export class ProjectsStore implements IProjectsStore {
get currentProjectDetails() {
if (!this.rootStore.app.router.projectId || !this.rootStore.app.router.workspaceSlug) return;
return this.projectMap[this.rootStore.app.router.workspaceSlug][this.projectId];
return this.projectMap[this.rootStore.app.router.workspaceSlug][this.rootStore.app.router.projectId];
}
get joinedProjects() {

View File

@ -1,7 +1,7 @@
import { makeObservable, observable, computed, action, runInAction } from "mobx";
import groupBy from "lodash/groupBy";
import keyBy from "lodash/keyBy";
import { set } from "lodash";
import set from "lodash/set";
// store
import { RootStore } from "./root.store";
// types

View File

@ -87,33 +87,33 @@ export class UserMembershipStore implements IUserMembershipStore {
}
get currentWorkspaceMemberInfo() {
if (!this.router.query?.workspaceSlug) return;
return this.workspaceMemberInfo[this.router.query?.workspaceSlug];
if (!this.router.workspaceSlug) return;
return this.workspaceMemberInfo[this.router.workspaceSlug];
}
get currentWorkspaceRole() {
if (!this.router.query?.workspaceSlug) return;
return this.workspaceMemberInfo[this.router.query?.workspaceSlug]?.role;
if (!this.router.workspaceSlug) return;
return this.workspaceMemberInfo[this.router.workspaceSlug]?.role;
}
get currentProjectMemberInfo() {
if (!this.router.query?.projectId) return;
return this.projectMemberInfo[this.router.query?.projectId];
if (!this.router.projectId) return;
return this.projectMemberInfo[this.router.projectId];
}
get currentProjectRole() {
if (!this.router.query?.projectId) return;
return this.projectMemberInfo[this.router.query?.projectId]?.role;
if (!this.router.projectId) return;
return this.projectMemberInfo[this.router.projectId]?.role;
}
get hasPermissionToCurrentWorkspace() {
if (!this.router.query?.workspaceSlug) return;
return this.hasPermissionToWorkspace[this.router.query?.workspaceSlug];
if (!this.router.workspaceSlug) return;
return this.hasPermissionToWorkspace[this.router.workspaceSlug];
}
get hasPermissionToCurrentProject() {
if (!this.router.query?.projectId) return;
return this.hasPermissionToProject[this.router.query?.projectId];
if (!this.router.projectId) return;
return this.hasPermissionToProject[this.router.projectId];
}
fetchUserWorkspaceInfo = async (workspaceSlug: string) => {