dynamic contract templates and companyId on bookings

This commit is contained in:
marshal
2026-06-04 16:53:14 +03:00
parent 324935a334
commit 8fea963ddb
26 changed files with 724 additions and 181 deletions

View File

@@ -61,10 +61,15 @@ export class CreateBookingDto {
@Transform(({ value }) => (typeof value === 'string' ? value.trim() : value))
reference?: string;
@ApiPropertyOptional({ format: 'uuid', description: 'Admin only: target customer' })
// @ApiPropertyOptional({ format: 'uuid', description: 'Admin only: target customer (legacy)' })
// @IsOptional()
// @IsUUID()
// customerId?: string;
@ApiPropertyOptional({ format: 'uuid', description: 'Admin only: target company' })
@IsOptional()
@IsUUID()
customerId?: string;
companyId?: string;
@ApiPropertyOptional({ format: 'uuid' })
@IsOptional()

View File

@@ -14,10 +14,15 @@ export class FilterBookingDto {
@IsIn([...BOOKING_STATUSES])
status?: string;
// @ApiPropertyOptional({ format: 'uuid' })
// @IsOptional()
// @IsUUID()
// customerId?: string;
@ApiPropertyOptional({ format: 'uuid' })
@IsOptional()
@IsUUID()
customerId?: string;
companyId?: string;
@ApiPropertyOptional()
@IsOptional()