menu header und leere reihen
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
<app-menu-header label="Kinosaal-Designer" icon="design_services"></app-menu-header>
|
||||||
|
|
||||||
@if(getHallId() >= 0) {
|
@if(getHallId() >= 0) {
|
||||||
<div
|
<div
|
||||||
class="m-auto w-200 h-10 bg-gray-200 mb-22 cursor-pointer"
|
class="m-auto w-200 h-10 bg-gray-200 mb-22 cursor-pointer"
|
||||||
|
|||||||
@@ -73,6 +73,19 @@ export class TheaterLayoutDesignerComponent implements OnInit {
|
|||||||
state: TheaterSeatState.AVAILABLE,
|
state: TheaterSeatState.AVAILABLE,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
this.addRow.splice(0, 0, {
|
||||||
|
seat: {
|
||||||
|
id: -2,
|
||||||
|
position: 1,
|
||||||
|
row: {
|
||||||
|
id: -1,
|
||||||
|
hall: { id: hallId } as Kinosaal,
|
||||||
|
category: { id: -1, name: '', price: -1, icon: 'check_box_outline_blank' },
|
||||||
|
position: -1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
state: TheaterSeatState.AVAILABLE,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
seatsPerRow() {
|
seatsPerRow() {
|
||||||
@@ -134,7 +147,11 @@ export class TheaterLayoutDesignerComponent implements OnInit {
|
|||||||
state: TheaterSeatState.RESERVED,
|
state: TheaterSeatState.RESERVED,
|
||||||
};
|
};
|
||||||
firstSeat.seat!.row.position = rows.length + 1;
|
firstSeat.seat!.row.position = rows.length + 1;
|
||||||
|
if (selectedSeat.row.id == -1) {
|
||||||
|
rows.push([{ seat: null, state: null }]);
|
||||||
|
} else {
|
||||||
rows.push([firstSeat]);
|
rows.push([firstSeat]);
|
||||||
|
}
|
||||||
TheaterLayoutDesignerComponent.fillRowWithSettings(rows.length - 1, rows[rows.length - 1]);
|
TheaterLayoutDesignerComponent.fillRowWithSettings(rows.length - 1, rows[rows.length - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,7 +170,7 @@ export class TheaterLayoutDesignerComponent implements OnInit {
|
|||||||
for (let row of TheaterLayoutDesignerComponent.seatsPerRow) {
|
for (let row of TheaterLayoutDesignerComponent.seatsPerRow) {
|
||||||
let seatRow;
|
let seatRow;
|
||||||
if (!row[0].seat) {
|
if (!row[0].seat) {
|
||||||
return;
|
continue;
|
||||||
} else if (row[0].seat.row.id == 0) {
|
} else if (row[0].seat.row.id == 0) {
|
||||||
seatRow = await firstValueFrom(this.http.createSeatRow(row[0].seat.row));
|
seatRow = await firstValueFrom(this.http.createSeatRow(row[0].seat.row));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user