editing the add rent property mouaz is the best in the west
All checks were successful
Build frontend / build (push) Successful in 50s
All checks were successful
Build frontend / build (push) Successful in 50s
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -101,13 +101,20 @@ function mapApiDetail(item) {
|
||||
const services = {};
|
||||
serviceList.forEach(s => { services[s] = serviceDetails[s] || true; });
|
||||
|
||||
const terms = details.terms || {};
|
||||
const rawTerms = details.terms || {};
|
||||
const terms = Array.isArray(rawTerms) ? rawTerms.reduce((acc, t) => ({ ...acc, [t]: true }), {}) : rawTerms;
|
||||
|
||||
// Try multiple key aliases like Flutter does
|
||||
const floor = details.floorNumber ?? details.floor ?? 0;
|
||||
const salons = details.numberOfSalons ?? details.salonsCount ?? details.salons ?? 0;
|
||||
const balconies = details.numberOfBalconies ?? details.balconiesCount ?? details.balconies ?? 0;
|
||||
const proximity = details.nearbyDistances || details.proximity || {};
|
||||
const rawProximity = details.nearbyDistances || details.proximity || {};
|
||||
const proximity = {};
|
||||
Object.entries(rawProximity).forEach(([k, v]) => {
|
||||
if (!v) return;
|
||||
const normalizedKey = k.charAt(0).toUpperCase() + k.slice(1);
|
||||
proximity[normalizedKey] = v;
|
||||
});
|
||||
const roomDetails = details.room || details.roomDetails || {};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user