mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Blocked seats report updates
This commit is contained in:
@@ -496,10 +496,14 @@ export class ReportsService {
|
||||
orderBy: { expiresAt: 'desc' },
|
||||
});
|
||||
|
||||
// Manually blocked seats from back office — exclude MAINTENANCE and system-created blocks
|
||||
// Manually blocked seats — schedule-scoped blocks for this schedule OR global blocks (scheduleId null)
|
||||
// Exclude MAINTENANCE and booking-system-created blocks
|
||||
const blocks = await this.prisma.seatBlock.findMany({
|
||||
where: {
|
||||
scheduleId,
|
||||
OR: [
|
||||
{ scheduleId },
|
||||
{ scheduleId: null },
|
||||
],
|
||||
NOT: [
|
||||
{ reason: { startsWith: 'MAINTENANCE:' } },
|
||||
{ blockedBy: 'system' },
|
||||
|
||||
Reference in New Issue
Block a user