2019-10-04 12:33:10 +03:00
|
|
|
import Controller from '@ember/controller';
|
2020-05-20 16:55:41 +03:00
|
|
|
import {action} from '@ember/object';
|
2019-10-04 12:33:10 +03:00
|
|
|
import {inject as controller} from '@ember/controller';
|
2020-07-23 16:14:50 +03:00
|
|
|
import {resetQueryParams} from 'ghost-admin/helpers/reset-query-params';
|
2019-10-04 12:33:10 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
|
2020-05-20 16:55:41 +03:00
|
|
|
export default class ImportController extends Controller {
|
|
|
|
@service router;
|
2020-06-01 17:48:46 +03:00
|
|
|
@controller members;
|
2019-10-04 12:33:10 +03:00
|
|
|
|
2020-05-20 16:55:41 +03:00
|
|
|
@action
|
2020-07-23 16:14:50 +03:00
|
|
|
refreshMembers({label} = {}) {
|
|
|
|
if (label) {
|
2022-01-05 15:48:52 +03:00
|
|
|
let queryParams = Object.assign(resetQueryParams('members.index'), {filter: `label:[${label.slug}]`});
|
2020-07-23 16:14:50 +03:00
|
|
|
this.router.transitionTo({queryParams});
|
|
|
|
}
|
2020-06-01 17:48:46 +03:00
|
|
|
this.members.refreshData();
|
2020-05-20 16:55:41 +03:00
|
|
|
}
|
2019-10-04 12:33:10 +03:00
|
|
|
|
2020-05-20 16:55:41 +03:00
|
|
|
@action
|
|
|
|
close() {
|
|
|
|
this.router.transitionTo('members');
|
2019-10-04 12:33:10 +03:00
|
|
|
}
|
2020-05-20 16:55:41 +03:00
|
|
|
}
|