feat: bulk issue deletion, colours to labels

This commit is contained in:
Aaryan Khandelwal 2022-11-30 21:28:45 +05:30
parent 71cd84e65c
commit 2b7282c6e8
31 changed files with 726 additions and 581 deletions

View file

@ -8,6 +8,8 @@ import {
ISSUE_PROPERTIES_ENDPOINT,
CYCLE_DETAIL,
ISSUE_LABELS,
BULK_DELETE_ISSUES,
BULK_ADD_ISSUES_TO_CYCLE,
} from "constants/api-routes";
// services
import APIService from "lib/services/api.service";
@ -235,6 +237,31 @@ class ProjectIssuesServices extends APIService {
throw error?.response?.data;
});
}
async bulkDeleteIssues(workspace_slug: string, projectId: string, data: any): Promise<any> {
return this.delete(BULK_DELETE_ISSUES(workspace_slug, projectId), data)
.then((response) => {
return response?.data;
})
.catch((error) => {
throw error?.response?.data;
});
}
async bulkAddIssuesToCycle(
workspace_slug: string,
projectId: string,
cycleId: string,
data: any
): Promise<any> {
return this.post(BULK_ADD_ISSUES_TO_CYCLE(workspace_slug, projectId, cycleId), data)
.then((response) => {
return response?.data;
})
.catch((error) => {
throw error?.response?.data;
});
}
}
export default new ProjectIssuesServices();