fix: Labels delete & reordering (#2729)

* fix: Labels reordering inconsistency

* fix: Delete child labels

* feat: multi-select while grouping labels

* refactor: label sorting in mobx computed function

* feat: drag & drop label grouping, un-grouping

* chore: removed label select modal

* fix: moving labels from project store to project label store

* fix: typo changes and build tree function added

* labels feature

* disable dropping group into a group

* fix build errors

* fix more issues

* chore: added combining state UI, fixed scroll issue for label groups

* chore: group icon for label groups

* fix: group cannot be dropped in another group

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: rahulramesha <rahulramesham@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
Lakhan Baheti 2023-11-19 01:46:11 +05:30 committed by sriram veeraghanta
parent d933c73343
commit 63b6150b9c
62 changed files with 862 additions and 520 deletions

View file

@ -3,7 +3,7 @@ import { API_BASE_URL } from "helpers/common.helper";
import { APIService } from "services/api.service";
import { TrackEventService } from "services/track_event.service";
// types
import { IIssueLabels, IUser } from "types";
import { IIssueLabel, IUser } from "types";
const trackEventServices = new TrackEventService();
@ -12,7 +12,7 @@ export class IssueLabelService extends APIService {
super(API_BASE_URL);
}
async getWorkspaceIssueLabels(workspaceSlug: string): Promise<IIssueLabels[]> {
async getWorkspaceIssueLabels(workspaceSlug: string): Promise<IIssueLabel[]> {
return this.get(`/api/workspaces/${workspaceSlug}/labels/`)
.then((response) => response?.data)
.catch((error) => {
@ -20,7 +20,7 @@ export class IssueLabelService extends APIService {
});
}
async getProjectIssueLabels(workspaceSlug: string, projectId: string): Promise<IIssueLabels[]> {
async getProjectIssueLabels(workspaceSlug: string, projectId: string): Promise<IIssueLabel[]> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issue-labels/`)
.then((response) => response?.data)
.catch((error) => {
@ -33,9 +33,9 @@ export class IssueLabelService extends APIService {
projectId: string,
data: any,
user: IUser | undefined
): Promise<IIssueLabels> {
): Promise<IIssueLabel> {
return this.post(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issue-labels/`, data)
.then((response: { data: IIssueLabels; [key: string]: any }) => {
.then((response: { data: IIssueLabel; [key: string]: any }) => {
trackEventServices.trackIssueLabelEvent(
{
workSpaceId: response?.data?.workspace_detail?.id,