diff --git a/app/reservations/page.js b/app/reservations/page.js
index b6389ac..e90a27a 100644
--- a/app/reservations/page.js
+++ b/app/reservations/page.js
@@ -9,7 +9,7 @@ import {
} from 'lucide-react';
import toast, { Toaster } from 'react-hot-toast';
import AuthService from '../services/AuthService';
-import { getUserReservations, payDeposit } from '../utils/api';
+import { getRentProperty, getUserReservations, payDeposit } from '../utils/api';
const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'https://45.93.137.91.nip.io/api';
@@ -39,7 +39,10 @@ function StatusBadge({ code }) {
async function enrich(reservation) {
if (!reservation.propertyId) return reservation;
- reservation._prop = reservation.property ?? null;
+ try {
+ const prop = await getRentProperty(reservation.propertyId);
+ reservation._prop = prop?.propertyInformation ?? prop ?? null;
+ } catch { /* skip */ }
return reservation;
}
@@ -112,9 +115,9 @@ function ReservationCard({ r, onViewDetails, onPay, payingId }) {
const beds = propBeds(p, r);
const baths = propBaths(p, r);
const isOwnerConfirmed = STATUS_MAP[r.status] === 'ownerConfirmed';
- const hasTimeWindow = r.ownerApprovalDate && r.allowedPaymentPeriod;
+ const hasTimeWindow = r.ownerApprovalDate && p?.allowedPaymentPeriod;
const deadline = hasTimeWindow
- ? new Date(r.ownerApprovalDate).getTime() + parseTimeSpan(r.allowedPaymentPeriod)
+ ? new Date(r.ownerApprovalDate).getTime() + parseTimeSpan(p.allowedPaymentPeriod)
: null;
const isExpired = deadline ? Date.now() > deadline : false;
const isPaying = payingId === r.id;
@@ -150,7 +153,7 @@ function ReservationCard({ r, onViewDetails, onPay, payingId }) {