feat(web): add price range filter and list view to /du-an page

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>
This commit is contained in:
Ho Ngoc Hai
2026-04-16 17:40:30 +07:00
parent a6e53e3d06
commit f3a2a012c4
8 changed files with 340 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
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[];
}