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:
Alireza Hassani
2026-08-11 15:46:18 +03:30
co-authored by Cursor
parent 73118f38d5
commit 49a9f0c289
3 changed files with 30 additions and 1 deletions
+2
View File
@@ -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(),
},
}));
+10
View File
@@ -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;