diff --git a/software/backend/data/bands.json b/software/backend/data/bands.json index 4e3f29b..d2f45d5 100644 --- a/software/backend/data/bands.json +++ b/software/backend/data/bands.json @@ -426,6 +426,59 @@ "bandId": 6 } ] + }, + { + "id": 7, + "name": "Muse", + "foundingYear": 1994, + "descriptionEn": "Muse are an English rock band from Teignmouth, Devon, formed in 1994. The band consists of Matt Bellamy (lead vocals, guitar, keyboards), Chris Wolstenholme (bass guitar, backing vocals), and Dominic Howard (drums, percussion).", + "descriptionDe": "Muse ist eine britische Rockband, die 1994 in Teignmouth, England gegründet wurde. Die Band besteht aus Matthew Bellamy (Gesang, Gitarre, Klavier und Synthesizers), Chris Wolstenholme (E-Bass, Gesang, Synthesizer) und Dominic Howard (Schlagzeug und Perkussion). Muse verbindet stilistisch Alternative, Hard und Progressive Rock sowie Electronica mit Elementen klassischer Musik zu Rockballaden und wird dem Subgenre New Prog zugeordnet.", + "images": [ + "muse-1.jpg", + "muse-2.jpg", + "muse-3.jpg" + ], + "imageMembers": "muse-members.jpg", + "logo": "muse-logo.jpg", + "genreId": [ + 2, + 15, + 16 + ], + "members": [ + { + "name": "Matthew Bellamy", + "bandId": 7, + "image": "matthew-bellamy.jpg" + }, + { + "name": "Dominic Howard", + "bandId": 7, + "image": "dominic-howard.jpg" + }, + { + "name": "Chris Wolstenholme", + "bandId": 7, + "image": "christ-wolstenholme.jpg" + } + ], + "ratings": [ + { + "accountId": 0, + "rating": 5, + "bandId": 7 + }, + { + "accountId": 1, + "rating": 4, + "bandId": 7 + }, + { + "accountId": 2, + "rating": 4, + "bandId": 7 + } + ] } ] } \ No newline at end of file diff --git a/software/backend/data/cities.json b/software/backend/data/cities.json index be2eb6d..160f976 100644 --- a/software/backend/data/cities.json +++ b/software/backend/data/cities.json @@ -4,7 +4,6 @@ "id": 0, "name": "Hannover", "country": "Germany", - "image": "hannover.jpg", "locations": [ { "id": 0, @@ -40,7 +39,6 @@ "id": 1, "name": "München", "country": "Germany", - "image": "munich.jpg", "locations": [ { "id": 4, @@ -69,7 +67,6 @@ "id": 2, "name": "Hamburg", "country": "Germany", - "image": "hamburg.jpg", "locations": [ { "id": 7, @@ -105,7 +102,6 @@ "id": 3, "name": "Berlin", "country": "Germany", - "image": "berlin.jpg", "locations": [ { "id": 11, diff --git a/software/backend/data/genres.json b/software/backend/data/genres.json index 2cc9a75..54023b7 100644 --- a/software/backend/data/genres.json +++ b/software/backend/data/genres.json @@ -59,6 +59,14 @@ { "id": 14, "name": "Bluesrock" + }, + { + "id": 15, + "name": "New Prog" + }, + { + "id": 16, + "name": "Hard Rock" } ] } \ No newline at end of file diff --git a/software/backend/data/tours.json b/software/backend/data/tours.json index f15ec81..4320f38 100644 --- a/software/backend/data/tours.json +++ b/software/backend/data/tours.json @@ -11,12 +11,20 @@ "id": 0, "date": "2024-10-18", "price": 92, - "inStock": 930, + "inStock": 0, "locationId": 0, "tourId": 0 }, { "id": 1, + "date": "2024-10-19", + "price": 92, + "inStock": 170, + "locationId": 0, + "tourId": 0 + }, + { + "id": 2, "date": "2024-10-23", "price": 119.90, "inStock": 8736, @@ -24,7 +32,7 @@ "tourId": 0 }, { - "id": 2, + "id": 3, "date": "2024-10-26", "price": 114.90, "inStock": 2793, @@ -32,7 +40,7 @@ "tourId": 0 }, { - "id": 3, + "id": 4, "date": "2024-11-02", "price": 124.90, "inStock": 3079, @@ -49,7 +57,7 @@ "image": "the-bends-tour.jpg", "concerts": [ { - "id": 4, + "id": 5, "date": "2024-11-30", "price": 108, "inStock": 1200, @@ -57,7 +65,7 @@ "tourId": 1 }, { - "id": 5, + "id": 6, "date": "2024-12-01", "price": 104, "inStock": 1800, @@ -65,7 +73,7 @@ "tourId": 1 }, { - "id": 6, + "id": 7, "date": "2024-12-07", "price": 99.90, "inStock": 2438, @@ -82,7 +90,7 @@ "image": "european-tour-arctic-monkeys.jpg", "concerts": [ { - "id": 7, + "id": 8, "date": "2025-01-21", "price": 67.90, "inStock": 994, @@ -90,7 +98,7 @@ "tourId": 2 }, { - "id": 8, + "id": 9, "date": "2024-11-15", "price": 79.90, "inStock": 1073, @@ -107,7 +115,7 @@ "image": "music-of-the-spheres.png", "concerts": [ { - "id": 9, + "id": 10, "date": "2024-12-07", "price": 124.90, "inStock": 765, @@ -115,7 +123,7 @@ "tourId": 3 }, { - "id": 10, + "id": 11, "date": "2025-01-17", "price": 129.90, "inStock": 989, @@ -123,7 +131,7 @@ "tourId": 3 }, { - "id": 11, + "id": 12, "date": "2025-02-01", "price": 134.90, "inStock": 827, @@ -140,7 +148,7 @@ "image": "but-here-we-are.jpg", "concerts": [ { - "id": 12, + "id": 13, "date": "2024-12-05", "price": 80, "inStock": 99, @@ -157,7 +165,7 @@ "image": "crisis-of-faith-tour.jpg", "concerts": [ { - "id": 13, + "id": 14, "date": "2025-01-12", "price": 81.90, "inStock": 173, @@ -165,7 +173,7 @@ "tourId": 5 }, { - "id": 14, + "id": 15, "date": "2025-02-01", "price": 84.90, "inStock": 192, @@ -182,7 +190,7 @@ "image": "back-to-the-water-below.jpg", "concerts": [ { - "id": 15, + "id": 16, "date": "2025-02-27", "price": 67.90, "inStock": 847, @@ -190,7 +198,7 @@ "tourId": 6 }, { - "id": 16, + "id": 17, "date": "2025-03-06", "price": 64.90, "inStock": 245, @@ -198,6 +206,47 @@ "tourId": 6 } ] + }, + { + "id": 7, + "name": "Will of the People Tour", + "bandId": 7, + "offered": true, + "image": "will-of-the-people-tour.jpg", + "concerts": [ + { + "id": 18, + "date": "2025-01-15", + "price": 67.90, + "inStock": 847, + "locationId": 2, + "tourId": 7 + }, + { + "id": 19, + "date": "2025-01-23", + "price": 64.90, + "inStock": 245, + "locationId": 10, + "tourId": 7 + }, + { + "id": 20, + "date": "2025-02-02", + "price": 64.90, + "inStock": 245, + "locationId": 13, + "tourId": 7 + }, + { + "id": 21, + "date": "2025-02-05", + "price": 64.90, + "inStock": 245, + "locationId": 13, + "tourId": 7 + } + ] } ] } \ No newline at end of file diff --git a/software/backend/images/bands/muse-1.jpg b/software/backend/images/bands/muse-1.jpg new file mode 100644 index 0000000..5687fb1 Binary files /dev/null and b/software/backend/images/bands/muse-1.jpg differ diff --git a/software/backend/images/bands/muse-2.jpg b/software/backend/images/bands/muse-2.jpg new file mode 100644 index 0000000..ebd9c13 Binary files /dev/null and b/software/backend/images/bands/muse-2.jpg differ diff --git a/software/backend/images/bands/muse-3.jpg b/software/backend/images/bands/muse-3.jpg new file mode 100644 index 0000000..646267f Binary files /dev/null and b/software/backend/images/bands/muse-3.jpg differ diff --git a/software/backend/images/bands/muse-logo.jpg b/software/backend/images/bands/muse-logo.jpg new file mode 100644 index 0000000..2fcb537 Binary files /dev/null and b/software/backend/images/bands/muse-logo.jpg differ diff --git a/software/backend/images/bands/muse-members.jpg b/software/backend/images/bands/muse-members.jpg new file mode 100644 index 0000000..ac533fd Binary files /dev/null and b/software/backend/images/bands/muse-members.jpg differ diff --git a/software/backend/images/cities/berlin.jpg b/software/backend/images/cities/berlin.jpg deleted file mode 100644 index 4637812..0000000 Binary files a/software/backend/images/cities/berlin.jpg and /dev/null differ diff --git a/software/backend/images/cities/hamburg.jpg b/software/backend/images/cities/hamburg.jpg deleted file mode 100644 index 13982ca..0000000 Binary files a/software/backend/images/cities/hamburg.jpg and /dev/null differ diff --git a/software/backend/images/cities/hannover.jpg b/software/backend/images/cities/hannover.jpg deleted file mode 100644 index 7a0bc93..0000000 Binary files a/software/backend/images/cities/hannover.jpg and /dev/null differ diff --git a/software/backend/images/cities/munich.jpg b/software/backend/images/cities/munich.jpg deleted file mode 100644 index 85f398a..0000000 Binary files a/software/backend/images/cities/munich.jpg and /dev/null differ diff --git a/software/backend/images/tours/will-of-the-people-tour.jpg b/software/backend/images/tours/will-of-the-people-tour.jpg new file mode 100644 index 0000000..a784102 Binary files /dev/null and b/software/backend/images/tours/will-of-the-people-tour.jpg differ diff --git a/software/backend/models/acts/city.model.ts b/software/backend/models/acts/city.model.ts index c4a71bc..fe574d8 100644 --- a/software/backend/models/acts/city.model.ts +++ b/software/backend/models/acts/city.model.ts @@ -9,9 +9,6 @@ export class City extends Model { @Column country: String - @Column - image: String - // Relations diff --git a/software/backend/models/acts/location.model.ts b/software/backend/models/acts/location.model.ts index 71df8ee..2cbf405 100644 --- a/software/backend/models/acts/location.model.ts +++ b/software/backend/models/acts/location.model.ts @@ -21,7 +21,7 @@ export class Location extends Model { // Relations @HasMany(() => Concert) - shows: Concert[] + concerts: Concert[] @BelongsTo(() => City) city: City diff --git a/software/backend/routes/city.routes.ts b/software/backend/routes/city.routes.ts index 2cf3400..00db191 100644 --- a/software/backend/routes/city.routes.ts +++ b/software/backend/routes/city.routes.ts @@ -1,14 +1,26 @@ import { Location } from "../models/acts/location.model"; import { City } from "../models/acts/city.model"; import { Request, Response, Router } from "express"; +import { Concert } from "../models/acts/concert.model"; export const city = Router() city.get("/", (req: Request, res: Response) => { City.findAll({ - include: [ Location ] + include: [ + { + model: Location, + include: [ Concert ] + } + ] }) .then(cities => { + for (let city of cities) { + for (let location of city.dataValues.locations) { + location.dataValues.nrOfConcerts = location.dataValues.concerts.length + delete location.dataValues.concerts + } + } res.status(200).json(cities) }) }) \ No newline at end of file diff --git a/software/backend/routes/location.routes.ts b/software/backend/routes/location.routes.ts index 56077b6..0b7bb9e 100644 --- a/software/backend/routes/location.routes.ts +++ b/software/backend/routes/location.routes.ts @@ -1,17 +1,41 @@ +import { Concert } from "../models/acts/concert.model"; import { City } from "../models/acts/city.model"; import { Location } from "../models/acts/location.model"; import { Request, Response, Router } from "express"; +import { Tour } from "../models/acts/tour.model"; +import { Band } from "../models/acts/band.model"; export const location = Router() location.get("/", (req: Request, res: Response) => { Location.findAll({ - include: [ City ], + include: [ + City, + { + model: Concert, + include: [ Tour ], + attributes: { + exclude: [ "locationId", "tourId" ] + } + } + ], attributes: { exclude: [ "cityId" ] } }) - .then(locations => { + .then(async locations => { + for (let location of locations) { + for (let concert of location.dataValues.concerts) { + let tour = concert.dataValues.tour + + await Band.findByPk(tour.dataValues.bandId) + .then(band => { + tour.dataValues.bandName = band.dataValues.name + delete tour.dataValues.bandId + }) + } + } + res.status(200).json(locations) }) }) \ No newline at end of file diff --git a/software/src/components/navigation/navigationPrependItems.vue b/software/src/components/navigation/navigationPrependItems.vue index 1c8527c..9a4464d 100644 --- a/software/src/components/navigation/navigationPrependItems.vue +++ b/software/src/components/navigation/navigationPrependItems.vue @@ -10,12 +10,12 @@ - {{ $t('menu.allConcerts', 2) }} + {{ $t('allEvents', 2) }} @@ -23,12 +23,12 @@ - {{ $t('menu.allLocations', 2) }} + {{ $t('allLocations', 2) }} diff --git a/software/src/data/models/acts/cityModel.ts b/software/src/data/models/acts/cityModel.ts index 5cf2738..33ee12b 100644 --- a/software/src/data/models/acts/cityModel.ts +++ b/software/src/data/models/acts/cityModel.ts @@ -1,3 +1,6 @@ +/** + * Replica of the API endpoint /cities + */ export class CityModel { id: number name: string @@ -8,5 +11,6 @@ export class CityModel { name: string address: string image: string + nrOfConcerts: number }> } \ No newline at end of file diff --git a/software/src/data/models/acts/locationModel.ts b/software/src/data/models/acts/locationModel.ts index ad6380a..67f3831 100644 --- a/software/src/data/models/acts/locationModel.ts +++ b/software/src/data/models/acts/locationModel.ts @@ -1,3 +1,6 @@ +/** + * Replica of the API endpoint /locations + */ export class LocationModel { id: number name: string @@ -7,4 +10,16 @@ export class LocationModel { name: string country: string } + concerts: Array<{ + id: number + date: string + price: number + inStock: number + tour: { + name: string + offered: boolean + image: string + bandName: string + } + }> } \ No newline at end of file diff --git a/software/src/data/stores/concertStore.ts b/software/src/data/stores/concertStore.ts index 02f6da9..2829e5b 100644 --- a/software/src/data/stores/concertStore.ts +++ b/software/src/data/stores/concertStore.ts @@ -53,6 +53,10 @@ export const useConcertStore = defineStore("concertStore", { await getAllGenres() .then(result => { this.genres = result.data + + this.genres.sort((a, b) => { + return a.name > b.name + }) }) await getAllCities() diff --git a/software/src/locales/de.json b/software/src/locales/de.json index a2b261f..2529310 100644 --- a/software/src/locales/de.json +++ b/software/src/locales/de.json @@ -1,19 +1,10 @@ { - "menu": { - "allConcerts": "Alle Konzerte", - "allLocations": "Alle Veranstaltungsorte", - "allBands": "Alle Bands" - }, - "shows": { - "highlights": "Highlights", - "tickets": "Ticket | Tickets", - "topConcerts": "Top Konzerte", - "topBands": "Top Bands", - "topLocations": "Top Veranstaltungsorte" - }, - "tours": { - "concert": "Konzert | Konzerte" - }, + "allEvents": "Alle Events", + "allLocations": "Alle Veranstaltungsorte", + "topEvents": "Top Events", + "topLocations": "Top Veranstaltungsorte", + "tickets": "Ticket | Tickets", + "concert": "Konzert | Konzerte", "preferences": { "pageSetup": "Seiteneinstellungen", "selectedTheme": "Ausgewähltes Theme", @@ -143,5 +134,10 @@ "brand": "Marke | Marken", "concerts": { "location": "Veranstaltungsort" - } + }, + "location": "Veranstaltungsort | Veranstaltungsorte", + "band": "Band | Bands", + "noEventsFound": "Keine Events gefunden", + "from": "ab", + "soldOut": "Ausverkauft" } diff --git a/software/src/locales/en.json b/software/src/locales/en.json index 8242d1f..d3dbe93 100644 --- a/software/src/locales/en.json +++ b/software/src/locales/en.json @@ -1,19 +1,10 @@ { - "menu": { - "allConcerts": "All Concerts", - "allLocations": "All Locations", - "allBands": "All Bands" - }, - "shows": { - "highlights": "Highlights", - "tickets": "Ticket | Tickets", - "topConcerts": "Top Concerts", - "topBands": "Top Bands", - "topLocations": "Top Locations" - }, - "tours": { - "concert": "Concert | Concerts" - }, + "allEvents": "All Events", + "allLocations": "All Locations", + "topEvents": "Top Events", + "topLocations": "Top Locations", + "tickets": "Ticket | Tickets", + "concert": "Concert | Concerts", "preferences": { "pageSetup": "Page setup", "selectedTheme": "Selected theme", @@ -143,5 +134,10 @@ "brand": "Brand | Brands", "concerts": { "location": "Locations" - } + }, + "location": "Location | Locations", + "band": "Band | Bands", + "noEventsFound": "No Events found", + "from": "from", + "soldOut": "Sold Out" } diff --git a/software/src/pages/homePage/highlightCarousel.vue b/software/src/pages/homePage/highlightCarousel.vue index d2840f7..53e63bc 100644 --- a/software/src/pages/homePage/highlightCarousel.vue +++ b/software/src/pages/homePage/highlightCarousel.vue @@ -51,9 +51,9 @@ const router = useRouter() append-icon="mdi-arrow-right" class="mt-2" color="primary" - @click="router.push('shows/band/red-hot-chili-peppers')" + @click="router.push('bands/' + band.name.replaceAll(' ', '-').toLowerCase())" > - {{ $t('shows.tickets', 2) }} + {{ $t('tickets', 2) }} diff --git a/software/src/pages/homePage/index.vue b/software/src/pages/homePage/index.vue index 7ea88be..7a12559 100644 --- a/software/src/pages/homePage/index.vue +++ b/software/src/pages/homePage/index.vue @@ -16,63 +16,75 @@ const concertStore = useConcertStore() - - - - + - - - - Tickets ab {{ lowestTicketPrice(concertStore.tours[i - 1]) }} € - - - + + + + + + - - - - {{ $t('menu.allConcerts') }} - - - + + + + ab {{ lowestTicketPrice(concertStore.tours[i - 1]) }} € + + + - - - - - + + + + {{ $t('allEvents') }} + + + - - - - {{ concertStore.locations[i + 2].city.name }}, {{ concertStore.locations[i + 2].city.country }} - - - + + + + + - - - - {{ $t('menu.allLocations') }} - + + + + {{ concertStore.locations[i + 2].city.name }}, {{ concertStore.locations[i + 2].city.country }} + + + + + + + + {{ $t('allLocations') }} + + + + + + + + diff --git a/software/src/pages/locations/locationDetailPage/index.vue b/software/src/pages/locations/locationDetailPage/index.vue new file mode 100644 index 0000000..640b014 --- /dev/null +++ b/software/src/pages/locations/locationDetailPage/index.vue @@ -0,0 +1,91 @@ + + + \ No newline at end of file diff --git a/software/src/pages/locations/locationsPage/index.vue b/software/src/pages/locations/locationsPage/index.vue new file mode 100644 index 0000000..cb069ef --- /dev/null +++ b/software/src/pages/locations/locationsPage/index.vue @@ -0,0 +1,48 @@ + + + \ No newline at end of file diff --git a/software/src/pages/shows/bandDetailPage/bandBanner.vue b/software/src/pages/shows/bandDetailPage/bandBanner.vue index 362a6d7..e916fe1 100644 --- a/software/src/pages/shows/bandDetailPage/bandBanner.vue +++ b/software/src/pages/shows/bandDetailPage/bandBanner.vue @@ -32,6 +32,15 @@ defineProps({

{{ band.name }}

+
+ + {{ genre.name }} + +

{{ band.descriptionDe }}

diff --git a/software/src/pages/shows/bandDetailPage/concertSection.vue b/software/src/pages/shows/bandDetailPage/concertSection.vue index 875107c..8b7b4b0 100644 --- a/software/src/pages/shows/bandDetailPage/concertSection.vue +++ b/software/src/pages/shows/bandDetailPage/concertSection.vue @@ -4,6 +4,9 @@ import { dateStringToHumanReadableString } from '@/scripts/dateTimeScripts'; import sectionDivider from '@/components/sectionDivider.vue'; import cardWithLeftImage from '@/components/cardWithLeftImage.vue'; import outlinedButton from '@/components/outlinedButton.vue'; +import { useRouter } from 'vue-router'; + +const router = useRouter() defineProps({ band: { @@ -27,17 +30,26 @@ defineProps({ :image="'http://localhost:3000/static/locations/' + concert.location.image" :link="false" > -
- {{ concert.location.name }} -
+ + + + -
- {{ concert.location.address }} -
+ +
+ {{ concert.location.name }} +
-
- {{ concert.location.city.name }} -
+
+ {{ concert.location.city.name }} +
+
+
diff --git a/software/src/pages/shows/toursPage/filterBar.vue b/software/src/pages/shows/eventsPage/filterBar.vue similarity index 81% rename from software/src/pages/shows/toursPage/filterBar.vue rename to software/src/pages/shows/eventsPage/filterBar.vue index ec07170..97ab80f 100644 --- a/software/src/pages/shows/toursPage/filterBar.vue +++ b/software/src/pages/shows/eventsPage/filterBar.vue @@ -23,7 +23,10 @@ const concertStore = useConcertStore() color="secondary" >