diff --git a/src/app/seat/seat.component.html b/src/app/seat/seat.component.html index 796b6c3..d30cfe3 100644 --- a/src/app/seat/seat.component.html +++ b/src/app/seat/seat.component.html @@ -1,4 +1,4 @@ - + @if(this.seat().row.category.id ==1){ event_seat diff --git a/src/app/seat/seat.component.ts b/src/app/seat/seat.component.ts index c29ae94..a81081a 100644 --- a/src/app/seat/seat.component.ts +++ b/src/app/seat/seat.component.ts @@ -15,7 +15,7 @@ export class SeatComponent{ selected: boolean = false; - private seatService = inject(SelectedSeatsService) + protected seatService = inject(SelectedSeatsService) getSeatStateColor(): any { switch (this.state()) { diff --git a/src/app/selected-seats.service.ts b/src/app/selected-seats.service.ts index f92333f..b3d5c45 100644 --- a/src/app/selected-seats.service.ts +++ b/src/app/selected-seats.service.ts @@ -6,6 +6,7 @@ import {Sitzplatz} from '@infinimotion/model-frontend'; }) export class SelectedSeatsService { private selectedSeatsList: Sitzplatz[] = []; + private seatIsSelectable: boolean = true; pushSelectedSeat(selectedSeat: Sitzplatz): void { this.selectedSeatsList.push(selectedSeat); @@ -35,4 +36,16 @@ export class SelectedSeatsService { //} } + getSeatIsSelected(): boolean{ + return this.seatIsSelectable; + } + + setSeatIsSelectableTrue(): void { + this.seatIsSelectable = true; + } + + setSeatIsSelectableFalse(): void { + this.seatIsSelectable = false; + } + }