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:
12
apps/web/components/listings/listing-status-badge.tsx
Normal file
12
apps/web/components/listings/listing-status-badge.tsx
Normal 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>;
|
||||
}
|
||||
Reference in New Issue
Block a user