Skip to content

Commit

Permalink
✨ Set application delete as danger kebab menu item (konveyor#1829)
Browse files Browse the repository at this point in the history
Part of konveyor#1318

Resolves: https://issues.redhat.com/browse/MTA-2261

---------

Signed-off-by: Maayan Hadasi <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
mguetta1 and sjd78 committed Apr 11, 2024
1 parent 7d77ba3 commit ab644f8
Showing 1 changed file with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,26 +1010,6 @@ export const ApplicationsTable: React.FC = () => {
},
]
: []),
...(applicationWriteAccess
? [
{
isAriaDisabled:
application.migrationWave !== null,
tooltipProps: {
content:
application.migrationWave !== null
? t(
"message.cannotDeleteApplicationsAssignedToMigrationWave"
)
: "",
},

title: t("actions.delete"),
onClick: () =>
setApplicationsToDelete([application]),
},
]
: []),
...(dependenciesWriteAccess
? [
{
Expand Down Expand Up @@ -1075,6 +1055,17 @@ export const ApplicationsTable: React.FC = () => {
},
]
: []),
...(applicationWriteAccess
? [
{ isSeparator: true },
{
title: t("actions.delete"),
onClick: () =>
setApplicationsToDelete([application]),
isDanger: true,
},
]
: []),
]}
/>
</Td>
Expand Down

0 comments on commit ab644f8

Please sign in to comment.