fix: photo URLs (CDN_HOST), booking conflict excludes checked_out, sync label, context menu overflow
This commit is contained in:
@@ -82,11 +82,11 @@ const bookings: FastifyPluginAsync = async (fastify) => {
|
||||
status = 'confirmed', source = 'direct', total_amount, paid_amount = 0, notes,
|
||||
} = request.body
|
||||
|
||||
// Check for conflicts
|
||||
// Check for conflicts (checked_out = early departure, doesn't block new booking)
|
||||
const { rows: conflicts } = await db.query(
|
||||
`SELECT id FROM bookings
|
||||
WHERE room_id = $1
|
||||
AND status NOT IN ('cancelled','no_show')
|
||||
AND status NOT IN ('cancelled','no_show','checked_out')
|
||||
AND check_in < $2 AND check_out > $3`,
|
||||
[room_id, check_out, check_in],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user