89136cbf6a
Manual interventions: • decorators on the same line for service and controller injections and most computed property macros • preserving import order when possible, both per-line and intra-line • moving new imports to the bottom • removal of classic decorator for trivial cases • conversion of init to constructor when appropriate
25 lines
542 B
JavaScript
25 lines
542 B
JavaScript
import Component from '@ember/component';
|
|
import { computed } from '@ember/object';
|
|
import { inject as service } from '@ember/service';
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
@classic
|
|
export default class RegionSwitcher extends Component {
|
|
@service system;
|
|
@service router;
|
|
@service store;
|
|
|
|
@computed('system.regions')
|
|
get sortedRegions() {
|
|
return this.get('system.regions')
|
|
.toArray()
|
|
.sort();
|
|
}
|
|
|
|
gotoRegion(region) {
|
|
this.router.transitionTo('jobs', {
|
|
queryParams: { region },
|
|
});
|
|
}
|
|
}
|