fix: issue property dropdown data flow (#3425)
* dev: workspace states and estimates * refactor issue dropdown logic to help work properly with issues on global level * fix: project labels response change * fix label type * change store computed actions to computed functions from mobx-utils * fix: state response change * chore: project and workspace state change * fix state and label types * chore: state and label serializer change * modify state and label types * fix dropdown reset on project id change * fix label sort order --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> Co-authored-by: Rahul R <rahulr@Rahuls-MacBook-Pro.local> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: Rahul R <rahul.ramesha@plane.so>
This commit is contained in:
parent
be62662bb1
commit
b3ac9def8d
82 changed files with 494 additions and 463 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { observable, action, makeObservable, runInAction, computed } from "mobx";
|
||||
import { computedFn } from "mobx-utils";
|
||||
import { set } from "lodash";
|
||||
// services
|
||||
import { WorkspaceService } from "services/workspace.service";
|
||||
|
|
@ -37,9 +38,6 @@ export class GlobalViewStore implements IGlobalViewStore {
|
|||
globalViewMap: observable,
|
||||
// computed
|
||||
currentWorkspaceViews: computed,
|
||||
// computed actions
|
||||
getSearchedViews: action,
|
||||
getViewDetailsById: action,
|
||||
// actions
|
||||
fetchAllGlobalViews: action,
|
||||
fetchGlobalViewDetails: action,
|
||||
|
|
@ -73,7 +71,7 @@ export class GlobalViewStore implements IGlobalViewStore {
|
|||
* @param searchQuery
|
||||
* @returns
|
||||
*/
|
||||
getSearchedViews = (searchQuery: string) => {
|
||||
getSearchedViews = computedFn((searchQuery: string) => {
|
||||
const currentWorkspaceDetails = this.rootStore.workspaceRoot.currentWorkspace;
|
||||
if (!currentWorkspaceDetails) return null;
|
||||
|
||||
|
|
@ -84,13 +82,13 @@ export class GlobalViewStore implements IGlobalViewStore {
|
|||
this.globalViewMap[viewId]?.name?.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
) ?? null
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* @description returns view details for given viewId
|
||||
* @param viewId
|
||||
*/
|
||||
getViewDetailsById = (viewId: string): IWorkspaceView | null => this.globalViewMap[viewId] ?? null;
|
||||
getViewDetailsById = computedFn((viewId: string): IWorkspaceView | null => this.globalViewMap[viewId] ?? null);
|
||||
|
||||
/**
|
||||
* @description fetch all global views for given workspace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue