mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
fixed linting
This commit is contained in:
parent
084b14608d
commit
57cf245b71
@ -4,7 +4,7 @@ import CategoriesFilter from './CategoriesFilter'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
let wrapper, environmentAndNatureButton, democracyAndPoliticsButton
|
||||
let wrapper, environmentAndNatureButton
|
||||
|
||||
describe('CategoriesFilter.vue', () => {
|
||||
const mutations = {
|
||||
|
||||
@ -9,14 +9,14 @@
|
||||
@click="setResetCategories"
|
||||
size="small"
|
||||
>
|
||||
{{ $t('filter-menu.all') }}
|
||||
{{ $t('filter-menu.all') }}
|
||||
</base-button>
|
||||
</div>
|
||||
<div class="category-filter-list">
|
||||
<!-- <ds-space margin="small" /> -->
|
||||
<base-button
|
||||
v-for="category in categories"
|
||||
:key="category.id"
|
||||
:key="category.id"
|
||||
@click="saveCategories(category.id)"
|
||||
:filled="filteredCategoryIds.includes(category.id)"
|
||||
:icon="category.icon"
|
||||
@ -37,13 +37,11 @@
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import CategoryQuery from '~/graphql/CategoryQuery.js'
|
||||
import FilterMenuSection from '~/components/FilterMenu/FilterMenuSection'
|
||||
import LabeledButton from '~/components/_new/generic/LabeledButton/LabeledButton'
|
||||
import SortCategories from '~/mixins/sortCategoriesMixin.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FilterMenuSection,
|
||||
LabeledButton,
|
||||
},
|
||||
mixins: [SortCategories],
|
||||
data() {
|
||||
@ -67,7 +65,7 @@ export default {
|
||||
},
|
||||
saveCategories(categoryId) {
|
||||
this.toggleCategory(categoryId)
|
||||
this.$emit('updateCategories', categoryId)
|
||||
this.$emit('updateCategories', categoryId)
|
||||
},
|
||||
},
|
||||
apollo: {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<post-type-filter />
|
||||
<following-filter />
|
||||
<categories-filter v-if="categoriesActive" @showFilterMenu="$emit('showFilterMenu')" @updateCategories="updateCategories" />
|
||||
<categories-filter v-if="categoriesActive" @showFilterMenu="$emit('showFilterMenu')" />
|
||||
</div>
|
||||
<div v-if="eventSetInPostTypeFilter" class="filter-menu-options">
|
||||
<h2 class="title">{{ $t('filter-menu.eventsBy') }}</h2>
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
OrderByFilter,
|
||||
CategoriesFilter,
|
||||
PostTypeFilter,
|
||||
LabeledButton
|
||||
LabeledButton,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -56,10 +56,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateCategories(newCatId){
|
||||
console.log(newCatId);
|
||||
},
|
||||
saveCategories(){
|
||||
saveCategories() {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: SaveCategories(),
|
||||
@ -72,18 +69,18 @@ export default {
|
||||
.catch(() => {
|
||||
this.$toast.error(this.$t('filter-menu.save.error'))
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.filter-header{
|
||||
.filter-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
& .labeled-button{
|
||||
& .labeled-button {
|
||||
margin-right: 2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
.filter-menu-options {
|
||||
max-width: $size-max-width-filter-menu;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user