forked from github/plane
chore: set order by to manual on gantt chart (#1886)
This commit is contained in:
parent
b67e30fd9c
commit
6344f6f562
@ -362,7 +362,13 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (property === "kanban") {
|
const additionalProperties = {
|
||||||
|
groupByProperty: state.groupByProperty,
|
||||||
|
orderBy: state.orderBy,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (property === "kanban" && state.groupByProperty === null) {
|
||||||
|
additionalProperties.groupByProperty = "state";
|
||||||
dispatch({
|
dispatch({
|
||||||
type: "SET_GROUP_BY_PROPERTY",
|
type: "SET_GROUP_BY_PROPERTY",
|
||||||
payload: {
|
payload: {
|
||||||
@ -371,6 +377,7 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (property === "calendar") {
|
if (property === "calendar") {
|
||||||
|
additionalProperties.groupByProperty = null;
|
||||||
dispatch({
|
dispatch({
|
||||||
type: "SET_GROUP_BY_PROPERTY",
|
type: "SET_GROUP_BY_PROPERTY",
|
||||||
payload: {
|
payload: {
|
||||||
@ -378,13 +385,22 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (property === "gantt_chart") {
|
||||||
|
additionalProperties.orderBy = "sort_order";
|
||||||
|
dispatch({
|
||||||
|
type: "SET_ORDER_BY_PROPERTY",
|
||||||
|
payload: {
|
||||||
|
orderBy: "sort_order",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
saveDataToServer(workspaceSlug as string, projectId as string, {
|
saveDataToServer(workspaceSlug as string, projectId as string, {
|
||||||
...state,
|
...state,
|
||||||
issueView: property,
|
issueView: property,
|
||||||
groupByProperty: "state",
|
...additionalProperties,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, state]
|
[workspaceSlug, projectId, state]
|
||||||
|
Loading…
Reference in New Issue
Block a user