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:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user