feat: Trigger update to host catalog type

This commit is contained in:
Susmitha Girumala committed 2022-01-26 10:49:48 -05:00
1 parent 6a8bbcad9d
commit 9255d6dd98
2 files changed
+11

No files matched your search

@@ -1,4 +1,5 @@
import Route from '@ember/routing/route';
import { action } from '@ember/object';
export default class ScopesScopeHostCatalogsNewRoute extends Route {
// =attributes
@@ -25,4 +26,13 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
scopeModel,
});
}
/**
* Update type of host catalog
* @param {string} type
*/
@action
async changeType(type) {
await this.router.replaceWith({ type });
}
}
@@ -18,6 +18,7 @@
@model={{@model}}
@submit={{route-action 'save' @model}}
@cancel={{route-action 'cancel' @model}}
@changeType={{route-action 'changeType' @model.type}}
/>
</page.body>