Display 'Now' for soonest dates in the past
This commit is contained in:
@ -884,7 +884,7 @@ const ApartmentDashboard = () => {
|
||||
<td className="py-3 px-4 text-right font-bold text-green-600">{formatPrice(unit.currentPrice)}</td>
|
||||
<td className="py-3 px-4 text-right text-gray-500">${((unit.currentPrice || 0) / (unit.area || 1)).toFixed(2)}</td>
|
||||
<td className="py-3 px-4 text-center">{unit.daysAvailable || 0}</td>
|
||||
<td className="py-3 px-4 text-center">{unit.soonest ? formatDate(unit.soonest) : '-'}</td>
|
||||
<td className="py-3 px-4 text-center">{unit.soonest ? (new Date(unit.soonest) <= new Date() ? 'Now' : formatDate(unit.soonest)) : '-'}</td>
|
||||
<td className="py-3 px-4">
|
||||
<div className="flex justify-center space-x-2">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user