refactor: 💡 remove route-action usage for auth-methods (#2178)

* refactor: 💡 remove route-action usage for auth-methods

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12603
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2024-04-22 10:33:06 -07:00
1 parent f65f483611
commit 148f2db941
22 files changed
+469 -276

No files matched your search

@@ -18,7 +18,13 @@
</page.navigation>
<page.actions>
<AuthMethods::AuthMethod::Actions @model={{@model.authMethod}} />
<AuthMethods::AuthMethod::Actions
@model={{@model.authMethod}}
@changeState={{this.authMethods.changeState}}
@removeAsPrimary={{this.authMethods.removeAsPrimary}}
@makePrimary={{this.authMethods.makePrimary}}
@delete={{this.authMethods.delete}}
/>
</page.actions>
<page.body>
@@ -18,18 +18,24 @@
</page.navigation>
<page.actions>
<AuthMethods::AuthMethod::Actions @model={{@model}} />
<AuthMethods::AuthMethod::Actions
@model={{@model}}
@changeState={{this.authMethods.changeState}}
@removeAsPrimary={{this.authMethods.removeAsPrimary}}
@makePrimary={{this.authMethods.makePrimary}}
@delete={{this.authMethods.delete}}
/>
</page.actions>
<page.body>
<Form::AuthMethod
@model={{@model}}
@edit={{route-action 'edit' @model}}
@submit={{route-action 'save' @model}}
@cancel={{route-action 'cancel' @model}}
@removeItemByIndex={{route-action 'removeItemByIndex' @model}}
@addStringItem={{route-action 'addStringItem' @model}}
@addAccountMapItem={{route-action 'addAccountMapItem' @model}}
@edit={{fn this.authMethods.edit @model}}
@submit={{fn this.authMethods.save @model}}
@cancel={{fn this.authMethods.cancel @model}}
@removeItemByIndex={{fn this.authMethods.removeItemByIndex @model}}
@addStringItem={{fn this.authMethods.addStringItem @model}}
@addAccountMapItem={{fn this.authMethods.addAccountMapItem @model}}
/>
</page.body>
@@ -18,7 +18,13 @@
</page.navigation>
<page.actions>
<AuthMethods::AuthMethod::Actions @model={{@model.authMethod}} />
<AuthMethods::AuthMethod::Actions
@model={{@model.authMethod}}
@changeState={{this.authMethods.changeState}}
@removeAsPrimary={{this.authMethods.removeAsPrimary}}
@makePrimary={{this.authMethods.makePrimary}}
@delete={{this.authMethods.delete}}
/>
</page.actions>
<page.body>
@@ -149,7 +149,7 @@
<dd.Interactive
@text={{t 'resources.auth-method.actions.make-primary'}}
data-test-make-primary-action
{{on 'click' (route-action 'makePrimary' B.data)}}
{{on 'click' (fn this.makePrimary B.data)}}
/>
{{/unless}}
{{#if B.data.isPrimary}}
@@ -157,7 +157,7 @@
@text={{t
'resources.auth-method.actions.remove-as-primary'
}}
{{on 'click' (route-action 'removeAsPrimary' B.data)}}
{{on 'click' (fn this.removeAsPrimary B.data)}}
/>
{{/if}}
</Hds::Dropdown>
@@ -25,11 +25,11 @@
<page.body>
<Form::AuthMethod
@model={{@model}}
@submit={{route-action 'save' @model}}
@cancel={{route-action 'cancel' @model}}
@removeItemByIndex={{route-action 'removeItemByIndex' @model}}
@addStringItem={{route-action 'addStringItem' @model}}
@addAccountMapItem={{route-action 'addAccountMapItem' @model}}
@submit={{fn this.authMethods.save @model}}
@cancel={{fn this.authMethods.cancel @model}}
@removeItemByIndex={{fn this.authMethods.removeItemByIndex @model}}
@addStringItem={{fn this.authMethods.addStringItem @model}}
@addAccountMapItem={{fn this.authMethods.addAccountMapItem @model}}
/>
</page.body>
</Rose::Layout::Page>