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:
@@ -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',
|
||||
});
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user