Skip to content

Commit

Permalink
EPMRPP-97810 || Several options are disabled in "Actions" dropdown (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian authored Dec 20, 2024
1 parent 611be49 commit 568d4e2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/src/pages/inside/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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$';
Expand Down Expand Up @@ -66,7 +64,6 @@ export const createStepActionDescriptors = (params) => {
btsIntegrations,
isBtsPluginsExist,
enabledBtsPlugins,
userRoles,
selectedItems = [],
} = params;
const isIssueOperationDisabled = selectedItems.length > ISSUE_OPERATION_MAX_ITEMS;
Expand All @@ -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 : '',
},
{
Expand Down Expand Up @@ -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,
},
{
Expand Down

0 comments on commit 568d4e2

Please sign in to comment.