mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
f25624234f
no issue - https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/avoid-leaking-state-in-ember-objects.md
34 lines
783 B
JavaScript
34 lines
783 B
JavaScript
import Controller from '@ember/controller';
|
|
import {inject as service} from '@ember/service';
|
|
import {sort} from '@ember/object/computed';
|
|
|
|
export default Controller.extend({
|
|
|
|
session: service(),
|
|
|
|
showInviteUserModal: false,
|
|
|
|
activeUsers: null,
|
|
suspendedUsers: null,
|
|
invites: null,
|
|
|
|
inviteOrder: null,
|
|
userOrder: null,
|
|
|
|
sortedInvites: sort('invites', 'inviteOrder'),
|
|
sortedActiveUsers: sort('activeUsers', 'userOrder'),
|
|
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
this.inviteOrder = ['email'];
|
|
this.userOrder = ['name', 'email'];
|
|
},
|
|
|
|
actions: {
|
|
toggleInviteUserModal() {
|
|
this.toggleProperty('showInviteUserModal');
|
|
}
|
|
}
|
|
});
|