From 18b5115546f398a766d4e4f13d8dde9baa580109 Mon Sep 17 00:00:00 2001 From: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:45:48 +0530 Subject: [PATCH] re enable sub issues toggle in spreadsheet layout (#3779) --- web/constants/issue.ts | 4 ++-- web/store/issue/archived/filter.store.ts | 7 ------- web/store/issue/cycle/filter.store.ts | 8 -------- web/store/issue/draft/filter.store.ts | 8 -------- web/store/issue/module/filter.store.ts | 8 -------- web/store/issue/profile/filter.store.ts | 7 ------- web/store/issue/project-views/filter.store.ts | 7 ------- web/store/issue/project/filter.store.ts | 7 ------- 8 files changed, 2 insertions(+), 54 deletions(-) diff --git a/web/constants/issue.ts b/web/constants/issue.ts index 4bb6bcec0..b2a8cd855 100644 --- a/web/constants/issue.ts +++ b/web/constants/issue.ts @@ -395,8 +395,8 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: { type: [null, "active", "backlog"], }, extra_options: { - access: false, - values: [], + access: true, + values: ["sub_issue"], }, }, gantt_chart: { diff --git a/web/store/issue/archived/filter.store.ts b/web/store/issue/archived/filter.store.ts index d92453a30..032928cda 100644 --- a/web/store/issue/archived/filter.store.ts +++ b/web/store/issue/archived/filter.store.ts @@ -89,8 +89,6 @@ export class ArchivedIssuesFilter extends IssueFilterHelperStore implements IArc filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -183,11 +181,6 @@ export class ArchivedIssuesFilter extends IssueFilterHelperStore implements IArc _filters.displayFilters.group_by = "state"; updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { diff --git a/web/store/issue/cycle/filter.store.ts b/web/store/issue/cycle/filter.store.ts index dd81cfc0e..b938a36d4 100644 --- a/web/store/issue/cycle/filter.store.ts +++ b/web/store/issue/cycle/filter.store.ts @@ -90,8 +90,6 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -195,12 +193,6 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } - runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { set( diff --git a/web/store/issue/draft/filter.store.ts b/web/store/issue/draft/filter.store.ts index 8295c263d..cc58a7755 100644 --- a/web/store/issue/draft/filter.store.ts +++ b/web/store/issue/draft/filter.store.ts @@ -89,8 +89,6 @@ export class DraftIssuesFilter extends IssueFilterHelperStore implements IDraftI filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -179,12 +177,6 @@ export class DraftIssuesFilter extends IssueFilterHelperStore implements IDraftI updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } - runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { set( diff --git a/web/store/issue/module/filter.store.ts b/web/store/issue/module/filter.store.ts index e92027235..f10a885a3 100644 --- a/web/store/issue/module/filter.store.ts +++ b/web/store/issue/module/filter.store.ts @@ -90,8 +90,6 @@ export class ModuleIssuesFilter extends IssueFilterHelperStore implements IModul filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -194,12 +192,6 @@ export class ModuleIssuesFilter extends IssueFilterHelperStore implements IModul updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } - runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { set( diff --git a/web/store/issue/profile/filter.store.ts b/web/store/issue/profile/filter.store.ts index 563af5b01..658980082 100644 --- a/web/store/issue/profile/filter.store.ts +++ b/web/store/issue/profile/filter.store.ts @@ -93,8 +93,6 @@ export class ProfileIssuesFilter extends IssueFilterHelperStore implements IProf filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -188,11 +186,6 @@ export class ProfileIssuesFilter extends IssueFilterHelperStore implements IProf _filters.displayFilters.group_by = "priority"; updatedDisplayFilters.group_by = "priority"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { diff --git a/web/store/issue/project-views/filter.store.ts b/web/store/issue/project-views/filter.store.ts index b3df3903b..c7c8988b1 100644 --- a/web/store/issue/project-views/filter.store.ts +++ b/web/store/issue/project-views/filter.store.ts @@ -90,8 +90,6 @@ export class ProjectViewIssuesFilter extends IssueFilterHelperStore implements I filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -192,11 +190,6 @@ export class ProjectViewIssuesFilter extends IssueFilterHelperStore implements I _filters.displayFilters.group_by = "state"; updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => { diff --git a/web/store/issue/project/filter.store.ts b/web/store/issue/project/filter.store.ts index 69393a320..f18654cde 100644 --- a/web/store/issue/project/filter.store.ts +++ b/web/store/issue/project/filter.store.ts @@ -89,8 +89,6 @@ export class ProjectIssuesFilter extends IssueFilterHelperStore implements IProj filteredParams ); - if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; - return filteredRouteParams; } @@ -191,11 +189,6 @@ export class ProjectIssuesFilter extends IssueFilterHelperStore implements IProj updatedDisplayFilters.group_by = "state"; } - // set sub_issue to false if layout is switched to spreadsheet and sub_issue is true - if (_filters.displayFilters.layout === "spreadsheet" && _filters.displayFilters.sub_issue === true) { - _filters.displayFilters.sub_issue = false; - updatedDisplayFilters.sub_issue = false; - } runInAction(() => { Object.keys(updatedDisplayFilters).forEach((_key) => {