fix service type relation in list services
This commit is contained in:
@ -83,22 +83,22 @@ export class RoomServicesController {
|
||||
status: room.status,
|
||||
department: room.department
|
||||
? {
|
||||
id: room.department.id,
|
||||
name: room.department.name,
|
||||
}
|
||||
id: room.department.id,
|
||||
name: room.department.name,
|
||||
}
|
||||
: null,
|
||||
service_types,
|
||||
services: room.services
|
||||
? room.services.map((service) => ({
|
||||
id: service.id,
|
||||
name: service.name,
|
||||
service_type: service.serviceType
|
||||
? {
|
||||
id: service.serviceType.id,
|
||||
name: service.serviceType.name,
|
||||
}
|
||||
: null,
|
||||
}))
|
||||
id: service.id,
|
||||
name: service.name,
|
||||
service_type: service.serviceType
|
||||
? {
|
||||
id: service.serviceType.id,
|
||||
name: service.serviceType.name,
|
||||
}
|
||||
: null,
|
||||
}))
|
||||
: [],
|
||||
};
|
||||
});
|
||||
@ -177,7 +177,6 @@ export class RoomServicesController {
|
||||
"fareType.id",
|
||||
"fareType.name",
|
||||
])
|
||||
.leftJoin("Service.serviceType", "serviceType")
|
||||
.leftJoin("Service.rooms", "room")
|
||||
.leftJoin("room.serviceclass", "roomClass")
|
||||
.innerJoin("Service.servicefare", "serviceFare")
|
||||
|
||||
Reference in New Issue
Block a user