Frontend improvements #2
41
src/App.jsx
41
src/App.jsx
@ -766,24 +766,12 @@ const ApartmentDashboard = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex space-x-2">
|
|
||||||
<button
|
<button
|
||||||
onClick={() => openUnitDetail(unit)}
|
onClick={() => openUnitDetail(unit)}
|
||||||
className="flex-1 bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition-colors"
|
className="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition-colors"
|
||||||
>
|
>
|
||||||
View Details
|
View Details
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
onClick={() => toggleWatchUnit(unit.unitCode)}
|
|
||||||
className={`px-4 py-2 rounded-md transition-colors ${
|
|
||||||
watchedUnits.has(unit.unitCode)
|
|
||||||
? 'bg-yellow-500 text-white hover:bg-yellow-600'
|
|
||||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<Eye className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
@ -885,25 +873,13 @@ const ApartmentDashboard = () => {
|
|||||||
<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-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.daysAvailable || 0}</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 text-center">{unit.soonest ? (new Date(unit.soonest) <= new Date() ? 'Now' : formatDate(unit.soonest)) : '-'}</td>
|
||||||
<td className="py-3 px-4">
|
<td className="py-3 px-4 text-center">
|
||||||
<div className="flex justify-center space-x-2">
|
|
||||||
<button
|
<button
|
||||||
onClick={() => openUnitDetail(unit)}
|
onClick={() => openUnitDetail(unit)}
|
||||||
className="bg-blue-600 text-white py-1 px-3 rounded-md hover:bg-blue-700 transition-colors text-sm"
|
className="bg-blue-600 text-white py-1 px-3 rounded-md hover:bg-blue-700 transition-colors text-sm"
|
||||||
>
|
>
|
||||||
Details
|
Details
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
onClick={() => toggleWatchUnit(unit.unitCode)}
|
|
||||||
className={`p-1 rounded-md transition-colors ${
|
|
||||||
watchedUnits.has(unit.unitCode)
|
|
||||||
? 'bg-yellow-500 text-white hover:bg-yellow-600'
|
|
||||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<Eye className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
@ -1270,19 +1246,6 @@ const ApartmentDashboard = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex space-x-2">
|
|
||||||
<button
|
|
||||||
onClick={() => toggleWatchUnit(selectedUnit.unitCode)}
|
|
||||||
className={`flex-1 py-2 px-4 rounded-md transition-colors ${
|
|
||||||
watchedUnits.has(selectedUnit.unitCode)
|
|
||||||
? 'bg-yellow-500 text-white hover:bg-yellow-600'
|
|
||||||
: 'bg-blue-600 text-white hover:bg-blue-700'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{watchedUnits.has(selectedUnit.unitCode) ? 'Stop Watching' : 'Watch This Unit'}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user