Merge branch 'dev' of http://git.wdipl.com/Siddhesh.More/tanami-admin-panel into dev
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
import dns from "node:dns"
|
||||
|
||||
|
||||
|
||||
export const generateSerialNumber = (index, currentPage, pageSize) => {
|
||||
return (currentPage - 1) * pageSize + (index + 1);
|
||||
};
|
||||
|
||||
export function getTomorrowDate() {
|
||||
const today = new Date();
|
||||
|
||||
@@ -51,6 +51,7 @@ import {
|
||||
AlertIcon,
|
||||
Breadcrumb,
|
||||
Divider,
|
||||
Tooltip,
|
||||
} from "@chakra-ui/react";
|
||||
import GlobalStateContext from "../Contexts/GlobalStateContext";
|
||||
import Cookies from "js-cookie"; // Import the Cookies library
|
||||
@@ -382,7 +383,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
No Internet !
|
||||
</Alert>
|
||||
|
||||
{/* <Box
|
||||
<Box
|
||||
bottom={4}
|
||||
right={!slideFromRight ? 4 : "auto"}
|
||||
left={slideFromRight ? 4 : "auto"}
|
||||
@@ -407,7 +408,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
zIndex={999}
|
||||
>
|
||||
<IoMdSwap />
|
||||
</Box> */}
|
||||
</Box>
|
||||
|
||||
{slideFromRight ? null : (
|
||||
<aside
|
||||
@@ -474,6 +475,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
if (type === "accordion") {
|
||||
return (
|
||||
<AccordionItem key={index} border={"none"}>
|
||||
<Tooltip isDisabled={isDrawerOpen || openDrawerClick} hasArrow bg={"#fff"} fontSize={"xs"} label={title} placement="top-start" color={"blue.800"} >
|
||||
<AccordionButton
|
||||
style={{ height: "auto" }}
|
||||
className={`${
|
||||
@@ -494,6 +496,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
fontSize={title === "Admin" ? "18px" : "15px"}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
@@ -508,6 +511,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
</Box>
|
||||
<AccordionIcon />
|
||||
</AccordionButton>
|
||||
</Tooltip>
|
||||
<AccordionPanel
|
||||
p={0}
|
||||
pb={1}
|
||||
@@ -520,6 +524,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
{ title: subMenuTitle, path: link, icon: SubIcon },
|
||||
i
|
||||
) => (
|
||||
<Tooltip isDisabled={isDrawerOpen || openDrawerClick} hasArrow bg={"#fff"} fontSize={"xs"} label={subMenuTitle} placement="right" color={"blue.800"} >
|
||||
<Box
|
||||
key={i}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
@@ -579,6 +584,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
</Text>
|
||||
</NavLink>
|
||||
</Box>
|
||||
</Tooltip>
|
||||
)
|
||||
)}
|
||||
</AccordionPanel>
|
||||
@@ -596,6 +602,8 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
);
|
||||
} else if (type === "single") {
|
||||
return (
|
||||
|
||||
<Tooltip hasArrow bg={"#fff"} fontSize={"xs"} label={title} placement="top-start" color={"blue.800"} >
|
||||
<NavLink
|
||||
key={index}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
@@ -618,6 +626,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
{title}
|
||||
</Text>
|
||||
</NavLink>
|
||||
</Tooltip>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
@@ -626,7 +635,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
</Accordion>
|
||||
</Box>
|
||||
|
||||
{/* <Button
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"lg"}
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
@@ -646,7 +655,7 @@ const DashboardLayout = ({ isOnline }) => {
|
||||
) : (
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
)}
|
||||
</Button> */}
|
||||
</Button>
|
||||
<Text textAlign={'center'} fontWeight={500} fontSize={'xs'} color={"gray.600"}>{getCountdownTimer(localStorage.getItem('accessTokenExp'))}</Text>
|
||||
|
||||
</aside>
|
||||
|
||||
@@ -35,7 +35,7 @@ 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 { generateSerialNumber, removeTrailingZeros } from "../../../Constants/Constants";
|
||||
|
||||
export const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -79,7 +79,7 @@ const DepositRequest = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr.no",
|
||||
"Sr.no",
|
||||
"Client ID",
|
||||
"First Name",
|
||||
"Last Name",
|
||||
@@ -125,18 +125,18 @@ const DepositRequest = () => {
|
||||
|
||||
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
// id: item?.id,
|
||||
"Sr.no": (
|
||||
<Text
|
||||
w={"30px"}
|
||||
w={"20px"}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{index + 1}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
</Text>
|
||||
),
|
||||
"Client ID": (
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
|
||||
import { ExternalLinkIcon } from "@chakra-ui/icons";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -72,7 +73,7 @@ const DepositHistory = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr.no",
|
||||
"Sr.no",
|
||||
"Client ID",
|
||||
"First Name",
|
||||
"Last Name",
|
||||
@@ -124,17 +125,17 @@ const DepositHistory = () => {
|
||||
// onViewOpen();
|
||||
// };
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
"Sr.no": (
|
||||
<Text
|
||||
w={"30px"}
|
||||
w={"10px"}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{index + 1}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
</Text>
|
||||
),
|
||||
"Client ID": (
|
||||
|
||||
@@ -42,7 +42,7 @@ import { formatCurrency } from "../../../Components/CurrencyInput";
|
||||
import { IoIosPhonePortrait } from "react-icons/io";
|
||||
import MobileView from "../../../Components/MobileView";
|
||||
import { ImMobile } from "react-icons/im";
|
||||
import { removeTrailingZeros } from "../../../Constants/Constants";
|
||||
import { generateSerialNumber, removeTrailingZeros } from "../../../Constants/Constants";
|
||||
// import { debounce } from "./AddIOCharges";
|
||||
|
||||
const formatDate = (date) => {
|
||||
@@ -83,6 +83,7 @@ const ViewIOTable = () => {
|
||||
|
||||
// ===============================[ Table Header ]
|
||||
const tableHeadRow = [
|
||||
"Sr No.",
|
||||
"IO ID",
|
||||
"IO Name",
|
||||
"Sponsor",
|
||||
@@ -110,7 +111,19 @@ const ViewIOTable = () => {
|
||||
return nameMatches && statusMatches;
|
||||
});
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
"Sr No.": (
|
||||
<Text
|
||||
w={'24px'}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{/* {item.id} */}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
|
||||
</Text>),
|
||||
"IO ID": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
|
||||
|
||||
@@ -38,6 +38,7 @@ import { debounce } from "../../Master/Sponser/AddSponser";
|
||||
import InvestmentDetailsEdit from "./InvestmentDetailsEdit";
|
||||
import { useGetInvestorsQuery } from "../../../Services/investor.details.service";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -81,14 +82,14 @@ const InvestorDetails = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr N/O",
|
||||
"Sr No",
|
||||
"Client ID",
|
||||
"First Name",
|
||||
"Last Name",
|
||||
"Country",
|
||||
"Phone Number",
|
||||
"E-mail ID",
|
||||
"Investor Type",
|
||||
"Type",
|
||||
"KYC Status",
|
||||
// "Status",
|
||||
"Action",
|
||||
@@ -125,16 +126,19 @@ const InvestorDetails = () => {
|
||||
});
|
||||
|
||||
|
||||
const extractedArray = filteredData?.map((item) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
id: item?.id,
|
||||
"Sr N/O": (
|
||||
"Sr No": (
|
||||
<Text
|
||||
w={'24px'}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{item.id}
|
||||
{/* {item.id} */}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
|
||||
</Text>
|
||||
),
|
||||
"Client ID": (
|
||||
@@ -179,7 +183,7 @@ const InvestorDetails = () => {
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Investor Type": (
|
||||
"Type": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} >
|
||||
<Badge colorScheme={item.ioStatus ? "gray" : "green"} variant={'outline'} fontWeight={"700"} px={2} py={0.5}>
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
useGetInvestmentTypesQuery,
|
||||
} from "../../../Services/io.service";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
@@ -84,25 +85,26 @@ const InvestmentType = () => {
|
||||
// ==================================================== [Table Setup] ================================================================
|
||||
|
||||
const tableHeadRow = [
|
||||
// "Sr.no",
|
||||
"Sr No",
|
||||
"Investment Type",
|
||||
"Description",
|
||||
"Status",
|
||||
"Action",
|
||||
];
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
// "Sr.no": (
|
||||
// <Text
|
||||
// justifyContent={slideFromRight ? "right" : "left"}
|
||||
// as={"span"}
|
||||
// color={"teal.900"}
|
||||
// fontWeight={"500"}
|
||||
// className="d-flex align-items-center web-text-small"
|
||||
// >
|
||||
// {index + 1}
|
||||
// </Text>
|
||||
// ),
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
"Sr No": (
|
||||
<Text
|
||||
w={'24px'}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{/* {item.id} */}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
|
||||
</Text>),
|
||||
"Investment Type": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
|
||||
@@ -12,6 +12,7 @@ import ToastBox from "../../../Components/ToastBox";
|
||||
import { debounce } from "./AddSponser";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import { useDeleteSponserMutation, useGetSponserMasterQuery } from "../../../Services/io.service";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
|
||||
export const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
@@ -61,13 +62,26 @@ const Sponser = () => {
|
||||
// ====================================================[Table Setup]================================================================
|
||||
|
||||
const tableHeadRow = [
|
||||
"Sr No",
|
||||
"Sponsor Name",
|
||||
"Email Address",
|
||||
"Status",
|
||||
"Action",
|
||||
];
|
||||
|
||||
const extractedArray = filteredData?.map((item) => ({
|
||||
const extractedArray = filteredData?.map((item, idx) => ({
|
||||
"Sr No": (
|
||||
<Text
|
||||
w={'24px'}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{/* {item.id} */}
|
||||
{generateSerialNumber(idx,currentPage, pageSize )}
|
||||
|
||||
</Text>),
|
||||
"Sponsor Name": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
|
||||
Reference in New Issue
Block a user