special case: theater in march '26

This commit is contained in:
2025-10-01 21:36:00 +02:00
parent 447ae6d97d
commit 49fa19ed1e
17 changed files with 72 additions and 23 deletions

View File

@@ -61,7 +61,8 @@ class EventStoreController {
if($this->isSomeKindOfReservation($newEvent)){
$reservationType = $newEvent->reservation()->first()->name;
if($reservationType == "Mit Tischwahl"){
$dates = array('2025-06-20', '2025-06-21', '2025-06-27', '2025-06-28', '2025-07-04', '2025-07-05', '2025-07-06', '2025-07-11', '2025-07-12', '2025-07-18', '2025-07-19', '2025-07-20' );
$dates = array('2026-03-13','2026-03-14','2026-03-15','2026-03-18','2026-03-19');
//$dates = array('2025-12-21');
//$dates = array($this->request["start_date"]);
$newEvent->start_date = $dates[0];
@@ -160,26 +161,42 @@ class EventStoreController {
private function updateSeatMapWithTables($seat)
{
for($x = 1; $x <= 13; $x ++){
$cols = 16;
if ($x >= 12) {
$cols = 10;
}else if($x >= 11) {
$cols = 12;
}
for($x = 9; $x <= 13; $x ++){
$cols = 20;
for($y = 1; $y <= $cols; $y++){
$s = new SingleSeat;
$s->x = $x;
$s->y = $y;
if($x <= 5){
$s->category = 'b';
} else{
$s->category = 'a';
}
$s->seat()->associate($seat);
$s->save();
}
}
// start sommertheater
// for($x = 1; $x <= 13; $x ++){
// $cols = 16;
// if ($x >= 12) {
// $cols = 10;
// }else if($x >= 11) {
// $cols = 12;
// }
// for($y = 1; $y <= $cols; $y++){
// $s = new SingleSeat;
// $s->x = $x;
// $s->y = $y;
// if($x <= 5){
// $s->category = 'b';
// } else{
// $s->category = 'a';
// }
// $s->seat()->associate($seat);
// $s->save();
// }
// }
}
}