Expose invoice locale on public payloads and accept English name fields on create customer.
Public invoices need branding defaultLocale for RTL viewers; customer create aligns with the business add-customer form. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
73118f38d5
commit
49a9f0c289
@@ -286,6 +286,8 @@ export class CustomersService {
|
||||
email: dto.email,
|
||||
firstName: dto.firstName,
|
||||
lastName: dto.lastName,
|
||||
firstNameEn: dto.firstNameEn?.trim() || null,
|
||||
lastNameEn: dto.lastNameEn?.trim() || null,
|
||||
cellVerifiedAt: new Date(),
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -26,6 +26,16 @@ export class CreateCustomerDto {
|
||||
@MinLength(2)
|
||||
lastName!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(2)
|
||||
firstNameEn?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(2)
|
||||
lastNameEn?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
|
||||
Reference in New Issue
Block a user