mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
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({
|
||||
type: "SET_GROUP_BY_PROPERTY",
|
||||
payload: {
|
||||
@ -371,6 +377,7 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
|
||||
});
|
||||
}
|
||||
if (property === "calendar") {
|
||||
additionalProperties.groupByProperty = null;
|
||||
dispatch({
|
||||
type: "SET_GROUP_BY_PROPERTY",
|
||||
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;
|
||||
|
||||
saveDataToServer(workspaceSlug as string, projectId as string, {
|
||||
...state,
|
||||
issueView: property,
|
||||
groupByProperty: "state",
|
||||
...additionalProperties,
|
||||
});
|
||||
},
|
||||
[workspaceSlug, projectId, state]
|
||||
|
Loading…
Reference in New Issue
Block a user