Compare commits

..

6 Commits

Author SHA1 Message Date
431f2bf82f Remove watch button from units page and detail view 2026-01-21 12:00:46 -07:00
69542f08cd Display 'Now' for soonest dates in the past 2026-01-21 11:56:28 -07:00
e79f28f52b Add soonest column to list view 2026-01-21 11:53:51 -07:00
b3f607b0fc Add sortable columns to list view
- Click column headers to sort by that field
- Click again to toggle ascending/descending
- Arrow indicators show current sort direction
- Dropdown filter stays in sync with column sorting
2026-01-21 11:45:48 -07:00
a137946a92 Set list view as default for Available Units 2026-01-21 11:15:05 -07:00
462dccffba Add grid/list view toggle to Available Units page
- Add toggle buttons in filter bar to switch between views
- Grid view shows card layout (default)
- List view shows compact table with all unit details
2026-01-21 11:14:22 -07:00

View File

@ -384,8 +384,7 @@ const ApartmentDashboard = () => {
// Filter function for units // Filter function for units
const filteredUnits = availableUnits.filter(unit => { const filteredUnits = availableUnits.filter(unit => {
const price = unit.currentPrice || 0; const matchesPrice = (unit.currentPrice || 0) >= priceFilter.min && (unit.currentPrice || 0) <= priceFilter.max;
const matchesPrice = price >= priceFilter.min && (priceFilter.max === 10000 || price <= priceFilter.max);
const matchesBedroom = bedroomFilter === 'all' || (unit.bedCount != null && unit.bedCount.toString() === bedroomFilter); const matchesBedroom = bedroomFilter === 'all' || (unit.bedCount != null && unit.bedCount.toString() === bedroomFilter);
return matchesPrice && matchesBedroom; return matchesPrice && matchesBedroom;
}).sort((a, b) => { }).sort((a, b) => {
@ -682,7 +681,7 @@ const ApartmentDashboard = () => {
onChange={(e) => setPriceFilter({...priceFilter, max: parseInt(e.target.value)})} onChange={(e) => setPriceFilter({...priceFilter, max: parseInt(e.target.value)})}
className="w-32" className="w-32"
/> />
<span className="text-sm">{priceFilter.max === 10000 ? 'No limit' : formatPrice(priceFilter.max)}</span> <span className="text-sm">{formatPrice(priceFilter.max)}</span>
</div> </div>
<select <select
value={bedroomFilter} value={bedroomFilter}