diff --git a/app/owner/properties/page.js b/app/owner/properties/page.js index 952c05a..07ba4d6 100644 --- a/app/owner/properties/page.js +++ b/app/owner/properties/page.js @@ -35,10 +35,10 @@ import { Cigarette, Dog, Music, - Sofa, - DoorOpen, Warehouse, Layers, + Sofa, + DoorOpen, Wind, Pencil, Save, @@ -749,7 +749,7 @@ export default function OwnerPropertiesPage() { propertyType: { 0: 'apartment', 1: 'villa', 2: 'sweet', 3: 'room', 4: 'studio', 5: 'office', 6: 'farms', 7: 'shop', 8: 'warehouse' }[info.buildingType] || 'apartment', propertyTypeLabel: { 0: 'شقة', 1: 'فيلا', 2: 'سويت', 3: 'غرفة', 4: 'استوديو', 5: 'مكتب', 6: 'مزرعة', 7: 'متجر', 8: 'مستودع' }[info.buildingType] || 'عقار', purpose: 'rent', - rentType: { 0: 'daily', 1: 'monthly' }[item.rentType] || 'daily', + rentType: item.rentType === 0 ? 'monthly' : item.rentType === 1 ? 'daily' : 'daily', dailyPrice: item.dailyRent || 0, monthlyPrice: item.monthlyRent || 0, salePrice: item.price || 0, @@ -759,6 +759,9 @@ export default function OwnerPropertiesPage() { bathrooms: info.numberOfBathRooms || 0, area: info.space || 0, livingRooms: details.livingRooms || 0, + floor: details.floorNumber ?? details.floor ?? 0, + salons: details.numberOfSalons ?? details.salonsCount ?? details.salons ?? 0, + balconies: details.numberOfBalconies ?? details.balconiesCount ?? details.balconies ?? 0, status: { 0: 'available', 1: 'booked', 2: 'maintenance' }[info.status] || 'available', images: raw.length > 0 ? raw.map(img => img.startsWith('http') ? img : `${apiBase}${img.startsWith('/') ? '' : '/Pictures/'}${img}`) : ['/property-placeholder.jpg'], createdAt: item.createdAt || new Date().toISOString(), @@ -795,6 +798,9 @@ export default function OwnerPropertiesPage() { bathrooms: info.numberOfBathRooms || 0, area: info.space || 0, livingRooms: details.livingRooms || 0, + floor: details.floorNumber ?? details.floor ?? 0, + salons: details.numberOfSalons ?? details.salonsCount ?? details.salons ?? 0, + balconies: details.numberOfBalconies ?? details.balconiesCount ?? details.balconies ?? 0, status: 'available', images: raw.length > 0 ? raw.map(img => img.startsWith('http') ? img : `${apiBase}${img.startsWith('/') ? '' : '/Pictures/'}${img}`) : ['/property-placeholder.jpg'], createdAt: item.createdAt || new Date().toISOString(), @@ -1090,7 +1096,7 @@ export default function OwnerPropertiesPage() { {property.address || property.location || 'موقع غير محدد'} -