mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 22:30:55 +00:00
fix: block the user from booking if not approved
This commit is contained in:
@@ -361,6 +361,17 @@ export class BookingsService {
|
||||
tradeDirection,
|
||||
fallbackType,
|
||||
);
|
||||
|
||||
// A customer booking under their own account may only do so once the
|
||||
// resolved operational profile has been approved by the backoffice. Staff-
|
||||
// and government-initiated bookings (companyId supplied explicitly) bypass
|
||||
// this gate.
|
||||
const customerSelfBooking = !dto.companyId && !!userId;
|
||||
if (customerSelfBooking && companyProfileId) {
|
||||
await this.companiesService.assertCompanyProfileApprovedForBooking(
|
||||
companyProfileId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const allowConsolidation =
|
||||
|
||||
Reference in New Issue
Block a user