From d012ff57d90e353ca588ebbcde15a575a82b0c1d Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Mon, 15 Jul 2024 18:10:32 +0500 Subject: [PATCH] Client:Store:FilesStore Fixed pdf form context menu --- packages/client/src/store/FilesStore.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/client/src/store/FilesStore.js b/packages/client/src/store/FilesStore.js index 27f6c4283a..f107bf9c44 100644 --- a/packages/client/src/store/FilesStore.js +++ b/packages/client/src/store/FilesStore.js @@ -2131,15 +2131,16 @@ class FilesStore { fileOptions = this.removeOptions(fileOptions, ["download"]); } - if ( - !isPdf || - item.startFilling || - item.rootFolderType === FolderType.USER - ) { + if (!isPdf || item.startFilling || item.isForm) { fileOptions = this.removeOptions(fileOptions, ["open-pdf"]); } - if (!isPdf || !item.security.EditForm || item.startFilling) { + if ( + !isPdf || + !item.security.EditForm || + item.startFilling || + !item.isForm + ) { fileOptions = this.removeOptions(fileOptions, ["edit-pdf"]); } @@ -2176,7 +2177,7 @@ class FilesStore { fileOptions = this.removeOptions(fileOptions, ["edit"]); } - if (!(shouldFillForm && canFillForm)) { + if (!(shouldFillForm && canFillForm) || !item.isForm) { fileOptions = this.removeOptions(fileOptions, ["fill-form"]); }