Files
threshold-ui/ui/admin/app/routes/scopes/scope/onboarding/quick-setup/choose-path.js
T
Randall MoreyandDharini Jeeva 24f630f084 Chore onboarding routing logic (#1123)
* chore: 🤖 stub out onboarding routes

* chore: initial onboarding routing logic

* chore: initial routing logic and resource creation

* chore: route "manual" to new org

* Update en-us.yaml

* fix: linting

Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
2022-06-03 13:25:53 -04:00

27 lines
605 B
JavaScript

import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class ScopesScopeOnboardingQuickSetupChoosePathRoute extends Route {
// =services
@service router;
// =actions
@action
choosePath(path = 'guided') {
switch (path) {
case 'guided':
this.router.transitionTo(
'scopes.scope.onboarding.quick-setup.create-resources'
);
break;
case 'manual':
default:
this.router.transitionTo('scopes.scope.new', 'global');
break;
}
}
}