diff --git a/software/backend/routes/city.routes.ts b/software/backend/routes/city.routes.ts index 7ddea96..893c645 100644 --- a/software/backend/routes/city.routes.ts +++ b/software/backend/routes/city.routes.ts @@ -15,12 +15,12 @@ city.get("/", (req: Request, res: Response) => { ] }) .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 - } - } + // 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 0782544..209c787 100644 --- a/software/backend/routes/location.routes.ts +++ b/software/backend/routes/location.routes.ts @@ -20,7 +20,12 @@ location.get("/", (req: Request, res: Response) => { City, { model: Concert, - include: [ Event ], + include: [ + { + model: Event, + include: [ Band ] + } + ], attributes: { exclude: [ "locationId", "tourId" ] } @@ -40,18 +45,6 @@ location.get("/", (req: Request, res: Response) => { } }) .then(async locations => { - for (let location of locations) { - for (let concert of location.dataValues.concerts) { - let event = concert.dataValues.event - - await Band.findByPk(event.dataValues.bandId) - .then(band => { - event.dataValues.bandName = band.dataValues.name - delete event.dataValues.bandId - }) - } - } - if (sort != undefined) { locations.sort((location1, location2) => { if (sort == "desc") { @@ -77,7 +70,12 @@ location.get("/location/:urlName", (req: Request, res: Response) => { City, { model: Concert, - include: [ Event ], + include: [ + { + model: Event, + include: [ Band ] + } + ], attributes: { exclude: [ "locationId", "tourId" ] } @@ -97,16 +95,6 @@ location.get("/location/:urlName", (req: Request, res: Response) => { } }) .then(async location => { - for (let concert of location.dataValues.concerts) { - let event = concert.dataValues.event - - await Band.findByPk(event.dataValues.bandId) - .then(band => { - event.dataValues.bandName = band.dataValues.name - delete event.dataValues.bandId - }) - } - for (let seatGroup of location.dataValues.seatGroups) { for (let seatRow of seatGroup.dataValues.seatRows) { for (let seat of seatRow.dataValues.seats) { diff --git a/software/src/components/navigation/footerItems.vue b/software/src/components/navigation/footerItems.vue index 954b934..471a038 100644 --- a/software/src/components/navigation/footerItems.vue +++ b/software/src/components/navigation/footerItems.vue @@ -1,5 +1,5 @@ @@ -21,6 +30,7 @@ defineProps({ >
+ + + - {{ title }} + + {{ title }} + + -

{{ description }}

+ + +

+ {{ description }} +

-

+

diff --git a/software/src/components/pageParts/locationListItem.vue b/software/src/components/pageParts/locationListItem.vue index e20df46..ef7772b 100644 --- a/software/src/components/pageParts/locationListItem.vue +++ b/software/src/components/pageParts/locationListItem.vue @@ -1,12 +1,20 @@ @@ -17,7 +25,7 @@ defineProps({ @click="router.push('locations/' + location.name.replaceAll(' ', '-').toLowerCase())" >
- {{ location.concerts.length }} {{ $t('concert', location.concerts.length) }} + {{ concerts.length }} {{ $t('concert', concerts.length) }}
\ No newline at end of file diff --git a/software/src/components/pageParts/ticketListItem.vue b/software/src/components/pageParts/ticketListItem.vue index d6157f2..9b7fd50 100644 --- a/software/src/components/pageParts/ticketListItem.vue +++ b/software/src/components/pageParts/ticketListItem.vue @@ -1,17 +1,41 @@