This commit is contained in:
@ -676,7 +676,7 @@ const handleMapClick = async (coords) => {
|
|||||||
toast.success('تم إضافة عقار للبيع بنجاح!');
|
toast.success('تم إضافة عقار للبيع بنجاح!');
|
||||||
} else {
|
} else {
|
||||||
const rentTypeMap = { daily: RentType.DAILY, monthly: RentType.MONTHLY, both: RentType.MONTHLY };
|
const rentTypeMap = { daily: RentType.DAILY, monthly: RentType.MONTHLY, both: RentType.MONTHLY };
|
||||||
const payload = {
|
const rentBody = {
|
||||||
propertyInformation: propInfo,
|
propertyInformation: propInfo,
|
||||||
deposit: parseFloat(formData.deposit) || 0,
|
deposit: parseFloat(formData.deposit) || 0,
|
||||||
monthlyRent: parseFloat(formData.monthlyPrice) || 0,
|
monthlyRent: parseFloat(formData.monthlyPrice) || 0,
|
||||||
@ -687,6 +687,7 @@ const handleMapClick = async (coords) => {
|
|||||||
type: formData.furnished ? RentPropertyType.FURNISHED : RentPropertyType.UNFURNISHED,
|
type: formData.furnished ? RentPropertyType.FURNISHED : RentPropertyType.UNFURNISHED,
|
||||||
allowedPaymentPeriod: '01:00:00:00',
|
allowedPaymentPeriod: '01:00:00:00',
|
||||||
};
|
};
|
||||||
|
const payload = { rentPropertyDto: rentBody };
|
||||||
console.log('[AddProperty] Rent payload:', JSON.stringify(payload, null, 2));
|
console.log('[AddProperty] Rent payload:', JSON.stringify(payload, null, 2));
|
||||||
const res = await addRentProperty(payload);
|
const res = await addRentProperty(payload);
|
||||||
console.log('[AddProperty] Rent API response:', res);
|
console.log('[AddProperty] Rent API response:', res);
|
||||||
|
|||||||
Reference in New Issue
Block a user