Band filter by genre

This commit is contained in:
2024-10-22 20:11:09 +02:00
parent 386800f31a
commit 70227329f2
5 changed files with 87 additions and 7 deletions

View File

@@ -0,0 +1,43 @@
<script setup lang="ts">
import cardView from '@/components/basics/cardView.vue';
import { useBandStore } from '@/stores/band.store';
import outlinedButton from '@/components/basics/outlinedButton.vue';
import { GenreModel } from '@/data/models/acts/genreModel';
const bandStore = useBandStore()
function itemProps(item: GenreModel) {
return {
title: item.name
}
}
</script>
<template>
<card-view :title="$t('filtering')">
<v-row>
<v-col>
<v-select
v-model="bandStore.filteredGenres"
:items="bandStore.availableGenres"
variant="outlined"
:label="$t('genres')"
:item-props="itemProps"
chips
clearable
hide-details
multiple
/>
</v-col>
<v-col cols="auto">
<outlined-button
@click="bandStore.getBands"
height="100%"
>
{{ $t('filtering') }}
</outlined-button>
</v-col>
</v-row>
</card-view>
</template>

View File

@@ -2,6 +2,7 @@
import { useBandStore } from '@/stores/band.store';
import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
import bandListItem from '@/components/pageParts/bandListItem.vue';
import bandFilterbar from './bandFilterbar.vue';
const bandStore = useBandStore()
@@ -16,7 +17,7 @@ bandStore.getBands()
<v-col cols="10">
<v-row>
<v-col>
Filterbar
<band-filterbar />
</v-col>
</v-row>