Skip to content

Commit b250898

Browse files
committed
Hide actions on all status
1 parent a6c372c commit b250898

File tree

1 file changed

+6
-7
lines changed
  • x-pack/plugins/security_solution/public/cases/components/all_cases

1 file changed

+6
-7
lines changed

x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const getActions = ({
2727
deleteCaseOnClick,
2828
}: GetActions): Array<DefaultItemIconButtonAction<Case>> => {
2929
const openCaseAction = {
30-
available: (item: Case | SubCase) => caseStatus !== CaseStatuses.open,
31-
enabled: (item: Case | SubCase) => isIndividual(item) && item.status !== CaseStatuses.open,
30+
available: (item: Case | SubCase) => item.status !== CaseStatuses.open,
31+
enabled: (item: Case | SubCase) => isIndividual(item),
3232
description: statuses[CaseStatuses.open].actions.single.title,
3333
icon: statuses[CaseStatuses.open].icon,
3434
name: statuses[CaseStatuses.open].actions.single.title,
@@ -44,9 +44,8 @@ export const getActions = ({
4444
};
4545

4646
const makeInProgressAction = {
47-
available: (item: Case) => caseStatus !== CaseStatuses['in-progress'],
48-
enabled: (item: Case | SubCase) =>
49-
isIndividual(item) && item.status !== CaseStatuses['in-progress'],
47+
available: (item: Case) => item.status !== CaseStatuses['in-progress'],
48+
enabled: (item: Case | SubCase) => isIndividual(item),
5049
description: statuses[CaseStatuses['in-progress']].actions.single.title,
5150
icon: statuses[CaseStatuses['in-progress']].icon,
5251
name: statuses[CaseStatuses['in-progress']].actions.single.title,
@@ -62,8 +61,8 @@ export const getActions = ({
6261
};
6362

6463
const closeCaseAction = {
65-
available: (item: Case | SubCase) => caseStatus !== CaseStatuses.closed,
66-
enabled: (item: Case | SubCase) => isIndividual(item) && item.status !== CaseStatuses.closed,
64+
available: (item: Case | SubCase) => item.status !== CaseStatuses.closed,
65+
enabled: (item: Case | SubCase) => isIndividual(item),
6766
description: statuses[CaseStatuses.closed].actions.single.title,
6867
icon: statuses[CaseStatuses.closed].icon,
6968
name: statuses[CaseStatuses.closed].actions.single.title,

0 commit comments

Comments
 (0)