File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,14 +154,14 @@ const mutations = {
154154 enableDisableUser ( state , { userid, enabled } ) {
155155 const user = state . users . find ( user => user . id === userid )
156156 user . enabled = enabled
157- // this.commit('updateUserCounts', { user, actionType: enabled ? 'enable' : 'disable' })
158- this . commit ( 'updateUserCounts' , { user, actionType : 'update' } )
157+ this . commit ( 'updateUserCounts' , { user, actionType : enabled ? 'enable' : 'disable' } )
159158 } ,
160159 // update active/disabled counts, groups counts
161160 updateUserCounts ( state , { user, actionType } ) {
162161 const disabledGroup = state . groups . find ( group => group . id === 'disabled' )
163162 switch ( actionType ) {
164- case 'update' :
163+ case 'enable' :
164+ case 'disable' :
165165 disabledGroup . usercount += user . enabled ? - 1 : 1 // update Disabled Users count
166166 state . userCount += user . enabled ? 1 : - 1 // update Active Users count
167167 user . groups . forEach ( userGroup => {
You can’t perform that action at this time.
0 commit comments