DEV: Update admin controllers to native class syntax (#20674)

This commit was generated using the ember-native-class-codemod along with a handful of manual updates
This commit is contained in:
David Taylor
2023-03-15 09:42:12 +00:00
committed by GitHub
parent 84f590ab83
commit be354e7950
59 changed files with 1944 additions and 1849 deletions

View File

@ -2,24 +2,19 @@ import Controller from "@ember/controller";
import I18n from "I18n";
export const DEFAULT_PERIOD = "yearly";
export default Controller.extend({
loading: false,
period: DEFAULT_PERIOD,
searchType: "all",
init() {
this._super(...arguments);
this.searchTypeOptions = [
{
id: "all",
name: I18n.t("admin.logs.search_logs.types.all_search_types"),
},
{ id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
{
id: "full_page",
name: I18n.t("admin.logs.search_logs.types.full_page"),
},
];
},
});
export default class AdminSearchLogsIndexController extends Controller {
loading = false;
period = DEFAULT_PERIOD;
searchType = "all";
searchTypeOptions = [
{
id: "all",
name: I18n.t("admin.logs.search_logs.types.all_search_types"),
},
{ id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
{
id: "full_page",
name: I18n.t("admin.logs.search_logs.types.full_page"),
},
];
}