feat(web): add auth+search i18n translations and filter-bar accessibility

Add missing auth and search translation namespaces to vi.json and en.json
that are required by login/register pages and search filter-bar component.
Update filter-bar with useTranslations('search'), aria-labels, and
role="search" for WCAG 2.1 AA compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 10:22:59 +07:00
parent 8179f1c16e
commit 862078df37
21 changed files with 213 additions and 83 deletions

View File

@@ -94,7 +94,7 @@ describe('PrismaPriceValidator', () => {
const result = await validator.validate({
priceVND: 5_000_000_000n,
areaM2: 80,
propertyType: 'HOUSE',
propertyType: 'TOWNHOUSE',
district: 'Quận 1',
});

View File

@@ -1,3 +1,4 @@
import { type ListingStatus } from '@prisma/client';
import { type ListingEntity } from '../entities/listing.entity';
export interface ModerationAction {
@@ -29,7 +30,7 @@ export class ModerationService {
*/
applyStatusTransition(
listing: ListingEntity,
newStatus: string,
newStatus: ListingStatus,
moderationNotes?: string,
): void {
if (newStatus === 'REJECTED' && moderationNotes) {

View File

@@ -13,7 +13,7 @@ import {
*/
const DEFAULT_RANGES: Record<PropertyType, { min: number; max: number }> = {
APARTMENT: { min: 15_000_000, max: 200_000_000 },
HOUSE: { min: 20_000_000, max: 500_000_000 },
TOWNHOUSE: { min: 20_000_000, max: 500_000_000 },
VILLA: { min: 50_000_000, max: 1_000_000_000 },
LAND: { min: 5_000_000, max: 800_000_000 },
OFFICE: { min: 10_000_000, max: 300_000_000 },
@@ -108,8 +108,8 @@ export class PrismaPriceValidator implements IPriceValidator {
AND l."createdAt" > NOW() - INTERVAL '6 months'
`;
if (rows.length > 0 && rows[0].min_price && rows[0].max_price) {
return { min: rows[0].min_price, max: rows[0].max_price };
if (rows.length > 0 && rows[0]!.min_price && rows[0]!.max_price) {
return { min: rows[0]!.min_price, max: rows[0]!.max_price };
}
return null;
} catch (err) {