feat: 添加房源审核功能及定时审核任务

This commit is contained in:
Cuishibing
2026-03-24 22:54:24 +08:00
parent 9998fb8649
commit 1b6e7fa886
6 changed files with 72 additions and 6 deletions

View File

@@ -13,6 +13,9 @@ interface House {
address: string;
phone: string;
images: string[];
status: string;
reject_reason?: string;
reviewed_at?: string;
createdAt: string;
}
@@ -271,6 +274,20 @@ export default function OwnerDashboard() {
</span>
<span className="text-gray-400 text-xs">{house.district}</span>
</div>
<div className="mt-2">
{house.status === 'pending' && (
<span className="inline-block bg-yellow-100 text-yellow-700 text-xs px-2 py-1 rounded"></span>
)}
{house.status === 'approved' && (
<span className="inline-block bg-green-100 text-green-700 text-xs px-2 py-1 rounded"></span>
)}
{house.status === 'rejected' && (
<span className="inline-block bg-red-100 text-red-700 text-xs px-2 py-1 rounded"></span>
)}
</div>
{house.status === 'rejected' && house.reject_reason && (
<p className="text-red-500 text-xs mt-1">{house.reject_reason}</p>
)}
</div>
</div>
</Link>