2019-10-24 01:06:54 +08:00
|
|
|
import Controller from "@ember/controller";
|
2020-01-13 22:20:26 +08:00
|
|
|
import { inject as service } from "@ember/service";
|
2022-08-03 17:12:17 +08:00
|
|
|
import { tracked } from "@glimmer/tracking";
|
2020-01-13 22:20:26 +08:00
|
|
|
|
2022-08-03 17:12:17 +08:00
|
|
|
export default class AdminBadgesController extends Controller {
|
|
|
|
@service router;
|
2020-01-13 22:20:26 +08:00
|
|
|
|
2022-08-03 17:12:17 +08:00
|
|
|
// Set by the route
|
|
|
|
@tracked badgeGroupings;
|
|
|
|
@tracked badgeTypes;
|
|
|
|
@tracked protectedSystemFields;
|
|
|
|
@tracked badgeTriggers;
|
|
|
|
|
|
|
|
get selectedRoute() {
|
|
|
|
const currentRoute = this.router.currentRouteName;
|
2020-01-13 22:20:26 +08:00
|
|
|
const indexRoute = "adminBadges.index";
|
|
|
|
if (currentRoute === indexRoute) {
|
|
|
|
return "adminBadges.show";
|
|
|
|
} else {
|
2022-08-03 17:12:17 +08:00
|
|
|
return currentRoute;
|
2020-01-13 22:20:26 +08:00
|
|
|
}
|
2022-08-03 17:12:17 +08:00
|
|
|
}
|
|
|
|
}
|