feat: my issues view layouts and filters, refactor: issue views (#1681)
* refactor: issue views and my issues * chore: update view dropdown options * refactor: render emoji function * refactor: api calss * fix: build errors * fix: fetch states only when dropdown is opened * chore: my issues dnd * fix: build errors * refactor: folder structure
This commit is contained in:
parent
ec62308195
commit
3d7fe40035
70 changed files with 2249 additions and 1430 deletions
|
|
@ -248,6 +248,14 @@ class ProjectIssuesServices extends APIService {
|
|||
});
|
||||
}
|
||||
|
||||
async getWorkspaceLabels(workspaceSlug: string): Promise<IIssueLabels[]> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/labels/`)
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
||||
async getIssueLabels(workspaceSlug: string, projectId: string): Promise<IIssueLabels[]> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issue-labels/`)
|
||||
.then((response) => response?.data)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import trackEventServices from "services/track-event.service";
|
|||
|
||||
import type {
|
||||
ICurrentUserResponse,
|
||||
IIssue,
|
||||
IUser,
|
||||
IUserActivityResponse,
|
||||
IUserWorkspaceDashboard,
|
||||
|
|
@ -26,8 +27,18 @@ class UserService extends APIService {
|
|||
};
|
||||
}
|
||||
|
||||
async userIssues(workspaceSlug: string): Promise<any> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/my-issues/`)
|
||||
async userIssues(
|
||||
workspaceSlug: string,
|
||||
params: any
|
||||
): Promise<
|
||||
| {
|
||||
[key: string]: IIssue[];
|
||||
}
|
||||
| IIssue[]
|
||||
> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/my-issues/`, {
|
||||
params,
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
IProductUpdateResponse,
|
||||
ICurrentUserResponse,
|
||||
IWorkspaceBulkInviteFormData,
|
||||
IWorkspaceViewProps,
|
||||
} from "types";
|
||||
|
||||
const trackEvent =
|
||||
|
|
@ -169,7 +170,10 @@ class WorkspaceService extends APIService {
|
|||
});
|
||||
}
|
||||
|
||||
async updateWorkspaceView(workspaceSlug: string, data: any): Promise<any> {
|
||||
async updateWorkspaceView(
|
||||
workspaceSlug: string,
|
||||
data: { view_props: IWorkspaceViewProps }
|
||||
): Promise<any> {
|
||||
return this.post(`/api/workspaces/${workspaceSlug}/workspace-views/`, data)
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue