1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/members/import.js
Kevin Ansfield ef491730d8 Fixed members list/chart not updating after members import
no issue

- move members loading code into `members` controller so that it's more accessible to other areas of the app
- add `refreshData()` to the `members` controller which forces members list and stats to be re-fetched
- call `members.refreshData()` after successful upload of members import file
- store range/days in `membersStats` service so that it's remembered across refreshes and component renders
2020-06-01 15:48:46 +01:00

19 lines
452 B
JavaScript

import Controller from '@ember/controller';
import {action} from '@ember/object';
import {inject as controller} from '@ember/controller';
import {inject as service} from '@ember/service';
export default class ImportController extends Controller {
@service router;
@controller members;
@action
refreshMembers() {
this.members.refreshData();
}
@action
close() {
this.router.transitionTo('members');
}
}