task(B5): seat counting by row and block

This commit is contained in:
Agent Zero
2026-08-26 20:53:42 +02:00
parent d93ee5308c
commit 7f4768c205
2 changed files with 96 additions and 2 deletions
+12 -2
View File
@@ -352,8 +352,18 @@ export class SeatingService {
return [];
}
/** Count seats in a list of elements */
countSeats(elements: CADElement[]): { total: number; byRow: Record<string, number>; byBlock: Record<string, number> } {
/**
* Zählt Sitzplätze gruppiert nach Reihe und Block.
* byRow enthält Reihen aus freien Reihen UND Block-Reihen (seit BUG-1-Fix
* tragen Block-Stühle pro Reihe eine eigene rowId).
*/
countSeats(elements: CADElement[]): {
total: number;
byRow: Record<string, number>;
byBlock: Record<string, number>;
/** Platzhalter für künftige Zonen-Gruppierung (aktuell immer leer). */
byZone?: Record<string, number>;
} {
let total = 0;
const byRow: Record<string, number> = {};
const byBlock: Record<string, number> = {};