2018-06-26 13:19:58 +03:00
|
|
|
import { scrollTop } from "discourse/mixins/scroll-top";
|
|
|
|
|
2018-04-18 21:30:41 +02:00
|
|
|
export default Discourse.Route.extend({
|
2018-04-19 18:19:21 +02:00
|
|
|
activate() {
|
2018-07-19 14:33:11 -04:00
|
|
|
this.controllerFor("admin-dashboard-next").fetchProblems();
|
2018-06-15 17:03:24 +02:00
|
|
|
this.controllerFor("admin-dashboard-next").fetchDashboard();
|
2018-06-26 13:19:58 +03:00
|
|
|
scrollTop();
|
2018-07-19 14:33:11 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
afterModel(model, transition) {
|
|
|
|
if (transition.targetName === "admin.dashboardNext.index") {
|
|
|
|
this.transitionTo("admin.dashboardNext.general");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
willTransition(transition) {
|
|
|
|
if (transition.targetName === "admin.dashboardNext.index") {
|
|
|
|
this.transitionTo("admin.dashboardNext.general");
|
|
|
|
}
|
|
|
|
}
|
2018-04-18 21:30:41 +02:00
|
|
|
}
|
|
|
|
});
|