mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix label type
This commit is contained in:
parent
7e95b8f160
commit
75965fc86e
10
packages/types/src/issues.d.ts
vendored
10
packages/types/src/issues.d.ts
vendored
@ -109,17 +109,11 @@ export type IssuePriorities = {
|
|||||||
|
|
||||||
export interface IIssueLabel {
|
export interface IIssueLabel {
|
||||||
id: string;
|
id: string;
|
||||||
created_at: Date;
|
|
||||||
updated_at: Date;
|
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
color: string;
|
color: string;
|
||||||
created_by: string;
|
project_id: string;
|
||||||
updated_by: string;
|
workspace_slug: string;
|
||||||
project: string;
|
|
||||||
project_detail: IProjectLite;
|
|
||||||
workspace: string;
|
|
||||||
workspace_detail: IWorkspaceLite;
|
|
||||||
parent: string | null;
|
parent: string | null;
|
||||||
sort_order: number;
|
sort_order: number;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ export class IssueRootStore implements IIssueRootStore {
|
|||||||
if (rootStore.app.router.userId) this.userId = rootStore.app.router.userId;
|
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?.stateMap)) this.states = Object.keys(rootStore?.state?.stateMap);
|
||||||
if (!isEmpty(rootStore?.state?.projectStates)) this.stateDetails = rootStore?.state?.projectStates;
|
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))
|
if (!isEmpty(rootStore?.memberRoot?.workspace?.workspaceMemberMap))
|
||||||
this.members = Object.keys(rootStore?.memberRoot?.workspace?.workspaceMemberMap);
|
this.members = Object.keys(rootStore?.memberRoot?.workspace?.workspaceMemberMap);
|
||||||
if (!isEmpty(rootStore?.projectRoot?.project?.projectMap))
|
if (!isEmpty(rootStore?.projectRoot?.project?.projectMap))
|
||||||
|
@ -82,7 +82,7 @@ export class LabelStore implements ILabelStore {
|
|||||||
const currentWorkspaceDetails = this.rootStore.workspaceRoot.currentWorkspace;
|
const currentWorkspaceDetails = this.rootStore.workspaceRoot.currentWorkspace;
|
||||||
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
||||||
if (!currentWorkspaceDetails || !this.fetchedMap[worksapceSlug]) return;
|
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 projectId = this.rootStore.app.router.projectId;
|
||||||
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
||||||
if (!projectId || !(this.fetchedMap[projectId] || this.fetchedMap[worksapceSlug])) return;
|
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) => {
|
getProjectLabels = computedFn((projectId: string | null) => {
|
||||||
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
const worksapceSlug = this.rootStore.app.router.workspaceSlug || "";
|
||||||
if (!projectId || !(this.fetchedMap[projectId] || this.fetchedMap[worksapceSlug])) return;
|
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user