Add filter by actor type to Users Filter Select
This commit is contained in:
parent
58f0c71ee9
commit
4316028e41
2 changed files with 17 additions and 1 deletions
|
@ -345,13 +345,17 @@ export default {
|
||||||
usersFilter: {
|
usersFilter: {
|
||||||
inputPlaceholder: 'Select filter',
|
inputPlaceholder: 'Select filter',
|
||||||
byAccountType: 'By account type',
|
byAccountType: 'By account type',
|
||||||
|
byActorType: 'By actor type',
|
||||||
local: 'Local',
|
local: 'Local',
|
||||||
external: 'External',
|
external: 'External',
|
||||||
byStatus: 'By status',
|
byStatus: 'By status',
|
||||||
active: 'Active',
|
active: 'Active',
|
||||||
pending: 'Pending Approval',
|
pending: 'Pending Approval',
|
||||||
deactivated: 'Deactivated',
|
deactivated: 'Deactivated',
|
||||||
unconfirmed: 'Unconfirmed'
|
unconfirmed: 'Unconfirmed',
|
||||||
|
person: 'Person',
|
||||||
|
bot: 'Bot',
|
||||||
|
application: 'Application'
|
||||||
},
|
},
|
||||||
reports: {
|
reports: {
|
||||||
reports: 'Reports',
|
reports: 'Reports',
|
||||||
|
|
|
@ -16,6 +16,11 @@
|
||||||
<el-option value="need_approval">{{ $t('usersFilter.pending') }}</el-option>
|
<el-option value="need_approval">{{ $t('usersFilter.pending') }}</el-option>
|
||||||
<el-option value="unconfirmed">{{ $t('usersFilter.unconfirmed') }}</el-option>
|
<el-option value="unconfirmed">{{ $t('usersFilter.unconfirmed') }}</el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
|
<el-option-group :label="$t('usersFilter.byActorType')">
|
||||||
|
<el-option value="Person">{{ $t('usersFilter.person') }}</el-option>
|
||||||
|
<el-option value="Service">{{ $t('usersFilter.bot') }}</el-option>
|
||||||
|
<el-option value="Application">{{ $t('usersFilter.application') }}</el-option>
|
||||||
|
</el-option-group>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -45,6 +50,9 @@ export default {
|
||||||
const indexOfDeactivated = this.$data.value.indexOf('deactivated')
|
const indexOfDeactivated = this.$data.value.indexOf('deactivated')
|
||||||
const indexOfPending = this.$data.value.indexOf('need_approval')
|
const indexOfPending = this.$data.value.indexOf('need_approval')
|
||||||
const indexOfUnconfirmed = this.$data.value.indexOf('unconfirmed')
|
const indexOfUnconfirmed = this.$data.value.indexOf('unconfirmed')
|
||||||
|
const indexOfPerson = this.$data.value.indexOf('Person')
|
||||||
|
const indexOfService = this.$data.value.indexOf('Service')
|
||||||
|
const indexOfApplication = this.$data.value.indexOf('Application')
|
||||||
|
|
||||||
if (this.$data.value.length === filtersQuantity) {
|
if (this.$data.value.length === filtersQuantity) {
|
||||||
return []
|
return []
|
||||||
|
@ -58,6 +66,10 @@ export default {
|
||||||
? currentFilters.push(this.$data.value[Math.max(indexOfActive, indexOfDeactivated, indexOfPending, indexOfUnconfirmed)])
|
? currentFilters.push(this.$data.value[Math.max(indexOfActive, indexOfDeactivated, indexOfPending, indexOfUnconfirmed)])
|
||||||
: currentFilters
|
: currentFilters
|
||||||
|
|
||||||
|
Math.max(indexOfPerson, indexOfService, indexOfApplication) > -1
|
||||||
|
? currentFilters.push(this.$data.value[Math.max(indexOfPerson, indexOfService, indexOfApplication)])
|
||||||
|
: currentFilters
|
||||||
|
|
||||||
return currentFilters
|
return currentFilters
|
||||||
},
|
},
|
||||||
toggleFilters() {
|
toggleFilters() {
|
||||||
|
|
Loading…
Reference in a new issue