* Updated Dropdown in Roles menu to reflect Hds Dropdown

* Added data-test attributes

* Removed mixed rose code

* Fixed lint issues

* Fixed up tests and removed bare text to be replaced with translation.

* Fixed lint issues

* Updated Manage Scopes to reflect HDS self-closing element

* Lint issues
This commit is contained in:
Wadi authored and Lisbet Alvarez committed 2024-07-15 17:23:00 -07:00
1 parent 4004431c6a
commit 3bcc5aabd8
5 files changed
+47 -25

No files matched your search

@@ -3,38 +3,29 @@
SPDX-License-Identifier: BUSL-1.1
}}
{{!TODO Refactor page to use hds dropdown in ICU-13879}}
<Rose::Dropdown
@text={{t 'actions.manage'}}
@dropdownRight={{true}}
as |dropdown|
>
<Hds::Dropdown as |dd|>
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
{{#if (can 'addPrincipals role' @model)}}
<dropdown.link
<dd.Interactive
@text={{t 'resources.role.principal.actions.add-principals'}}
@route='scopes.scope.roles.role.add-principals'
data-test-manage-dropdown-principals
>
{{t 'resources.role.principal.actions.add-principals'}}
</dropdown.link>
/>
{{/if}}
{{#if (can 'setGrantScopes role' @model)}}
<dropdown.link
<dd.Interactive
@text={{t 'resources.role.scope.actions.manage-scopes'}}
@route='scopes.scope.roles.role.manage-scopes'
data-test-manage-dropdown-scopes
>
{{t 'resources.role.scope.actions.manage-scopes'}}
</dropdown.link>
/>
{{/if}}
{{#if (can 'delete model' @model)}}
<dropdown.separator />
<dropdown.button
@style='danger'
<dd.Separator />
<dd.Interactive
@text={{t 'resources.role.actions.delete'}}
@color='critical'
@disabled={{@model.canSave}}
{{on 'click' (fn @delete @model)}}
>
{{t 'resources.role.actions.delete'}}
</dropdown.button>
/>
{{/if}}
</Rose::Dropdown>
</Hds::Dropdown>