update
This commit is contained in:
@@ -15,7 +15,7 @@ import { Link, Link as RouterLink, useNavigate } from "react-router-dom";
|
||||
import GlobalStateContext from "../../../../Contexts/GlobalStateContext";
|
||||
import { debounce } from "../../../Master/Sponser/AddSponser";
|
||||
import { OPACITY_ON_LOAD } from "../../../../Layout/animations";
|
||||
import DataTable from "../../../../Components/DataTable/DataTable";
|
||||
import NormalTable from "../../../../Components/DataTable/NormalTable";
|
||||
import CustomAlertDialog from "../../../../Components/CustomAlertDialog";
|
||||
import Pagination from "../../../../Components/Pagination";
|
||||
import ToastBox from "../../../../Components/ToastBox";
|
||||
@@ -276,7 +276,7 @@ const BankInvestor = () => {
|
||||
</HStack>
|
||||
</Box>
|
||||
|
||||
<DataTable
|
||||
<NormalTable
|
||||
emptyMessage={`We don't have any Sponers `}
|
||||
tableHeadRow={tableHeadRow}
|
||||
data={extractedArray}
|
||||
|
||||
@@ -88,7 +88,7 @@ import { useUpdateUnbanMutation } from "../../../../Services/ban.investor.servic
|
||||
<Modal isOpen={isOpen} onClose={heandleOnClose} initialFocusRef={firstField}>
|
||||
<ModalOverlay />
|
||||
<ModalContent pb={4}>
|
||||
<ModalHeader fontSize={"md"}>Reason for Unban</ModalHeader>
|
||||
<ModalHeader fontSize={"md"}>Reason for Ban</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<Box as="form" onSubmit={handleSubmit(onSubmit)}>
|
||||
<ModalBody>
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Link, Link as RouterLink, useNavigate } from "react-router-dom";
|
||||
import GlobalStateContext from "../../../../Contexts/GlobalStateContext";
|
||||
import { debounce } from "../../../Master/Sponser/AddSponser";
|
||||
import { OPACITY_ON_LOAD } from "../../../../Layout/animations";
|
||||
import DataTable from "../../../../Components/DataTable/DataTable";
|
||||
import DataTable from "../../../../Components/DataTable/NormalTable";
|
||||
import CustomAlertDialog from "../../../../Components/CustomAlertDialog";
|
||||
import Pagination from "../../../../Components/Pagination";
|
||||
import ToastBox from "../../../../Components/ToastBox";
|
||||
@@ -186,7 +186,7 @@ const UnbanInvestor = () => {
|
||||
py={0.5}
|
||||
onClick={onOpen}
|
||||
>
|
||||
Unban Investor
|
||||
Ban Investor
|
||||
</Badge>
|
||||
</Box>
|
||||
),
|
||||
|
||||
@@ -11,6 +11,8 @@ export const banInvestorDetails = createApi({
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getBanInvestor", "getUnbanInvestor"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
getInvestor: builder.query({
|
||||
query: () => `/investorDetails/admin`,
|
||||
providesTags: ["getBanInvestor"],
|
||||
@@ -35,6 +37,16 @@ export const banInvestorDetails = createApi({
|
||||
invalidatesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
|
||||
updateBan: builder.mutation({
|
||||
query: ({ id, data }) => ({
|
||||
url: `/investorDetails/admin/banById/${id}`,
|
||||
method: "PATCH",
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ["getBanInvestor"],
|
||||
}),
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -44,4 +56,5 @@ export const {
|
||||
useGetInvestorQuery,
|
||||
useGetbanInvestorQuery,
|
||||
useUpdateUnbanMutation,
|
||||
useUpdateBanMutation
|
||||
} = banInvestorDetails;
|
||||
|
||||
Reference in New Issue
Block a user