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:
@ -1,4 +1,6 @@
|
||||
import { body } from "framer-motion/client";
|
||||
import AuthService from "../services/AuthService";
|
||||
import { frameData } from "framer-motion";
|
||||
const API_BASE = process.env.NEXT_PUBLIC_API_URL || "https://45.93.137.91.nip.io/api";
|
||||
const REPORT_API_BASE = process.env.NEXT_PUBLIC_REPORT_API_URL || "http://45.93.137.91/api";
|
||||
|
||||
@ -364,16 +366,38 @@ export async function getSalePropertyById(id) {
|
||||
}
|
||||
|
||||
export async function updateRentPropertyStatus(id, status) {
|
||||
return apiFetch(`/RentProperties/UpdateStatus/${id}`, {
|
||||
return apiFetch(`/RentProperties/ChangeActivityStatus/${id}`, {
|
||||
method: "PUT",
|
||||
body: { status },
|
||||
body: status ,
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateSalePropertyStatus(id, status) {
|
||||
return apiFetch(`/SaleProperties/UpdateStatus/${id}`, {
|
||||
return apiFetch(`/SaleProperties/ChangeActivityStatus/${id}`, {
|
||||
method: "PUT",
|
||||
body: { status },
|
||||
body: status ,
|
||||
});
|
||||
}
|
||||
|
||||
export async function OwnerPaymentForSaleProperite(
|
||||
salePropertyId,
|
||||
PaymentTypeId,
|
||||
TransactionType,
|
||||
paymentImage
|
||||
) {
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append("salePropertyId", String(salePropertyId));
|
||||
formData.append("PaymentTypeId", String(PaymentTypeId));
|
||||
formData.append("TransactionType", String(TransactionType));
|
||||
|
||||
if (paymentImage instanceof File) {
|
||||
formData.append("paymentImage", paymentImage);
|
||||
}
|
||||
|
||||
return apiFetch("/SaleProperties/PaySaleFee", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user