Enhance search for band names of concerts
This commit is contained in:
@@ -102,10 +102,19 @@ 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: {
|
||||||
|
[Op.or]: [
|
||||||
|
{
|
||||||
name: {
|
name: {
|
||||||
[Op.substring]: req.query.value
|
[Op.substring]: req.query.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"$band.name$": {
|
||||||
|
[Op.substring]: req.query.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
include: [ Band, Location ]
|
include: [ Band, Location ]
|
||||||
})
|
})
|
||||||
.then(concerts => {
|
.then(concerts => {
|
||||||
|
|||||||
@@ -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 >
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -18,11 +18,10 @@ 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"
|
||||||
>
|
>
|
||||||
|
<template #borderless>
|
||||||
<!-- Display items if basket is not empty -->
|
<!-- Display items if basket is not empty -->
|
||||||
<tickets-table v-if="basketStore.itemsInBasket.length > 0"/>
|
<tickets-table v-if="basketStore.itemsInBasket.length > 0"/>
|
||||||
|
|
||||||
@@ -32,6 +31,7 @@ const showOrderingDialog = ref()
|
|||||||
: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) }} €
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user