feat(listings-frontend): add create/edit form, detail page, and listing components

- Multi-step wizard for listing creation (basic info, location, details, pricing, images)
- Listing detail page with image gallery, property specs, seller/agent info, stats
- Listings index page with filters (transaction type, property type) and pagination
- Edit page with tab-based form (read-only until backend PATCH endpoint available)
- Drag & drop image upload component with preview and multi-file support
- Dashboard layout with navigation bar
- New UI primitives: textarea, select, badge, tabs
- Listings API client with typed endpoints matching backend contract
- Zod validation schemas for all form steps
- Status badges with Vietnamese labels for all listing states
- Responsive design across all pages

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 01:54:08 +07:00
parent 8a33aae026
commit 207a2013f3
18 changed files with 1834 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
import { Badge } from '@/components/ui/badge';
import { LISTING_STATUSES } from '@/lib/validations/listings';
import type { ListingStatus } from '@/lib/listings-api';
interface ListingStatusBadgeProps {
status: ListingStatus;
}
export function ListingStatusBadge({ status }: ListingStatusBadgeProps) {
const config = LISTING_STATUSES[status] ?? { label: status, variant: 'outline' as const };
return <Badge variant={config.variant}>{config.label}</Badge>;
}