add seatIsSelected to SelectedSeatService, so seats cannot be interacted with while cooking/reservation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<button (click)="updateSelectedSeats(this.seat())" [disabled]="state() == TheaterSeatState.BOOKED || state() == TheaterSeatState.RESERVED" class="mx-1 hover:opacity-50">
|
||||
<button (click)="updateSelectedSeats(this.seat())" [disabled]="state() == TheaterSeatState.BOOKED || state() == TheaterSeatState.RESERVED || !seatService.getSeatIsSelected()" class="mx-1 hover:opacity-50">
|
||||
<mat-icon [ngStyle]="{'opacity': selected ? '0.5' : '1', color: getSeatStateColor() }" style="font-size: 30px; width: 30px; height: 30px">
|
||||
@if(this.seat().row.category.id ==1){
|
||||
event_seat
|
||||
|
||||
@@ -15,7 +15,7 @@ export class SeatComponent{
|
||||
|
||||
selected: boolean = false;
|
||||
|
||||
private seatService = inject(SelectedSeatsService)
|
||||
protected seatService = inject(SelectedSeatsService)
|
||||
|
||||
getSeatStateColor(): any {
|
||||
switch (this.state()) {
|
||||
|
||||
Reference in New Issue
Block a user