forked from github/plane
fix: removed redundant function to get draft issues
This commit is contained in:
parent
b85c93b0e5
commit
bc6a983d1e
@ -37,7 +37,7 @@ export interface IIssueDraftStore {
|
|||||||
|
|
||||||
// computed
|
// computed
|
||||||
getIssueType: IIssueType | null;
|
getIssueType: IIssueType | null;
|
||||||
getIssues: IIssueGroupedStructure | IIssueGroupWithSubGroupsStructure | IIssueUnGroupedStructure | null;
|
getDraftIssues: IIssueGroupedStructure | IIssueGroupWithSubGroupsStructure | IIssueUnGroupedStructure | null;
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
fetchIssues: (workspaceSlug: string, projectId: string) => Promise<any>;
|
fetchIssues: (workspaceSlug: string, projectId: string) => Promise<any>;
|
||||||
@ -67,7 +67,7 @@ export class IssueDraftStore implements IIssueDraftStore {
|
|||||||
draftIssues: observable.ref,
|
draftIssues: observable.ref,
|
||||||
// computed
|
// computed
|
||||||
getIssueType: computed,
|
getIssueType: computed,
|
||||||
getIssues: computed,
|
getDraftIssues: computed,
|
||||||
// actions
|
// actions
|
||||||
fetchIssues: action,
|
fetchIssues: action,
|
||||||
createDraftIssue: action,
|
createDraftIssue: action,
|
||||||
@ -110,14 +110,6 @@ export class IssueDraftStore implements IIssueDraftStore {
|
|||||||
return this.draftIssues?.[projectId]?.[issueType] || null;
|
return this.draftIssues?.[projectId]?.[issueType] || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get getIssues() {
|
|
||||||
const projectId: string | null = this.rootStore?.project?.projectId;
|
|
||||||
const issueType = this.getIssueType;
|
|
||||||
if (!projectId || !issueType) return null;
|
|
||||||
|
|
||||||
return this.draftIssues?.[projectId]?.[issueType] || null;
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchIssues = async (workspaceSlug: string, projectId: string) => {
|
fetchIssues = async (workspaceSlug: string, projectId: string) => {
|
||||||
try {
|
try {
|
||||||
this.loader = true;
|
this.loader = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user