Enhance search for band names of concerts

This commit is contained in:
2024-10-22 19:16:30 +02:00
parent 4b43757dd4
commit cf9a888a97
6 changed files with 28 additions and 17 deletions

View File

@@ -102,9 +102,18 @@ concert.get("/concert/:id", (req: Request, res: Response) => {
concert.get("/search", (req: Request, res: Response) => { concert.get("/search", (req: Request, res: Response) => {
Concert.findAll({ Concert.findAll({
where: { where: {
name: { [Op.or]: [
[Op.substring]: req.query.value {
} name: {
[Op.substring]: req.query.value
}
},
{
"$band.name$": {
[Op.substring]: req.query.value
}
}
]
}, },
include: [ Band, Location ] include: [ Band, Location ]
}) })

View File

@@ -40,6 +40,8 @@ defineProps({
</v-sheet> </v-sheet>
</v-card-title> </v-card-title>
<slot name="borderless"></slot>
<v-container> <v-container>
<v-row> <v-row>
<v-col > <v-col >

View File

@@ -129,7 +129,7 @@
}, },
"location": "Veranstaltungsort | Veranstaltungsorte", "location": "Veranstaltungsort | Veranstaltungsorte",
"band": "Band | Bands", "band": "Band | Bands",
"noEventsFound": "Keine Events gefunden", "noConcertsFound": "Keine Konzerte gefunden",
"from": "ab", "from": "ab",
"soldOut": "Ausverkauft", "soldOut": "Ausverkauft",
"city": "Stadt", "city": "Stadt",

View File

@@ -129,7 +129,7 @@
}, },
"location": "Location | Locations", "location": "Location | Locations",
"band": "Band | Bands", "band": "Band | Bands",
"noEventsFound": "No Events found", "noConcertsFound": "No Concerts found",
"from": "from", "from": "from",
"soldOut": "Sold Out", "soldOut": "Sold Out",
"city": "City", "city": "City",

View File

@@ -18,20 +18,20 @@ const showOrderingDialog = ref()
<v-col> <v-col>
<card-view <card-view
:title="$t('basket')" :title="$t('basket')"
:subtitle="basketStore.itemsInBasket.length + ' ' +
$tc('product.product', basketStore.itemsInBasket.length)"
v-model="showOrderingDialog" v-model="showOrderingDialog"
icon="mdi-cart" icon="mdi-cart"
> >
<!-- Display items if basket is not empty --> <template #borderless>
<tickets-table v-if="basketStore.itemsInBasket.length > 0"/> <!-- Display items if basket is not empty -->
<tickets-table v-if="basketStore.itemsInBasket.length > 0"/>
<!-- Display empty state if card is empty --> <!-- Display empty state if card is empty -->
<v-empty-state v-else <v-empty-state v-else
icon="mdi-basket-off" icon="mdi-basket-off"
:title="$t('emptyBasketTitle')" :title="$t('emptyBasketTitle')"
:text="$t('emptyBasketText')" :text="$t('emptyBasketText')"
/> />
</template>
<v-card-text class="text-right text-h5" v-if="basketStore.itemsInBasket.length > 0"> <v-card-text class="text-right text-h5" v-if="basketStore.itemsInBasket.length > 0">
{{ $t('totalPrice') }}: {{ (basketStore.getTotalPrice).toFixed(2) }} {{ $t('totalPrice') }}: {{ (basketStore.getTotalPrice).toFixed(2) }}

View File

@@ -66,7 +66,7 @@ const searchStore = useSearchStore()
<!-- Section Concert results --> <!-- Section Concert results -->
<v-row> <v-row>
<v-col> <v-col>
<section-divider :title="$t('event', 2)" /> <section-divider :title="$t('concert', 2)" />
</v-col> </v-col>
</v-row> </v-row>
@@ -95,7 +95,7 @@ const searchStore = useSearchStore()
<v-row v-else > <v-row v-else >
<v-col> <v-col>
<v-empty-state <v-empty-state
:title="$t('noEventsFound')" :title="$t('noConcertsFound')"
icon="mdi-party-popper" icon="mdi-party-popper"
/> />
</v-col> </v-col>