diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx index cf60667..843de6a 100644 --- a/src/Layout/DefaultLayout.jsx +++ b/src/Layout/DefaultLayout.jsx @@ -24,7 +24,7 @@ import { Button, Image, Text, - Tooltip + Tooltip, } from "@chakra-ui/react"; import Cookies from "js-cookie"; // Import the Cookies library import { GrManual } from "react-icons/gr"; @@ -32,6 +32,7 @@ import { HiOutlineChartSquareBar } from "react-icons/hi"; import { LuContact } from "react-icons/lu"; import { MdNotificationsNone, MdOutlineAddChart } from "react-icons/md"; import { + RiAccountBoxLine, RiBankLine, RiExchangeBoxLine, RiFileUserLine, @@ -41,7 +42,7 @@ import { TbLayoutDashboard, TbListDetails, TbReportMoney, - TbTransactionDollar + TbTransactionDollar, } from "react-icons/tb"; import { VscSymbolClass } from "react-icons/vsc"; import { @@ -64,6 +65,7 @@ import { nav } from "../Routes/Nav"; import { RouteLink } from "../Routes/Routes"; import { useProfileQuery } from "../Services/io.service"; import { useLogoutMutation } from "../Services/token.serivce"; +import { HiOutlineBanknotes } from "react-icons/hi2"; const DashboardLayout = ({ isOnline }) => { const navigate = useNavigate(); @@ -141,19 +143,20 @@ const DashboardLayout = ({ isOnline }) => { case "/": return "👋🏻 Hi, Admin"; - case path.startsWith("/"): - return ( - - Dashboard - - ); + // case path.startsWith("/"): + // return (z + // + // Dashboard + // + // ); case path.startsWith("/investment-opportunities"): - return ( - - dashboard / Open Opportunities - - ); + return ( + + + dashboard / Open Opportunities + + ); case path.startsWith("/sponser"): return ( @@ -294,6 +297,29 @@ const DashboardLayout = ({ isOnline }) => { Deletion request ); + + case path.startsWith("/bank-deposit-request"): + return ( + + + Bank Deposit Request + + ); + case path.startsWith("/reversal-fawateer-deposit"): + return ( + + + Fawateer Deposit + + ); + case path.startsWith("/account-deletion-request"): + return ( + + + Account Deletion Request + + ); + case path.startsWith("/bank-investor"): return ( @@ -312,7 +338,7 @@ const DashboardLayout = ({ isOnline }) => { return ( - Push Notification + Push Notification ); case path.startsWith("/contact"): @@ -364,7 +390,7 @@ const DashboardLayout = ({ isOnline }) => { Deletion request ); - case path.startsWith("/subadmin"): + case path.startsWith("/subadmin"): return ( @@ -530,12 +556,170 @@ const DashboardLayout = ({ isOnline }) => { index={openIndex} onChange={handleAccordionChange} > - {filteredNav.map(({ title, type, Icon, submenu, path }, index) => { - if (type === "accordion") { - return ( - + {filteredNav.map( + ({ title, type, Icon, submenu, path }, index) => { + if (type === "accordion") { + return ( + + + + + {/* {Icon && title === "Admin" ? : } */} + {Icon && ( + + )} + + + {title} + + + + + + + {submenu?.map( + ( + { + title: subMenuTitle, + path: link, + icon: SubIcon, + }, + i + ) => ( + + + + + + + {SubIcon && ( + + )} + + {subMenuTitle === "Aprover Request" + ? data?.data?.role === "Maker" + ? "Create Request" + : "Aprover Request" + : subMenuTitle} + + + + + ) + )} + + + ); + } else if (type === "title") { + return ( + + {title} + + ); + } else if (type === "single") { + return ( { placement="top-start" color={"blue.800"} > - - } + - {/* {Icon && title === "Admin" ? : } */} - {Icon && ( - - )} - - - {title} - - - - + {title} + + - - {submenu?.map( - ( - { title: subMenuTitle, path: link, icon: SubIcon }, - i - ) => ( - - - - - - - {SubIcon && ( - - )} - - {subMenuTitle === "Aprover Request" - ? data?.data?.role === "Maker" - ? "Create Request" - : "Aprover Request" - : subMenuTitle} - - - - - ) - )} - - - ); - } else if (type === "title") { - return ( - - {title} - - ); - } else if (type === "single") { - return ( - - - {Icon && } - - {title} - - - - ); - } else { - return null; + ); + } else { + return null; + } } - })} + )} diff --git a/src/Pages/BankDepositRequest/BankDepositRequest.jsx b/src/Pages/BankDepositRequest/BankDepositRequest.jsx index f6b3c21..00524f4 100644 --- a/src/Pages/BankDepositRequest/BankDepositRequest.jsx +++ b/src/Pages/BankDepositRequest/BankDepositRequest.jsx @@ -27,6 +27,7 @@ import { useGetDepositHistoryQuery } from "../../Services/deposit.request.servic import Pagination from "../../Components/Pagination"; import ConfirmModal from "./ConfirmModal"; import RejectModal from "./RejectModal"; +import { useGetBankDepositMasterQuery } from "../../Services/bankdeposit.request.service"; const formatDate = (date) => { return new Date(date).toLocaleDateString("en-GB", { @@ -78,7 +79,7 @@ const BankDepositRequest = () => { error, refetch, isLoading: depositHistoryLoading, - } = useGetDepositHistoryQuery( + } = useGetBankDepositMasterQuery( { page: debouncedSearchTerm ? undefined : currentPage, // Omit pagination for search size: debouncedSearchTerm ? undefined : pageSize, // Omit pagination for search @@ -103,10 +104,6 @@ const BankDepositRequest = () => { "Last Name", "Country", "Phone Number", - "Deposit Amount", - "Deposit Date", - "Status", - "Supporting's", "Action", ]; @@ -163,6 +160,18 @@ const BankDepositRequest = () => { {generateSerialNumber(idx, currentPage, pageSize)} ), + "Request Date": ( + + {formatDate(item?.createdAt)} + + ), "Client ID": ( { ), - "Deposit Amount": ( - - - {parseFloat(item?.investorAmount || 0).toLocaleString(undefined, { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - })} - - {item?.currencyCode} - - - - ), - "Deposit Date": ( - - {formatDate(item?.createdAt)} - - ), - Status: ( - - - {item.transactionStatus} - - - ), - "Supporting's": - item.transactionStatus === "Approved" ? ( - - {/* {item?.supporting_FileName} */} - - - - View - - - - {/* - View - */} - - - ) : ( - "" - ), Action: ( { setFile(selectedFile); }; + const modules = { + toolbar: [ + // [{ header: "1" }, { header: "2" }, + // // { font: [] } + // ], + // [{ size: [] }], + ["bold", "italic", "underline", "strike", "blockquote"], + [{ list: "ordered" }, { list: "bullet" }], + ["clean"], + ], + }; + return ( @@ -104,18 +117,17 @@ const ConfirmModal = ({ isOpen, onClose, firstField }) => { size="sm" /> - + Message -