diff --git a/software/backend/routes/band.routes.ts b/software/backend/routes/band.routes.ts
index 8632cbc..04fc8d1 100644
--- a/software/backend/routes/band.routes.ts
+++ b/software/backend/routes/band.routes.ts
@@ -118,8 +118,19 @@ band.get("/search", (req: Request, res: Response) => {
where: {
name: {
[Op.substring]: req.query.value
+ },
+ },
+ include: [
+ {
+ model: Event,
+ include: [
+ Concert
+ ]
+ },
+ {
+ model: Genre
}
- }
+ ]
})
.then(bands => {
res.status(200).json(bands)
diff --git a/software/backend/routes/location.routes.ts b/software/backend/routes/location.routes.ts
index 209c787..33c10eb 100644
--- a/software/backend/routes/location.routes.ts
+++ b/software/backend/routes/location.routes.ts
@@ -116,7 +116,8 @@ location.get("/search", (req: Request, res: Response) => {
name: {
[Op.substring]: req.query.value
}
- }
+ },
+ include: [ Concert ]
})
.then(locations => {
res.status(200).json(locations)
diff --git a/software/src/components/pageParts/bandListItem.vue b/software/src/components/pageParts/bandListItem.vue
new file mode 100644
index 0000000..8852127
--- /dev/null
+++ b/software/src/components/pageParts/bandListItem.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+ {{ genre.name }}
+
+
+
+
+
+
+
+ {{ $t('from') + ' ' + lowestTicketPriceEvents(events) + ' €' }}
+
+
+
+
+ {{ events.length }} {{ $t('event', events.length) }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/software/src/locales/de.json b/software/src/locales/de.json
index 8c1cd72..5f820ef 100644
--- a/software/src/locales/de.json
+++ b/software/src/locales/de.json
@@ -171,5 +171,7 @@
},
"goToTheConcert": "Zum Konzert",
"selectedConcert": "Ausgewähltes Konzert",
- "enterSomeKeywords": "Füge Schlagworte ein um nach Bands, Events, Konzerten und Veranstaltungsorten zu suchen"
+ "enterSomeKeywords": "Füge Schlagworte ein um nach Bands, Events, Konzerten und Veranstaltungsorten zu suchen",
+ "noBandFound": "Keine Band gefunden",
+ "noLocationsFound": "Keine Veranstaltungsorte gefunden"
}
diff --git a/software/src/locales/en.json b/software/src/locales/en.json
index b8feb18..284b3d4 100644
--- a/software/src/locales/en.json
+++ b/software/src/locales/en.json
@@ -171,5 +171,7 @@
},
"goToTheConcert": "To the concert",
"selectedConcert": "Selected Concert",
- "enterSomeKeywords": "Enter keywords to search for bands, events, concerts and locations"
+ "enterSomeKeywords": "Enter keywords to search for bands, events, concerts and locations",
+ "noBandFound": "No band found",
+ "noLocationsFound": "No location found"
}
diff --git a/software/src/pages/searchPage/index.vue b/software/src/pages/searchPage/index.vue
index 90adbae..588399f 100644
--- a/software/src/pages/searchPage/index.vue
+++ b/software/src/pages/searchPage/index.vue
@@ -2,6 +2,10 @@
import searchBar from './searchBar.vue';
import eventListItem from '@/components/pageParts/eventListItem.vue';
import sectionDivider from '@/components/basics/sectionDivider.vue';
+import cardViewHorizontal from '@/components/basics/cardViewHorizontal.vue';
+import locationListItem from '@/components/pageParts/locationListItem.vue';
+import cardViewTopImage from '@/components/basics/cardViewTopImage.vue';
+import bandListItem from '@/components/pageParts/bandListItem.vue';
import { useSearchStore } from '@/data/stores/searchStore';
const searchStore = useSearchStore()
@@ -19,62 +23,126 @@ const searchStore = useSearchStore()
-
-
- {{ searchStore.bands }}
-
-
+
+
+
+
+
+
-
-
- {{ searchStore.locations }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- Loading...
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
diff --git a/software/src/pages/searchPage/searchBar.vue b/software/src/pages/searchPage/searchBar.vue
index 840fba6..b4ffc32 100644
--- a/software/src/pages/searchPage/searchBar.vue
+++ b/software/src/pages/searchPage/searchBar.vue
@@ -12,6 +12,7 @@ const searchStore = useSearchStore()
hide-details
v-model="searchStore.searchTerm"
:placeholder="$t('enterSomeKeywords')"
+ @keyup.enter="searchStore.startSearch"
>
): string {
priceArray.sort()
+ try {
+ return priceArray[0].toFixed(2)
+ } catch(e) {
+ return "0"
+ }
+}
+
+export function lowestTicketPriceEvents(events: Array) {
+ const priceArray : Array = []
+
+ for (let event of events) {
+ for (let concert of event.concerts) {
+ priceArray.push(concert.price)
+ }
+ }
+
+ priceArray.sort()
+
try {
return priceArray[0].toFixed(2)
} catch(e) {