Production checklists, issue fixes

This commit is contained in:
Stephanos A
2026-07-01 15:04:38 +03:00
parent 0015f645cf
commit 103117d88b
20 changed files with 100 additions and 200 deletions

View File

@@ -6,12 +6,16 @@ export class SeatClassesService {
constructor(private prisma: PrismaService) {}
listSeatClasses() {
return this.prisma.seatClass.findMany({ orderBy: { createdAt: 'asc' } });
return this.prisma.seatClass.findMany({
where: { isActive: true },
orderBy: { createdAt: 'asc' },
});
}
async getSeatClass(id: string) {
const sc = await this.prisma.seatClass.findUnique({ where: { id } });
if (!sc) throw new NotFoundException('SeatClass not found');
if (!sc.isActive) throw new NotFoundException('SeatClass is not active');
return sc;
}