Skip to content

Commit

Permalink
✨ Set application delete as danger kebab menu item (#1829) (#1840)
Browse files Browse the repository at this point in the history
Part of #1318
Resolves: https://issues.redhat.com/browse/MTA-2261
Backport-of: #1829

Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
Co-authored-by: Maayan Hadasi <60384172+mguetta1@users.noreply.github.com>
  • Loading branch information
sjd78 and mguetta1 authored Apr 12, 2024
1 parent 7d77ba3 commit 43cd5e9
Showing 1 changed file with 22 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,28 @@ export const ApplicationsTable: React.FC = () => {
},
]
: []),
...(applicationWriteAccess
? [
{ isSeparator: true },
{
isAriaDisabled:
application.migrationWave !== null,
tooltipProps: {
content:
application.migrationWave !== null
? t(
"message.cannotDeleteApplicationsAssignedToMigrationWave"
)
: "",
},

title: t("actions.delete"),
onClick: () =>
setApplicationsToDelete([application]),
isDanger: true,
},
]
: []),
]}
/>
</Td>
Expand Down

0 comments on commit 43cd5e9

Please sign in to comment.