mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 17:08:18 +00:00
Merge pull request #887 from Tria-plc/alpha
Blocked seats report updates
This commit is contained in:
@@ -496,10 +496,14 @@ export class ReportsService {
|
|||||||
orderBy: { expiresAt: 'desc' },
|
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({
|
const blocks = await this.prisma.seatBlock.findMany({
|
||||||
where: {
|
where: {
|
||||||
scheduleId,
|
OR: [
|
||||||
|
{ scheduleId },
|
||||||
|
{ scheduleId: null },
|
||||||
|
],
|
||||||
NOT: [
|
NOT: [
|
||||||
{ reason: { startsWith: 'MAINTENANCE:' } },
|
{ reason: { startsWith: 'MAINTENANCE:' } },
|
||||||
{ blockedBy: 'system' },
|
{ blockedBy: 'system' },
|
||||||
|
|||||||
Reference in New Issue
Block a user