changed selected color to indigo-500
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<button (click)="updateSelectedSeats(this.seat())" [disabled]="state() == TheaterSeatState.BOOKED || state() == TheaterSeatState.RESERVED || !seatService.getSeatIsSelected()" 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">
|
<mat-icon [ngStyle]="{color: isSelectedAndAvaliable() ? '#6366f1': getSeatStateColor() }" style="font-size: 30px; width: 30px; height: 30px">
|
||||||
@if(this.seat().row.category.id ==1){
|
@if(this.seat().row.category.id ==1){
|
||||||
event_seat
|
event_seat
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {Component, inject, input, OnInit, output} from '@angular/core';
|
import {Component, inject, input} from '@angular/core';
|
||||||
import {TheaterSeatState} from '../model/theater-seat-state.model';
|
import {TheaterSeatState} from '../model/theater-seat-state.model';
|
||||||
import {Sitzkategorie, Sitzplatz} from '@infinimotion/model-frontend';
|
import {Sitzplatz} from '@infinimotion/model-frontend';
|
||||||
import {SelectedSeatsService} from '../selected-seats.service';
|
import {SelectedSeatsService} from '../selected-seats.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -16,8 +16,9 @@ export class SeatComponent{
|
|||||||
selected: boolean = false;
|
selected: boolean = false;
|
||||||
|
|
||||||
protected seatService = inject(SelectedSeatsService)
|
protected seatService = inject(SelectedSeatsService)
|
||||||
|
protected readonly TheaterSeatState = TheaterSeatState;
|
||||||
|
|
||||||
getSeatStateColor(): any {
|
getSeatStateColor(): string {
|
||||||
switch (this.state()) {
|
switch (this.state()) {
|
||||||
case TheaterSeatState.RESERVED:
|
case TheaterSeatState.RESERVED:
|
||||||
return 'orange';
|
return 'orange';
|
||||||
@@ -40,5 +41,7 @@ export class SeatComponent{
|
|||||||
//console.log(this.selected)
|
//console.log(this.selected)
|
||||||
}
|
}
|
||||||
|
|
||||||
protected readonly TheaterSeatState = TheaterSeatState;
|
isSelectedAndAvaliable(): boolean {
|
||||||
|
return this.selected && this.state() == TheaterSeatState.AVAILABLE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user