diff --git a/software/backend/data/orders.json b/software/backend/data/orders.json index 3b76df9..5a20fa4 100644 --- a/software/backend/data/orders.json +++ b/software/backend/data/orders.json @@ -23,11 +23,13 @@ "tickets": [ { "concertId": 0, - "orderPrice": 184 + "orderPrice": 184, + "seatId": 2 }, { "concertId": 0, - "orderPrice": 184 + "orderPrice": 184, + "seatId": 3 } ] }, @@ -40,7 +42,8 @@ "tickets": [ { "concertId": 0, - "orderPrice": 184 + "orderPrice": 184, + "seatId": 3 } ] } diff --git a/software/backend/models/ordering/ticket.model.ts b/software/backend/models/ordering/ticket.model.ts index 6ae9b60..c9ecb86 100644 --- a/software/backend/models/ordering/ticket.model.ts +++ b/software/backend/models/ordering/ticket.model.ts @@ -26,7 +26,7 @@ export class Ticket extends Model { order: Order @BelongsTo(() => Concert) - product: Concert + concert: Concert @BelongsTo(() => Seat) seat: Seat diff --git a/software/backend/routes/order.routes.ts b/software/backend/routes/order.routes.ts index aa9fa8f..da88f85 100644 --- a/software/backend/routes/order.routes.ts +++ b/software/backend/routes/order.routes.ts @@ -7,6 +7,10 @@ import { Address } from "../models/user/address.model"; import { Band } from "../models/acts/band.model"; import { Location } from "../models/locations/location.model"; import { Event } from "../models/acts/event.model"; +import { City } from "../models/locations/city.model"; +import { Seat } from "../models/locations/seat.model"; +import { SeatRow } from "../models/locations/seatRow.model"; +import { SeatGroup } from "../models/locations/seatGroup.model"; export const order = Router() @@ -25,7 +29,10 @@ order.get("/:id", (req: Request, res: Response) => { model: Event, include: [ Band ] }, - Location + { + model: Location, + include: [ City ] + } ], attributes: { exclude: [ @@ -34,6 +41,15 @@ order.get("/:id", (req: Request, res: Response) => { ] } }, + { + model: Seat, + include: [ + { + model: SeatRow, + include: [ SeatGroup ] + } + ] + } ] }, Payment, diff --git a/software/src/components/actionDialog.vue b/software/src/components/basics/actionDialog.vue similarity index 93% rename from software/src/components/actionDialog.vue rename to software/src/components/basics/actionDialog.vue index 5139820..d607cfa 100644 --- a/software/src/components/actionDialog.vue +++ b/software/src/components/basics/actionDialog.vue @@ -1,6 +1,5 @@ + + \ No newline at end of file diff --git a/software/src/components/cardWithTopImage.vue b/software/src/components/basics/cardViewTopImage.vue similarity index 100% rename from software/src/components/cardWithTopImage.vue rename to software/src/components/basics/cardViewTopImage.vue diff --git a/software/src/components/confirmDialog.vue b/software/src/components/basics/confirmDialog.vue similarity index 88% rename from software/src/components/confirmDialog.vue rename to software/src/components/basics/confirmDialog.vue index 5cc7707..76e8606 100644 --- a/software/src/components/confirmDialog.vue +++ b/software/src/components/basics/confirmDialog.vue @@ -1,7 +1,7 @@