diff --git a/web/store/issue/archived/filter.store.ts b/web/store/issue/archived/filter.store.ts index aa75950fc..9a9c91a37 100644 --- a/web/store/issue/archived/filter.store.ts +++ b/web/store/issue/archived/filter.store.ts @@ -90,6 +90,7 @@ export class ArchivedIssuesFilter extends IssueFilterHelperStore implements IArc ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -183,6 +184,11 @@ 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 e66873a03..27347536b 100644 --- a/web/store/issue/cycle/filter.store.ts +++ b/web/store/issue/cycle/filter.store.ts @@ -91,6 +91,7 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -195,6 +196,12 @@ 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( @@ -262,5 +269,3 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI } }; } - - diff --git a/web/store/issue/draft/filter.store.ts b/web/store/issue/draft/filter.store.ts index 3cb502231..7096040d5 100644 --- a/web/store/issue/draft/filter.store.ts +++ b/web/store/issue/draft/filter.store.ts @@ -90,6 +90,7 @@ export class DraftIssuesFilter extends IssueFilterHelperStore implements IDraftI ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -179,6 +180,12 @@ 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 1523079f8..3c309cecd 100644 --- a/web/store/issue/module/filter.store.ts +++ b/web/store/issue/module/filter.store.ts @@ -91,6 +91,7 @@ export class ModuleIssuesFilter extends IssueFilterHelperStore implements IModul ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -194,6 +195,12 @@ 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 9d824389c..a0f8028f8 100644 --- a/web/store/issue/profile/filter.store.ts +++ b/web/store/issue/profile/filter.store.ts @@ -94,6 +94,7 @@ export class ProfileIssuesFilter extends IssueFilterHelperStore implements IProf ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -188,6 +189,11 @@ 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 3763d0389..e0dae761c 100644 --- a/web/store/issue/project-views/filter.store.ts +++ b/web/store/issue/project-views/filter.store.ts @@ -91,6 +91,7 @@ export class ProjectViewIssuesFilter extends IssueFilterHelperStore implements I ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -192,6 +193,11 @@ 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 03636224a..392b7203f 100644 --- a/web/store/issue/project/filter.store.ts +++ b/web/store/issue/project/filter.store.ts @@ -90,6 +90,7 @@ export class ProjectIssuesFilter extends IssueFilterHelperStore implements IProj ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; } @@ -191,6 +192,12 @@ 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) => { set( diff --git a/web/store/issue/workspace/filter.store.ts b/web/store/issue/workspace/filter.store.ts index 48c1acd53..34907bd9b 100644 --- a/web/store/issue/workspace/filter.store.ts +++ b/web/store/issue/workspace/filter.store.ts @@ -100,6 +100,7 @@ export class WorkspaceIssuesFilter extends IssueFilterHelperStore implements IWo ); if (userFilters?.displayFilters?.layout === "gantt_chart") filteredRouteParams.start_target_date = true; + if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false; return filteredRouteParams; }; @@ -213,6 +214,11 @@ export class WorkspaceIssuesFilter extends IssueFilterHelperStore implements IWo _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) => {