From 7ec0677a40074521dd0f8a8952bd8dfb47ab8cf3 Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Fri, 20 Dec 2024 12:58:43 +0400 Subject: [PATCH] EPMRPP-97810 || Several options are disabled in "Actions" dropdown --- app/src/pages/inside/common/utils.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/pages/inside/common/utils.js b/app/src/pages/inside/common/utils.js index f68e01430b..54a803e97d 100644 --- a/app/src/pages/inside/common/utils.js +++ b/app/src/pages/inside/common/utils.js @@ -15,11 +15,9 @@ */ import { COMMON_LOCALE_KEYS } from 'common/constants/localization'; -import { canBulkEditItems } from 'common/utils/permissions'; import { isPostIssueActionAvailable } from 'controllers/plugins'; import { DEFECT_TYPES_SEQUENCE, DEFAULT_DEFECT_TYPES_LOCATORS } from 'common/constants/defectTypes'; import { defectTypesLocalization } from 'common/constants/localization/defectTypesLocalization'; -import { canWorkWithDefectTypes, canWorkWithTests } from 'common/utils/permissions/permissions'; import { actionMessages, ISSUE_OPERATION_MAX_ITEMS } from './constants'; const DEFECT_STATISTICS_BASE = 'statistics$defects$'; @@ -66,7 +64,6 @@ export const createStepActionDescriptors = (params) => { btsIntegrations, isBtsPluginsExist, enabledBtsPlugins, - userRoles, selectedItems = [], } = params; const isIssueOperationDisabled = selectedItems.length > ISSUE_OPERATION_MAX_ITEMS; @@ -81,19 +78,17 @@ export const createStepActionDescriptors = (params) => { enabledBtsPlugins, isPostIssueUnavailable, ); - return [ { label: formatMessage(COMMON_LOCALE_KEYS.EDIT_ITEMS), value: 'action-edit', - hidden: !canBulkEditItems(userRoles), onClick: onEditItems, }, { label: formatMessage(actionMessages.editDefects), value: 'action-edit-defects', onClick: onEditDefects, - disabled: isIssueOperationDisabled || !canWorkWithDefectTypes(userRoles), + disabled: isIssueOperationDisabled, title: isIssueOperationDisabled ? issueTitle : '', }, { @@ -124,14 +119,12 @@ export const createStepActionDescriptors = (params) => { label: formatMessage(actionMessages.ignoreInAA), value: 'action-ignore-in-AA', hidden: debugMode || historyView, - disabled: !canWorkWithTests(userRoles), onClick: onIgnoreInAA, }, { label: formatMessage(actionMessages.includeInAA), value: 'action-include-into-AA', hidden: debugMode || historyView, - disabled: !canWorkWithTests(userRoles), onClick: onIncludeInAA, }, {