diff --git a/ui/app/components/generated-item-list.js b/ui/app/components/generated-item-list.js index 6339b1e5cd..ca6a09cf2b 100644 --- a/ui/app/components/generated-item-list.js +++ b/ui/app/components/generated-item-list.js @@ -27,14 +27,7 @@ import { tracked } from '@glimmer/tracking'; export default class GeneratedItemList extends Component { @service router; @service store; - @tracked showConfirmModal = false; - - get model() { - return this.args.model || null; - } - get itemType() { - return this.args.itemType || null; - } + @tracked itemToDelete = null; @action refreshItemList() { diff --git a/ui/app/templates/components/generated-item-list.hbs b/ui/app/templates/components/generated-item-list.hbs index 7a5c6d5f81..786ed50428 100644 --- a/ui/app/templates/components/generated-item-list.hbs +++ b/ui/app/templates/components/generated-item-list.hbs @@ -37,37 +37,30 @@ Create - {{singularize this.itemType}} + {{singularize @itemType}} - + {{#if list.empty}} {{else if list.item}} - + {{list.item.id}} @@ -80,39 +73,38 @@ data-test-popup-menu-trigger /> - - {{#if this.showConfirmModal}} + {{#if (eq list.item this.itemToDelete)}} {{/if}} diff --git a/ui/app/templates/vault/cluster/access/namespaces/index.hbs b/ui/app/templates/vault/cluster/access/namespaces/index.hbs index d68832f9ca..169753405e 100644 --- a/ui/app/templates/vault/cluster/access/namespaces/index.hbs +++ b/ui/app/templates/vault/cluster/access/namespaces/index.hbs @@ -46,18 +46,18 @@ {{/if}} {{/let}} - + - {{#if this.showConfirmModal}} + {{#if (eq this.nsToDelete list.item)}} {{/if}} - {{#if this.showConfirmModal}} + {{#if (eq this.credToRevoke list.item)}} {{/if}} {{/if}} - {{#if this.showConfirmModal}} + {{#if (eq this.roleToDelete list.item)}} {{/if}} diff --git a/ui/lib/kmip/addon/templates/scopes/index.hbs b/ui/lib/kmip/addon/templates/scopes/index.hbs index 2eccaa146b..4af903b79d 100644 --- a/ui/lib/kmip/addon/templates/scopes/index.hbs +++ b/ui/lib/kmip/addon/templates/scopes/index.hbs @@ -69,24 +69,24 @@ {{/if}} - {{#if this.showConfirmModal}} + {{#if (eq this.scopeToDelete list.item)}}