fixing room services

This commit is contained in:
avicenan
2026-03-13 09:51:50 +07:00
parent a930c29e7f
commit c0fc0b9177

View File

@ -18,7 +18,8 @@ export class RoomServicesModel {
let query = repo.createQueryBuilder("Service") let query = repo.createQueryBuilder("Service")
.leftJoinAndSelect("Service.rooms", "Room") .leftJoinAndSelect("Service.rooms", "Room")
.leftJoinAndSelect("Room.department", "Department"); .leftJoinAndSelect("Room.department", "Department")
.leftJoinAndSelect("Service.serviceType", "ServiceType");
if (whereAttr.length != 0) { if (whereAttr.length != 0) {
query = query.where(whereAttr.join(" and "), whereVal); query = query.where(whereAttr.join(" and "), whereVal);
@ -44,7 +45,8 @@ export class RoomServicesModel {
let query = repo.createQueryBuilder("Room") let query = repo.createQueryBuilder("Room")
.leftJoinAndSelect("Room.services", "Service") .leftJoinAndSelect("Room.services", "Service")
.leftJoinAndSelect("Room.department", "Department"); .leftJoinAndSelect("Room.department", "Department")
.leftJoinAndSelect("Service.serviceType", "ServiceType");
if (whereAttr.length != 0) { if (whereAttr.length != 0) {
query = query.where(whereAttr.join(" and "), whereVal); query = query.where(whereAttr.join(" and "), whereVal);