Load Seat-Icons from DB
Replaces multiple conditional blocks for seat icons with a single interpolation using the category's icon property, simplifying the seat component template.
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
<button (click)="updateSelectedSeats(this.seat())" [disabled]="state() == TheaterSeatState.BOOKED || state() == TheaterSeatState.RESERVED || !seatService.getSeatIsSelected()" class="mx-1 hover:opacity-50">
|
||||
<mat-icon [ngStyle]="{color: isSelectedAndAvaliable() ? '#6366f1': getSeatStateColor() }" style="font-size: 30px; width: 30px; height: 30px">
|
||||
@if(this.seat().row.category.id ==1){
|
||||
event_seat
|
||||
}
|
||||
@if(this.seat().row.category.id == 2){
|
||||
weekend
|
||||
}
|
||||
@if(this.seat().row.category.id == 3){
|
||||
chair
|
||||
}
|
||||
{{ seat().row.category.icon }}
|
||||
</mat-icon>
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user