Compare commits

..

2 Commits

Author SHA1 Message Date
188c77c1e1 Merge pull request 'update investor' (#21) from Yasin into release/sprint-8
Reviewed-on: #21
2024-12-02 07:18:48 +00:00
YasinShaikh123
463325e603 update investor 2024-12-02 12:47:44 +05:30
5 changed files with 12 additions and 46 deletions

View File

@@ -1,16 +1,16 @@
import { Box, Spinner, Text } from "@chakra-ui/react";
import React from "react";
import "./FullscreenLoaders.css";
import './FullscreenLoaders.css'
const FullscreenLoaders = ({ height }) => {
const FullscreenLoaders = ({height}) => {
return (
<Box
display={"flex"}
justifyContent={"center"}
flexDirection={"column"}
flexDirection={'column'}
alignItems={"center"}
w={"100%"}
h={height ? height : "100vh"}
h={height ? height: "100vh"}
gap={4}
>
{/* <div className="dot-spinner">
@@ -23,16 +23,8 @@ const FullscreenLoaders = ({ height }) => {
<div className="dot-spinner__dot"></div>
<div className="dot-spinner__dot"></div>
</div> */}
{/* <Text color='#004717' fontSize={'md'} fontWeight={500}>Loading...</Text> */}
{/* <div className="spinner-grow" style={{backgroundColor:"#004118"}} role="status" /> */}
<Spinner
thickness="4px"
speed="0.65s"
emptyColor="#fff"
color="#004118"
size="lg"
/>
{/* <Text color='#004717' fontSize={'md'} fontWeight={500}>Loading...</Text> */}
<Spinner />
</Box>
);
};

View File

@@ -4,16 +4,6 @@ import { Spinner } from "@chakra-ui/react";
const Loader01 = () => {
return (
// <div className="dot-spinner">
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// <div className="dot-spinner__dot"></div>
// </div>
// <div className="dot-spinner">
// <div className="dot-spinner__dot"></div>

View File

@@ -1,7 +1,6 @@
import dns from "node:dns"
import * as XLSX from 'xlsx';
import CryptoJS from "crypto-js";
export const generateSerialNumber = (index, currentPage, pageSize) => {
@@ -219,18 +218,4 @@ export function formatDateToYYYYMMDD(dateString) {
// Combine the formatted parts
return `${year}-${month}-${day}`;
}
// Encrypt a string
export const encryptString = (text) => {
const ciphertext = CryptoJS.AES.encrypt(text, import.meta.env.VITE_ROLE_ENCRYPTION_KEY).toString();
return ciphertext;
};
// Decrypt a string
export const decryptString = (ciphertext) => {
const bytes = CryptoJS.AES.decrypt(ciphertext, import.meta.env.VITE_ROLE_ENCRYPTION_KEY);
const originalText = bytes.toString(CryptoJS.enc.Utf8);
return originalText;
};
}

View File

@@ -182,7 +182,7 @@ const Investors = ({ data }) => {
{item?.clientReference_id}
</Text>
),
"First name": (
"First Name": (
<Text
justifyContent={slideFromRight ? "right" : "center"}
as={"span"}
@@ -193,7 +193,7 @@ const Investors = ({ data }) => {
{item.firstName}
</Text>
),
"Last name": (
"Last Name": (
<Text
justifyContent={slideFromRight ? "right" : "center"}
as={"span"}
@@ -204,7 +204,7 @@ const Investors = ({ data }) => {
{item.lastName}
</Text>
),
"Investment amount": (
"Investment Amount": (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
@@ -313,7 +313,7 @@ const Investors = ({ data }) => {
})}`}
</Text>
),
"Total return on Investment": (
"Total Return on Investment": (
<Text
justifyContent={slideFromRight ? "right" : "center"}
as={"span"}

View File

@@ -1,5 +1,4 @@
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
import { encryptString } from '../Constants/Constants'
// Define a base query function with RTK Query
// export const baseQuery = fetchBaseQuery({
@@ -101,7 +100,7 @@ export const apiSlice = createApi({
localStorage.setItem("refreshToken", data?.data?.refresh?.token);
// localStorage.setItem('refreshTokenExp', data?.data?.refresh?.expires);
localStorage.setItem("accessTokenExp", data?.data?.access?.expires);
localStorage.setItem("role", encryptString(data?.data?.role));
localStorage.setItem("role", data?.data?.role);
} catch (error) {
console.error("Login failed:", error);
}