Add minPrice/maxPrice inputs to ProjectFilterBar and introduce a list view mode alongside the existing grid/map toggle for project browsing. Co-Authored-By: Paperclip <noreply@paperclip.ing>
20 lines
587 B
TypeScript
20 lines
587 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Transform } from 'class-transformer';
|
|
import { ArrayMaxSize, ArrayMinSize, IsArray, IsString } from 'class-validator';
|
|
|
|
export class AvmCompareQueryDto {
|
|
@ApiProperty({
|
|
description: 'Comma-separated property IDs to compare (2-5)',
|
|
example: 'prop-1,prop-2,prop-3',
|
|
type: String,
|
|
})
|
|
@Transform(({ value }) =>
|
|
typeof value === 'string' ? value.split(',').map((s: string) => s.trim()).filter(Boolean) : value,
|
|
)
|
|
@IsArray()
|
|
@ArrayMinSize(2)
|
|
@ArrayMaxSize(5)
|
|
@IsString({ each: true })
|
|
ids!: string[];
|
|
}
|