fix: photo URLs (CDN_HOST), booking conflict excludes checked_out, sync label, context menu overflow

This commit is contained in:
2026-03-24 19:46:45 +03:00
parent 9a2e45b4c4
commit 0aaf26cbd1
3 changed files with 5 additions and 5 deletions

View File

@@ -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],
)