feat: Trigger update to host catalog type

This commit is contained in:
Susmitha Girumala authored and dharini committed 2022-01-31 11:38:58 -08:00
1 parent c1d71e5166
commit cc56fb9636
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>