FEATURE: provide more details when performing a bulk add to group

This commit is contained in:
Arpit Jalan
2017-04-27 00:30:05 +05:30
parent f499180bb3
commit 285c167fae
7 changed files with 38 additions and 5 deletions

View File

@ -6,6 +6,7 @@ export default Ember.Controller.extend({
users: null,
groupId: null,
saving: false,
bulkAddResponse: null,
@computed('saving', 'users', 'groupId')
buttonDisabled(saving, users, groupId) {
@ -24,7 +25,8 @@ export default Ember.Controller.extend({
ajax('/admin/groups/bulk', {
data: { users, group_id: this.get('groupId') },
method: 'PUT'
}).then(() => {
}).then(result => {
this.set('bulkAddResponse', result);
this.transitionToRoute('adminGroups.bulkComplete');
}).catch(popupAjaxError).finally(() => {
this.set('saving', false);