From 7f5d3065ca8023e8d829fd4b90c59358c6091686 Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:16:36 +0530 Subject: [PATCH] update fix --- src/Layout/DefaultLayout.jsx | 15 +++++++ src/Pages/Fawateer/CreateRequest.jsx | 9 ++-- src/Pages/Fawateer/SelectInvestorModal.jsx | 6 +++ .../ApproveHistory/ApproveHistoryChecker.jsx | 44 +++++++++++++++--- .../ApproveHistory/ApproveHistoryMaker.jsx | 44 +++++++++++++++--- .../ApproveRequest/ApproveRequest.jsx | 45 ++++++++++++++++--- 6 files changed, 143 insertions(+), 20 deletions(-) diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx index b7ac929..3e6bd25 100644 --- a/src/Layout/DefaultLayout.jsx +++ b/src/Layout/DefaultLayout.jsx @@ -238,6 +238,21 @@ const DashboardLayout = ({ isOnline }) => { Deposite withdrawal request ); + + case path.startsWith("/fawateer"): + return ( + + + Fawateer Deposit + + ); + case path.startsWith("/fawateer-history"): + return ( + + + Fawateer Deposit + + ); case path.startsWith("/withdraw-request"): return ( diff --git a/src/Pages/Fawateer/CreateRequest.jsx b/src/Pages/Fawateer/CreateRequest.jsx index fd2bda8..01dc1fc 100644 --- a/src/Pages/Fawateer/CreateRequest.jsx +++ b/src/Pages/Fawateer/CreateRequest.jsx @@ -34,7 +34,7 @@ const validationSchema = Yup.object().shape({ .typeError('Transaction amount must be a number') // Custom error message if it's not a number .positive('Transaction amount must be greater than zero'), spportFile_path: Yup.mixed().required("Support file is required"), - makerComment: Yup.string().required("Description is required"), + makerComment: Yup.string(), }); const CreateRequest = () => { @@ -231,7 +231,7 @@ const CreateRequest = () => { {/* Support File Field with Preview */} - + Support file @@ -243,9 +243,10 @@ const CreateRequest = () => { rounded={"sm"} type={"file"} className="form-control" + name="spportFile_path" placeholder={"Support file"} {...register("spportFile_path")} - onChange={handleFileChange} + // onChange={handleFileChange} /> {errors.spportFile_path?.message} @@ -272,7 +273,7 @@ const CreateRequest = () => { {/* Description Field */} - + Description diff --git a/src/Pages/Fawateer/SelectInvestorModal.jsx b/src/Pages/Fawateer/SelectInvestorModal.jsx index 5c565ec..86c1c8d 100644 --- a/src/Pages/Fawateer/SelectInvestorModal.jsx +++ b/src/Pages/Fawateer/SelectInvestorModal.jsx @@ -176,6 +176,12 @@ const handleCheckboxChange = (id) => { ), })); + + const handleClose = () => { + setSelectorInvestor(null) + handleClose() + } + return ( { "Last Name", "E-mail ID", "Phone Number", - "Transaction Date", - "Transaction Amount", + "Deposit Date", + "Deposit Amount (BHD)", + "Support Image", "Status", ]; @@ -169,7 +171,7 @@ const ApproveHistory = () => { ), - "Transaction Date": ( + "Deposit Date": ( { ), - "Transaction Amount": ( + "Deposit Amount (BHD)": ( {/* {item.investorAmount} */} @@ -192,6 +194,38 @@ const ApproveHistory = () => { ), + "Support Image": ( + + + + + View + + + + + + ), Status: ( ), - "Transaction Date": ( + "Deposit Date": ( ), - "Transaction Amount": ( + "Deposit Amount (BHD)": ( {/* {item.investorAmount} */} @@ -212,6 +214,38 @@ import { ), + "Support Image": ( + + + + + View + + + + + + ), Status: ( ), - "Transaction Date": ( + "Deposit Date": ( {formatDate(item?.transaction_date)} ), - "Transaction Amount": ( + "Deposit Amount (BHD)": ( {/* {item.investorAmount} */} @@ -214,6 +215,38 @@ import RequestRejectModal from "./RequestRejectModal"; ), + "Support Image": ( + + + + + View + + + + + + ), "Status": (