fixed the details
All checks were successful
Build frontend / build (push) Successful in 42s

This commit is contained in:
mouazkh
2026-05-26 02:34:18 +03:00
parent 4c350d7589
commit 80ea9af86b
2 changed files with 52 additions and 48 deletions

View File

@ -1270,47 +1270,49 @@ export default function OwnerPropertiesPage() {
};
const detailsJSON = JSON.stringify(details);
const editBody = {
PropertyInformation: {
CordsX: raw.propertyInformation?.cordsX || "",
CordsY: raw.propertyInformation?.cordsY || "",
Address:
const payload = {
propertyInformation: {
cordsX: raw.propertyInformation?.cordsX || "",
cordsY: raw.propertyInformation?.cordsY || "",
address:
updatedProperty.address || raw.propertyInformation?.address || "",
Description:
description:
updatedProperty.description ||
raw.propertyInformation?.description ||
"",
NumberOfBathRooms:
numberOfBathRooms:
updatedProperty.bathrooms ||
raw.propertyInformation?.numberOfBathRooms ||
0,
NumberOfRooms: updatedProperty.bedrooms || 0,
NumberOfBedRooms:
numberOfRooms: updatedProperty.bedrooms || 0,
numberOfBedRooms:
updatedProperty.bedrooms ||
raw.propertyInformation?.numberOfBedRooms ||
0,
Space:
space:
parseFloat(updatedProperty.area) ||
raw.propertyInformation?.space ||
0,
DetailsJSON: detailsJSON,
BuildingType: buildingTypeMap[updatedProperty.propertyType] ?? 0,
Status: updatedProperty.status === "available" ? 0 : 1,
PropertyType: updatedProperty.furnished ? 0 : 1,
Images: raw.propertyInformation?.images || [],
detailsJSON,
buildingType: buildingTypeMap[updatedProperty.propertyType] ?? 0,
status: updatedProperty.status === "available" ? 0 : 1,
propertyType: updatedProperty.furnished ? 0 : 1,
images: raw.propertyInformation?.images || [],
},
Deposit: parseFloat(updatedProperty.deposit) || raw.deposit || 0,
MonthlyRent:
deposit: parseFloat(updatedProperty.deposit) || raw.deposit || 0,
monthlyRent:
parseFloat(updatedProperty.monthlyPrice) || raw.monthlyRent || 0,
DailyRent:
dailyRent:
parseFloat(updatedProperty.dailyPrice) || raw.dailyRent || 0,
Rating: 1,
CurrencyId: updatedProperty.currencyId || raw.currencyId || 1,
RentType: rentTypeMap[updatedProperty.rentType] ?? 0,
Type: updatedProperty.furnished ? 0 : 1,
AllowedPaymentPeriod: "01:00:00:00",
rating: 1,
currencyId: updatedProperty.currencyId || raw.currencyId || 1,
rentType: rentTypeMap[updatedProperty.rentType] ?? 0,
type: updatedProperty.furnished ? 0 : 1,
allowedPaymentPeriod: "",
isSmokeAllow: null,
specializedFor: null,
isVisitorAllow: null,
};
const payload = { rentPropertyDto: editBody };
await editRentProperty(updatedProperty.id, payload);
}