[WED-634] fix: profile issues not rendering correctly with GroupBy display filter (#3886)
* fix: Handled issue render in the display filters groupBy stateGroup and labels * chore: Optimized state_group filter and typo * Fix: removed workspaceLevel boolean and handled the states from stateMap
This commit is contained in:
parent
bce69bcbe1
commit
b535d8a23c
5 changed files with 38 additions and 17 deletions
|
|
@ -77,6 +77,7 @@ const GroupByList: React.FC<IGroupByList> = (props) => {
|
|||
label,
|
||||
projectState,
|
||||
member,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
|
|
@ -97,6 +98,10 @@ const GroupByList: React.FC<IGroupByList> = (props) => {
|
|||
preloadedData = { ...preloadedData, label_ids: [value] };
|
||||
} else if (groupByKey === "assignees" && value != "None") {
|
||||
preloadedData = { ...preloadedData, assignee_ids: [value] };
|
||||
} else if (groupByKey === "cycle" && value != "None") {
|
||||
preloadedData = { ...preloadedData, cycle_id: value };
|
||||
} else if (groupByKey === "module" && value != "None") {
|
||||
preloadedData = { ...preloadedData, module_ids: [value] };
|
||||
} else if (groupByKey === "created_by") {
|
||||
preloadedData = { ...preloadedData };
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ export const getGroupByColumns = (
|
|||
label: ILabelStore,
|
||||
projectState: IStateStore,
|
||||
member: IMemberRootStore,
|
||||
includeNone?: boolean
|
||||
includeNone?: boolean,
|
||||
isWorkspaceLevel?: boolean
|
||||
): IGroupByColumn[] | undefined => {
|
||||
switch (groupBy) {
|
||||
case "project":
|
||||
|
|
@ -40,7 +41,7 @@ export const getGroupByColumns = (
|
|||
case "priority":
|
||||
return getPriorityColumns();
|
||||
case "labels":
|
||||
return getLabelsColumns(label) as any;
|
||||
return getLabelsColumns(label, isWorkspaceLevel) as any;
|
||||
case "assignees":
|
||||
return getAssigneeColumns(member) as any;
|
||||
case "created_by":
|
||||
|
|
@ -177,12 +178,13 @@ const getPriorityColumns = () => {
|
|||
}));
|
||||
};
|
||||
|
||||
const getLabelsColumns = (label: ILabelStore) => {
|
||||
const { projectLabels } = label;
|
||||
const getLabelsColumns = (label: ILabelStore, isWorkspaceLevel: boolean = false) => {
|
||||
const { workspaceLabels, projectLabels } = label;
|
||||
|
||||
if (!projectLabels) return;
|
||||
|
||||
const labels = [...projectLabels, { id: "None", name: "None", color: "#666" }];
|
||||
const labels = [
|
||||
...(isWorkspaceLevel ? workspaceLabels || [] : projectLabels || []),
|
||||
{ id: "None", name: "None", color: "#666" },
|
||||
];
|
||||
|
||||
return labels.map((label) => ({
|
||||
id: label.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue