Merge branch 'waiting-list' into feat/neoleap-integration

This commit is contained in:
Abdalhamid Alhamad
2025-05-21 09:59:18 +03:00
13 changed files with 140 additions and 132 deletions
@@ -29,17 +29,6 @@ export class CustomerRepository {
firstName: body.firstName,
lastName: body.lastName,
dateOfBirth: body.dateOfBirth,
gender: body.gender,
countryOfResidence: body.countryOfResidence,
nationalId: body.nationalId,
nationalIdExpiry: body.nationalIdExpiry,
sourceOfIncome: body.sourceOfIncome,
profession: body.profession,
professionType: body.professionType,
isPep: body.isPep,
profilePictureId: body.profilePictureId,
civilIdFrontId: body.civilIdFrontId,
civilIdBackId: body.civilIdBackId,
}),
);
}
+2 -2
View File
@@ -89,13 +89,13 @@ export class CustomerService {
}
@Transactional()
async createGuardianCustomer(userId: string, body: CreateCustomerRequestDto) {
async createGuardianCustomer(userId: string, body: Partial<CreateCustomerRequestDto>) {
this.logger.log(`Creating guardian customer for user ${userId}`);
const existingCustomer = await this.customerRepository.findOne({ id: userId });
if (existingCustomer) {
this.logger.error(`Customer ${userId} already exists`);
throw new BadRequestException('CUSTOMER.ALRADY_EXISTS');
throw new BadRequestException('CUSTOMER.ALREADY_EXISTS');
}
// await this.validateCivilIdForCustomer(userId, body.civilIdFrontId, body.civilIdBackId);