Merge branch 'feature/workspaces' of https://github.com/ONLYOFFICE/AppServer into feature/workspaces

This commit is contained in:
Alexey Safronov 2021-03-20 11:54:34 +03:00
commit 16738bf314
2 changed files with 17 additions and 12 deletions

View File

@ -76,14 +76,15 @@ class FilesFilter {
withSubfolders,
} = this;
const isFilterSet =
filterType || (search ?? "").trim() || authorType
? withSubfolders
: false;
const userIdOrGroupId =
authorType && authorType.includes("_")
? authorType.slice(authorType.indexOf("_") + 1)
: null;
// const isFilterSet =
// filterType || (search ?? "").trim() || authorType
// ? withSubfolders
// : false;
// const userIdOrGroupId =
// authorType && authorType.includes("_")
// ? authorType.slice(authorType.indexOf("_") + 1)
// : null;
const dtoFilter = {
folder,
@ -92,9 +93,9 @@ class FilesFilter {
sortby: sortBy,
sortOrder: sortOrder,
filterType: filterType,
filterValue: (search ?? "").trim(),
withSubfolders: isFilterSet,
userIdOrGroupId,
search: (search ?? "").trim(),
withSubfolders,
authorType,
};
if (pageCount !== DEFAULT_PAGE) {

View File

@ -6,7 +6,11 @@ import TopLoaderService from "@appserver/components/top-loading-indicator";
export const toUrlParams = (obj, skipNull) => {
let str = "";
for (var key in obj) {
if (skipNull && !obj[key]) continue;
if (
(skipNull && !obj[key] && key !== "withSubfolders") ||
(key === "withSubfolders" && obj[key] !== "false")
)
continue;
if (str !== "") {
str += "&";