This commit is contained in:
@ -1270,46 +1270,47 @@ export default function OwnerPropertiesPage() {
|
||||
};
|
||||
const detailsJSON = JSON.stringify(details);
|
||||
|
||||
const payload = {
|
||||
propertyInformation: {
|
||||
cordsX: raw.propertyInformation?.cordsX || "",
|
||||
cordsY: raw.propertyInformation?.cordsY || "",
|
||||
address:
|
||||
const editBody = {
|
||||
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,
|
||||
buildingType: buildingTypeMap[updatedProperty.propertyType] ?? 0,
|
||||
status: updatedProperty.status === "available" ? 0 : 1,
|
||||
propertyType: updatedProperty.furnished ? 0 : 1,
|
||||
images: raw.propertyInformation?.images || [],
|
||||
DetailsJSON: 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: "01:00:00:00",
|
||||
};
|
||||
const payload = { rentPropertyDto: editBody };
|
||||
|
||||
await editRentProperty(updatedProperty.id, payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user