diff --git a/app/owner/properties/add/page.js b/app/owner/properties/add/page.js index 3b65012..6336d76 100644 --- a/app/owner/properties/add/page.js +++ b/app/owner/properties/add/page.js @@ -676,7 +676,7 @@ const handleMapClick = async (coords) => { toast.success('تم إضافة عقار للبيع بنجاح!'); } else { const rentTypeMap = { daily: RentType.DAILY, monthly: RentType.MONTHLY, both: RentType.MONTHLY }; - const payload = { + const rentBody = { propertyInformation: propInfo, deposit: parseFloat(formData.deposit) || 0, monthlyRent: parseFloat(formData.monthlyPrice) || 0, @@ -687,6 +687,7 @@ const handleMapClick = async (coords) => { type: formData.furnished ? RentPropertyType.FURNISHED : RentPropertyType.UNFURNISHED, allowedPaymentPeriod: '01:00:00:00', }; + const payload = { rentPropertyDto: rentBody }; console.log('[AddProperty] Rent payload:', JSON.stringify(payload, null, 2)); const res = await addRentProperty(payload); console.log('[AddProperty] Rent API response:', res);