chore: spreadsheet layout improvement (#3483)

* chore: spreadsheet layout improvement

* chore: spreadsheet layout improvement

* chore: spreadsheet layout improvement
This commit is contained in:
Anmol Singh Bhatia 2024-01-27 15:18:42 +05:30 committed by GitHub
parent ddae745669
commit 9ecdcc6fde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 52 additions and 2 deletions

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -183,6 +184,11 @@ export class ArchivedIssuesFilter extends IssueFilterHelperStore implements IArc
_filters.displayFilters.group_by = "state"; _filters.displayFilters.group_by = "state";
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -195,6 +196,12 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {
set( set(
@ -262,5 +269,3 @@ export class CycleIssuesFilter extends IssueFilterHelperStore implements ICycleI
} }
}; };
} }

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -179,6 +180,12 @@ export class DraftIssuesFilter extends IssueFilterHelperStore implements IDraftI
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {
set( set(

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -194,6 +195,12 @@ export class ModuleIssuesFilter extends IssueFilterHelperStore implements IModul
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {
set( set(

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -188,6 +189,11 @@ export class ProfileIssuesFilter extends IssueFilterHelperStore implements IProf
_filters.displayFilters.group_by = "priority"; _filters.displayFilters.group_by = "priority";
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -192,6 +193,11 @@ export class ProjectViewIssuesFilter extends IssueFilterHelperStore implements I
_filters.displayFilters.group_by = "state"; _filters.displayFilters.group_by = "state";
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
} }
@ -191,6 +192,12 @@ export class ProjectIssuesFilter extends IssueFilterHelperStore implements IProj
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {
set( set(

View File

@ -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 === "gantt_chart") filteredRouteParams.start_target_date = true;
if (userFilters?.displayFilters?.layout === "spreadsheet") filteredRouteParams.sub_issue = false;
return filteredRouteParams; return filteredRouteParams;
}; };
@ -213,6 +214,11 @@ export class WorkspaceIssuesFilter extends IssueFilterHelperStore implements IWo
_filters.displayFilters.group_by = "state"; _filters.displayFilters.group_by = "state";
updatedDisplayFilters.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(() => { runInAction(() => {
Object.keys(updatedDisplayFilters).forEach((_key) => { Object.keys(updatedDisplayFilters).forEach((_key) => {