2019-01-24 22:34:32 +03:00
|
|
|
import Controller from '@ember/controller';
|
|
|
|
import {alias} from '@ember/object/computed';
|
2019-02-22 14:31:45 +03:00
|
|
|
import {inject as controller} from '@ember/controller';
|
|
|
|
import {inject as service} from '@ember/service';
|
2019-01-24 22:34:32 +03:00
|
|
|
|
|
|
|
export default Controller.extend({
|
2019-02-22 14:31:45 +03:00
|
|
|
members: controller(),
|
|
|
|
router: service(),
|
|
|
|
|
|
|
|
member: alias('model'),
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
finaliseDeletion() {
|
|
|
|
// decrememnt the total member count manually so there's no flash
|
|
|
|
// when transitioning back to the members list
|
|
|
|
if (this.members.meta) {
|
|
|
|
this.members.decrementProperty('meta.pagination.total');
|
|
|
|
}
|
|
|
|
this.router.transitionTo('members');
|
|
|
|
}
|
|
|
|
}
|
2019-01-24 22:34:32 +03:00
|
|
|
});
|