fix: allow booking the free part of a partly booked day

This commit is contained in:
fromme committed 2026-09-13 19:11:51 +02:00
1 parent a88ff7ff24
commit 78839838f0
15 files changed
+541 -60

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Booking;
/**
* How one resource looks on the floor plan, for the day and span the board is showing.
*
* PARTLY exists because of a real bug: with only "free" and "taken", a desk booked 09:00-13:00
* looked identical to one booked all day on an all-day board, and was equally unclickable -- so
* nobody could book the afternoon without first knowing to narrow the span by hand.
*/
enum SpotState
{
case FREE;
case PARTLY;
case TAKEN;
case MINE;
public function isBookable(): bool
{
return self::FREE === $this || self::PARTLY === $this;
}
}