Web: Refactoring.
This commit is contained in:
parent
8bc024d260
commit
7894f9e434
@ -169,21 +169,6 @@ class AccessRightsStore {
|
||||
return getFileRoleActions(access).moveSelf;
|
||||
};
|
||||
|
||||
canMakeForm = (item) => {
|
||||
const { rootFolderType, access } = item;
|
||||
|
||||
if (
|
||||
rootFolderType === FolderType.Archive ||
|
||||
rootFolderType === FolderType.TRASH ||
|
||||
rootFolderType === FolderType.Privacy ||
|
||||
rootFolderType === FolderType.Favorites ||
|
||||
rootFolderType === FolderType.Recent
|
||||
)
|
||||
return false;
|
||||
|
||||
return getFileRoleActions(access).saveAsForm;
|
||||
};
|
||||
|
||||
canMoveAlienItems = (item) => {
|
||||
const {
|
||||
rootFolderType,
|
||||
@ -198,6 +183,20 @@ class AccessRightsStore {
|
||||
return getFileRoleActions(access).moveAlien;
|
||||
};
|
||||
|
||||
canMakeForm = (item) => {
|
||||
const { rootFolderType, access } = item;
|
||||
|
||||
if (
|
||||
rootFolderType === FolderType.Archive ||
|
||||
rootFolderType === FolderType.TRASH ||
|
||||
rootFolderType === FolderType.Privacy ||
|
||||
rootFolderType === FolderType.Favorites ||
|
||||
rootFolderType === FolderType.Recent
|
||||
)
|
||||
return false;
|
||||
|
||||
return getFileRoleActions(access).saveAsForm;
|
||||
};
|
||||
canArchiveRoom = (room) => {
|
||||
const { archive } = getRoomRoleActions(room.access);
|
||||
|
||||
|
@ -1208,12 +1208,12 @@ class FilesStore {
|
||||
"mark-as-favorite",
|
||||
"remove-from-favorites",
|
||||
// "edit",
|
||||
"move",
|
||||
// "move",
|
||||
// "move-to",
|
||||
"copy-to",
|
||||
"copy",
|
||||
//"rename",
|
||||
"separator2",
|
||||
// "separator2",
|
||||
//"delete",
|
||||
//"finalize-version",
|
||||
]);
|
||||
@ -1243,7 +1243,13 @@ class FilesStore {
|
||||
fileOptions = this.removeOptions(fileOptions, ["docu-sign"]);
|
||||
}
|
||||
|
||||
if (isEditing)
|
||||
if (
|
||||
isEditing ||
|
||||
item.rootFolderType === FolderType.Archive ||
|
||||
(isFavoritesFolder && !isFavorite) ||
|
||||
isFavoritesFolder ||
|
||||
isRecentFolder
|
||||
)
|
||||
fileOptions = this.removeOptions(fileOptions, ["separator2"]);
|
||||
|
||||
// if (isEditing) {
|
||||
@ -1270,9 +1276,6 @@ class FilesStore {
|
||||
}
|
||||
}
|
||||
|
||||
if (isFavoritesFolder && !isFavorite)
|
||||
fileOptions = this.removeOptions(fileOptions, ["separator2"]);
|
||||
|
||||
if (isFavoritesFolder) {
|
||||
fileOptions = this.removeOptions(fileOptions, [
|
||||
// "move-to",
|
||||
@ -1302,9 +1305,6 @@ class FilesStore {
|
||||
]);
|
||||
}
|
||||
|
||||
if (isRecentFolder && !isFavorite)
|
||||
fileOptions = this.removeOptions(fileOptions, ["separator2"]);
|
||||
|
||||
// if (isRecentFolder) {
|
||||
// //fileOptions = this.removeOptions(fileOptions, ["delete"]);
|
||||
|
||||
@ -1320,7 +1320,7 @@ class FilesStore {
|
||||
// "move-to",
|
||||
//"sharing-settings",
|
||||
"unsubscribe",
|
||||
"separator2",
|
||||
//"separator2",
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user