Tickets moveable to basket, Basket shows tickets, removable

This commit is contained in:
2024-10-05 20:23:13 +02:00
parent e48782b897
commit d1cdf1f8fb
21 changed files with 301 additions and 334 deletions

View File

@@ -1,9 +1,24 @@
import { LocationModel } from "./../locations/locationModel"
import { BandModel } from "./bandModel"
import { EventModel } from "./eventModel"
export class ConcertModel {
id: number
inStock: number
date: string
price: number
location: LocationModel
id: number = 0
inStock: number = 0
date: string = ""
price: number = 0
location: LocationModel = new LocationModel()
event: {
id: number
name: string
offered: boolean
image: string
band: BandModel
} = {
id: 0,
name: "",
offered: true,
image: "",
band: new BandModel()
}
}

View File

@@ -1,12 +1,14 @@
import { ConcertModel } from "../acts/concertModel"
import { SeatModel } from "../locations/seatModel"
export class BasketItemModel {
id: number = -1
quantity: number = 1
concert: ConcertModel = new ConcertModel()
seats: Array<SeatModel> = []
price: number
constructor(quantity: number, concert: ConcertModel) {
this.quantity = quantity
constructor(concert: ConcertModel, seat: SeatModel, price: number) {
this.concert = concert
this.seats = [ seat ]
this.price = price
}
}

View File

@@ -1,14 +1,17 @@
import { ConcertModel } from "../acts/concertModel";
import { SeatModel } from "../locations/seatModel";
import { SeatRowModel } from "../locations/seatRowModel";
export class SelectedSeatModel {
seat: SeatModel
seatRow: number
seatGroupName: string
concert: ConcertModel
price: number
constructor(seat: SeatModel, seatRow: number, seatGroupName: string) {
constructor(seat: SeatModel, seatRow: number, seatGroupName: string, concert: ConcertModel) {
this.seat = seat
this.seatRow = seatRow
this.seatGroupName = seatGroupName
this.concert = concert
}
}