mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 04:50:54 +00:00
Enhance contract and booking request handling
This commit is contained in:
@@ -34,7 +34,17 @@ export class BookingRequestRepository extends BaseRepository<BookingRequest> {
|
||||
async findById(id: string): Promise<BookingRequest | null> {
|
||||
return this.repository.findOne({
|
||||
where: { id },
|
||||
relations: { contract: true },
|
||||
// Load the contract with the bits the detail page surfaces: customer
|
||||
// (company), service type (mile/customs flags), routes (with yard labels)
|
||||
// and cargo scope.
|
||||
relations: {
|
||||
contract: {
|
||||
company: true,
|
||||
serviceType: true,
|
||||
routes: { originYard: true, destinationYard: true },
|
||||
cargoScope: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user