diff --git a/src/Components/MobileView.jsx b/src/Components/MobileView.jsx
index be6b8a5..d0a4262 100644
--- a/src/Components/MobileView.jsx
+++ b/src/Components/MobileView.jsx
@@ -2,6 +2,7 @@ import {
Box,
Button,
Heading,
+ HStack,
Image,
Modal,
ModalContent,
@@ -20,16 +21,25 @@ import { LuClock } from "react-icons/lu";
const MobileView = ({ isOpen, onClose, finalRef }) => {
return (
-
-
-
-
+
+
+
+
+
+ display={'flex'}
+ justifyContent={'center'}
+ h={"600px"}
+ w={"330px"}
+ >
{
/>
@@ -207,9 +218,10 @@ const MobileView = ({ isOpen, onClose, finalRef }) => {
+
+
-
);
};
diff --git a/src/Constants/Constants.js b/src/Constants/Constants.js
index c09566b..8a5decd 100644
--- a/src/Constants/Constants.js
+++ b/src/Constants/Constants.js
@@ -2,6 +2,34 @@
import dns from "node:dns"
+
+
+export function getTomorrowDate() {
+ const today = new Date();
+ const tomorrow = new Date(today);
+ tomorrow.setDate(today.getDate() + 1);
+
+ // Format the date as YYYY-MM-DD (ISO 8601)
+ return tomorrow.toISOString().split('T')[0];
+}
+
+
+export function removeTrailingZeros(value) {
+ // Convert the value to a number and then to a string
+ let number = parseFloat(value);
+ let result = number.toString();
+
+ // Check if the result contains a decimal point
+ if (result.includes('.')) {
+ // Remove trailing zeros if the decimal part is 0 or 00
+ result = result.replace(/(\.\d*?)0+$/, '$1'); // Remove trailing zeros
+ result = result.replace(/\.$/, ''); // Remove the decimal point if it's the last character
+ }
+
+ return result;
+}
+
+
export function getCountdownTimer(utcDateString) {
// Parse the UTC datetime string into a Date object
const targetDate = new Date(utcDateString);
@@ -85,3 +113,20 @@ export async function checkEmailValidity(email) {
return false; // Error occurred
}
}
+
+
+// Function to convert timestamp to readable date format in Gulf timezone
+export function formatTimestampInGulfTimezone(timestamp) {
+ const date = new Date(timestamp);
+ const options = {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ timeZone: 'Asia/Dubai', // Gulf Standard Time (GST) timezone
+ timeZoneName: 'short'
+ };
+ return date.toLocaleDateString('en-GB', options);
+}
diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx
index a0c05f8..405d59c 100644
--- a/src/Layout/DefaultLayout.jsx
+++ b/src/Layout/DefaultLayout.jsx
@@ -188,6 +188,30 @@ const DashboardLayout = ({ isOnline }) => {
Investor Transactions
);
+
+
+
+
+ case path.startsWith("/deposit-request"):
+ return (
+
+
+ Deposite pending request
+
+ );
+ case path.startsWith("/deposit-history"):
+ return (
+
+
+ Deposite withdrawal request
+
+ );
+
+
+
+
+
+
case path.startsWith("/withdraw-request"):
return (
diff --git a/src/Pages/Deposit/DepositRequest/DepositRequest.jsx b/src/Pages/Deposit/DepositRequest/DepositRequest.jsx
index d428265..c5f6f22 100644
--- a/src/Pages/Deposit/DepositRequest/DepositRequest.jsx
+++ b/src/Pages/Deposit/DepositRequest/DepositRequest.jsx
@@ -35,6 +35,8 @@ import NormalTable from "../../../Components/DataTable/NormalTable";
import { useGetDepositRequestQuery } from "../../../Services/deposit.request.service";
import { current } from "@reduxjs/toolkit";
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
+import { removeTrailingZeros } from "../../../Constants/Constants";
+import { formatCurrency } from "../../../Components/CurrencyInput";
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
@@ -100,7 +102,7 @@ const DepositRequest = () => {
// ====================================================[Table Filter]================================================================
const filteredData = data?.data?.rows.filter((item) => {
// Filter by name (case insensitive)
- const name = [item.firstName, item.lastName, item.countryName].filter(Boolean).join(' ');
+ const name = [item.firstName, item.lastName, item.countryName].filter(Boolean).join(' ');
const searchLower = searchTerm.toLowerCase();
const nameMatches = name.toLowerCase().includes(searchLower);
@@ -116,6 +118,9 @@ const DepositRequest = () => {
return nameMatches;
});
+ console.log(data?.data?.rows);
+
+
const extractedArray = filteredData?.map((item, index) => ({
// id: item?.id,
"Sr.no": (
@@ -171,9 +176,9 @@ const DepositRequest = () => {
),
"Amount in Investor currency": (
-