Updated Sr No

This commit is contained in:
2024-08-26 18:58:58 +05:30
parent 8b0454b16a
commit 2f7f907a89
7 changed files with 70 additions and 31 deletions

View File

@@ -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>

View File

@@ -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": (

View File

@@ -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": (

View File

@@ -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"}>

View File

@@ -89,7 +89,7 @@ const InvestorDetails = () => {
"Country",
"Phone Number",
"E-mail ID",
"Investor Type",
"Type",
"KYC Status",
// "Status",
"Action",
@@ -183,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}>

View File

@@ -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"}

View File

@@ -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"}