Files
plane/web/ee/services/workspace-feature.service.ts
guru_sainath 3e4fa21ee2 [WEB-1986] Feat: Project Grouping (#715)
* feat: project grouping migrations

* chore: implemented workspace features

* chore: updated worksapce feature import in types

* chore: project states endpoint

* chore: updated migration file

* chore: migration file changes

* chore: workspace project states

* feat: project states

* fix: project states

* chore: replaced base modal with project base modal in project attribute

* chore: removed 002 migration

* chore: project attribute migration

* chore: project states feature flagged

* chore: project state marking as default

* chore: code cleanup

* chore: updated the project attributes operations in the project crud endpoints

* fix: wip

* chore: feature flag validation on project create and update.

* fix: sync develope

* dev: project state feature flag and removed read only fields from serializer

* wip

* chore: updated project id and project validation when we toggle the workspace project_grouping feature is true

* wip: layouts

* chore: updated project filter store

* wip: default screens

* chore: filters update

* chore: filters updates

* chore: display filter updates

* wip: state dropdown

* chore: seperated project components for CE

* chore: splitted the code for project creation form

* fix: code structure optimization

* chore: handled project filters

* wip: gallery layout for projects

* wip: spreadsheet filters

* chore: added state and priority filters

* fix: project page root moved

* fix: synced with preview

* dev: updated sorting

* wip: role based permissions

* fix: header sorting fixed

* fix: project types + state filter

* fix: optimizations

* fix: optimizations

* fix: partial feature flagging

* fix: project states

* fix: css

* fix: css foxes

* fix:

* chore: handled board layout in project grouping

* fix: post ce sync changes

* fix: gantt permissions + member bugs

* fix: mobile header + layout fixes

* fix: workspace sidebar + archives

* fix: build errors

* fix: dark theme handling

* fix: archive fix + miscellaneous

* Fix: build errors

* fix: kandban drag and drop + miscellaneous

* fix: kanban drag and drop

* fix: imports

* fix: drag & drop + project dropdown

* fix: merge changes

---------

Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2024-08-12 21:08:16 +05:30

51 lines
1.4 KiB
TypeScript

/* eslint-disable no-useless-catch */
// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
// plane web types
import { TWorkspaceFeature, TWorkspaceFeatures } from "@/plane-web/types/workspace-feature";
// services
import { APIService } from "@/services/api.service";
export class WorkspaceFeatureService extends APIService {
constructor() {
super(API_BASE_URL);
}
/**
* @description fetching workspace features
* @param { string } workspaceSlug
* @returns { TWorkspaceFeatures | undefined }
*/
async fetchWorkspaceFeatures(workspaceSlug: string): Promise<TWorkspaceFeatures | undefined> {
try {
const { data } = await this.get(`/api/workspaces/${workspaceSlug}/features/`);
return data || undefined;
} catch (error) {
throw error;
}
}
/**
* @description update workspace feature
* @param { string } workspaceSlug
* @param { Partial<TWorkspaceFeature> } payload
* @returns { TWorkspaceFeatures | undefined }
*/
async updateWorkspaceFeature(
workspaceSlug: string,
payload: Partial<TWorkspaceFeature>
): Promise<TWorkspaceFeatures | undefined> {
try {
const { data } = await this.patch(`/api/workspaces/${workspaceSlug}/features/`, payload);
return data || undefined;
} catch (error) {
throw error;
}
}
}
const workspaceFeatureService = new WorkspaceFeatureService();
export default workspaceFeatureService;