update 🦄
This commit is contained in:
@@ -57,7 +57,7 @@ const App = () => {
|
||||
<Router>
|
||||
<Routes>
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/forgot-password" element={<ForgotPassword />} />
|
||||
<Route path="/" element={<ForgotPassword />} />
|
||||
<Route path="/otp-screen" element={<OtpScreen />} />
|
||||
<Route path="/otp-screen/:id" element={<OtpScreen />} />
|
||||
<Route path="/reset-password" element={<ResetPassword />} />
|
||||
|
||||
@@ -22,6 +22,7 @@ const PrimaryButton = ({title, onClick, ...props}) => {
|
||||
// bgGradient: "linear(to-r, #5E0FCD, #3725EA)",
|
||||
opacity: 1,
|
||||
}}
|
||||
|
||||
onClick={onClick}
|
||||
>{title}</Button>
|
||||
)
|
||||
|
||||
@@ -96,7 +96,10 @@ const NormalTable = ({
|
||||
)
|
||||
)
|
||||
: data?.map((item, index) => (
|
||||
<Tr bg={index % 2 === 0 ? "" : "#6311cb14"} key={index}>
|
||||
<Tr cursor={'pointer'}
|
||||
transition={'0.2s all'}
|
||||
_hover={{ shadow: "lg" }}
|
||||
h={12} bg={index % 2 === 0 ? "" : "#6311cb14"} key={index}>
|
||||
{tableHeadRow.map((heading, i) => (
|
||||
<Td
|
||||
textAlign={
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { CheckCircleIcon, WarningIcon } from "@chakra-ui/icons";
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
import { PiWarningBold } from "react-icons/pi";
|
||||
|
||||
const ToastBox = ({ message, status }) => {
|
||||
return (
|
||||
<Box
|
||||
color="white"
|
||||
rounded={"sm"}
|
||||
className="web-text-large d-flex gap-2 align-items-center"
|
||||
p={3}
|
||||
bg={status === "error" ? "red.500" : status === "warn" ? "yellow.500" : status === "info" ? "blue.500" : "green.500"}
|
||||
color={status === "error" ? "red.500" : status === "warn" ? "blue.500" : "green.500"}
|
||||
bg={"#fff"}
|
||||
boxShadow={'md'}
|
||||
rounded={'md'}
|
||||
>
|
||||
|
||||
{status === "error" || status === "warn" ? <PiWarningBold/> : status === "info" ? <WarningIcon/> : <CheckCircleIcon /> }
|
||||
{status === "error" || status === "warn" ? <WarningIcon/> : <CheckCircleIcon /> }
|
||||
<Text as={"span"}>{message}</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -8,8 +8,8 @@ import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { TiWarning } from "react-icons/ti";
|
||||
import Loader01 from "../../Components/Loaders/Loader01";
|
||||
import Asset1 from "../../assets/loginpat.png";
|
||||
import logo from "../../assets/optifii_white.svg";
|
||||
import Asset1 from "../../assets/pattern_white.png";
|
||||
import logo from "../../assets/Whitelogo.svg";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -261,9 +261,9 @@ const ForgotPassword = () => {
|
||||
<Image
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 350,
|
||||
left: -100,
|
||||
bottom: -120,
|
||||
width: 450,
|
||||
}}
|
||||
src={Asset1}
|
||||
alt="bg-img"
|
||||
|
||||
@@ -8,8 +8,8 @@ import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { TiWarning } from "react-icons/ti";
|
||||
import Loader01 from "../../Components/Loaders/Loader01";
|
||||
import Asset1 from "../../assets/loginpat.png";
|
||||
import logo from "../../assets/optifii_white.svg";
|
||||
import Asset1 from "../../assets/pattern_white.png";
|
||||
import logo from "../../assets/Whitelogo.svg";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -294,9 +294,9 @@ const Login = () => {
|
||||
<Image
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 350,
|
||||
left: -100,
|
||||
bottom: -120,
|
||||
width: 450,
|
||||
}}
|
||||
src={Asset1}
|
||||
alt="bg-img"
|
||||
|
||||
@@ -8,8 +8,8 @@ import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { TiWarning } from "react-icons/ti";
|
||||
import Loader01 from "../../Components/Loaders/Loader01";
|
||||
import Asset1 from "../../assets/loginpat.png";
|
||||
import logo from "../../assets/optifii_white.svg";
|
||||
import Asset1 from "../../assets/pattern_white.png";
|
||||
import logo from "../../assets/Whitelogo.svg";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -34,12 +34,13 @@ import {
|
||||
useLoginMutation,
|
||||
useResendOtpMutation,
|
||||
useResetPasswordMutation,
|
||||
useSetOtpMutation,
|
||||
} from "../../Services/token.serivce";
|
||||
import * as Yup from "yup";
|
||||
import { EmailIcon, PhoneIcon } from "@chakra-ui/icons";
|
||||
|
||||
const OtpScreen = () => {
|
||||
const params = useParams()
|
||||
const params = useParams();
|
||||
const [show, setShow] = useState(false);
|
||||
const handleClick = () => setShow(!show);
|
||||
const { isAuthenticate, setIsAuthenticate } = useContext(GlobalStateContext);
|
||||
@@ -52,66 +53,99 @@ const OtpScreen = () => {
|
||||
setPin(value);
|
||||
};
|
||||
|
||||
console.log(pin);
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [resendPassword] = useResendOtpMutation();
|
||||
const [sendOtp] = useSetOtpMutation();
|
||||
|
||||
useEffect(() => {
|
||||
if (isAuthenticate) {
|
||||
navigate("/sponser");
|
||||
}
|
||||
}, [navigate, isAuthenticate]);
|
||||
// useEffect(() => {
|
||||
// if (isAuthenticate) {
|
||||
// navigate("/sponser");
|
||||
// }
|
||||
// }, [navigate, isAuthenticate]);
|
||||
|
||||
const onSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
setIsLoading(true);
|
||||
|
||||
if (params?.id) {
|
||||
// 3-second delay before navigating to "/reset-password"
|
||||
setTimeout(() => {
|
||||
navigate("/reset-password");
|
||||
setIsLoading(false);
|
||||
}, 3000);
|
||||
} else {
|
||||
// 3-second delay before setting authentication, setting cookies, and navigating
|
||||
setTimeout(() => {
|
||||
setIsAuthenticate(true);
|
||||
setIsLoading(false);
|
||||
Cookies.set("isAuthenticated", true, { expires: 7 });
|
||||
navigate("/");
|
||||
reset();
|
||||
}, 3000);
|
||||
}
|
||||
const data = {
|
||||
otp: pin,
|
||||
};
|
||||
|
||||
|
||||
const handleResendOtp = async () => {
|
||||
|
||||
|
||||
|
||||
|
||||
if (params?.id) {
|
||||
|
||||
try {
|
||||
const res = await resendPassword().unwrap();
|
||||
console.log(res);
|
||||
const res = await sendOtp(data);
|
||||
console.log(res?.error?.data?.message);
|
||||
|
||||
if (res?.statusCode === 200) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.message} />
|
||||
),
|
||||
})
|
||||
});
|
||||
navigate("/reset-password");
|
||||
setIsLoading(false);
|
||||
} else if (res?.error) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox
|
||||
status={"success"}
|
||||
message={res?.error?.data?.message}
|
||||
/>
|
||||
),
|
||||
});
|
||||
setIsLoading(false);
|
||||
}
|
||||
} catch (error) {console.log(error);}
|
||||
|
||||
}else if(res?.error){
|
||||
} else {
|
||||
try {
|
||||
const res = await sendOtp(data);
|
||||
console.log(res);
|
||||
|
||||
if (res?.data?.statusCode === 200) {
|
||||
console.log("it");
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.data?.message} />
|
||||
),
|
||||
});
|
||||
|
||||
setIsAuthenticate(true);
|
||||
setIsLoading(false);
|
||||
Cookies.set("isAuthenticated", true, { expires: 7 });
|
||||
navigate("/");
|
||||
} else if (res?.error) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"error"} message={res?.error?.data?.message} />
|
||||
),
|
||||
});
|
||||
setIsLoading(false);
|
||||
}
|
||||
} catch (error) {console.log(error);}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
const handleResendOtp = async () => {
|
||||
try {
|
||||
const res = await resendPassword().unwrap();
|
||||
console.log(res);
|
||||
if (res?.statusCode === 200) {
|
||||
toast({
|
||||
render: () => <ToastBox status={"success"} message={res?.message} />,
|
||||
});
|
||||
} else if (res?.error) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.error?.message} />
|
||||
),
|
||||
})
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
if (err) {
|
||||
@@ -123,13 +157,7 @@ const OtpScreen = () => {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
<Box
|
||||
@@ -175,7 +203,6 @@ const OtpScreen = () => {
|
||||
</Box>
|
||||
|
||||
<FormControl mb={6}>
|
||||
|
||||
<HStack justifyContent={"center"}>
|
||||
<PinInput
|
||||
value={pin}
|
||||
@@ -183,7 +210,6 @@ const OtpScreen = () => {
|
||||
size="md"
|
||||
type="alphanumeric"
|
||||
mask
|
||||
|
||||
>
|
||||
<PinInputField mx={1} />
|
||||
<PinInputField mx={1} />
|
||||
@@ -194,11 +220,17 @@ const OtpScreen = () => {
|
||||
</PinInput>
|
||||
</HStack>
|
||||
|
||||
|
||||
|
||||
<HStack mt={2} fontWeight={600} fontSize={'xs'} justify={'end'} w={'100%'}>
|
||||
<HStack
|
||||
mt={2}
|
||||
fontWeight={600}
|
||||
fontSize={"xs"}
|
||||
justify={"end"}
|
||||
w={"100%"}
|
||||
>
|
||||
{/* <Text>Resend Otp</Text> */}
|
||||
<Text onClick={handleResendOtp} cursor={'pointer'}>Resend Otp</Text>
|
||||
<Text onClick={handleResendOtp} cursor={"pointer"}>
|
||||
Resend Otp
|
||||
</Text>
|
||||
</HStack>
|
||||
</FormControl>
|
||||
|
||||
@@ -237,12 +269,13 @@ const OtpScreen = () => {
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
|
||||
<Image
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 350,
|
||||
left: -100,
|
||||
bottom: -120,
|
||||
width: 450,
|
||||
}}
|
||||
src={Asset1}
|
||||
alt="bg-img"
|
||||
|
||||
@@ -8,8 +8,8 @@ import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { TiWarning } from "react-icons/ti";
|
||||
import Loader01 from "../../Components/Loaders/Loader01";
|
||||
import Asset1 from "../../assets/loginpat.png";
|
||||
import logo from "../../assets/optifii_white.svg";
|
||||
import Asset1 from "../../assets/pattern_white.png";
|
||||
import logo from "../../assets/Whitelogo.svg";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -320,9 +320,9 @@ const ResetPassword = () => {
|
||||
<Image
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 350,
|
||||
left: -100,
|
||||
bottom: -120,
|
||||
width: 450,
|
||||
}}
|
||||
src={Asset1}
|
||||
alt="bg-img"
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
import { Box, Button, HStack, Icon, Input, InputGroup, InputLeftElement, Tag, Text, useDisclosure, VStack } from "@chakra-ui/react";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
HStack,
|
||||
Icon,
|
||||
Input,
|
||||
InputGroup,
|
||||
InputLeftElement,
|
||||
Tag,
|
||||
TagLabel,
|
||||
TagLeftIcon,
|
||||
Text,
|
||||
useDisclosure,
|
||||
VStack,
|
||||
} from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
import MiniHeader from "../../Components/MiniHeader";
|
||||
import GlobalStateContext from "../../Contexts/GlobalStateContext";
|
||||
@@ -11,22 +25,52 @@ import { AddIcon, SearchIcon } from "@chakra-ui/icons";
|
||||
import PrimaryButton from "../../Components/Buttons/PrimaryButton";
|
||||
import { GoDotFill } from "react-icons/go";
|
||||
import RegisteredCorporateAddNewModal from "./RegisteredCorporateAddNewModal";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useGetAllCorpQuery } from "../../Services/register.corporate.service";
|
||||
|
||||
const getStatusColor = (status) => {
|
||||
switch (status) {
|
||||
case 1:
|
||||
return { bg: "blue.100", text: "blue.700", label: "Requested" };
|
||||
case 2:
|
||||
return { bg: "yellow.100", text: "yellow.700", label: "Submitted" };
|
||||
case 3:
|
||||
return { bg: "purple.100", text: "purple.700", label: "Registered" };
|
||||
case 4:
|
||||
return { bg: "green.100", text: "green.700", label: "Approved" };
|
||||
case 5:
|
||||
return { bg: "red.100", text: "red.700", label: "Rejected" };
|
||||
default:
|
||||
return { bg: "gray.100", text: "gray.700", label: "Unknown" };
|
||||
}
|
||||
};
|
||||
|
||||
const RegisteredCorporate = () => {
|
||||
const navigate = useNavigate();
|
||||
const { corpData } = useContext(GlobalStateContext);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [selectedRadio, setSelectedRadio] = useState("");
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure()
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
// Simulate loading effect
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
const [debouncedSearchTerm, setDebouncedSearchTerm] = useState("");
|
||||
|
||||
// Debounce the search term to avoid making a request on every keystroke
|
||||
useEffect(() => {
|
||||
setIsLoading(true);
|
||||
const timer = setTimeout(() => setIsLoading(false), 500);
|
||||
return () => clearTimeout(timer);
|
||||
}, []);
|
||||
const handler = setTimeout(() => {
|
||||
setDebouncedSearchTerm(searchTerm);
|
||||
}, 500); // Adjust delay as needed
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [searchTerm]);
|
||||
|
||||
console.log(corpData);
|
||||
// Modify the skip condition to always call the API initially
|
||||
const { data, isLoading } = useGetAllCorpQuery(debouncedSearchTerm, {
|
||||
skip: debouncedSearchTerm === "" && searchTerm !== "", // Skip only if searchTerm has been cleared after a previous search
|
||||
});
|
||||
|
||||
console.log(data?.data?.rows);
|
||||
|
||||
// Table headers
|
||||
const tableHeadRow = [
|
||||
@@ -38,11 +82,10 @@ const RegisteredCorporate = () => {
|
||||
"Industry",
|
||||
"Type",
|
||||
"Subscription",
|
||||
"Status"
|
||||
|
||||
"Status",
|
||||
];
|
||||
// Extracted data for table
|
||||
const extractedArray = corpData?.map((item, index) => ({
|
||||
const extractedArray = data?.data?.rows?.map((item, index) => ({
|
||||
"Corp Id": (
|
||||
<Text
|
||||
as={"span"}
|
||||
@@ -50,23 +93,26 @@ const RegisteredCorporate = () => {
|
||||
fontSize={"xs"}
|
||||
gap={2}
|
||||
alignItems={"center"}
|
||||
cursor={"pointer"}
|
||||
onClick={() => navigate("/register-corporates/view-corporates")}
|
||||
>
|
||||
{item.CorpId}
|
||||
{item?.corporate_code}
|
||||
</Text>
|
||||
),
|
||||
"Company Name":
|
||||
(<Text
|
||||
"Company Name": (
|
||||
<Text
|
||||
as={"span"}
|
||||
display={"flex"}
|
||||
fontSize={"xs"}
|
||||
gap={2}
|
||||
alignItems={"center"}
|
||||
>
|
||||
{item.CompanyName}
|
||||
</Text>),
|
||||
{item?.corporate_name}
|
||||
</Text>
|
||||
),
|
||||
"Date Of Onboarding": (
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"}>
|
||||
{item.DateOfOnbaording}
|
||||
{item?.onboarding_date? item?.onboarding_date:"---"}
|
||||
</Text>
|
||||
),
|
||||
// "Email Address": (
|
||||
@@ -108,52 +154,120 @@ const RegisteredCorporate = () => {
|
||||
// ),
|
||||
"Email Address": (
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"}>
|
||||
{item.EmailAddress}
|
||||
{item?.emailAddress}
|
||||
</Text>
|
||||
),
|
||||
|
||||
"Industry": (
|
||||
Industry: (
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"}>
|
||||
{item.Industry}
|
||||
{item.industry_name? item?.industry_name:"---"}
|
||||
</Text>
|
||||
),
|
||||
|
||||
"Type": (
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"}>
|
||||
{item.Type}
|
||||
</Text>
|
||||
),
|
||||
Type: <Text as={'span'}> {item?.corporate_type?item?.corporate_type:"---"}</Text>,
|
||||
|
||||
"Subscription": (
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"}>
|
||||
{item.Subscription}
|
||||
</Text>
|
||||
),
|
||||
|
||||
"Status": (
|
||||
<Tag bg={index % 2 === 0 ? "green.100" : "#fff"} size="sm">
|
||||
<GoDotFill color="green" /> <Text
|
||||
ms={1}
|
||||
bgGradient="linear(to-l, green.700, green.600)"
|
||||
bgClip="text"
|
||||
fontSize={"xs"}
|
||||
Subscription: (
|
||||
<HStack maxH={190} as={"span"} alignItems={"center"} flexWrap={"wrap"}>
|
||||
{item?.opted_for_expence && (
|
||||
<Text
|
||||
fontWeight={600}
|
||||
as={"span"}
|
||||
fontSize={"xs"}
|
||||
py={0.5}
|
||||
rounded={"md"}
|
||||
bg={index % 2 === 0 ? "purple.100" : "#fff"}
|
||||
color={"purple.500"}
|
||||
px={2}
|
||||
>
|
||||
Expence
|
||||
</Text>
|
||||
)}
|
||||
{item?.opted_for_benefit && (
|
||||
<Text
|
||||
fontWeight={600}
|
||||
as={"span"}
|
||||
fontSize={"xs"}
|
||||
py={0.5}
|
||||
rounded={"md"}
|
||||
bg={index % 2 === 0 ? "purple.100" : "#fff"}
|
||||
color={"purple.500"}
|
||||
px={2}
|
||||
>
|
||||
Benefits
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{item?.opted_for_gifting && (
|
||||
<Text
|
||||
fontWeight={600}
|
||||
as={"span"}
|
||||
fontSize={"xs"}
|
||||
py={0.5}
|
||||
rounded={"md"}
|
||||
bg={index % 2 === 0 ? "purple.100" : "#fff"}
|
||||
color={"purple.500"}
|
||||
px={2}
|
||||
>
|
||||
Gifting
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{!item?.opted_for_gifting && !item?.opted_for_gifting && !item?.opted_for_gifting && (
|
||||
<Text
|
||||
fontWeight={600}
|
||||
as={"span"}
|
||||
fontSize={"xs"}
|
||||
py={0.5}
|
||||
rounded={"md"}
|
||||
bg={index % 2 === 0 ? "purple.100" : "#fff"}
|
||||
color={"purple.500"}
|
||||
px={2}
|
||||
>
|
||||
---
|
||||
</Text>
|
||||
)}
|
||||
|
||||
</HStack>
|
||||
),
|
||||
|
||||
Status: (
|
||||
<Tag
|
||||
bg={getStatusColor(item?.corporate_status_xid)?.bg}
|
||||
size="sm"
|
||||
key={index}
|
||||
>
|
||||
<TagLeftIcon
|
||||
boxSize="12px"
|
||||
as={GoDotFill}
|
||||
color={getStatusColor(item?.corporate_status_xid)?.text}
|
||||
/>
|
||||
<TagLabel>
|
||||
<Text
|
||||
// ms={1}
|
||||
bgGradient={`linear(to-l, ${
|
||||
getStatusColor(item?.corporate_status_xid)?.text
|
||||
}, ${getStatusColor(item?.corporate_status_xid)?.text})`}
|
||||
bgClip="text"
|
||||
fontSize="xs"
|
||||
as="span"
|
||||
fontWeight={600}
|
||||
>
|
||||
{item.Status}
|
||||
{item?.corporate_status}
|
||||
</Text>
|
||||
</TagLabel>
|
||||
</Tag>
|
||||
),
|
||||
|
||||
}));
|
||||
|
||||
return (
|
||||
<Box as={"span"} {...OPACITY_ON_LOAD} p={4} pb={3} overflowX={"scroll"}>
|
||||
<MiniHeader backButton={true} title={"Manage Registered Corporates"} />
|
||||
|
||||
<VStack shadow={'md'} rounded={'md'} gap={3} py={3} bg={'#fff'}>
|
||||
<HStack px={3} w={'100%'} justifyContent={'space-between'}>
|
||||
<Text as={'span'} fontWeight={500} fontSize={'sm'}>Corporates</Text>
|
||||
<VStack shadow={"md"} rounded={"md"} gap={3} py={3} bg={"#fff"}>
|
||||
<HStack px={3} w={"100%"} justifyContent={"space-between"}>
|
||||
<Text as={"span"} fontWeight={500} fontSize={"sm"}>
|
||||
Corporates
|
||||
</Text>
|
||||
<HStack>
|
||||
<InputGroup width={350} size="sm" ml={5}>
|
||||
<InputLeftElement pointerEvents="none">
|
||||
@@ -163,18 +277,18 @@ const RegisteredCorporate = () => {
|
||||
type="search"
|
||||
placeholder="Search..."
|
||||
rounded="md"
|
||||
bg={'gray.100'}
|
||||
border={'none'}
|
||||
// value={searchTerm}
|
||||
// onChange={(e) => setSearchTerm(e.target.value)}
|
||||
bg={"gray.100"}
|
||||
border={"none"}
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
</InputGroup>
|
||||
|
||||
<PrimaryButton
|
||||
onClick={onOpen}
|
||||
title={"Add New"}
|
||||
size={'sm'}
|
||||
leftIcon={<AddIcon fontSize={'xs'} />}
|
||||
size={"sm"}
|
||||
leftIcon={<AddIcon fontSize={"xs"} />}
|
||||
/>
|
||||
{/* Modal is triggered on button click */}
|
||||
<RegisteredCorporateAddNewModal isOpen={isOpen} onClose={onClose} />
|
||||
|
||||
@@ -1,26 +1,122 @@
|
||||
import { Box, Modal, ModalOverlay, ModalContent, ModalHeader, ModalFooter, ModalBody, ModalCloseButton, Button, Input, Text, HStack } from '@chakra-ui/react'
|
||||
import React, { useState } from 'react'
|
||||
import PrimaryButton from '../../Components/Buttons/PrimaryButton'
|
||||
import SecondaryButton from '../../Components/Buttons/SecondaryButton'
|
||||
import RegisteredCorporateAddNewModalSuccessModal from './RegisteredCorporateAddNewModalSuccessModal'
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
Box,
|
||||
Modal,
|
||||
ModalOverlay,
|
||||
ModalContent,
|
||||
ModalHeader,
|
||||
ModalFooter,
|
||||
ModalBody,
|
||||
ModalCloseButton,
|
||||
Button,
|
||||
Input,
|
||||
Text,
|
||||
HStack,
|
||||
FormControl,
|
||||
FormLabel,
|
||||
FormErrorMessage,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import * as Yup from "yup";
|
||||
import PrimaryButton from "../../Components/Buttons/PrimaryButton";
|
||||
import SecondaryButton from "../../Components/Buttons/SecondaryButton";
|
||||
import RegisteredCorporateAddNewModalSuccessModal from "./RegisteredCorporateAddNewModalSuccessModal";
|
||||
import PhoneInput from "react-phone-input-2";
|
||||
import "react-phone-input-2/lib/style.css";
|
||||
import { useCorporateQuickAddMutation } from "../../Services/register.corporate.service";
|
||||
import ToastBox from "../../Components/ToastBox";
|
||||
|
||||
// Define Yup schema for validation
|
||||
const validationSchema = Yup.object().shape({
|
||||
entity_name: Yup.string().required("Entity Name is required"),
|
||||
corporate_name: Yup.string().required("Company Name is required"),
|
||||
emailAddress: Yup.string()
|
||||
.email("Email is invalid")
|
||||
.required("Email is required"),
|
||||
mobileNumber: Yup.string().required("Phone number is required"),
|
||||
ISDcode: Yup.string(),
|
||||
});
|
||||
|
||||
const RegisteredCorporateAddNewModal = ({ isOpen, onClose }) => {
|
||||
const toast = useToast()
|
||||
const [isSuccessOpen, setIsSuccessOpen] = useState(false);
|
||||
|
||||
const [phone, setPhone] = useState("");
|
||||
const[ isLoading, setIsLoading ] = useState(false)
|
||||
|
||||
const handleAddClick = () => {
|
||||
// Handle the form submission logic here (e.g., send data to the server)
|
||||
// After successful submission, open the success modal
|
||||
setIsSuccessOpen(true);
|
||||
const [isdCode, setIsdCode] = useState("");
|
||||
|
||||
// Initialize react-hook-form with Yup validation
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors },
|
||||
setValue,
|
||||
reset,
|
||||
} = useForm({
|
||||
resolver: yupResolver(validationSchema),
|
||||
});
|
||||
|
||||
const [corporateQuickAdd] = useCorporateQuickAddMutation();
|
||||
|
||||
const handlePhoneChange = (value, country) => {
|
||||
const countryCode = `+${country.dialCode}`;
|
||||
setIsdCode(countryCode);
|
||||
let numberWithoutISD = value;
|
||||
|
||||
setPhone(numberWithoutISD);
|
||||
setValue("mobileNumber", value.split('').splice(countryCode.length - 1, 15).join('')); // Sync phone number
|
||||
setValue("ISDcode", countryCode); // Sync ISD code
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Handle form submission
|
||||
const onSubmit = async (data) => {
|
||||
setIsLoading(true)
|
||||
console.log(data);
|
||||
|
||||
try {
|
||||
const res = await corporateQuickAdd(data)
|
||||
console.log(res?.data?.data?.link);
|
||||
|
||||
|
||||
|
||||
if (res?.data?.statusCode === 200) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.data?.message} />
|
||||
),
|
||||
})
|
||||
localStorage?.setItem("link", res?.data?.data?.link)
|
||||
setIsLoading(false);
|
||||
setIsSuccessOpen(true); // Open success modal after submission
|
||||
onClose(); // Close the initial add form modal
|
||||
reset(); // Reset the form fields
|
||||
}else if(res?.error){
|
||||
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"error"} message={res?.error?.data?.message} />
|
||||
),
|
||||
})
|
||||
setIsLoading(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
// Handle the form submission logic here (e.g., send data to the server)
|
||||
|
||||
};
|
||||
|
||||
const handleSuccessClose = () => {
|
||||
setIsSuccessOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
@@ -30,35 +126,69 @@ const RegisteredCorporateAddNewModal = ({ isOpen, onClose }) => {
|
||||
<ModalHeader>Quick Add</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<ModalBody>
|
||||
<Box as='form'>
|
||||
<Box mb={4}>
|
||||
<Text fontSize='xs' fontWeight={400} mb={1} color={"#4F4F4F"}>Entity Name</Text>
|
||||
<Input />
|
||||
</Box>
|
||||
<Box mb={4}>
|
||||
<Text fontSize='xs' fontWeight={400} mb={1} color={"#4F4F4F"}>Email ID</Text>
|
||||
<Input />
|
||||
</Box>
|
||||
<Box mb={10}>
|
||||
<Text
|
||||
color={"#4F4F4F"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
{/* Use handleSubmit from react-hook-form */}
|
||||
<Box as="form" onSubmit={handleSubmit(onSubmit)}>
|
||||
<FormControl isInvalid={errors.entity_name} mb={4} isRequired>
|
||||
<FormLabel
|
||||
fontSize="xs"
|
||||
fontWeight={400}
|
||||
mb={1}
|
||||
color={"#4F4F4F"}
|
||||
>
|
||||
Entity Name
|
||||
</FormLabel>
|
||||
<Input fontSize={"xs"} {...register("entity_name")} />
|
||||
<FormErrorMessage fontSize={"xs"} fontWeight={500} as={"span"}>
|
||||
{errors.entity_name?.message}
|
||||
</FormErrorMessage>
|
||||
</FormControl>
|
||||
|
||||
<FormControl isInvalid={errors.corporate_name} mb={4} isRequired>
|
||||
<FormLabel
|
||||
fontSize="xs"
|
||||
fontWeight={400}
|
||||
mb={1}
|
||||
color={"#4F4F4F"}
|
||||
>
|
||||
Company Name
|
||||
</FormLabel>
|
||||
<Input fontSize={"xs"} {...register("corporate_name")} />
|
||||
<FormErrorMessage fontSize={"xs"} fontWeight={500} as={"span"}>
|
||||
{errors.corporate_name?.message}
|
||||
</FormErrorMessage>
|
||||
</FormControl>
|
||||
|
||||
<FormControl isInvalid={errors.emailAddress} mb={4} isRequired>
|
||||
<FormLabel
|
||||
fontSize="xs"
|
||||
fontWeight={400}
|
||||
mb={1}
|
||||
color={"#4F4F4F"}
|
||||
>
|
||||
Email ID
|
||||
</FormLabel>
|
||||
<Input fontSize={"xs"} {...register("emailAddress")} />
|
||||
<FormErrorMessage fontSize={"xs"} fontWeight={500} as={"span"}>
|
||||
{errors.emailAddress?.message}
|
||||
</FormErrorMessage>
|
||||
</FormControl>
|
||||
|
||||
<Box mb={10}>
|
||||
<Text color={"#4F4F4F"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Phone Number
|
||||
</Text>
|
||||
|
||||
{/* Handle phone input separately and integrate it with react-hook-form */}
|
||||
<PhoneInput
|
||||
country={"in"} // Default country
|
||||
country={"in"}
|
||||
value={phone}
|
||||
onChange={setPhone}
|
||||
onChange={handlePhoneChange}
|
||||
inputStyle={{
|
||||
width: "100%",
|
||||
borderRadius: "md",
|
||||
paddingLeft: "8",
|
||||
border: "1px solid #e2e8f0",
|
||||
height: "40px"
|
||||
height: "40px",
|
||||
}}
|
||||
buttonStyle={{
|
||||
border: "none",
|
||||
@@ -66,23 +196,33 @@ const RegisteredCorporateAddNewModal = ({ isOpen, onClose }) => {
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
/>
|
||||
{errors.mobileNumber && (
|
||||
<Text color="red.500" fontSize="xs" fontWeight={500}>
|
||||
{errors.mobileNumber.message}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<HStack justifyContent={"center"} spacing={4} my={6}>
|
||||
<SecondaryButton title={"Cancel"} onClick={onClose} />
|
||||
<PrimaryButton
|
||||
onClick={handleAddClick} // Add button triggers form submission and success modal
|
||||
isLoading={isLoading}
|
||||
type="submit" // Change onClick to type="submit" to trigger form submit
|
||||
title={"Add"}
|
||||
/>
|
||||
</HStack>
|
||||
</Box>
|
||||
</ModalBody>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
{/* Success Modal */}
|
||||
<RegisteredCorporateAddNewModalSuccessModal isOpen={isSuccessOpen} onClose={handleSuccessClose} />
|
||||
<RegisteredCorporateAddNewModalSuccessModal
|
||||
isOpen={isSuccessOpen}
|
||||
onClose={handleSuccessClose}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export default RegisteredCorporateAddNewModal;
|
||||
|
||||
@@ -8,10 +8,15 @@ import {
|
||||
ModalCloseButton,
|
||||
Text,
|
||||
HStack,
|
||||
Icon,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
import { motion } from "framer-motion"; // Import motion from framer-motion
|
||||
import PrimaryButton from "../../Components/Buttons/PrimaryButton";
|
||||
import { AddIcon } from "@chakra-ui/icons";
|
||||
import { FaRegCopy } from "react-icons/fa";
|
||||
import ToastBox from "../../Components/ToastBox";
|
||||
|
||||
// Define motion components
|
||||
const MotionBox = motion(Box);
|
||||
@@ -20,6 +25,24 @@ const MotionCircle = motion.circle;
|
||||
const MotionPolyline = motion.polyline;
|
||||
|
||||
const RegisteredCorporateAddNewModalSuccessModal = ({ isOpen, onClose }) => {
|
||||
const toast = useToast()
|
||||
|
||||
function copyToClipboard(text) {
|
||||
navigator.clipboard.writeText(text)
|
||||
.then(() => {
|
||||
// console.log('Text copied to clipboard');
|
||||
// alert('Text copied to clipboard');
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"warn"} message={"Text copied to clipboard"} />
|
||||
),
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Failed to copy text: ', err);
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal isOpen={isOpen} onClose={onClose}>
|
||||
<ModalOverlay />
|
||||
@@ -101,8 +124,19 @@ const RegisteredCorporateAddNewModalSuccessModal = ({ isOpen, onClose }) => {
|
||||
An email with the onboarding link along with the instruction has been sent has been sent.You can view their onboarding status, by clicking on the button below
|
||||
</Text>
|
||||
|
||||
<HStack position={'relative'} overflowX={'hidden'} w={'100%'}>
|
||||
<Text
|
||||
color={"#4F4F4F"}
|
||||
fontSize={"10px"}
|
||||
fontWeight={"500"}
|
||||
textAlign={"start"}>{localStorage?.getItem("link")}</Text>
|
||||
<Icon bg={'#fff'} p={2} onClick={()=>copyToClipboard(localStorage?.getItem("link"))} position={'absolute'} right={0} bottom={0} boxSize={7} _hover={{bg:"gray.100", transition:"0.5s"}} cursor={'pointer'} rounded={'md'} as={FaRegCopy} />
|
||||
</HStack>
|
||||
|
||||
|
||||
|
||||
<HStack justifyContent={"center"} mt={6}>
|
||||
<PrimaryButton title={"Check Application Status"} />
|
||||
<PrimaryButton onClick={onClose} title={"Check Application Status"} />
|
||||
</HStack>
|
||||
</MotionBox>
|
||||
</ModalBody>
|
||||
|
||||
@@ -18,9 +18,11 @@ import { MdCheckCircle, MdOutlineModeEdit } from "react-icons/md";
|
||||
import SecondaryButton from "../../Components/Buttons/SecondaryButton";
|
||||
import pancard from "../../assets/pancard.svg"
|
||||
import gift from "../../assets/gift.svg"
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
|
||||
const ViewCorporates = () => {
|
||||
const navigate = useNavigate()
|
||||
const { empData } = useContext(GlobalStateContext);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [selectedRadio, setSelectedRadio] = useState("");
|
||||
@@ -127,7 +129,7 @@ const ViewCorporates = () => {
|
||||
</Tag>
|
||||
),
|
||||
"Action": (
|
||||
<HStack>
|
||||
<HStack onClick={()=> navigate('/register-corporates/view-corporates-employee-details')}>
|
||||
<LuEye color="#6311CB" />
|
||||
<Text fontSize={"xs"} as={"span"} colorScheme={"#363636"} mb={0}>
|
||||
{item.Action}
|
||||
@@ -141,7 +143,7 @@ const ViewCorporates = () => {
|
||||
<Box as={"span"} {...OPACITY_ON_LOAD} p={4} pb={3} overflowX={"scroll"}>
|
||||
<MiniHeader backButton={true} title={""} />
|
||||
|
||||
<Box shadow={'md'} p={4} bg={'#fff'}>
|
||||
<Box roundedTop={"lg"} shadow={'md'} p={4} bg={'#fff'}>
|
||||
<HStack justifyContent={"space-between"}>
|
||||
<Box>
|
||||
<HStack spacing={4} alignItems={"start"}>
|
||||
@@ -153,7 +155,7 @@ const ViewCorporates = () => {
|
||||
<Text fontSize={"sm"} color={"#999999"}>Limited Liability Partnership (LLP)</Text>
|
||||
</VStack>
|
||||
|
||||
<Badge
|
||||
{/* <Badge
|
||||
bg={"#ebf8ef"}
|
||||
color={"#00A438"}
|
||||
fontSize={"xs"}
|
||||
@@ -166,7 +168,21 @@ const ViewCorporates = () => {
|
||||
<GoDotFill color={"#00A438"} />
|
||||
<Text mb={0}>Registered</Text>
|
||||
</HStack>
|
||||
</Badge>
|
||||
|
||||
|
||||
</Badge> */}
|
||||
<Tag bg={"green.100" } size="sm">
|
||||
<GoDotFill color={"#00A438"} /> <Text
|
||||
ms={1}
|
||||
bgGradient="linear(to-l, green.700, green.600)"
|
||||
bgClip="text"
|
||||
fontSize={"xs"}
|
||||
as={"span"}
|
||||
fontWeight={600}
|
||||
>
|
||||
Registered
|
||||
</Text>
|
||||
</Tag>
|
||||
</HStack>
|
||||
</Box>
|
||||
|
||||
@@ -445,7 +461,7 @@ const ViewCorporates = () => {
|
||||
</Text>
|
||||
</HStack>
|
||||
</Box>
|
||||
<Box shadow={'md'} p={4} bg={'#fff'}>
|
||||
<Box roundedBottom={'lg'} shadow={'md'} p={4} bg={'#fff'}>
|
||||
<HStack spacing={6}>
|
||||
<Box bg={"#f7f6fe"} p={4} rounded={"md"}>
|
||||
<HStack justifyContent={"space-between"} mb={4}>
|
||||
@@ -556,7 +572,7 @@ const ViewCorporates = () => {
|
||||
</Box>
|
||||
|
||||
|
||||
<Box mt={4} shadow={'md'} py={2} bg={'#fff'}>
|
||||
<Box rounded={'lg'} mt={4} shadow={'md'} py={2} bg={'#fff'}>
|
||||
<Accordion allowMultiple>
|
||||
<AccordionItem border={"none"}>
|
||||
<Text mb={0}>
|
||||
|
||||
@@ -7,6 +7,6 @@ import ViewCorporatesEmployeeDetails from "../Pages/ViewCorporates/ViewCorporate
|
||||
export const RouteLink = [
|
||||
{ path: "/", Component: NotFound },
|
||||
{ path: "/register-corporates", Component: RegisteredCorporate },
|
||||
{ path: "/view-corporates", Component: ViewCorporates },
|
||||
{ path: "/view-corporates-employee-details", Component: ViewCorporatesEmployeeDetails },
|
||||
{ path: "/register-corporates/view-corporates", Component: ViewCorporates },
|
||||
{ path: "/register-corporates/view-corporates-employee-details", Component: ViewCorporatesEmployeeDetails },
|
||||
];
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
// io.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
export const keyMerits = createApi({
|
||||
reducerPath: "ioService",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getKeyMerits"],
|
||||
endpoints: (builder) => ({
|
||||
// =====[get]
|
||||
getKeyMerits: builder.query({
|
||||
query: (id) => `/io/admin/key-merits/${id}`,
|
||||
providesTags: ["getKeyMerits"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
setDisplayOrder: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/key-merits/resetDisplayOrder`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetKeyMeritsQuery,
|
||||
useSetDisplayOrderMutation
|
||||
} =
|
||||
keyMerits;
|
||||
@@ -1,47 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const banInvestorDetails = createApi({
|
||||
reducerPath: "banInvestorDetails",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getBanInvestor", "getUnbanInvestor"],
|
||||
endpoints: (builder) => ({
|
||||
getInvestor: builder.query({
|
||||
query: () => `/investorDetails/admin`,
|
||||
providesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
getUnbanInvestor: builder.query({
|
||||
query: () => `/investorDetails/admin/getAllUnbanned`,
|
||||
providesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
getbanInvestor: builder.query({
|
||||
query: () => `/investorDetails/admin/getAllBanned`,
|
||||
providesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
updateUnban: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/investorDetails/admin/unBanById/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetUnbanInvestorQuery,
|
||||
useGetInvestorQuery,
|
||||
useGetbanInvestorQuery,
|
||||
useUpdateUnbanMutation,
|
||||
} = banInvestorDetails;
|
||||
@@ -1,43 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const bankDetails = createApi({
|
||||
reducerPath: "bankDetails",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getBank"],
|
||||
|
||||
endpoints: (builder) => ({
|
||||
getBank: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/bankDetails/admin/?page=${page}&size=${size}`,
|
||||
providesTags: ["getBank"],
|
||||
}),
|
||||
|
||||
updateBankDetails: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/bankDetails/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getBank"],
|
||||
}),
|
||||
|
||||
getBankDetails: builder.query({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/bankDetails/admin/${id}`,
|
||||
method: "GET",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getBank"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useGetBankQuery, useUpdateBankDetailsMutation,useGetBankDetailsQuery } = bankDetails;
|
||||
@@ -1,37 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const contact = createApi({
|
||||
reducerPath: "contact",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getContact"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
getContact: builder.query({
|
||||
query: () =>
|
||||
`/contactDetails/admin`,
|
||||
providesTags: ["getContact"],
|
||||
}),
|
||||
|
||||
|
||||
// ========[Update Investment]=======
|
||||
|
||||
updateContact: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/contactDetails/admin/`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getContact"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useGetContactQuery, useUpdateContactMutation } = contact;
|
||||
@@ -1,57 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const deleteRequest = createApi({
|
||||
reducerPath: "deleteRequest",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getDeleteRequest", "getDeleteHistory"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
getDeleteRequest: builder.query({
|
||||
query: () => `/account/admin/pending-request`,
|
||||
providesTags: ["getDepositRequest"],
|
||||
}),
|
||||
|
||||
getDeleteRequestById: builder.query({
|
||||
query: (id) => `/account/admin/detail/${id}`,
|
||||
}),
|
||||
|
||||
approveDepositRequest: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/account/admin/approved-request/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDeleteRequest", "getDeleteHistory"],
|
||||
}),
|
||||
|
||||
deleteReject: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/deposit/admin/rejected/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDeleteRequest", "getDeleteHistory"],
|
||||
}),
|
||||
|
||||
getDeleteHistory: builder.query({
|
||||
query: () => `/account/admin/history`,
|
||||
providesTags: ["getDeleteHistory"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetDeleteRequestQuery,
|
||||
useGetDeleteRequestByIdQuery,
|
||||
useApproveDepositRequestMutation,
|
||||
useGetDeleteHistoryQuery
|
||||
|
||||
} = deleteRequest;
|
||||
@@ -1,55 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const depositRequest = createApi({
|
||||
reducerPath: "depositRequest",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getDepositRequest", "getDepositHistory"],
|
||||
endpoints: (builder) => ({
|
||||
getDepositRequest: builder.query({
|
||||
query: ({page, size}) => `/deposit/admin/pending-requests?page=${page}&size=${size}`,
|
||||
providesTags: ["getDepositRequest"],
|
||||
}),
|
||||
|
||||
getDepositRequestById: builder.query({
|
||||
query: (id) => `/deposit/admin/getById/${id}`,
|
||||
}),
|
||||
|
||||
updateDepositRequest: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/deposit/admin/approved/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDepositRequest", "getDepositHistory"],
|
||||
}),
|
||||
|
||||
depositReject: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/deposit/admin/rejected/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDepositRequest", "getDepositHistory"],
|
||||
}),
|
||||
|
||||
getDepositHistory: builder.query({
|
||||
query: ({page, size}) => `/deposit/admin/history?page=${page}&size=${size}`,
|
||||
providesTags: ["getDepositHistory"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetDepositRequestQuery,
|
||||
useGetDepositRequestByIdQuery,
|
||||
useUpdateDepositRequestMutation,
|
||||
useDepositRejectMutation,
|
||||
useGetDepositHistoryQuery,
|
||||
} = depositRequest;
|
||||
@@ -1,101 +0,0 @@
|
||||
//sponser.service
|
||||
// Need to use the React-specific entry point to import createApi
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import { api } from "./api.service";
|
||||
|
||||
const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// const baseUrl = `${import.meta.env.VITE_API_BASE_URL}/${import.meta.env.VITE_API_VERSION}`
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const deposite = createApi({
|
||||
reducerPath: "deposite",
|
||||
baseQuery: fetchBaseQuery({ baseUrl: baseUrl }),
|
||||
tagTypes: ["gtDeposite"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
|
||||
// ======[Get All]=====
|
||||
|
||||
getSponserMaster: builder.query({
|
||||
query: ({ page, size }) => `/sponsor/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
|
||||
// ========[Get Active]========
|
||||
|
||||
getActiveSponserMaster: builder.query({
|
||||
query: () => `/sponsor/admin/active`,
|
||||
providesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
getSponserMasterActive: builder.query({
|
||||
query: () => "/sponsor/admin/active",
|
||||
}),
|
||||
|
||||
|
||||
// ======[Get ID]=====
|
||||
|
||||
getSponserById: builder.query({
|
||||
query: (id) => `/sponsor/admin/${id}`,
|
||||
providesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Toggle Status]========
|
||||
|
||||
toggleStatus: builder.mutation({
|
||||
query: ({ id }) => ({
|
||||
url: `/sponsor/admin/toggle-status/${id}`,
|
||||
method: "PATCH",
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Create Sponser]========
|
||||
|
||||
createSponser: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/sponsor/admin`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Update Sponser]========
|
||||
|
||||
updateSponser: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/sponsor/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Delete Sponser]========
|
||||
|
||||
deleteSponser: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/sponsor/admin/delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetSponserMasterQuery,
|
||||
useGetSponserMasterActiveQuery,
|
||||
useToggleStatusMutation,
|
||||
useCreateSponserMutation,
|
||||
useUpdateSponserMutation,
|
||||
useGetSponserByIdQuery,
|
||||
useDeleteSponserMutation,
|
||||
useGetActiveSponserMasterQuery
|
||||
} = sponserMaster;
|
||||
@@ -1,56 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const drawalRequest = createApi({
|
||||
reducerPath: "drawalRequest",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getDrawalRequest", "getDepositHistory"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
getDrawalRequest: builder.query({
|
||||
query: () => `/withdrawal/admin`,
|
||||
providesTags: ["getDrawalRequest"],
|
||||
}),
|
||||
|
||||
getDrawalRequestById: builder.query({
|
||||
query: (id) => `/withdrawal/admin/getById/${id}`,
|
||||
}),
|
||||
|
||||
updateDrawalRequest: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/withdrawal/admin/updateApprove/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDrawalRequest", "getDepositHistory"],
|
||||
}),
|
||||
|
||||
depositReject: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/deposit/admin/rejected/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getDepositRequest", "getDepositHistory"],
|
||||
}),
|
||||
|
||||
getDrawalHistory: builder.query({
|
||||
query: () => `/withdrawal/admin/history`,
|
||||
providesTags: ["getDepositHistory"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetDrawalRequestQuery,
|
||||
useUpdateDrawalRequestMutation,
|
||||
useGetDrawalRequestByIdQuery,
|
||||
useDepositRejectMutation,
|
||||
useGetDrawalHistoryQuery
|
||||
} = drawalRequest;
|
||||
@@ -1,49 +0,0 @@
|
||||
// exchangeRate.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const exchangeRate = createApi({
|
||||
reducerPath: "exchangeRate",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getAllExchangeRate", "getExchangeById"],
|
||||
|
||||
endpoints: (builder) => ({
|
||||
|
||||
getAllExchangeRates: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/currencyExchange/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getAllExchangeRate"],
|
||||
}),
|
||||
|
||||
getExchangeRateById: builder.query({
|
||||
query: (id) => `/currencyExchange/admin/${id}`,
|
||||
providesTags: ["getExchangeById"],
|
||||
}),
|
||||
|
||||
updateExchangeRate: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/currencyExchange/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getAllExchangeRate"],
|
||||
}),
|
||||
|
||||
getCurrencyHistoryById: builder.query({
|
||||
query: (id) => `/currencyExchange/admin/history/${id}`,
|
||||
providesTags: ["getAllExchangeRate"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetAllExchangeRatesQuery,
|
||||
useGetExchangeRateByIdQuery,
|
||||
useUpdateExchangeRateMutation,
|
||||
useGetCurrencyHistoryByIdQuery,
|
||||
} = exchangeRate;
|
||||
@@ -1,61 +0,0 @@
|
||||
// io.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
export const ioService = createApi({
|
||||
reducerPath: "ioService",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getInvestmentDocuments"],
|
||||
|
||||
|
||||
|
||||
endpoints: (builder) => ({
|
||||
// =====[get]
|
||||
getInvestmentDocuments: builder.query({
|
||||
query: ({id}) => `/io/admin/document/${id}`,
|
||||
providesTags: ["getInvestmentDocuments"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// =====[create]
|
||||
createInvestmentDocuments: builder.mutation({
|
||||
query: ({data, id}) => ({
|
||||
url: `/io/admin/document/${id}`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getInvestmentDocuments"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
updateIO: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentDocuments"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useCreateInvestmentDocumentsMutation,
|
||||
} =
|
||||
ioService;
|
||||
@@ -1,72 +0,0 @@
|
||||
// // investmentType.service.js
|
||||
// import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// // import { api } from "./api.service";
|
||||
// import { baseQuery } from "./token.serivce";
|
||||
|
||||
// // const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// // Define a service using a base URL and expected endpoints
|
||||
// export const investmentType = createApi({
|
||||
// reducerPath: "investmentType",
|
||||
// baseQuery: baseQuery,
|
||||
// tagTypes: ["getInvestmentType", "getInvestmentTypeID"],
|
||||
// endpoints: (builder) => ({
|
||||
|
||||
// // ========[Get All]=========
|
||||
|
||||
// getInvestmentTypes: builder.query({
|
||||
// query: ({ page, size }) =>
|
||||
// `/investmentType/admin?page=${page}&size=${size}`,
|
||||
// providesTags: ["getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// // ========[Get ID]=========
|
||||
|
||||
// getInvestmentTypeById: builder.query({
|
||||
// query: (id) => `/investmentType/admin/${id}`,
|
||||
// providesTags: ["getInvestmentTypeID"],
|
||||
// }),
|
||||
|
||||
// // ========[Create Investment]========
|
||||
|
||||
// createInvestmentType: builder.mutation({
|
||||
// query: (data) => ({
|
||||
// url: `/investmentType/admin/`,
|
||||
// method: "POST",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// // ========[Update Investment]=======
|
||||
|
||||
// updateInvestmentType: builder.mutation({
|
||||
// query: ({ data, id }) => ({
|
||||
// url: `/investmentType/admin/${id}`,
|
||||
// method: "PATCH",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getInvestmentTypeID", "getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// // ========[Delete Investment]=======
|
||||
|
||||
// deleteInvestmentType: builder.mutation({
|
||||
// query: (id) => ({
|
||||
// url: `/investmentType/admin/delete/${id}`,
|
||||
// method: "DELETE",
|
||||
// }),
|
||||
// invalidatesTags: ["getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// }),
|
||||
// });
|
||||
|
||||
// // Export hooks for usage in functional components
|
||||
// export const {
|
||||
// useGetInvestmentTypesQuery,
|
||||
// useGetInvestmentTypeByIdQuery,
|
||||
// useCreateInvestmentTypeMutation,
|
||||
// useUpdateInvestmentTypeMutation,
|
||||
// useDeleteInvestmentTypeMutation,
|
||||
// } = investmentType;
|
||||
@@ -1,42 +0,0 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const investorDetails = createApi({
|
||||
reducerPath: "investorDetails",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: [],
|
||||
endpoints: (builder) => ({
|
||||
getInvestors: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/investorDetails/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getInvestors"],
|
||||
}),
|
||||
|
||||
// =====[get investment details ]
|
||||
getInvestorsDetailsById: builder.query({
|
||||
query: (id) => `/investorDetails/admin/byId/${id}`,
|
||||
providesTags: ["getInvestors"],
|
||||
}),
|
||||
|
||||
// =====[get investment details ]
|
||||
getInvestorsDetailsById_InInvCur: builder.query({
|
||||
query: ({ id, currencyIn }) =>
|
||||
currencyIn
|
||||
? `/investorDetails/admin/byId/${id}?currencyIn=InvCur`
|
||||
: `/investorDetails/admin/byId/${id}`,
|
||||
providesTags: ["getInvestors"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetInvestorsQuery,
|
||||
useGetInvestorsDetailsByIdQuery,
|
||||
useGetInvestorsDetailsById_InInvCurQuery,
|
||||
} = investorDetails;
|
||||
@@ -1,23 +0,0 @@
|
||||
// investorTransaction.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = import.meta.env.VITE_API_BASE_URL + "/api";
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const investorTransaction = createApi({
|
||||
reducerPath: "investorTransaction",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: [],
|
||||
endpoints: (builder) => ({
|
||||
getTransactions: builder.query({
|
||||
query: () => '/getTransactions',
|
||||
}),
|
||||
getTransactionById: builder.query({
|
||||
query: (id) => `/getTransaction/${id}`,
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useGetTransactionsQuery, useGetTransactionByIdQuery } = investorTransaction;
|
||||
@@ -1,493 +0,0 @@
|
||||
// io.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const ioService = createApi({
|
||||
reducerPath: "ioService",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: [
|
||||
"prePopulate",
|
||||
"getIO",
|
||||
"getKeyMerits",
|
||||
"getArtifactsVideo",
|
||||
"getInvestmentDocuments",
|
||||
"getIOById",
|
||||
"getSponser",
|
||||
"getInvestmentType",
|
||||
"getInvestmentTypeID"
|
||||
],
|
||||
endpoints: (builder) => ({
|
||||
// =====[get prepopulate data]
|
||||
getIOprepopulateData: builder.query({
|
||||
query: () => `/io/admin/pre-populate`,
|
||||
providesTags: ["prePopulate"],
|
||||
}),
|
||||
|
||||
// =====[get]
|
||||
getIOs: builder.query({
|
||||
query: ({ page, size }) => `/io/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getIO"],
|
||||
}),
|
||||
|
||||
getIOById: builder.query({
|
||||
query: (id) => ({ url: `/io/admin/${id}` }),
|
||||
providesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[create]
|
||||
createIO: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/io/admin`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIO"],
|
||||
}),
|
||||
|
||||
updateIO: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById", "getIO", "prePopulate"],
|
||||
}),
|
||||
|
||||
// =====[Key Merits]
|
||||
getKeyMerits: builder.query({
|
||||
query: (id) => `/io/admin/key-merits/${id}`,
|
||||
providesTags: ["getKeyMerits"],
|
||||
}),
|
||||
|
||||
createKeyMerits: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/key-merits/${id}`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
// No need to manually set 'Content-Type'
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
deleteKeyMerits: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/io/admin/key-merits/hard-delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateKeyMerits: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/key-merits/byId/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[getIODocument]
|
||||
createInvestmentDocuments: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/document/${id}`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateInvestmentDocuments: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/document/byId/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
getInvestmentDocuments: builder.query({
|
||||
query: (id) => `/io/admin/document/${id}`,
|
||||
providesTags: ["getInvestmentDocuments"],
|
||||
}),
|
||||
|
||||
deleteIODocs: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/io/admin/document/hard-delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[Artifacts]
|
||||
getArtifactsVideo: builder.query({
|
||||
query: (id) => `/io/artifact/artifactVideo/${id}`,
|
||||
providesTags: ["getArtifactsVideo"],
|
||||
}),
|
||||
|
||||
// =====[createImageArtifacts]
|
||||
createImageArtifacts: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/artifact/image/${id}`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateImageArtifacts: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/artifact/image/byId/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[createVideoArtifacts]
|
||||
createVideoArtifacts: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/artifact/video/${id}`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
deleteVideoArtifacts: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/io/admin/artifact/video/byId/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
deleteImageArtifacts: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/io/admin/artifact/image/byId/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateVideoArtifacts: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/artifact/video/byId/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateStatusIo: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/transaction/${id}/update-status/`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById", "getIO"],
|
||||
}),
|
||||
|
||||
createIoCash: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/transaction/${id}/io-cash/`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
createIoNav: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/transaction/${id}/io-nav/`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// =====[ Amount Investment ] ======
|
||||
amountIvestment: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/transaction/${id}/amount-invested`,
|
||||
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// ======== [ Distribution Transaction ] ========
|
||||
|
||||
getDistributionInvestor: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/io/admin/transaction/${id}/calculate-distribution-amt`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
getDistributedToInvestor: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/io/admin/transaction/${id}/distributed-to-investor`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
updateExitToInvestor: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/io/admin/transaction/${id}/exit`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
// ==============[ Displaye Orders ]===============
|
||||
|
||||
setDisplayOrder: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/key-merits/resetDisplayOrder`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
setDisplayOrderIODocuments: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/document/resetDisplayOrder`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
setDisplayOrderIOArtifactsImage: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/artifact/image/resetDisplayOrder`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
setDisplayOrderIOArtifactsVideo: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/artifact/video/resetDisplayOrder`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
// ========[Create Sponser]========
|
||||
|
||||
createSponser: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/sponsor/admin`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser","prePopulate"],
|
||||
}),
|
||||
|
||||
// ========[Update Sponser]========
|
||||
|
||||
updateSponser: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/sponsor/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser","prePopulate"],
|
||||
}),
|
||||
|
||||
// ======[Get All]=====
|
||||
|
||||
getSponserMaster: builder.query({
|
||||
query: ({ page, size }) => `/sponsor/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Delete Sponser]========
|
||||
|
||||
deleteSponser: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/sponsor/admin/delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
|
||||
// ========[Get Active]========
|
||||
|
||||
getActiveSponserMaster: builder.query({
|
||||
query: () => `/sponsor/admin/active`,
|
||||
}),
|
||||
|
||||
getSponserMasterActive: builder.query({
|
||||
query: () => "/sponsor/admin/active",
|
||||
}),
|
||||
|
||||
// ======[Get ID]=====
|
||||
|
||||
getSponserById: builder.query({
|
||||
query: (id) => `/sponsor/admin/${id}`,
|
||||
}),
|
||||
|
||||
// ========[Get Active]========
|
||||
|
||||
getActiveSponserMaster: builder.query({
|
||||
query: () => `/sponsor/admin/active`,
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
// ===============================[ Investment Type ]===================================
|
||||
|
||||
|
||||
// ========[Get All]=========
|
||||
|
||||
getInvestmentTypes: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/investmentType/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getInvestmentType"],
|
||||
}),
|
||||
|
||||
// ========[Get ID]=========
|
||||
|
||||
getInvestmentTypeById: builder.query({
|
||||
query: (id) => `/investmentType/admin/${id}`,
|
||||
providesTags: ["getInvestmentTypeID"],
|
||||
}),
|
||||
|
||||
// ========[Create Investment]========
|
||||
|
||||
createInvestmentType: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/investmentType/admin/`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentType", "prePopulate"],
|
||||
}),
|
||||
|
||||
// ========[Update Investment]=======
|
||||
|
||||
updateInvestmentType: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/investmentType/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentTypeID", "getInvestmentType", "prePopulate"],
|
||||
}),
|
||||
|
||||
// ========[Delete Investment]=======
|
||||
|
||||
deleteInvestmentType: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/investmentType/admin/delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentType", 'prePopulate'],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetIOprepopulateDataQuery,
|
||||
|
||||
useGetIOsQuery,
|
||||
useGetIOByIdQuery,
|
||||
useCreateIOMutation,
|
||||
useUpdateIOMutation,
|
||||
|
||||
useGetKeyMeritsQuery,
|
||||
useCreateKeyMeritsMutation,
|
||||
useDeleteKeyMeritsMutation,
|
||||
useUpdateKeyMeritsMutation,
|
||||
|
||||
useGetInvestmentDocumentsQuery,
|
||||
useCreateInvestmentDocumentsMutation,
|
||||
useDeleteIODocsMutation,
|
||||
useUpdateInvestmentDocumentsMutation,
|
||||
|
||||
useCreateImageArtifactsMutation,
|
||||
useUpdateImageArtifactsMutation,
|
||||
useUpdateVideoArtifactsMutation,
|
||||
|
||||
useGetArtifactsVideoQuery,
|
||||
useCreateVideoArtifactsMutation,
|
||||
useDeleteVideoArtifactsMutation,
|
||||
useDeleteImageArtifactsMutation,
|
||||
|
||||
|
||||
useSetDisplayOrderMutation,
|
||||
useSetDisplayOrderIODocumentsMutation,
|
||||
useSetDisplayOrderIOArtifactsImageMutation,
|
||||
useSetDisplayOrderIOArtifactsVideoMutation,
|
||||
|
||||
useCreateIoCashMutation,
|
||||
useCreateIoNavMutation,
|
||||
|
||||
useUpdateStatusIoMutation,
|
||||
|
||||
useAmountIvestmentMutation,
|
||||
|
||||
useGetDistributionInvestorMutation,
|
||||
|
||||
useGetDistributedToInvestorMutation,
|
||||
useUpdateExitToInvestorMutation,
|
||||
|
||||
|
||||
// ==============[ Sponser ]===============
|
||||
useGetSponserMasterQuery,
|
||||
useGetSponserMasterActiveQuery,
|
||||
useCreateSponserMutation,
|
||||
useUpdateSponserMutation,
|
||||
useGetSponserByIdQuery,
|
||||
useDeleteSponserMutation,
|
||||
useGetActiveSponserMasterQuery,
|
||||
|
||||
|
||||
// ============[ Investment Type ]========
|
||||
|
||||
|
||||
useGetInvestmentTypesQuery,
|
||||
useGetInvestmentTypeByIdQuery,
|
||||
useCreateInvestmentTypeMutation,
|
||||
useUpdateInvestmentTypeMutation,
|
||||
useDeleteInvestmentTypeMutation,
|
||||
|
||||
} = ioService;
|
||||
38
src/Services/register.corporate.service.js
Normal file
38
src/Services/register.corporate.service.js
Normal file
@@ -0,0 +1,38 @@
|
||||
// investorDetails.service.js
|
||||
import { createApi } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
|
||||
// const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
// Define a service using a base URL and expected endpoints
|
||||
export const registerCorporate = createApi({
|
||||
reducerPath: "registerCorporate",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getAllCorp"],
|
||||
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
getAllCorp: builder.query({
|
||||
// query: (searchData) => `/corporate/admin`,
|
||||
query: (searchData) => `/corporate/admin/?search_data=${searchData}?page=${1}&size=${100}`,
|
||||
providesTags: ["getAllCorp"],
|
||||
}),
|
||||
|
||||
|
||||
// =====[create]
|
||||
corporateQuickAdd: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/corporate/admin/quick-add`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getAllCorp"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useCorporateQuickAddMutation, useGetAllCorpQuery } = registerCorporate;
|
||||
@@ -1,105 +0,0 @@
|
||||
// //sponser.service
|
||||
// // Need to use the React-specific entry point to import createApi
|
||||
// import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// // import { api } from "./api.service";
|
||||
// import { baseQuery } from "./token.serivce";
|
||||
// import { ioService } from "./io.service";
|
||||
|
||||
// // const baseUrl = api?.defaults.baseURL;
|
||||
|
||||
|
||||
|
||||
// // const baseUrl = `${import.meta.env.VITE_API_BASE_URL}/${import.meta.env.VITE_API_VERSION}`
|
||||
|
||||
|
||||
|
||||
// // Define a service using a base URL and expected endpoints
|
||||
// export const sponserMaster = createApi({
|
||||
// reducerPath: "sponserMaster",
|
||||
// baseQuery: baseQuery,
|
||||
// tagTypes: ["getSponser", "prePopulate"],
|
||||
// endpoints: (builder) => ({
|
||||
|
||||
|
||||
|
||||
// // ======[Get All]=====
|
||||
|
||||
// getSponserMaster: builder.query({
|
||||
// query: ({ page, size }) => `/sponsor/admin?page=${page}&size=${size}`,
|
||||
// providesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
|
||||
// // ========[Get Active]========
|
||||
|
||||
// getActiveSponserMaster: builder.query({
|
||||
// query: () => `/sponsor/admin/active`,
|
||||
// }),
|
||||
|
||||
// getSponserMasterActive: builder.query({
|
||||
// query: () => "/sponsor/admin/active",
|
||||
// }),
|
||||
|
||||
|
||||
// // ======[Get ID]=====
|
||||
|
||||
// getSponserById: builder.query({
|
||||
// query: (id) => `/sponsor/admin/${id}`,
|
||||
// }),
|
||||
|
||||
// // ========[Toggle Status]========
|
||||
|
||||
// toggleStatus: builder.mutation({
|
||||
// query: ({ id }) => ({
|
||||
// url: `/sponsor/admin/toggle-status/${id}`,
|
||||
// method: "PATCH",
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
// // ========[Create Sponser]========
|
||||
|
||||
// createSponser: builder.mutation({
|
||||
// query: (data) => ({
|
||||
// url: `/sponsor/admin`,
|
||||
// method: "POST",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser","prePopulate"],
|
||||
// }),
|
||||
|
||||
// // ========[Update Sponser]========
|
||||
|
||||
// updateSponser: builder.mutation({
|
||||
// query: ({ data, id }) => ({
|
||||
// url: `/sponsor/admin/${id}`,
|
||||
// method: "PATCH",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
// // ========[Delete Sponser]========
|
||||
|
||||
// deleteSponser: builder.mutation({
|
||||
// query: (id) => ({
|
||||
// url: `/sponsor/admin/delete/${id}`,
|
||||
// method: "DELETE",
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
// }),
|
||||
// });
|
||||
|
||||
// // Export hooks for usage in functional components
|
||||
// export const {
|
||||
// useGetSponserMasterQuery,
|
||||
// useGetSponserMasterActiveQuery,
|
||||
// useToggleStatusMutation,
|
||||
// useCreateSponserMutation,
|
||||
// useUpdateSponserMutation,
|
||||
// useGetSponserByIdQuery,
|
||||
// useDeleteSponserMutation,
|
||||
// useGetActiveSponserMasterQuery
|
||||
// } = sponserMaster;
|
||||
@@ -1,21 +1,6 @@
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
// Define a base query function with RTK Query
|
||||
// export const baseQuery = fetchBaseQuery({
|
||||
// baseUrl: 'https://sprint4.tanami.betadelivery.com/api/v1',
|
||||
// prepareHeaders: (headers) => {
|
||||
// const token = localStorage.getItem('accessToken');
|
||||
// if (token) {
|
||||
// headers.set('x-auth-token', `${token}`);
|
||||
// }
|
||||
// return headers;
|
||||
// },
|
||||
// });
|
||||
|
||||
// Define a base query function with token refresh logic
|
||||
|
||||
console.log(import.meta.env.VITE_BASE_URL);
|
||||
export const baseQuery = async (args, api, extraOptions) => {
|
||||
let result = await fetchBaseQuery({
|
||||
baseUrl: import.meta.env.VITE_BASE_URL,
|
||||
@@ -137,6 +122,14 @@ export const apiSlice = createApi({
|
||||
}),
|
||||
}),
|
||||
|
||||
setOtp: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: "/auth/admin/verify-otp",
|
||||
method: "POST",
|
||||
body: data ,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,4 +150,4 @@ export const apiSlice = createApi({
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useLoginMutation, useRefreshTokenMutation, useForgotPasswordMutation, useResetPasswordMutation,useResendOtpMutation } = apiSlice;
|
||||
export const { useLoginMutation, useRefreshTokenMutation, useForgotPasswordMutation, useResetPasswordMutation,useResendOtpMutation, useSetOtpMutation } = apiSlice;
|
||||
|
||||
@@ -1,37 +1,13 @@
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import { setupListeners } from "@reduxjs/toolkit/query";
|
||||
// import { sponserMaster } from "../Services/sponser.service";
|
||||
// import { investmentType } from "../Services/investment.type.service";
|
||||
import { exchangeRate } from "../Services/exchange.rate.service";
|
||||
import { ioService } from "../Services/io.service";
|
||||
import { investorDetails } from "../Services/investor.details.service";
|
||||
import { investorTransaction } from "../Services/investor.transaction.service";
|
||||
// import { api } from "../Services/api.service";
|
||||
// import { keyMerits } from "../Services/Key.merits.service";
|
||||
import { bankDetails } from "../Services/bank.details.service";
|
||||
import { contact } from "../Services/contact.service";
|
||||
import { depositRequest } from "../Services/deposit.request.service";
|
||||
import { apiSlice, baseQuery } from "../Services/token.serivce";
|
||||
import { drawalRequest } from "../Services/drawal.request.service";
|
||||
import { deleteRequest } from "../Services/delete.request.service";
|
||||
import { banInvestorDetails } from "../Services/ban.investor.service";
|
||||
import { registerCorporate } from "../Services/register.corporate.service";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
[apiSlice.reducerPath]: apiSlice.reducer,
|
||||
// [sponserMaster.reducerPath]: sponserMaster.reducer,
|
||||
// [investmentType.reducerPath]: investmentType.reducer,
|
||||
[exchangeRate.reducerPath]: exchangeRate.reducer,
|
||||
[ioService.reducerPath]: ioService.reducer,
|
||||
[investorDetails.reducerPath]: investorDetails.reducer,
|
||||
[investorTransaction.reducerPath]: investorTransaction.reducer,
|
||||
[bankDetails.reducerPath]: bankDetails.reducer,
|
||||
[contact.reducerPath]: contact.reducer,
|
||||
[depositRequest.reducerPath]: depositRequest.reducer,
|
||||
[drawalRequest.reducerPath]: drawalRequest.reducer,
|
||||
[deleteRequest.reducerPath]: deleteRequest.reducer,
|
||||
[banInvestorDetails.reducerPath]: banInvestorDetails.reducer,
|
||||
// Add other reducers as needed
|
||||
[registerCorporate.reducerPath]: registerCorporate.reducer,
|
||||
|
||||
},
|
||||
middleware: (getDefaultMiddleware) =>
|
||||
getDefaultMiddleware({
|
||||
@@ -40,18 +16,7 @@ export const store = configureStore({
|
||||
},
|
||||
}).concat(
|
||||
apiSlice.middleware,
|
||||
// sponserMaster.middleware,
|
||||
// investmentType.middleware,
|
||||
exchangeRate.middleware,
|
||||
ioService.middleware,
|
||||
investorDetails.middleware,
|
||||
investorTransaction.middleware,
|
||||
bankDetails.middleware,
|
||||
contact.middleware,
|
||||
depositRequest.middleware,
|
||||
drawalRequest.middleware,
|
||||
deleteRequest.middleware,
|
||||
banInvestorDetails.middleware,
|
||||
registerCorporate.middleware,
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
13
src/assets/Whitelogo.svg
Normal file
13
src/assets/Whitelogo.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg width="192" height="75" viewBox="0 0 192 75" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M34.5072 75C49.9987 75 63.2962 65.6064 69.0145 52.2046C63.668 49.4748 60.0072 43.9149 60.0072 37.5C60.0072 31.0851 63.668 25.5252 69.0145 22.7954C63.2962 9.39356 49.9987 0 34.5072 0C19.0158 0 5.71827 9.39356 0 22.7954C5.34645 25.5252 9.00724 31.0851 9.00724 37.5C9.00724 43.9149 5.34645 49.4748 0 52.2046C5.71827 65.6064 19.0158 75 34.5072 75ZM9.00724 37.5C9.00724 23.4167 20.424 12 34.5072 12C48.5905 12 60.0072 23.4167 60.0072 37.5C60.0072 51.5833 48.5905 63 34.5072 63C20.424 63 9.00724 51.5833 9.00724 37.5Z" fill="white"/>
|
||||
<path d="M81.0842 25.0287C77.8694 25.5075 75.3933 26.5335 73.2866 28.2435C71.0431 30.0629 69.5657 32.7031 69.1005 35.7538C69.0048 36.3557 68.9774 37.5185 69.0185 38.5581C69.1279 41.3899 69.7845 43.2504 71.4398 45.4392C73.7107 48.4488 77.4316 50.2682 82.1375 50.6786C87.3633 51.1163 92.2197 49.5295 95.1335 46.4378C97.3633 44.0848 98.2252 41.8961 98.3483 38.353C98.403 36.8071 98.3756 36.1094 98.1841 35.2066C97.336 31.0205 94.4085 27.6552 90.2224 26.0684C88.1567 25.2749 86.8298 25.056 84.0254 25.015C82.63 24.9876 81.3167 25.0013 81.0842 25.0287ZM87.2128 29.1737C90.7012 30.0903 93.1909 32.6211 93.7518 35.8085C93.9844 37.1628 93.8476 39.8441 93.4782 40.8564C92.6848 43.0862 91.2484 44.7141 89.1964 45.7128C87.459 46.5472 86.2962 46.7661 83.615 46.7524C81.563 46.7388 81.2483 46.7114 80.1266 46.3694C76.7476 45.3434 74.6136 43.2367 73.8338 40.1997C73.5876 39.2558 73.5602 36.8618 73.7791 35.6717C73.8475 35.2339 74.1895 34.3037 74.5178 33.6197C75.0103 32.6074 75.2976 32.2243 76.1457 31.4172C77.6095 30.0082 79.0459 29.3652 81.6998 28.8591C81.8913 28.8317 82.972 28.818 84.0938 28.8454C85.6259 28.8727 86.4194 28.9548 87.2128 29.1737Z" fill="white"/>
|
||||
<path d="M146.857 25.7809C146.091 26.1639 145.722 26.7659 145.722 27.6687C145.722 28.4895 145.954 29.0094 146.542 29.5018C147.733 30.5142 149.935 30.2816 150.742 29.0641C151.166 28.4485 151.166 27.4362 150.756 26.7111C150.127 25.6031 148.17 25.1243 146.857 25.7809Z" fill="white"/>
|
||||
<path d="M179.032 26.3693C178.458 26.6155 177.897 27.3132 177.787 27.8878C177.637 28.7222 177.842 29.3378 178.485 29.9671C179.812 31.2257 182.096 31.0342 182.821 29.5841C183.341 28.5991 182.958 27.2858 181.96 26.6292C181.481 26.3146 181.207 26.2462 180.414 26.2051C179.798 26.1915 179.292 26.2462 179.032 26.3693Z" fill="white"/>
|
||||
<path d="M187.691 26.4512C187.034 26.6428 186.515 27.1216 186.282 27.7508C185.625 29.4608 187.226 31.1435 189.319 30.9246C191.412 30.7057 192.137 28.4348 190.55 27.0395C189.811 26.3828 188.676 26.1503 187.691 26.4512Z" fill="white"/>
|
||||
<path d="M155.435 28.4622C155.435 29.3514 155.503 32.2926 155.571 35.0013C155.64 37.7099 155.736 42.1695 155.777 44.9192C155.818 47.6689 155.886 50.1723 155.927 50.487L155.995 51.0752H158.061H160.127L160.031 46.1231L159.922 41.1846L167.459 41.2804L174.997 41.3898L174.915 39.5567C174.86 38.4896 174.751 37.6962 174.669 37.6415C174.586 37.5868 173.191 37.532 171.577 37.532C169.963 37.532 166.652 37.491 164.244 37.4363L159.853 37.3542L159.744 34.071C159.689 32.2789 159.703 30.7468 159.771 30.6921C159.826 30.6374 163.273 30.6647 167.405 30.7468C171.55 30.8426 174.97 30.8699 175.024 30.8289C175.079 30.7878 175.093 29.967 175.038 29.0231L174.956 27.2994L172.89 27.2174C170.578 27.1353 158.143 26.8617 156.502 26.8617H155.435V28.4622Z" fill="white"/>
|
||||
<path d="M131.234 29.283C130.92 30.2543 130.523 31.376 130.373 31.8001L130.113 32.5525L128.129 33.0176L126.159 33.4691V34.3856V35.3022L128.088 35.3843C129.155 35.4253 130.044 35.4937 130.072 35.5211C130.099 35.5484 130.154 37.7509 130.208 40.4185C130.277 44.5088 130.332 45.4253 130.55 46.3282C131.002 48.2571 132.001 49.543 133.669 50.3912C134.86 50.9794 136.063 51.2256 137.91 51.2256C139.579 51.2393 140.537 51.1025 142.042 50.6784C143.615 50.227 143.533 50.3501 143.533 48.4897C143.533 47.6005 143.492 46.8481 143.451 46.7933C143.396 46.7523 143.232 46.7933 143.068 46.9028C142.288 47.4089 141.139 47.6825 139.415 47.7509C137.24 47.8467 136.419 47.6415 135.544 46.7933C134.572 45.8631 134.504 45.4801 134.408 40.0902L134.326 35.4663L138.649 35.5621L142.986 35.6579V34.1394C142.986 33.3049 142.931 32.5936 142.862 32.5525C142.794 32.4978 140.851 32.4294 138.553 32.3747L134.367 32.2926L134.34 30.3637C134.326 29.2967 134.312 28.2433 134.299 28.0244L134.285 27.614L133.068 27.573L131.836 27.5456L131.234 29.283Z" fill="white"/>
|
||||
<path d="M114.052 31.595C113.901 31.6223 113.436 31.7181 113.026 31.8002C110.919 32.2242 108.498 33.9342 107.171 35.9178C106.993 36.2051 106.788 36.4377 106.747 36.4377C106.692 36.4377 106.665 35.4117 106.665 34.1394V31.8549L104.517 31.8139L102.356 31.7728V35.1654C102.356 37.0396 102.315 42.4842 102.26 47.2722L102.178 56H104.38H106.596V50.87C106.596 48.0519 106.637 45.74 106.706 45.74C106.761 45.7537 106.979 46.041 107.198 46.383C108.224 47.9972 110.358 49.7619 112.027 50.3912C114.613 51.3625 117.746 51.2531 120.057 50.0903C122.109 49.0643 123.696 47.2038 124.476 44.8508C124.818 43.8385 124.845 43.5786 124.859 41.4993C124.859 39.6661 124.804 39.0779 124.599 38.3529C123.86 35.8084 122.15 33.688 120.003 32.6346C119.36 32.32 118.471 31.9643 118.019 31.8412C117.212 31.636 114.599 31.4582 114.052 31.595ZM115.488 34.9466C118.443 35.4117 120.345 37.5868 120.618 40.8426C120.782 42.7168 120.208 44.4952 119.018 45.8084C117.144 47.8604 113.942 48.2571 111.124 46.766C109.414 45.8632 108.142 44.4815 107.048 42.3611L106.46 41.212L107.171 39.8303C108.539 37.149 110.769 35.357 113.204 34.9466C114.202 34.7824 114.476 34.7824 115.488 34.9466Z" fill="white"/>
|
||||
<path d="M146.446 36.5198C146.501 38.777 146.583 42.9357 146.624 45.7675L146.72 50.9385H148.84H150.947L150.865 48.777C150.824 47.6006 150.756 44.1669 150.714 41.1573C150.673 38.1477 150.605 34.9603 150.564 34.0848L150.482 32.4705L149.907 32.58C149.155 32.7031 147.855 32.7031 147.035 32.5526L146.364 32.4295L146.446 36.5198Z" fill="white"/>
|
||||
<path d="M178.595 34.8919C178.636 35.9316 178.786 40.0219 178.909 43.9754L179.156 51.1847L179.84 51.2668C180.223 51.3078 181.139 51.3489 181.878 51.3489H183.205V50.3229C183.205 49.379 182.699 34.8782 182.617 33.6333C182.589 33.0314 182.658 33.0451 181.262 33.2777C180.825 33.3597 180.291 33.3597 180.031 33.2913C179.785 33.2366 179.333 33.1409 179.046 33.0861L178.513 32.9904L178.595 34.8919Z" fill="white"/>
|
||||
<path d="M186.939 34.2079C186.994 34.7961 187.158 38.8454 187.322 43.2093C187.486 47.5732 187.65 51.1847 187.705 51.2394C187.746 51.2804 188.676 51.3488 189.757 51.3762L191.713 51.4172L191.631 49.16C191.536 46.6156 191.358 42.5116 191.125 37.0533C191.043 35.015 190.947 33.3323 190.92 33.305C190.893 33.2639 190.414 33.305 189.867 33.4007C189.087 33.5102 188.704 33.5102 187.992 33.3597C187.5 33.2503 187.049 33.1682 186.98 33.1545C186.912 33.1545 186.898 33.6196 186.939 34.2079Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.7 KiB |
BIN
src/assets/pattern_white.png
Normal file
BIN
src/assets/pattern_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Reference in New Issue
Block a user