Compare commits
6 Commits
2ffe3a0197
...
frontend-i
| Author | SHA1 | Date | |
|---|---|---|---|
| 431f2bf82f | |||
| 69542f08cd | |||
| e79f28f52b | |||
| b3f607b0fc | |||
| a137946a92 | |||
| 462dccffba |
@ -384,8 +384,7 @@ const ApartmentDashboard = () => {
|
||||
|
||||
// Filter function for units
|
||||
const filteredUnits = availableUnits.filter(unit => {
|
||||
const price = unit.currentPrice || 0;
|
||||
const matchesPrice = price >= priceFilter.min && (priceFilter.max === 10000 || price <= priceFilter.max);
|
||||
const matchesPrice = (unit.currentPrice || 0) >= priceFilter.min && (unit.currentPrice || 0) <= priceFilter.max;
|
||||
const matchesBedroom = bedroomFilter === 'all' || (unit.bedCount != null && unit.bedCount.toString() === bedroomFilter);
|
||||
return matchesPrice && matchesBedroom;
|
||||
}).sort((a, b) => {
|
||||
@ -682,7 +681,7 @@ const ApartmentDashboard = () => {
|
||||
onChange={(e) => setPriceFilter({...priceFilter, max: parseInt(e.target.value)})}
|
||||
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>
|
||||
<select
|
||||
value={bedroomFilter}
|
||||
|
||||
Reference in New Issue
Block a user