FIX: "Action Logs" button on user admin page (#25300)
The `transitionToRoute` API was removed in Ember 5 in favour of the route service
This commit is contained in:
parent
f2e669a008
commit
ec1905cf6f
|
@ -1,4 +1,3 @@
|
||||||
import { getOwner } from "@ember/application";
|
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import Service, { inject as service } from "@ember/service";
|
import Service, { inject as service } from "@ember/service";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
|
@ -14,13 +13,11 @@ import AdminUser from "admin/models/admin-user";
|
||||||
export default class AdminToolsService extends Service {
|
export default class AdminToolsService extends Service {
|
||||||
@service dialog;
|
@service dialog;
|
||||||
@service modal;
|
@service modal;
|
||||||
|
@service router;
|
||||||
|
|
||||||
showActionLogs(target, filters) {
|
showActionLogs(target, filters) {
|
||||||
const controller = getOwner(target).lookup(
|
this.router.transitionTo("adminLogs.staffActionLogs", {
|
||||||
"controller:adminLogs.staffActionLogs"
|
queryParams: { filters },
|
||||||
);
|
|
||||||
target.transitionToRoute("adminLogs.staffActionLogs").then(() => {
|
|
||||||
controller.changeFilters(filters);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue