mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-13 14:39:52 +03:00
7b41a0c2cc
no issue - after importing members a filter is applied to the members list only shows imported members - the query param used for this was still using an old format which correctly updated the list but meant that the filter selection UI was left in a bad state that didn't correctly show the selected label or allow easy clearing of the bad filter
25 lines
736 B
JavaScript
25 lines
736 B
JavaScript
import Controller from '@ember/controller';
|
|
import {action} from '@ember/object';
|
|
import {inject as controller} from '@ember/controller';
|
|
import {resetQueryParams} from 'ghost-admin/helpers/reset-query-params';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class ImportController extends Controller {
|
|
@service router;
|
|
@controller members;
|
|
|
|
@action
|
|
refreshMembers({label} = {}) {
|
|
if (label) {
|
|
let queryParams = Object.assign(resetQueryParams('members.index'), {filter: `label:[${label.slug}]`});
|
|
this.router.transitionTo({queryParams});
|
|
}
|
|
this.members.refreshData();
|
|
}
|
|
|
|
@action
|
|
close() {
|
|
this.router.transitionTo('members');
|
|
}
|
|
}
|