diff --git a/software/backend/data/bands.json b/software/backend/data/bands.json index 52d5136..86b499c 100644 --- a/software/backend/data/bands.json +++ b/software/backend/data/bands.json @@ -239,6 +239,60 @@ "bandId": 4 } ] + }, + { + "id": 5, + "name": "Billy Talent", + "foundingYear": 1993, + "descriptionEn": "Billy Talent is a Canadian rock band from Mississauga, Ontario. They formed in 1993 with lead vocalist Benjamin Kowalewicz, guitarist Ian D'Sa, bassist Jonathan Gallant, and drummer Aaron Solowoniuk. There have been no lineup changes, although Solowoniuk has been on hiatus from the band since 2016 due to a relapse of multiple sclerosis. In the three decades since their inception, Billy Talent has sold well over a million physical albums in Canada alone and nearly 3 million albums internationally. During their most successful period, they were ranked as one of the top 10 best-selling native bands in Canada.", + "descriptionDe": "Billy Talent ist eine kanadische Rockband aus Mississauga, Ontario. Die Band spielte anfangs Punk, ordnet sich auf den späteren Alben jedoch eher im Alternative Rock ein. ", + "images": [ "billy-talent-1.jpg" ], + "logo": "billy-talent-logo.png", + "genreId": [ 2, 11, 12, 13 ], + "members": [ + { + "name": "Benjamin Kowalewicz", + "bandId": 5, + "image": "benjamin-kowalewicz.jpg" + }, + { + "name": "Ian D'Sa ", + "bandId": 5, + "image": "ian-d-sa.jpg" + }, + { + "name": "Jonathan Gallant", + "bandId": 5, + "image": "jonathan-gallant.jpg" + }, + { + "name": "Jordan Hastings", + "bandId": 5, + "image": "jordan-hastings.jpg" + }, + { + "name": "Josh Freese", + "bandId": 5, + "image": "josh-freese.jpg" + } + ], + "ratings": [ + { + "accountId": 0, + "rating": 5, + "bandId": 5 + }, + { + "accountId": 1, + "rating": 3, + "bandId": 5 + }, + { + "accountId": 2, + "rating": 4, + "bandId": 5 + } + ] } ] } \ No newline at end of file diff --git a/software/backend/data/categories.json b/software/backend/data/categories.json deleted file mode 100644 index 9a4c81d..0000000 --- a/software/backend/data/categories.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "data": [ - { - "id": 0, - "icon": "", - "name": "All" - }, - { - "id": 1, - "icon": "mdi-chip", - "name": "Electronic" - }, - { - "id": 2, - "icon": "mdi-soccer", - "name": "Sports" - }, - { - "id": 3, - "icon": "mdi-tshirt-crew", - "name": "Clothes" - }, - { - "id": 4, - "icon": "mdi-bookshelf", - "name": "Books" - }, - { - "id": 5, - "icon": "mdi-guitar-electric", - "name": "Instruments" - }, - { - "id": 6, - "icon": "mdi-teddy-bear", - "name": "Toys" - } - ] -} \ No newline at end of file diff --git a/software/backend/data/genres.json b/software/backend/data/genres.json index 11d86c8..870fa10 100644 --- a/software/backend/data/genres.json +++ b/software/backend/data/genres.json @@ -43,6 +43,18 @@ { "id": 10, "name": "Post-Grunge" + }, + { + "id": 11, + "name": "Punk-Rock" + }, + { + "id": 12, + "name": "Post-Hardcore" + }, + { + "id": 13, + "name": "Pop-Punk" } ] } \ No newline at end of file diff --git a/software/backend/data/tours.json b/software/backend/data/tours.json index 293142f..45c9863 100644 --- a/software/backend/data/tours.json +++ b/software/backend/data/tours.json @@ -2,40 +2,74 @@ "data": [ { "id": 0, - "name": "Unlimited Love Tour", + "name": "Unlimited Love", "bandId": 0, "offered": true, - "shows": [ + "image": "unlimited-love-tour.jpg", + "concerts": [ { "id": 0, - "date": "2024-12-03", + "date": "2024-10-18", "price": 92, - "inStock": 230, + "inStock": 930, "locationId": 0, "tourId": 0 + }, + { + "id": 1, + "date": "2024-10-23", + "price": 119.90, + "inStock": 8736, + "locationId": 4, + "tourId": 0 + }, + { + "id": 2, + "date": "2024-10-26", + "price": 114.90, + "inStock": 2793, + "locationId": 8, + "tourId": 0 + }, + { + "id": 3, + "date": "2024-11-02", + "price": 124.90, + "inStock": 3079, + "locationId": 12, + "tourId": 0 } ] }, { "id": 1, - "name": "The Bends Tour", + "name": "The Bends", "bandId": 1, "offered": true, - "shows": [ + "image": "the-bends-tour.jpg", + "concerts": [ { - "id": 1, + "id": 4, "date": "2024-11-30", - "price": 104, - "inStock": 120, - "locationId": 2, + "price": 108, + "inStock": 1200, + "locationId": 1, "tourId": 1 }, { - "id": 2, + "id": 5, "date": "2024-12-01", "price": 104, - "inStock": 180, - "locationId": 0, + "inStock": 1800, + "locationId": 5, + "tourId": 1 + }, + { + "id": 6, + "date": "2024-12-07", + "price": 99.90, + "inStock": 2438, + "locationId": 9, "tourId": 1 } ] @@ -45,29 +79,55 @@ "name": "European Tour", "bandId": 2, "offered": true, - "shows": [ + "image": "european-tour-arctic-monkeys.jpg", + "concerts": [ { - "id": 3, - "date": "2024-10-15", - "price": 80, - "inStock": 99, + "id": 7, + "date": "2025-01-21", + "price": 67.90, + "inStock": 994, "locationId": 3, "tourId": 2 + }, + { + "id": 8, + "date": "2024-11-15", + "price": 79.90, + "inStock": 1073, + "locationId": 14, + "tourId": 2 } ] }, { "id": 3, - "name": "Moon Music Tour", + "name": "Music of the Spheres", "bandId": 3, "offered": true, - "shows": [ + "image": "music-of-the-spheres.png", + "concerts": [ { - "id": 4, - "date": "2024-10-15", - "price": 80, - "inStock": 99, - "locationId": 1, + "id": 9, + "date": "2024-12-07", + "price": 124.90, + "inStock": 765, + "locationId": 13, + "tourId": 3 + }, + { + "id": 10, + "date": "2025-01-17", + "price": 129.90, + "inStock": 989, + "locationId": 9, + "tourId": 3 + }, + { + "id": 11, + "date": "2025-02-01", + "price": 134.90, + "inStock": 827, + "locationId": 4, "tourId": 3 } ] @@ -77,16 +137,42 @@ "name": "But Here We Are Tour", "bandId": 4, "offered": true, - "shows": [ + "image": "but-here-we-are.jpg", + "concerts": [ { - "id": 5, - "date": "2024-10-15", + "id": 12, + "date": "2024-12-05", "price": 80, "inStock": 99, "locationId": 2, "tourId": 4 } ] + }, + { + "id": 5, + "name": "Crisis of Faith", + "bandId": 5, + "offered": true, + "image": "crisis-of-faith-tour.jpg", + "concerts": [ + { + "id": 13, + "date": "2025-01-12", + "price": 81.90, + "inStock": 173, + "locationId": 2, + "tourId": 5 + }, + { + "id": 14, + "date": "2025-02-01", + "price": 84.90, + "inStock": 192, + "locationId": 6, + "tourId": 5 + } + ] } ] } \ No newline at end of file diff --git a/software/backend/database.ts b/software/backend/database.ts index 5398d8d..84111fc 100644 --- a/software/backend/database.ts +++ b/software/backend/database.ts @@ -11,7 +11,7 @@ import { AccountRole } from "./models/user/accountRole.model" import { Genre } from "./models/acts/genre.model" import { Location } from "./models/acts/location.model" import { Band } from "./models/acts/band.model" -import { Show } from "./models/acts/show.model" +import { Concert } from "./models/acts/concert.model" import { Member } from "./models/acts/member.model" import { Rating } from "./models/acts/rating.model" import { Tour } from "./models/acts/tour.model" @@ -31,7 +31,7 @@ export const sequelize = new Sequelize({ storage: "database.sqlite", models: [ AccountRole, Account, Payment, Address, - City, Location, Genre, Band, BandGenre, Rating, Member, Tour, Show, + City, Location, Genre, Band, BandGenre, Rating, Member, Tour, Concert, Order, OrderItem ] }) diff --git a/software/backend/images/bands/billy-talent-1.jpg b/software/backend/images/bands/billy-talent-1.jpg new file mode 100644 index 0000000..d4d1403 Binary files /dev/null and b/software/backend/images/bands/billy-talent-1.jpg differ diff --git a/software/backend/images/tours/but-here-we-are.jpg b/software/backend/images/tours/but-here-we-are.jpg new file mode 100644 index 0000000..d1d72a7 Binary files /dev/null and b/software/backend/images/tours/but-here-we-are.jpg differ diff --git a/software/backend/images/tours/crisis-of-faith-tour.jpg b/software/backend/images/tours/crisis-of-faith-tour.jpg new file mode 100644 index 0000000..dca1702 Binary files /dev/null and b/software/backend/images/tours/crisis-of-faith-tour.jpg differ diff --git a/software/backend/images/tours/european-tour-arctic-monkeys.jpg b/software/backend/images/tours/european-tour-arctic-monkeys.jpg new file mode 100644 index 0000000..c06f26b Binary files /dev/null and b/software/backend/images/tours/european-tour-arctic-monkeys.jpg differ diff --git a/software/backend/images/tours/music-of-the-spheres.png b/software/backend/images/tours/music-of-the-spheres.png new file mode 100644 index 0000000..59349a4 Binary files /dev/null and b/software/backend/images/tours/music-of-the-spheres.png differ diff --git a/software/backend/images/tours/the-bends-tour.jpg b/software/backend/images/tours/the-bends-tour.jpg new file mode 100644 index 0000000..7790cb7 Binary files /dev/null and b/software/backend/images/tours/the-bends-tour.jpg differ diff --git a/software/backend/images/tours/unlimited-love-tour.jpg b/software/backend/images/tours/unlimited-love-tour.jpg new file mode 100644 index 0000000..709cd57 Binary files /dev/null and b/software/backend/images/tours/unlimited-love-tour.jpg differ diff --git a/software/backend/models/acts/show.model.ts b/software/backend/models/acts/concert.model.ts similarity index 94% rename from software/backend/models/acts/show.model.ts rename to software/backend/models/acts/concert.model.ts index 544de49..2b12bb8 100644 --- a/software/backend/models/acts/show.model.ts +++ b/software/backend/models/acts/concert.model.ts @@ -4,7 +4,7 @@ import { Tour } from "./tour.model"; import { OrderItem } from "../ordering/orderItem.model"; @Table({ timestamps: false }) -export class Show extends Model { +export class Concert extends Model { @Column date: String diff --git a/software/backend/models/acts/location.model.ts b/software/backend/models/acts/location.model.ts index 16706df..71df8ee 100644 --- a/software/backend/models/acts/location.model.ts +++ b/software/backend/models/acts/location.model.ts @@ -1,5 +1,5 @@ import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript"; -import { Show } from "./show.model"; +import { Concert } from "./concert.model"; import { City } from "./city.model"; @Table({ timestamps: false }) @@ -20,8 +20,8 @@ export class Location extends Model { // Relations - @HasMany(() => Show) - shows: Show[] + @HasMany(() => Concert) + shows: Concert[] @BelongsTo(() => City) city: City diff --git a/software/backend/models/acts/tour.model.ts b/software/backend/models/acts/tour.model.ts index dcc7e67..c59d90c 100644 --- a/software/backend/models/acts/tour.model.ts +++ b/software/backend/models/acts/tour.model.ts @@ -1,6 +1,6 @@ import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript"; import { Band } from "./band.model"; -import { Show } from "./show.model"; +import { Concert } from "./concert.model"; @Table({ timestamps: false }) export class Tour extends Model { @@ -13,12 +13,15 @@ export class Tour extends Model { @Column offered: Boolean + @Column + image: String + // Relations @BelongsTo(() => Band) band: Band - @HasMany(() => Show) - shows: Show[] + @HasMany(() => Concert) + shows: Concert[] } \ No newline at end of file diff --git a/software/backend/models/ordering/orderItem.model.ts b/software/backend/models/ordering/orderItem.model.ts index 9be7682..bb51ad6 100644 --- a/software/backend/models/ordering/orderItem.model.ts +++ b/software/backend/models/ordering/orderItem.model.ts @@ -1,5 +1,5 @@ import { Model, BelongsTo, Column, ForeignKey, HasMany, HasOne, Table } from "sequelize-typescript"; -import { Show } from "../acts/show.model"; +import { Concert } from "../acts/concert.model"; import { Order } from "./order.model"; @Table({ timestamps: false }) @@ -15,7 +15,7 @@ export class OrderItem extends Model { orderPrice: number @Column - @ForeignKey(() => Show) + @ForeignKey(() => Concert) showId: number @@ -23,6 +23,6 @@ export class OrderItem extends Model { @BelongsTo(() => Order) order: Order - @BelongsTo(() => Show) - product: Show + @BelongsTo(() => Concert) + product: Concert } diff --git a/software/backend/routes/show.routes.ts b/software/backend/routes/concert.routes.ts similarity index 74% rename from software/backend/routes/show.routes.ts rename to software/backend/routes/concert.routes.ts index aae9a08..6c1ce0e 100644 --- a/software/backend/routes/show.routes.ts +++ b/software/backend/routes/concert.routes.ts @@ -1,13 +1,13 @@ import { Location } from "../models/acts/location.model"; -import { Show } from "../models/acts/show.model"; +import { Concert } from "../models/acts/concert.model"; import { Request, Response, Router } from "express"; import { Tour } from "../models/acts/tour.model"; import { City } from "../models/acts/city.model"; -export const show = Router() +export const concert = Router() -show.get("/:id", (req: Request, res: Response) => { - Show.findByPk(req.params.id, { +concert.get("/:id", (req: Request, res: Response) => { + Concert.findByPk(req.params.id, { include: [ Tour, { diff --git a/software/backend/routes/order.routes.ts b/software/backend/routes/order.routes.ts index b132855..9a1aeb9 100644 --- a/software/backend/routes/order.routes.ts +++ b/software/backend/routes/order.routes.ts @@ -1,6 +1,6 @@ import { Router, Request, Response } from "express"; import { Order } from "../models/ordering/order.model"; -import { Show } from "../models/acts/show.model"; +import { Concert } from "../models/acts/concert.model"; import { OrderItem } from "../models/ordering/orderItem.model"; import { Payment } from "../models/user/payment.model"; import { Address } from "../models/user/address.model"; @@ -18,7 +18,7 @@ order.get("/:id", (req: Request, res: Response) => { model: OrderItem, include: [ { - model: Show, + model: Concert, include: [ Band, Location ], attributes: { exclude: [ @@ -50,7 +50,7 @@ order.post("/", (req: Request, res: Response) => { productId: orderItem.productId }) - Show.decrement( + Concert.decrement( "inStock", { by: orderItem.quantity, diff --git a/software/backend/routes/tour.routes.ts b/software/backend/routes/tour.routes.ts index 6601c99..87592c7 100644 --- a/software/backend/routes/tour.routes.ts +++ b/software/backend/routes/tour.routes.ts @@ -1,4 +1,4 @@ -import { Show } from "../models/acts/show.model"; +import { Concert } from "../models/acts/concert.model"; import { Band } from "../models/acts/band.model"; import { Tour } from "../models/acts/tour.model"; import { Request, Response, Router } from "express"; @@ -19,7 +19,7 @@ tour.get("/", (req: Request, res: Response) => { } }, { - model: Show, + model: Concert, include: [ { model: Location, diff --git a/software/backend/scripts/databaseHelper.ts b/software/backend/scripts/databaseHelper.ts index 99924f7..cc05efa 100644 --- a/software/backend/scripts/databaseHelper.ts +++ b/software/backend/scripts/databaseHelper.ts @@ -9,7 +9,7 @@ import { Member } from '../models/acts/member.model' import { Genre } from '../models/acts/genre.model' import { Band } from '../models/acts/band.model' import { Location } from '../models/acts/location.model' -import { Show } from '../models/acts/show.model' +import { Concert } from '../models/acts/concert.model' import { Tour } from '../models/acts/tour.model' import { City } from '../models/acts/city.model' import { BandGenre } from '../models/acts/bandGenre.model' @@ -36,7 +36,7 @@ export function deleteAllTables() { Genre.destroy({ truncate: true }) Band.destroy({ truncate: true }) Location.destroy({ truncate: true }) - Show.destroy({ truncate: true }) + Concert.destroy({ truncate: true }) Address.destroy({ truncate: true }) Payment.destroy({ truncate: true }) @@ -90,8 +90,8 @@ export async function prepopulateDatabase() { for (let tour of tours.data) { await Tour.create(tour) .then(async dataset => { - for (let show of tour.shows) { - await Show.create(show) + for (let concert of tour.concerts) { + await Concert.create(concert) } }) } diff --git a/software/backend/server.ts b/software/backend/server.ts index 2726d55..4de4f5c 100644 --- a/software/backend/server.ts +++ b/software/backend/server.ts @@ -5,7 +5,7 @@ import { api } from './routes/api.routes' import { startDatabase } from './database' import { order } from './routes/order.routes' import { account } from './routes/account.routes' -import { show } from './routes/show.routes' +import { concert } from './routes/concert.routes' import { band } from './routes/band.routes' import { genre } from './routes/genre.routes' import { location } from './routes/location.routes' @@ -35,7 +35,7 @@ app.use('/static', express.static(path.join(__dirname, 'images'))) // Routes app.use("/api", api) -app.use("/shows", show) +app.use("/shows", concert) app.use("/bands", band) app.use("/genres", genre) app.use("/locations", location) diff --git a/software/src/App.vue b/software/src/App.vue index a22c8cc..3577c3d 100644 --- a/software/src/App.vue +++ b/software/src/App.vue @@ -6,17 +6,17 @@ import navigationAppendItems from './components/navigation/navigationAppendItems import navigationPrependItems from './components/navigation/navigationPrependItems.vue'; import { usePreferencesStore } from './data/stores/preferencesStore'; import { useFeedbackStore } from './data/stores/feedbackStore'; -import { useShowStore } from './data/stores/showStore'; +import { useConcertStore } from './data/stores/concertStore'; const preferencesStore = usePreferencesStore() -const showStore = useShowStore() +const concertStore = useConcertStore() const feedbackStore = useFeedbackStore() const theme = useTheme() theme.global.name.value = preferencesStore.theme -showStore.fetchAllTours() +concertStore.fetchAllTours() // Global watcher watch(() => preferencesStore.language, () => { @@ -64,7 +64,7 @@ watch(() => preferencesStore.language, () => { - + diff --git a/software/src/components/cardWithLeftImage.vue b/software/src/components/cardWithLeftImage.vue new file mode 100644 index 0000000..833536e --- /dev/null +++ b/software/src/components/cardWithLeftImage.vue @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/software/src/components/cardWithTopImage.vue b/software/src/components/cardWithTopImage.vue index 8ed7f69..29618dc 100644 --- a/software/src/components/cardWithTopImage.vue +++ b/software/src/components/cardWithTopImage.vue @@ -1,7 +1,11 @@ @@ -17,9 +21,16 @@ defineProps({ cover /> - - {{ title }} - +
+ + {{ title }} + + + + {{ title }} + +
+
diff --git a/software/src/components/navigation/navigationPrependItems.vue b/software/src/components/navigation/navigationPrependItems.vue index d8beab4..5b40a60 100644 --- a/software/src/components/navigation/navigationPrependItems.vue +++ b/software/src/components/navigation/navigationPrependItems.vue @@ -10,12 +10,12 @@ - {{ $t('menu.allEvents', 2) }} + {{ $t('menu.allConcerts', 2) }} diff --git a/software/src/data/api/concertApi.ts b/software/src/data/api/concertApi.ts new file mode 100644 index 0000000..edda810 --- /dev/null +++ b/software/src/data/api/concertApi.ts @@ -0,0 +1,7 @@ +import axios from "axios" + +let BASE_URL = "http://localhost:3000/concerts" + +export async function getAllConcerts() { + return await axios.get(BASE_URL) +} \ No newline at end of file diff --git a/software/src/data/api/showApi.ts b/software/src/data/api/showApi.ts deleted file mode 100644 index 71f2a9c..0000000 --- a/software/src/data/api/showApi.ts +++ /dev/null @@ -1,7 +0,0 @@ -import axios from "axios" - -let BASE_URL = "http://localhost:3000/shows" - -export async function getAllShows() { - return await axios.get(BASE_URL) -} \ No newline at end of file diff --git a/software/src/data/models/bandModel.ts b/software/src/data/models/bandModel.ts index 2f29dbb..959e147 100644 --- a/software/src/data/models/bandModel.ts +++ b/software/src/data/models/bandModel.ts @@ -12,7 +12,7 @@ export class BandModel { logo: string ratings: Array members: Array - genre: { + genres: { name: string } } \ No newline at end of file diff --git a/software/src/data/models/basketItemModel.ts b/software/src/data/models/basketItemModel.ts index 0407b8a..3fc1f29 100644 --- a/software/src/data/models/basketItemModel.ts +++ b/software/src/data/models/basketItemModel.ts @@ -1,12 +1,12 @@ -import { ShowModel } from "./showModel" +import { ConcertModel } from "./concertModel" export class BasketItemModel { id: number = -1 quantity: number = 1 - product: ShowModel = new ShowModel() + concert: ConcertModel = new ConcertModel() - constructor(quantity: number, product: ShowModel) { + constructor(quantity: number, concert: ConcertModel) { this.quantity = quantity - this.product = product + this.concert = concert } } \ No newline at end of file diff --git a/software/src/data/models/showModel.ts b/software/src/data/models/concertModel.ts similarity index 83% rename from software/src/data/models/showModel.ts rename to software/src/data/models/concertModel.ts index d13e00a..8af6b8a 100644 --- a/software/src/data/models/showModel.ts +++ b/software/src/data/models/concertModel.ts @@ -1,6 +1,6 @@ import { LocationModel } from "./locationModel" -export class ShowModel { +export class ConcertModel { id: number inStock: number date: string diff --git a/software/src/data/models/orderItemModel.ts b/software/src/data/models/orderItemModel.ts index 6e55ed6..93e1183 100644 --- a/software/src/data/models/orderItemModel.ts +++ b/software/src/data/models/orderItemModel.ts @@ -1,8 +1,8 @@ -import { ShowModel } from "./showModel" +import { ConcertModel } from "./concertModel" export class OrderItemModel { orderId: number = -1 quantity: number = 1 orderPrice: number = 0 - product: ShowModel + product: ConcertModel } \ No newline at end of file diff --git a/software/src/data/models/ratingModel.ts b/software/src/data/models/ratingModel.ts index aafbd06..20e303d 100644 --- a/software/src/data/models/ratingModel.ts +++ b/software/src/data/models/ratingModel.ts @@ -1,4 +1,3 @@ -import { AccountModel } from "./accountModel" import { BandModel } from "./bandModel" export class RatingModel { diff --git a/software/src/data/models/tourModel.ts b/software/src/data/models/tourModel.ts index 830378b..1b8f2f5 100644 --- a/software/src/data/models/tourModel.ts +++ b/software/src/data/models/tourModel.ts @@ -1,10 +1,11 @@ import { BandModel } from "./bandModel" -import { ShowModel } from "./showModel" +import { ConcertModel } from "./concertModel" export class TourModel { id: number name: string offered: boolean band: BandModel - shows: Array + image: string + shows: Array } \ No newline at end of file diff --git a/software/src/data/stores/basketStore.ts b/software/src/data/stores/basketStore.ts index 08bb383..db17e70 100644 --- a/software/src/data/stores/basketStore.ts +++ b/software/src/data/stores/basketStore.ts @@ -5,7 +5,7 @@ import { useFeedbackStore } from "./feedbackStore"; import { BannerStateEnum } from "../enums/bannerStateEnum"; import { addOrder } from "../api/orderApi"; import { useAccountStore } from "./accountStore"; -import { ShowModel } from "../models/showModel"; +import { ConcertModel } from "../models/concertModel"; import { AddressModel } from "../models/addressModel"; import { PaymentModel } from "../models/paymentModel"; @@ -44,28 +44,28 @@ export const useBasketStore = defineStore('basketStore', { feedbackStore.changeBanner(BannerStateEnum.BASKETPRODUCTREMOVED) this.itemsInBasket = this.itemsInBasket.filter((basketItemModel: BasketItemModel) => - basketItemModel.product.id != item.product.id + basketItemModel.concert.id != item.concert.id ) }, /** * Add an item to the basket. If the product is already in the basket, the quantity will increase * - * @param show Show to add + * @param concert Concert to add * @param quantity Quantity of the product */ - addItemToBasket(show: ShowModel, quantity: number) { + addItemToBasket(concert: ConcertModel, quantity: number) { const feedbackStore = useFeedbackStore() feedbackStore.changeBanner(BannerStateEnum.BASKETPRODUCTADDED) // Product is already in the basket, increase number of items if (this.itemsInBasket.find((basketItem: BasketItemModel) => - basketItem.product.id == show.id)) + basketItem.concert.id == concert.id)) { this.itemsInBasket.find((basketItem: BasketItemModel) => - basketItem.product.id == show.id).quantity += quantity + basketItem.concert.id == concert.id).quantity += quantity } else { - this.itemsInBasket.push(new BasketItemModel(quantity, show)) + this.itemsInBasket.push(new BasketItemModel(quantity, concert)) } }, diff --git a/software/src/data/stores/showStore.ts b/software/src/data/stores/concertStore.ts similarity index 68% rename from software/src/data/stores/showStore.ts rename to software/src/data/stores/concertStore.ts index dd02826..58a282e 100644 --- a/software/src/data/stores/showStore.ts +++ b/software/src/data/stores/concertStore.ts @@ -11,13 +11,13 @@ import { getAllGenres } from "../api/genreApi"; import { CityModel } from "../models/cityModel"; import { getAllCities } from "../api/cityApi"; -export const useShowStore = defineStore("showStore", { +export const useConcertStore = defineStore("concertStore", { state: () => ({ - tours: useLocalStorage>("hackmycart/showStore/tours", []), - bands: useLocalStorage>("hackmycart/showStore/bands", []), - locations: useLocalStorage>("hackmycart/showStore/locations", []), - cities: useLocalStorage>("hackmycart/showStore/cities", []), - genres: useLocalStorage>("hackmycart/showStore/genres", []) + tours: useLocalStorage>("hackmycart/concertStore/tours", []), + bands: useLocalStorage>("hackmycart/concertStore/bands", []), + locations: useLocalStorage>("hackmycart/concertStore/locations", []), + cities: useLocalStorage>("hackmycart/concertStore/cities", []), + genres: useLocalStorage>("hackmycart/concertStore/genres", []) }), actions: { @@ -25,6 +25,10 @@ export const useShowStore = defineStore("showStore", { await getAllTours() .then(result => { this.tours = result.data + + this.tours.sort((a, b) => { + return new Date(a.shows[0].date) < new Date(b.shows[0].date) ? -1 : 1 + }) }) await getAllBands() diff --git a/software/src/data/stores/preferencesStore.ts b/software/src/data/stores/preferencesStore.ts index 1681380..91bf50d 100644 --- a/software/src/data/stores/preferencesStore.ts +++ b/software/src/data/stores/preferencesStore.ts @@ -5,7 +5,7 @@ import { LanguageEnum } from "../enums/languageEnum"; export const usePreferencesStore = defineStore('preferencesStore', { state: () => ({ - theme: useLocalStorage("hackmycart/preferencesStore/theme", ThemeEnum.DARKRED), + theme: useLocalStorage("hackmycart/preferencesStore/theme", ThemeEnum.DARKBLUE), language: useLocalStorage("hackmycart/preferencesStore/language", LanguageEnum.GERMAN) }), }) \ No newline at end of file diff --git a/software/src/locales/de.json b/software/src/locales/de.json index b473e95..255ffce 100644 --- a/software/src/locales/de.json +++ b/software/src/locales/de.json @@ -1,12 +1,13 @@ { "menu": { - "allEvents": "Alle Events", + "allConcerts": "Alle Konzerte", "allLocations": "Alle Veranstaltungsorte", "allBands": "Alle Bands" }, "shows": { + "highlights": "Highlights", "tickets": "Ticket | Tickets", - "topEvents": "Top Events", + "topConcerts": "Top Konzerte", "topBands": "Top Bands", "topLocations": "Top Veranstaltungsorte" }, diff --git a/software/src/locales/en.json b/software/src/locales/en.json index 12cb5b8..50c367f 100644 --- a/software/src/locales/en.json +++ b/software/src/locales/en.json @@ -1,12 +1,13 @@ { "menu": { - "allEvents": "All Events", + "allConcerts": "All Concerts", "allLocations": "All Locations", "allBands": "All Bands" }, "shows": { + "highlights": "Highlights", "tickets": "Ticket | Tickets", - "topEvents": "Top Events", + "topConcerts": "Top Concerts", "topBands": "Top Bands", "topLocations": "Top Locations" }, diff --git a/software/src/pages/basketPage/productsTable.vue b/software/src/pages/basketPage/productsTable.vue index 3684f80..a5b7634 100644 --- a/software/src/pages/basketPage/productsTable.vue +++ b/software/src/pages/basketPage/productsTable.vue @@ -30,18 +30,18 @@ function editQuantity(basketItem: BasketItemModel) { - - {{ basketItem.product.category.name }} + + {{ basketItem.concert.category.name }} - {{ basketItem.product.brand.name }} + {{ basketItem.concert.brand.name }} - {{ basketItem.product.name }} + {{ basketItem.concert.name }} @@ -73,18 +73,18 @@ function editQuantity(basketItem: BasketItemModel) { -
+
- {{ calcPrice(basketItem.product.price, basketItem.product.discount, basketItem.quantity) }} € + {{ calcPrice(basketItem.concert.price, basketItem.concert.discount, basketItem.quantity) }} €
- {{ calcPrice(basketItem.product.price, 0, basketItem.quantity) }} € + {{ calcPrice(basketItem.concert.price, 0, basketItem.quantity) }} €
- {{ calcPrice(basketItem.product.price, 0, basketItem.quantity) }} € + {{ calcPrice(basketItem.concert.price, 0, basketItem.quantity) }} €
diff --git a/software/src/pages/homePage/highlightCarousel.vue b/software/src/pages/homePage/highlightCarousel.vue index ddceaae..8a15fd9 100644 --- a/software/src/pages/homePage/highlightCarousel.vue +++ b/software/src/pages/homePage/highlightCarousel.vue @@ -1,8 +1,8 @@ diff --git a/software/src/pages/homePage/index.vue b/software/src/pages/homePage/index.vue index 24c46ae..a1b5a10 100644 --- a/software/src/pages/homePage/index.vue +++ b/software/src/pages/homePage/index.vue @@ -1,13 +1,13 @@ - - diff --git a/software/src/pages/shows/bandsPage/index.vue b/software/src/pages/shows/bandsPage/index.vue index a703dfa..98e67a6 100644 --- a/software/src/pages/shows/bandsPage/index.vue +++ b/software/src/pages/shows/bandsPage/index.vue @@ -1,15 +1,15 @@