fix(appointment): resolve issue with reserved slots incorrectly shown as available
This commit is contained in:
@@ -52,6 +52,22 @@ class Appointment
|
||||
self::STATUS_CONFIRMED,
|
||||
];
|
||||
|
||||
/**
|
||||
* Statuses that make a slot unavailable for a *new* booking, as seen by the
|
||||
* public availability view (AppointmentRepository::isSlotTaken). Broader than
|
||||
* SLOT_OCCUPYING_STATUSES: besides a live booking, a slot is also spoken for
|
||||
* once the visit has been consumed (completed / in-progress / no_show). Only
|
||||
* cancelled_* and expired truly release it. STATUS_PENDING is handled
|
||||
* separately in the query because it blocks only while not yet expired.
|
||||
*/
|
||||
public const SLOT_BLOCKING_STATUSES = [
|
||||
self::STATUS_CONFIRMED,
|
||||
self::STATUS_COMPLETED,
|
||||
self::STATUS_FOLLOWING_UP,
|
||||
self::STATUS_SALON,
|
||||
self::STATUS_NO_SHOW,
|
||||
];
|
||||
|
||||
// Optimistic locking
|
||||
#[ORM\Version]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
|
||||
Reference in New Issue
Block a user