wire up bulk action buttons to vuex
This commit is contained in:
parent
7e74a13fcf
commit
13c8f10f4b
3 changed files with 33 additions and 13 deletions
|
@ -355,6 +355,12 @@ const UserSettings = {
|
|||
this.$store.dispatch('addNewUsers', users)
|
||||
return map(users, 'id')
|
||||
})
|
||||
},
|
||||
blockUsers (ids) {
|
||||
return this.$store.dispatch('blockUsers', ids)
|
||||
},
|
||||
unblockUsers (ids) {
|
||||
return this.$store.dispatch('unblockUsers', ids)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,13 +203,13 @@
|
|||
<BlockList :refresh="true" :getKey="item => item">
|
||||
<template slot="header" slot-scope="p">
|
||||
<div class="bulk-actions-wrapper">
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0">
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0" :click="() => blockUsers(p.selected)">
|
||||
{{ $t('user_card.block') }}
|
||||
<template slot="progress">
|
||||
{{ $t('user_card.block_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0">
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0" :click="() => unblockUsers(p.selected)">
|
||||
{{ $t('user_card.unblock') }}
|
||||
<template slot="progress">
|
||||
{{ $t('user_card.unblock_progress') }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue