Skip to content
Snippets Groups Projects
Commit 9c059c58 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Refactoring

parent 3d7d026a
No related branches found
No related tags found
No related merge requests found
......@@ -35,12 +35,13 @@ export default {
},
methods: {
removeOppositeFilters() {
const filtersQuantity = Object.keys(this.$store.state.users.filters).length
const currentFilters = this.$data.value.slice()
const indexOfLocal = currentFilters.indexOf('local')
const indexOfExternal = currentFilters.indexOf('external')
const indexOfActive = currentFilters.indexOf('active')
const indexOfDeactivated = currentFilters.indexOf('deactivated')
if (currentFilters.length === 4) {
if (currentFilters.length === filtersQuantity) {
return []
} else if (indexOfLocal > -1 && indexOfExternal > -1) {
const filterToRemove = indexOfLocal > indexOfExternal ? indexOfExternal : indexOfLocal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment