diff --git a/packages/types/src/issues.d.ts b/packages/types/src/issues.d.ts index da6db8062..1f4398acc 100644 --- a/packages/types/src/issues.d.ts +++ b/packages/types/src/issues.d.ts @@ -109,17 +109,11 @@ export type IssuePriorities = { export interface IIssueLabel { id: string; - created_at: Date; - updated_at: Date; name: string; description: string; color: string; - created_by: string; - updated_by: string; - project: string; - project_detail: IProjectLite; - workspace: string; - workspace_detail: IWorkspaceLite; + project_id: string; + workspace_slug: string; parent: string | null; sort_order: number; } diff --git a/web/store/issue/root.store.ts b/web/store/issue/root.store.ts index 1f20a4151..46e4b67c6 100644 --- a/web/store/issue/root.store.ts +++ b/web/store/issue/root.store.ts @@ -142,7 +142,7 @@ export class IssueRootStore implements IIssueRootStore { if (rootStore.app.router.userId) this.userId = rootStore.app.router.userId; if (!isEmpty(rootStore?.state?.stateMap)) this.states = Object.keys(rootStore?.state?.stateMap); if (!isEmpty(rootStore?.state?.projectStates)) this.stateDetails = rootStore?.state?.projectStates; - if (!isEmpty(rootStore?.labelRoot?.labelMap)) this.labels = Object.keys(rootStore?.labelRoot?.labelMap); + if (!isEmpty(rootStore?.label?.labelMap)) this.labels = Object.keys(rootStore?.label?.labelMap); if (!isEmpty(rootStore?.memberRoot?.workspace?.workspaceMemberMap)) this.members = Object.keys(rootStore?.memberRoot?.workspace?.workspaceMemberMap); if (!isEmpty(rootStore?.projectRoot?.project?.projectMap)) diff --git a/web/store/label.store.ts b/web/store/label.store.ts index 33361c94e..fad52261c 100644 --- a/web/store/label.store.ts +++ b/web/store/label.store.ts @@ -82,7 +82,7 @@ export class LabelStore implements ILabelStore { const currentWorkspaceDetails = this.rootStore.workspaceRoot.currentWorkspace; const worksapceSlug = this.rootStore.app.router.workspaceSlug || ""; if (!currentWorkspaceDetails || !this.fetchedMap[worksapceSlug]) return; - return Object.values(this.labelMap).filter((label) => label.workspace === currentWorkspaceDetails.id); + return Object.values(this.labelMap).filter((label) => label.workspace_slug === currentWorkspaceDetails.slug); } /** @@ -92,7 +92,7 @@ export class LabelStore implements ILabelStore { const projectId = this.rootStore.app.router.projectId; const worksapceSlug = this.rootStore.app.router.workspaceSlug || ""; if (!projectId || !(this.fetchedMap[projectId] || this.fetchedMap[worksapceSlug])) return; - return Object.values(this.labelMap ?? {}).filter((label) => label.project === projectId); + return Object.values(this.labelMap ?? {}).filter((label) => label.project_id === projectId); } /** @@ -106,7 +106,7 @@ export class LabelStore implements ILabelStore { getProjectLabels = computedFn((projectId: string | null) => { const worksapceSlug = this.rootStore.app.router.workspaceSlug || ""; if (!projectId || !(this.fetchedMap[projectId] || this.fetchedMap[worksapceSlug])) return; - return Object.values(this.labelMap ?? {}).filter((label) => label.project === projectId); + return Object.values(this.labelMap ?? {}).filter((label) => label.project_id === projectId); }); /**