add payment for SaleProprite ,add commsion,fixed error handling fiexd final things
All checks were successful
Build frontend / build (push) Successful in 1m46s
All checks were successful
Build frontend / build (push) Successful in 1m46s
This commit is contained in:
@ -383,7 +383,7 @@ export default function OwnerBookingsPage() {
|
||||
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const [response, rentProps] = await Promise.all([getOwnerReservationsByStatuses([0, 1, 2, 3, 4]), getRentProperties().catch(() => [])]);
|
||||
const [response, rentProps] = await Promise.all([getOwnerReservationsByStatuses([0, 1, 2, 3, 4, 5]), getRentProperties().catch(() => [])]);
|
||||
|
||||
let rawData = response;
|
||||
|
||||
@ -419,8 +419,6 @@ export default function OwnerBookingsPage() {
|
||||
propMap[rp.propertyInformation?.id] = propertyData;
|
||||
});
|
||||
|
||||
console.log("PROP MAP:", propMap);
|
||||
|
||||
// ربط الـ reservation بالعقار عن طريق propertyId
|
||||
const enriched = list.map((item) => {
|
||||
if (item.propertyId && propMap[item.propertyId]) {
|
||||
@ -430,8 +428,6 @@ export default function OwnerBookingsPage() {
|
||||
return item;
|
||||
});
|
||||
|
||||
console.log("ENRICHED BOOKINGS:", enriched);
|
||||
|
||||
const mappedBookings = enriched.map((item) => {
|
||||
const property = item._prop || {};
|
||||
|
||||
@ -450,7 +446,8 @@ export default function OwnerBookingsPage() {
|
||||
1: "pending",
|
||||
2: "confirmed",
|
||||
3: "completed",
|
||||
4: "cancelled",
|
||||
4: "منتهية",
|
||||
5: "cancelled",
|
||||
};
|
||||
|
||||
const statusKey = statusMap[item?.status] || "pending";
|
||||
|
||||
Reference in New Issue
Block a user