seats are now selectable. returns list of selected seats. colors might not work anymore. 😢😢

This commit is contained in:
Marcel-Anker
2025-11-12 19:33:28 +01:00
parent 5699f23540
commit c0f022e65c
6 changed files with 1687 additions and 386 deletions

View File

@@ -0,0 +1,30 @@
import {Injectable} from '@angular/core';
import {Sitzplatz} from '@infinimotion/model-frontend';
@Injectable({
providedIn: 'root',
})
export class SelectedSeatsService {
private selectedSeatsList: Sitzplatz[] = [];
pushSelectedSeat(selectedSeat: Sitzplatz): void {
this.selectedSeatsList.push(selectedSeat);
//console.log("Added" + selectedSeat);
//console.log(this.selectedSeatsList);
}
removeSelectedSeat(selectedSeat: Sitzplatz): void {
let removeId = this.selectedSeatsList.indexOf(selectedSeat);
if(removeId !== -1) {
this.selectedSeatsList.splice(removeId, 1)
}
//console.log("Removed" + selectedSeat)
//console.log(this.selectedSeatsList);
}
getSelectedSeatsList(): Sitzplatz[] {
return this.selectedSeatsList;
}
}