[WEB-5490] fix: intake section filter persists incorrectly across projects (#8187)
This commit is contained in:
parent
6b85d67f6c
commit
22bb3c5ecc
3 changed files with 14 additions and 11 deletions
|
|
@ -125,18 +125,16 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
|||
* @description computed project inbox filters
|
||||
*/
|
||||
get inboxFilters() {
|
||||
const { projectId } = this.store.router;
|
||||
if (!projectId) return {} as TInboxIssueFilter;
|
||||
return this.filtersMap?.[projectId];
|
||||
if (!this.currentInboxProjectId) return {} as TInboxIssueFilter;
|
||||
return this.filtersMap?.[this.currentInboxProjectId];
|
||||
}
|
||||
|
||||
/**
|
||||
* @description computed project inbox sorting
|
||||
*/
|
||||
get inboxSorting() {
|
||||
const { projectId } = this.store.router;
|
||||
if (!projectId) return {} as TInboxIssueSorting;
|
||||
return this.sortingMap?.[projectId];
|
||||
if (!this.currentInboxProjectId) return {} as TInboxIssueSorting;
|
||||
return this.sortingMap?.[this.currentInboxProjectId];
|
||||
}
|
||||
|
||||
get getAppliedFiltersCount() {
|
||||
|
|
@ -274,7 +272,8 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
|||
};
|
||||
|
||||
handleInboxIssueFilters = <T extends keyof TInboxIssueFilter>(key: T, value: TInboxIssueFilter[T]) => {
|
||||
const { workspaceSlug, projectId } = this.store.router;
|
||||
const { workspaceSlug } = this.store.router;
|
||||
const projectId = this.currentInboxProjectId;
|
||||
if (workspaceSlug && projectId) {
|
||||
runInAction(() => {
|
||||
set(this.filtersMap, [projectId, key], value);
|
||||
|
|
@ -285,7 +284,8 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
|||
};
|
||||
|
||||
handleInboxIssueSorting = <T extends keyof TInboxIssueSorting>(key: T, value: TInboxIssueSorting[T]) => {
|
||||
const { workspaceSlug, projectId } = this.store.router;
|
||||
const { workspaceSlug } = this.store.router;
|
||||
const projectId = this.currentInboxProjectId;
|
||||
if (workspaceSlug && projectId) {
|
||||
runInAction(() => {
|
||||
set(this.sortingMap, [projectId, key], value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue