diff --git a/apps/web/app/(dashboard)/layout.tsx b/apps/web/app/(dashboard)/layout.tsx new file mode 100644 index 0000000..2700c50 --- /dev/null +++ b/apps/web/app/(dashboard)/layout.tsx @@ -0,0 +1,61 @@ +'use client'; + +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import { cn } from '@/lib/utils'; +import { useAuthStore } from '@/lib/auth-store'; +import { Button } from '@/components/ui/button'; + +const navItems = [ + { href: '/', label: 'Trang chủ', icon: '🏠' }, + { href: '/listings', label: 'Tin đăng', icon: '📋' }, + { href: '/listings/new', label: 'Đăng tin', icon: '➕' }, +]; + +export default function DashboardLayout({ children }: { children: React.ReactNode }) { + const pathname = usePathname(); + const { user, logout } = useAuthStore(); + + return ( +
Không tìm thấy tin đăng
+ ++ Chức năng chỉnh sửa sẽ được hoàn thiện khi backend API hỗ trợ PATCH /listings/:id. + Hiện tại bạn có thể xem lại thông tin đã nhập. +
+ +{error || 'Không tìm thấy tin đăng'}
+ + + ++ {property.address}, {property.ward}, {property.district}, {property.city} +
+{formatPrice(listing.priceVND)} VNĐ
+ {listing.pricePerM2 && ( ++ ~{listing.pricePerM2.toLocaleString('vi-VN')} VNĐ/m² +
+ )} + {listing.rentPriceMonthly && ( ++ Thuê: {formatPrice(listing.rentPriceMonthly)}/tháng +
+ )} +{property.description}
+{seller.fullName}
+{seller.phone}
+{agent.agency}
} + {listing.commissionPct != null && ( +Hoa hồng: {listing.commissionPct}%
+ )} +{label}
+{value}
+Chưa có tin đăng nào
+ + + ++ {formatPrice(listing.priceVND)} VNĐ +
++ {listing.property.district}, {listing.property.city} +
++ Nền tảng bất động sản thông minh tại Việt Nam +
+Vietnam Real Estate Platform
-Kéo thả ảnh vào đây hoặc nhấp để chọn
++ JPG, PNG, WebP - Tối đa {maxFiles} ảnh, mỗi ảnh 10MB +
+ { + if (e.target.files) addFiles(e.target.files); + e.target.value = ''; + }} + /> +{message}
; +} + +// ─── Step 1: Basic Info ────────────────────────────────── + +export function StepBasicInfo({ register, errors }: StepProps) { + return ( +Nhập số không có dấu chấm hoặc dấu phẩy
+