forked from AkkomaGang/admin-fe
Update usage of tag/untag api functions for multiple users
This commit is contained in:
parent
d3d380a9af
commit
d821debd85
1 changed files with 14 additions and 10 deletions
|
@ -130,16 +130,20 @@ export default {
|
|||
remove: () => this.selectedUsers
|
||||
.filter(user => this.$store.state.user.id !== user.id)
|
||||
.map(user => this.$store.dispatch('DeleteUser', user)),
|
||||
addTag: (tag) => () => this.selectedUsers
|
||||
.filter(user => tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
|
||||
? user.local && !user.tags.includes(tag)
|
||||
: !user.tags.includes(tag)
|
||||
).map(user => this.$store.dispatch('ToggleTag', { user, tag })),
|
||||
removeTag: (tag) => () => this.selectedUsers
|
||||
.filter(user => tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
|
||||
? user.local && user.tags.includes(tag)
|
||||
: user.tags.includes(tag)
|
||||
).map(user => this.$store.dispatch('ToggleTag', { user, tag }))
|
||||
addTag: (tag) => () => {
|
||||
const users = this.selectedUsers
|
||||
.filter(user => tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
|
||||
? user.local && !user.tags.includes(tag)
|
||||
: !user.tags.includes(tag))
|
||||
this.$store.dispatch('AddTag', { users, tag })
|
||||
},
|
||||
removeTag: (tag) => () => {
|
||||
const users = this.selectedUsers
|
||||
.filter(user => tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
|
||||
? user.local && user.tags.includes(tag)
|
||||
: user.tags.includes(tag))
|
||||
this.$store.dispatch('RemoveTag', { users, tag })
|
||||
}
|
||||
}
|
||||
},
|
||||
grantRightToMultipleUsers(right) {
|
||||
|
|
Loading…
Reference in a new issue