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