update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
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 (
|
||||
@@ -9,10 +10,10 @@ const ToastBox = ({ message, status }) => {
|
||||
rounded={"sm"}
|
||||
className="web-text-large d-flex gap-2 align-items-center"
|
||||
p={3}
|
||||
bg={status === "error" ? "red.500" : status === "warn" ? "blue.500" : "green.500"}
|
||||
bg={status === "error" ? "red.500" : status === "warn" ? "yellow.500" : status === "info" ? "blue.500" : "green.500"}
|
||||
>
|
||||
|
||||
{status === "error" || status === "warn" ? <WarningIcon/> : <CheckCircleIcon /> }
|
||||
{status === "error" || status === "warn" ? <PiWarningBold/> : status === "info" ? <WarningIcon/> : <CheckCircleIcon /> }
|
||||
<Text as={"span"}>{message}</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -7,8 +7,8 @@ import * as yup from "yup";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
|
||||
import { generateUniqueId } from "../../../Contexts/GlobalStateProvider";
|
||||
import { useGetInvestmentTypesQuery } from "../../../Services/investment.type.service";
|
||||
import { useGetActiveSponserMasterQuery } from "../../../Services/sponser.service";
|
||||
import { useGetInvestmentTypesQuery } from "../../../Services/io.service";
|
||||
import { useGetActiveSponserMasterQuery } from "../../../Services/io.service";
|
||||
import {
|
||||
useCreateIOMutation,
|
||||
useGetIOByIdQuery,
|
||||
|
||||
@@ -184,6 +184,8 @@ const IONAVDetails = () => {
|
||||
</HStack> */}
|
||||
|
||||
|
||||
{IODetails?.isInvestedAmount ? <Button onClick={onOpen} leftIcon={<AddIcon/>} colorScheme="forestGreen" size={'sm'} rounded={'sm'} fontSize={'xs'} >Add IO Nav</Button>:null}
|
||||
|
||||
</HStack>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -325,6 +325,8 @@ const DistributionInvestor = ({ isOpen, onClose, exit }) => {
|
||||
onClose()
|
||||
setIsFinalCalculateLoading(false)
|
||||
reset()
|
||||
setCalculatedDate(null)
|
||||
setIsCalcualtedData(false)
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +335,7 @@ const DistributionInvestor = ({ isOpen, onClose, exit }) => {
|
||||
<ModalOverlay />
|
||||
<ModalContent maxW={1000}>
|
||||
<ModalHeader fontSize={"md"}>
|
||||
Distribution To Investor Transaction
|
||||
{exit ? "Enter Exit Amount":" Distribution To Investor Transaction"}
|
||||
</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<ModalBody>
|
||||
@@ -342,8 +344,8 @@ const DistributionInvestor = ({ isOpen, onClose, exit }) => {
|
||||
</Text> */}
|
||||
<HStack onSubmit={handleSubmit(onSubmit)} as={"form"} mb={4}>
|
||||
{/* <Input placeholder="$00.00" size={"sm"} className="col" /> */}
|
||||
<FormControl isInvalid={errors.amount}>
|
||||
<FormLabel textAlign={'right'} fontSize={"sm"} > Amount to Distribute</FormLabel>
|
||||
<FormControl isInvalid={errors.amount} isRequired>
|
||||
<FormLabel textAlign={'right'} fontSize={"sm"} > {exit ? "Enter Exit Amount":"Amount to Distribute"}</FormLabel>
|
||||
<Box display={"flex"} justifyContent={'end'} alignItems={"end"} gap={2}>
|
||||
<Controller
|
||||
name="amount"
|
||||
@@ -389,6 +391,7 @@ const DistributionInvestor = ({ isOpen, onClose, exit }) => {
|
||||
</Alert>}
|
||||
</ModalBody>
|
||||
<ModalFooter pt={0}>
|
||||
{isCalcualtedData?<>
|
||||
<Button
|
||||
bg={"hsla(139, 100%, 14%, 1)"}
|
||||
mr={3}
|
||||
@@ -405,7 +408,7 @@ const DistributionInvestor = ({ isOpen, onClose, exit }) => {
|
||||
</Button>
|
||||
<Button size={"sm"} rounded={"sm"} mr={3} onClick={onClose}>
|
||||
Close
|
||||
</Button>
|
||||
</Button></>:""}
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
@@ -29,7 +29,7 @@ import ViewIOnav from "./ViewIOnav";
|
||||
import ViewDistribution from "./ViewDistribution";
|
||||
import InvestmentDocument from "../CreateIO/InvestmentDocument";
|
||||
import KeyMerits from "../CreateIO/KeyMerits";
|
||||
import Investors from "../CreateIO/Investors"
|
||||
import Investors from "../CreateIO/Investors";
|
||||
import EditIO from "../EditIO/EditIO";
|
||||
import IOArtifacts from "../CreateIO/IOArtifacts";
|
||||
import IOCashDetails from "../CreateIO/IOCashDetails";
|
||||
@@ -38,34 +38,43 @@ import { useGetIOprepopulateDataQuery } from "../../../Services/io.service";
|
||||
import UnderConstruction from "../../UnderConstruction";
|
||||
import Destribution from "../CreateIO/Destribution";
|
||||
|
||||
|
||||
const ViewIOdata = () => {
|
||||
const params = useParams()
|
||||
const id = params?.id
|
||||
const params = useParams();
|
||||
const id = params?.id;
|
||||
const { data, error, isLoading } = useGetIOprepopulateDataQuery();
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const navigate = useNavigate();
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const { IODetails, setIODetails } = useContext(GlobalStateContext);
|
||||
console.log(IODetails?.isInvestedAmount);
|
||||
|
||||
|
||||
|
||||
const tabs = [
|
||||
{ label: "IO Details", content: <ViewIOdetails data={data?.data} /> },
|
||||
{ label: "Investment documents", content: <InvestmentDocument data={data?.data} /> },
|
||||
{
|
||||
label: "Investment documents",
|
||||
content: <InvestmentDocument data={data?.data} />,
|
||||
},
|
||||
{ label: "Key merits", content: <KeyMerits data={data?.data} /> },
|
||||
{ label: "IO artifacts", content: <IOArtifacts data={data?.data} /> },
|
||||
{ label: "Investors", content: <Investors data={data?.data} /> },
|
||||
// { label: "Investors", content: <UnderConstruction h={'75vh'} /> },
|
||||
{ label: "IO Cash Details", content: <IOCashDetails data={data?.data} /> },
|
||||
{ label: "IO NAV Details", content: <IONAVDetails data={data?.data} /> },
|
||||
{ label: "Distribution to Investors", content: <Destribution data={data?.data} /> },
|
||||
{
|
||||
label: "Distribution to Investors",
|
||||
content: <Destribution data={data?.data} />,
|
||||
},
|
||||
// { label: "Distribution to Investors", content: <UnderConstruction h={'75vh'} /> },
|
||||
];
|
||||
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} overflowX={"hidden"} height={"100vh"} pb={14} >
|
||||
<Box
|
||||
{...OPACITY_ON_LOAD}
|
||||
overflowY={"scroll"}
|
||||
overflowX={"hidden"}
|
||||
height={"100vh"}
|
||||
pb={14}
|
||||
>
|
||||
<Box paddingInline={"12px"} mt={2}>
|
||||
{/* <span
|
||||
onClick={() => navigate(-1)}
|
||||
@@ -77,34 +86,35 @@ const ViewIOdata = () => {
|
||||
</Box>
|
||||
|
||||
<Tabs mt={4}>
|
||||
<TabList justifyContent={'space-between'} pe={4} alignItems={'center'}>
|
||||
<Box display={'flex'} >
|
||||
{tabs.map(({ label }, index) => (
|
||||
<Tab
|
||||
px={3}
|
||||
isDisabled={
|
||||
index === 0 ||
|
||||
index === 1 ||
|
||||
index === 2 ||
|
||||
index === 3 ||
|
||||
index === 4 ?
|
||||
false :
|
||||
!IODetails?.isInvestedAmount}
|
||||
key={index}
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
</Tab>
|
||||
))}
|
||||
<TabList justifyContent={"space-between"} pe={4} alignItems={"center"}>
|
||||
<Box display={"flex"}>
|
||||
{tabs.map(({ label }, index) => (
|
||||
<Tab
|
||||
px={3}
|
||||
isDisabled={
|
||||
index === 0 ||
|
||||
index === 1 ||
|
||||
index === 2 ||
|
||||
index === 3 ||
|
||||
index === 4
|
||||
? false
|
||||
: !IODetails?.isInvestedAmount
|
||||
}
|
||||
key={index}
|
||||
fontSize={"sm"}
|
||||
_selected={{
|
||||
color: "#004118",
|
||||
borderBottom: "2px solid #38a169",
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
</Tab>
|
||||
))}
|
||||
</Box>
|
||||
</TabList>
|
||||
<TabPanels>
|
||||
{tabs.map(({ content }, index) => (
|
||||
<TabPanel key={index}>{content}</TabPanel>
|
||||
<TabPanel key={index}>{content}</TabPanel>
|
||||
))}
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
|
||||
@@ -30,8 +30,7 @@ import {
|
||||
} from "../../../Services/exchange.rate.service";
|
||||
import ToastBox from "../../../Components/ToastBox";
|
||||
import { getTomorrowDate } from "../../../Constants/Constants";
|
||||
|
||||
|
||||
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
|
||||
|
||||
// Convert date to YYYY-MM-DD format
|
||||
const formatDateValue = (date) => {
|
||||
@@ -47,11 +46,16 @@ const formatDateValue = (date) => {
|
||||
return [year, month, day].join("-");
|
||||
};
|
||||
|
||||
const EditExchangeRate = ({ id, setIsLoading }) => {
|
||||
const btnRef = useRef();
|
||||
const EditExchangeRate = ({
|
||||
id,
|
||||
setIsLoading,
|
||||
isOpen,
|
||||
onOpen,
|
||||
onClose,
|
||||
btnRef,
|
||||
}) => {
|
||||
const toast = useToast();
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const { rateExchange, setRateExchange } = useContext(GlobalStateContext);
|
||||
const {} = useDisclosure();
|
||||
const [isBtnLoading, setIsBtnLoading] = useState(false);
|
||||
|
||||
const { data, isLoading, errors } = useGetExchangeRateByIdQuery(id, {
|
||||
@@ -89,31 +93,6 @@ const EditExchangeRate = ({ id, setIsLoading }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="Edit"
|
||||
bg="#fff"
|
||||
color={"blue.500"}
|
||||
placement="top"
|
||||
>
|
||||
<Button
|
||||
ref={btnRef}
|
||||
onClick={onOpen}
|
||||
// _hover={{ color: "blue.500" }}
|
||||
// transition={"0.5s all"}
|
||||
// color="blue.400"
|
||||
colorScheme="blue"
|
||||
size={"xs"}
|
||||
// size={{base:'xs', lg:'sm'}}
|
||||
rounded={"sm"}
|
||||
display={"flex"}
|
||||
alignItems={"center"}
|
||||
gap={1}
|
||||
>
|
||||
<EditIcon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Drawer
|
||||
// size={"md"}
|
||||
isOpen={isOpen}
|
||||
@@ -132,79 +111,83 @@ const EditExchangeRate = ({ id, setIsLoading }) => {
|
||||
<DrawerCloseButton />
|
||||
<DrawerHeader fontSize={"md"}>Edit rate</DrawerHeader>
|
||||
|
||||
<DrawerBody>
|
||||
<Box display={"flex"} mb={5}>
|
||||
<Box
|
||||
w={"50%"}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
<FormLabel fontSize={"sm"}>From</FormLabel>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={"bold"}>
|
||||
{foundObject?.fromCurrency?.currencyCode}
|
||||
</Text>
|
||||
</Box>
|
||||
<Box
|
||||
w={"50%"}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
<FormLabel fontSize={"sm"}>To</FormLabel>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={"bold"}>
|
||||
{foundObject?.toCurrency?.currencyCode}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
{isLoading ? (
|
||||
<FullscreenLoaders />
|
||||
) : (
|
||||
<>
|
||||
{" "}
|
||||
<DrawerBody>
|
||||
<Box display={"flex"} mb={5}>
|
||||
<Box
|
||||
w={"50%"}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
<FormLabel fontSize={"sm"}>From</FormLabel>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={"bold"}>
|
||||
{foundObject?.fromCurrency?.currencyCode}
|
||||
</Text>
|
||||
</Box>
|
||||
<Box
|
||||
w={"50%"}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
<FormLabel fontSize={"sm"}>To</FormLabel>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={"bold"}>
|
||||
{foundObject?.toCurrency?.currencyCode}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* <FormControl mb={4}>
|
||||
{/* <FormControl mb={4}>
|
||||
<FormLabel fontSize={"sm"}>Last effective date</FormLabel>
|
||||
<Text color={'gray.500'} fontSize={"sm"}>
|
||||
{formatDate(foundObject?.effectiveFrom)}
|
||||
</Text>
|
||||
</FormControl> */}
|
||||
<FormControl mb={4}>
|
||||
<FormLabel fontSize={"sm"}>Effective from</FormLabel>
|
||||
<Text fontSize={"sm"}>
|
||||
{formatDate(getTomorrowDate())}
|
||||
</Text>
|
||||
</FormControl>
|
||||
<FormControl mb={4}>
|
||||
<FormLabel fontSize={"sm"}>Effective from</FormLabel>
|
||||
<Text fontSize={"sm"}>{formatDate(getTomorrowDate())}</Text>
|
||||
</FormControl>
|
||||
|
||||
<FormControl mb={4} isRequired>
|
||||
<FormLabel fontSize={"sm"}>Rate</FormLabel>
|
||||
<Input
|
||||
required
|
||||
type="number"
|
||||
placeholder="Type rate here..."
|
||||
size={"sm"}
|
||||
value={rate}
|
||||
onChange={(e) => setRate(e.target.value)}
|
||||
/>
|
||||
</FormControl>
|
||||
</DrawerBody>
|
||||
<FormControl mb={4} isRequired>
|
||||
<FormLabel fontSize={"sm"}>Rate</FormLabel>
|
||||
<Input
|
||||
required
|
||||
type="number"
|
||||
placeholder="Type rate here..."
|
||||
size={"sm"}
|
||||
value={rate}
|
||||
onChange={(e) => setRate(e.target.value)}
|
||||
/>
|
||||
</FormControl>
|
||||
</DrawerBody>
|
||||
<DrawerFooter>
|
||||
<Button
|
||||
variant="outline"
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"sm"}
|
||||
size={"sm"}
|
||||
mr={3}
|
||||
onClick={onClose}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
|
||||
<DrawerFooter>
|
||||
<Button
|
||||
variant="outline"
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"sm"}
|
||||
size={"sm"}
|
||||
mr={3}
|
||||
onClick={onClose}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"sm"}
|
||||
size={"sm"}
|
||||
type="submit"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</DrawerFooter>
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"sm"}
|
||||
size={"sm"}
|
||||
type="submit"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</DrawerFooter>
|
||||
</>
|
||||
)}
|
||||
</DrawerContent>
|
||||
</form>
|
||||
</Drawer>
|
||||
|
||||
@@ -15,14 +15,15 @@ import {
|
||||
Tag,
|
||||
Text,
|
||||
Tooltip,
|
||||
useDisclosure,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import React, { useContext, useEffect, useRef, useState } from "react";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import DataTable from "../../../Components/DataTable/DataTable";
|
||||
import { HiDotsVertical } from "react-icons/hi";
|
||||
import { Link, Link as RouterLink, useNavigate } from "react-router-dom";
|
||||
import { AddIcon, EmailIcon } from "@chakra-ui/icons";
|
||||
import { AddIcon, EditIcon, EmailIcon } from "@chakra-ui/icons";
|
||||
import Pagination from "../../../Components/Pagination";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
@@ -38,6 +39,7 @@ import { formatCurrency } from "../../../Components/CurrencyInput";
|
||||
|
||||
const ExchangeRate = () => {
|
||||
const toast = useToast();
|
||||
const btnRef = useRef();
|
||||
const navigate = useNavigate();
|
||||
const { slideFromRight, rateExchange, setRateExchange } =
|
||||
useContext(GlobalStateContext);
|
||||
@@ -48,6 +50,9 @@ const ExchangeRate = () => {
|
||||
const [mouseEntered, setMouseEntered] = useState(false);
|
||||
const [mouseEnteredId, setMouseEnteredId] = useState("");
|
||||
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
// ===============================[ Paginations ]
|
||||
const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
@@ -132,12 +137,34 @@ const ExchangeRate = () => {
|
||||
// Edit
|
||||
// </Button>
|
||||
<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
<EditExchangeRate
|
||||
setIsLoading={setIsLoading}
|
||||
id={item.id}
|
||||
// updateHistory={updateHistory}
|
||||
/>
|
||||
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="Edit"
|
||||
bg="#fff"
|
||||
color={"blue.500"}
|
||||
placement="top"
|
||||
>
|
||||
<Button
|
||||
ref={btnRef}
|
||||
onClick={()=>{
|
||||
setActionId(item?.id)
|
||||
onOpen()
|
||||
}}
|
||||
// _hover={{ color: "blue.500" }}
|
||||
// transition={"0.5s all"}
|
||||
// color="blue.400"
|
||||
colorScheme="blue"
|
||||
size={"xs"}
|
||||
// size={{base:'xs', lg:'sm'}}
|
||||
rounded={"sm"}
|
||||
display={"flex"}
|
||||
alignItems={"center"}
|
||||
gap={1}
|
||||
>
|
||||
<EditIcon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
@@ -208,8 +235,6 @@ const ExchangeRate = () => {
|
||||
tableHeadRow={tableHeadRow}
|
||||
data={extractedArray}
|
||||
isLoading={isExchangeRateLoading}
|
||||
viewActionId={actionId}
|
||||
setViewActionId={setActionId}
|
||||
// totalPages={10}
|
||||
|
||||
setMouseEnteredId={setMouseEnteredId}
|
||||
@@ -223,6 +248,19 @@ const ExchangeRate = () => {
|
||||
alertHandler={handleDelete}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
|
||||
|
||||
<EditExchangeRate
|
||||
setIsLoading={setIsLoading}
|
||||
id={actionId}
|
||||
setId={setActionId}
|
||||
onClose={onClose}
|
||||
onOpen={onOpen}
|
||||
isOpen={isOpen}
|
||||
btnRef={btnRef}
|
||||
// id={item.id}
|
||||
// updateHistory={updateHistory}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
useCreateInvestmentTypeMutation,
|
||||
useGetInvestmentTypeByIdQuery,
|
||||
useUpdateInvestmentTypeMutation,
|
||||
} from "../../../Services/investment.type.service";
|
||||
} from "../../../Services/io.service";
|
||||
import ToastBox from "../../../Components/ToastBox";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
|
||||
|
||||
@@ -21,7 +21,7 @@ import NormalTable from "../../../Components/DataTable/NormalTable";
|
||||
import {
|
||||
useDeleteInvestmentTypeMutation,
|
||||
useGetInvestmentTypesQuery,
|
||||
} from "../../../Services/investment.type.service";
|
||||
} from "../../../Services/io.service";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
@@ -152,7 +152,7 @@ const InvestmentType = () => {
|
||||
),
|
||||
Action: (
|
||||
<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
<Tooltip
|
||||
{/* <Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="View"
|
||||
@@ -173,7 +173,7 @@ const InvestmentType = () => {
|
||||
>
|
||||
<ViewIcon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</Tooltip> */}
|
||||
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
|
||||
@@ -6,7 +6,7 @@ import FormInputView from "../../../Components/FormInputView";
|
||||
import { useForm } from "react-hook-form"; // assuming react-hook-form is used
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import { ArrowBackIcon } from "@chakra-ui/icons";
|
||||
import { useGetInvestmentTypeByIdQuery } from "../../../Services/investment.type.service";
|
||||
import { useGetInvestmentTypeByIdQuery } from "../../../Services/io.service";
|
||||
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
|
||||
|
||||
const ViewInvestmentType = () => {
|
||||
|
||||
@@ -7,13 +7,12 @@ import * as yup from "yup";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import FormInputMain from "../../../Components/FormInputMain";
|
||||
import {useCreateSponserMutation,useGetSponserByIdQuery,useUpdateSponserMutation,} from "../../../Services/sponser.service";
|
||||
import ToastBox from "../../../Components/ToastBox";
|
||||
import FullscreenLoaders from "../../../Components/Loaders/FullscreenLoaders";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
import SwitchButton from "../../../Components/SwitchButton";
|
||||
import DummyComponent from "../../../Components/DummyComponent";
|
||||
|
||||
import { useCreateSponserMutation, useGetSponserByIdQuery, useUpdateSponserMutation } from "../../../Services/io.service";
|
||||
// ======================= [validation] =========================
|
||||
|
||||
export const addSponser = yup.object().shape({
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useNavigate } from "react-router-dom";
|
||||
import ToastBox from "../../../Components/ToastBox";
|
||||
import { debounce } from "./AddSponser";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import {useDeleteSponserMutation,useGetSponserMasterQuery,useToggleStatusMutation,} from "../../../Services/sponser.service";
|
||||
import { useDeleteSponserMutation, useGetSponserMasterQuery } from "../../../Services/io.service";
|
||||
|
||||
export const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
@@ -39,7 +39,6 @@ const Sponser = () => {
|
||||
const [actionId, setActionId] = useState(false);
|
||||
const [mouseEntered, setMouseEntered] = useState(false);
|
||||
const [mouseEnteredId, setMouseEnteredId] = useState("");
|
||||
const [toggleStatus] = useToggleStatusMutation();
|
||||
const [deleteSponser] = useDeleteSponserMutation();
|
||||
const { sponser, setSponser, slideFromRight } = useContext(GlobalStateContext);
|
||||
|
||||
@@ -161,7 +160,7 @@ const Sponser = () => {
|
||||
console.log(response?.data);
|
||||
if(response?.error?.data?.code === 400){
|
||||
toast({
|
||||
render: () => <ToastBox message={response?.error?.data?.message} status={'error'} />,
|
||||
render: () => <ToastBox message={response?.error?.data?.message} status={'warn'} />,
|
||||
});
|
||||
setIsLoading(false);
|
||||
setDeleteAlert(false);
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useContext, useEffect, useState } from "react";
|
||||
import FormInputView from "../../../Components/FormInputView";
|
||||
import { useForm } from "react-hook-form"; // assuming react-hook-form is used
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import { useGetSponserByIdQuery } from "../../../Services/sponser.service";
|
||||
import { useGetSponserByIdQuery } from "../../../Services/io.service";
|
||||
|
||||
const ViewSponser = () => {
|
||||
const params = useParams();
|
||||
|
||||
@@ -12,6 +12,7 @@ export const exchangeRate = createApi({
|
||||
tagTypes: ["getAllExchangeRate", "getExchangeById"],
|
||||
|
||||
endpoints: (builder) => ({
|
||||
|
||||
getAllExchangeRates: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/currencyExchange/admin?page=${page}&size=${size}`,
|
||||
@@ -20,7 +21,7 @@ export const exchangeRate = createApi({
|
||||
|
||||
getExchangeRateById: builder.query({
|
||||
query: (id) => `/currencyExchange/admin/${id}`,
|
||||
providesTags: ["getAllExchangeRate"],
|
||||
providesTags: ["getExchangeById"],
|
||||
}),
|
||||
|
||||
updateExchangeRate: builder.mutation({
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
// investmentType.service.js
|
||||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
|
||||
// import { api } from "./api.service";
|
||||
import { baseQuery } from "./token.serivce";
|
||||
// // 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;
|
||||
// // 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) => ({
|
||||
// // 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]=========
|
||||
// // ========[Get All]=========
|
||||
|
||||
getInvestmentTypes: builder.query({
|
||||
query: ({ page, size }) =>
|
||||
`/investmentType/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getInvestmentType"],
|
||||
}),
|
||||
// getInvestmentTypes: builder.query({
|
||||
// query: ({ page, size }) =>
|
||||
// `/investmentType/admin?page=${page}&size=${size}`,
|
||||
// providesTags: ["getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// ========[Get ID]=========
|
||||
// // ========[Get ID]=========
|
||||
|
||||
getInvestmentTypeById: builder.query({
|
||||
query: (id) => `/investmentType/admin/${id}`,
|
||||
providesTags: ["getInvestmentTypeID"],
|
||||
}),
|
||||
// getInvestmentTypeById: builder.query({
|
||||
// query: (id) => `/investmentType/admin/${id}`,
|
||||
// providesTags: ["getInvestmentTypeID"],
|
||||
// }),
|
||||
|
||||
// ========[Create Investment]========
|
||||
// // ========[Create Investment]========
|
||||
|
||||
createInvestmentType: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/investmentType/admin/`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentType"],
|
||||
}),
|
||||
// createInvestmentType: builder.mutation({
|
||||
// query: (data) => ({
|
||||
// url: `/investmentType/admin/`,
|
||||
// method: "POST",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// ========[Update Investment]=======
|
||||
// // ========[Update Investment]=======
|
||||
|
||||
updateInvestmentType: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/investmentType/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentTypeID", "getInvestmentType"],
|
||||
}),
|
||||
// updateInvestmentType: builder.mutation({
|
||||
// query: ({ data, id }) => ({
|
||||
// url: `/investmentType/admin/${id}`,
|
||||
// method: "PATCH",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getInvestmentTypeID", "getInvestmentType"],
|
||||
// }),
|
||||
|
||||
// ========[Delete Investment]=======
|
||||
// // ========[Delete Investment]=======
|
||||
|
||||
deleteInvestmentType: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/investmentType/admin/delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getInvestmentType"],
|
||||
}),
|
||||
// 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;
|
||||
// // Export hooks for usage in functional components
|
||||
// export const {
|
||||
// useGetInvestmentTypesQuery,
|
||||
// useGetInvestmentTypeByIdQuery,
|
||||
// useCreateInvestmentTypeMutation,
|
||||
// useUpdateInvestmentTypeMutation,
|
||||
// useDeleteInvestmentTypeMutation,
|
||||
// } = investmentType;
|
||||
|
||||
@@ -15,6 +15,9 @@ export const ioService = createApi({
|
||||
"getArtifactsVideo",
|
||||
"getInvestmentDocuments",
|
||||
"getIOById",
|
||||
"getSponser",
|
||||
"getInvestmentType",
|
||||
"getInvestmentTypeID"
|
||||
],
|
||||
endpoints: (builder) => ({
|
||||
// =====[get prepopulate data]
|
||||
@@ -181,7 +184,6 @@ export const ioService = createApi({
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
updateStatusIo: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/io/admin/transaction/${id}/update-status/`,
|
||||
@@ -242,8 +244,6 @@ export const ioService = createApi({
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
updateExitToInvestor: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/io/admin/transaction/${id}/exit`,
|
||||
@@ -275,7 +275,6 @@ export const ioService = createApi({
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
setDisplayOrderIOArtifactsImage: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/artifact/image/resetDisplayOrder`,
|
||||
@@ -285,8 +284,6 @@ export const ioService = createApi({
|
||||
invalidatesTags: ["getIOById"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
setDisplayOrderIOArtifactsVideo: builder.mutation({
|
||||
query: ({ data }) => ({
|
||||
url: `/io/admin/artifact/video/resetDisplayOrder`,
|
||||
@@ -296,6 +293,130 @@ export const ioService = createApi({
|
||||
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'],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -346,9 +467,27 @@ export const {
|
||||
|
||||
useGetDistributionInvestorMutation,
|
||||
|
||||
|
||||
|
||||
useGetDistributedToInvestorMutation,
|
||||
useUpdateExitToInvestorMutation,
|
||||
|
||||
|
||||
// ==============[ Sponser ]===============
|
||||
useGetSponserMasterQuery,
|
||||
useGetSponserMasterActiveQuery,
|
||||
useCreateSponserMutation,
|
||||
useUpdateSponserMutation,
|
||||
useGetSponserByIdQuery,
|
||||
useDeleteSponserMutation,
|
||||
useGetActiveSponserMasterQuery,
|
||||
|
||||
|
||||
// ============[ Investment Type ]========
|
||||
|
||||
|
||||
useGetInvestmentTypesQuery,
|
||||
useGetInvestmentTypeByIdQuery,
|
||||
useCreateInvestmentTypeMutation,
|
||||
useUpdateInvestmentTypeMutation,
|
||||
useDeleteInvestmentTypeMutation,
|
||||
|
||||
} = ioService;
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
//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";
|
||||
// //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 = api?.defaults.baseURL;
|
||||
|
||||
|
||||
|
||||
// const baseUrl = `${import.meta.env.VITE_API_BASE_URL}/${import.meta.env.VITE_API_VERSION}`
|
||||
// // 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) => ({
|
||||
// // 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]=====
|
||||
// // ======[Get All]=====
|
||||
|
||||
getSponserMaster: builder.query({
|
||||
query: ({ page, size }) => `/sponsor/admin?page=${page}&size=${size}`,
|
||||
providesTags: ["getSponser"],
|
||||
}),
|
||||
// getSponserMaster: builder.query({
|
||||
// query: ({ page, size }) => `/sponsor/admin?page=${page}&size=${size}`,
|
||||
// providesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
|
||||
// ========[Get Active]========
|
||||
// // ========[Get Active]========
|
||||
|
||||
getActiveSponserMaster: builder.query({
|
||||
query: () => `/sponsor/admin/active`,
|
||||
}),
|
||||
// getActiveSponserMaster: builder.query({
|
||||
// query: () => `/sponsor/admin/active`,
|
||||
// }),
|
||||
|
||||
getSponserMasterActive: builder.query({
|
||||
query: () => "/sponsor/admin/active",
|
||||
}),
|
||||
// getSponserMasterActive: builder.query({
|
||||
// query: () => "/sponsor/admin/active",
|
||||
// }),
|
||||
|
||||
|
||||
// ======[Get ID]=====
|
||||
// // ======[Get ID]=====
|
||||
|
||||
getSponserById: builder.query({
|
||||
query: (id) => `/sponsor/admin/${id}`,
|
||||
}),
|
||||
// getSponserById: builder.query({
|
||||
// query: (id) => `/sponsor/admin/${id}`,
|
||||
// }),
|
||||
|
||||
// ========[Toggle Status]========
|
||||
// // ========[Toggle Status]========
|
||||
|
||||
toggleStatus: builder.mutation({
|
||||
query: ({ id }) => ({
|
||||
url: `/sponsor/admin/toggle-status/${id}`,
|
||||
method: "PATCH",
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
// toggleStatus: builder.mutation({
|
||||
// query: ({ id }) => ({
|
||||
// url: `/sponsor/admin/toggle-status/${id}`,
|
||||
// method: "PATCH",
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
// ========[Create Sponser]========
|
||||
// // ========[Create Sponser]========
|
||||
|
||||
createSponser: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: `/sponsor/admin`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser","prePopulate"],
|
||||
}),
|
||||
// createSponser: builder.mutation({
|
||||
// query: (data) => ({
|
||||
// url: `/sponsor/admin`,
|
||||
// method: "POST",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser","prePopulate"],
|
||||
// }),
|
||||
|
||||
// ========[Update Sponser]========
|
||||
// // ========[Update Sponser]========
|
||||
|
||||
updateSponser: builder.mutation({
|
||||
query: ({ data, id }) => ({
|
||||
url: `/sponsor/admin/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
// updateSponser: builder.mutation({
|
||||
// query: ({ data, id }) => ({
|
||||
// url: `/sponsor/admin/${id}`,
|
||||
// method: "PATCH",
|
||||
// body: data,
|
||||
// }),
|
||||
// invalidatesTags: ["getSponser"],
|
||||
// }),
|
||||
|
||||
// ========[Delete Sponser]========
|
||||
// // ========[Delete Sponser]========
|
||||
|
||||
deleteSponser: builder.mutation({
|
||||
query: (id) => ({
|
||||
url: `/sponsor/admin/delete/${id}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
invalidatesTags: ["getSponser"],
|
||||
}),
|
||||
// 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;
|
||||
// // Export hooks for usage in functional components
|
||||
// export const {
|
||||
// useGetSponserMasterQuery,
|
||||
// useGetSponserMasterActiveQuery,
|
||||
// useToggleStatusMutation,
|
||||
// useCreateSponserMutation,
|
||||
// useUpdateSponserMutation,
|
||||
// useGetSponserByIdQuery,
|
||||
// useDeleteSponserMutation,
|
||||
// useGetActiveSponserMasterQuery
|
||||
// } = sponserMaster;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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 { 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";
|
||||
@@ -17,8 +17,8 @@ import { drawalRequest } from "../Services/drawal.request.service";
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
[apiSlice.reducerPath]: apiSlice.reducer,
|
||||
[sponserMaster.reducerPath]: sponserMaster.reducer,
|
||||
[investmentType.reducerPath]: investmentType.reducer,
|
||||
// [sponserMaster.reducerPath]: sponserMaster.reducer,
|
||||
// [investmentType.reducerPath]: investmentType.reducer,
|
||||
[exchangeRate.reducerPath]: exchangeRate.reducer,
|
||||
[ioService.reducerPath]: ioService.reducer,
|
||||
[investorDetails.reducerPath]: investorDetails.reducer,
|
||||
@@ -36,8 +36,8 @@ export const store = configureStore({
|
||||
},
|
||||
}).concat(
|
||||
apiSlice.middleware,
|
||||
sponserMaster.middleware,
|
||||
investmentType.middleware,
|
||||
// sponserMaster.middleware,
|
||||
// investmentType.middleware,
|
||||
exchangeRate.middleware,
|
||||
ioService.middleware,
|
||||
investorDetails.middleware,
|
||||
|
||||
Reference in New Issue
Block a user