feat: add plannedTabs
This commit is contained in:
@@ -142,6 +142,13 @@ export class DevicesService {
|
||||
orderBy: { createdAt: 'asc' },
|
||||
});
|
||||
|
||||
// Fetch planned tab names for this venue
|
||||
const plannedTabs = await this.prisma.plannedTab.findMany({
|
||||
where: { venueId: device.venueId },
|
||||
orderBy: { position: 'asc' },
|
||||
select: { customerName: true },
|
||||
});
|
||||
|
||||
return {
|
||||
cursor,
|
||||
commands: commands.map((c) => ({
|
||||
@@ -153,6 +160,7 @@ export class DevicesService {
|
||||
requestedBy: c.requestedBy,
|
||||
createdAt: c.createdAt,
|
||||
})),
|
||||
plannedTabNames: plannedTabs.map((t) => t.customerName),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user