Client: Filter: enable sort always in accounts
This commit is contained in:
parent
1077c1577b
commit
a1e9e0b507
@ -2011,41 +2011,8 @@ const SectionFilterContent = ({
|
|||||||
hideableColumns.Storage = storage;
|
hideableColumns.Storage = storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
options.push(firstName, lastName);
|
options.push(firstName, lastName, type, department, email);
|
||||||
if (accountsViewAs === "table") {
|
if (showStorageInfo) options.push(storage);
|
||||||
const tableColumns = isInsideGroup
|
|
||||||
? TABLE_INSIDE_GROUP_COLUMNS
|
|
||||||
: TABLE_PEOPLE_COLUMNS;
|
|
||||||
|
|
||||||
const columnsSizeInfoPanel = isInsideGroup
|
|
||||||
? COLUMNS_INSIDE_GROUP_SIZE_INFO_PANEL
|
|
||||||
: COLUMNS_PEOPLE_SIZE_INFO_PANEL;
|
|
||||||
|
|
||||||
const availableSort = localStorage
|
|
||||||
?.getItem(`${tableColumns}=${userId}`)
|
|
||||||
?.split(",");
|
|
||||||
|
|
||||||
const infoPanelColumnsSize = localStorage
|
|
||||||
?.getItem(`${columnsSizeInfoPanel}=${userId}`)
|
|
||||||
?.split(" ");
|
|
||||||
|
|
||||||
availableSort?.forEach((columnTitle) => {
|
|
||||||
if (!hideableColumns[columnTitle]) return;
|
|
||||||
|
|
||||||
if (availableSort?.includes(columnTitle)) {
|
|
||||||
const idx = availableSort.findIndex((x) => x === columnTitle);
|
|
||||||
const hide =
|
|
||||||
infoPanelVisible &&
|
|
||||||
infoPanelColumnsSize &&
|
|
||||||
infoPanelColumnsSize[idx] === "0px";
|
|
||||||
|
|
||||||
!hide && options.push(hideableColumns[columnTitle]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
options.push(type, department, email);
|
|
||||||
if (showStorageInfo) options.push(storage);
|
|
||||||
}
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user