add payment for SaleProprite ,add commsion,fixed error handling fiexd final things
All checks were successful
Build frontend / build (push) Successful in 1m46s

This commit is contained in:
hamzaobed7
2026-08-18 01:24:18 +03:00
parent 5592d9fbd2
commit 3472dc1175
10 changed files with 793 additions and 1070 deletions

View File

@ -433,11 +433,15 @@ export default function PropertyDetailsPage({ type }) {
const propInfoId = property._raw?.propertyInformationId || property.id;
const startDate = new Date(selectedStart + "T00:00:00.000").toISOString();
const endDate = new Date(selectedEnd + "T00:00:00.000").toISOString();
await bookReservation(propInfoId, startDate, endDate);
await bookReservation(propInfoId, startDate, endDate);
setBookingSuccess(true);
toast.success(t("bookingSentSuccess"));
} catch (err) {
setBookingError(err.message || t("bookingFailed"));
if (err.message=="API 400: Cannot book a reservation for an inactive property."){
setBookingError("لا يمكنك حجز هذا العقار لانه غير نشط" || t("bookingFailed"));
}
} finally {
setBookingLoading(false);
}