2022-01-17 13:05:27 +03:00
|
|
|
import AdminRoute from 'ghost-admin/routes/admin';
|
2021-10-06 17:29:15 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2021-10-04 14:01:12 +03:00
|
|
|
|
2022-01-17 13:05:27 +03:00
|
|
|
export default class offersRoute extends AdminRoute {
|
2021-10-06 17:29:15 +03:00
|
|
|
@service store;
|
|
|
|
@service feature;
|
|
|
|
|
2021-10-13 18:53:21 +03:00
|
|
|
queryParams = {
|
|
|
|
type: {refreshModel: true}
|
|
|
|
};
|
|
|
|
|
2021-10-06 17:29:15 +03:00
|
|
|
beforeModel() {
|
|
|
|
super.beforeModel(...arguments);
|
2022-01-17 13:05:27 +03:00
|
|
|
// TODO: redirect if members is disabled?
|
2021-10-06 17:29:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
model(params) {
|
|
|
|
return this.controllerFor('offers').fetchOffersTask.perform(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
// trigger a background load of members plus labels for filter dropdown
|
|
|
|
setupController() {
|
|
|
|
super.setupController(...arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
buildRouteInfoMetadata() {
|
|
|
|
return {
|
|
|
|
titleToken: 'Offers'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|