From bc8d986f299fa9c940e4849404aad54f345e209a Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Tue, 1 Oct 2024 17:44:15 +0530 Subject: [PATCH] update --- .../Admin/Investor/BankInvestor/BankInvestor.jsx | 4 ++-- .../Admin/Investor/UnbanInvestor/ReasonBanModal.jsx | 2 +- .../Admin/Investor/UnbanInvestor/UnbanInvestor.jsx | 4 ++-- src/Services/ban.investor.service.js | 13 +++++++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Pages/Admin/Investor/BankInvestor/BankInvestor.jsx b/src/Pages/Admin/Investor/BankInvestor/BankInvestor.jsx index d315697..e7cd5ce 100644 --- a/src/Pages/Admin/Investor/BankInvestor/BankInvestor.jsx +++ b/src/Pages/Admin/Investor/BankInvestor/BankInvestor.jsx @@ -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 = () => { - - Reason for Unban + Reason for Ban diff --git a/src/Pages/Admin/Investor/UnbanInvestor/UnbanInvestor.jsx b/src/Pages/Admin/Investor/UnbanInvestor/UnbanInvestor.jsx index b869d66..f947a78 100644 --- a/src/Pages/Admin/Investor/UnbanInvestor/UnbanInvestor.jsx +++ b/src/Pages/Admin/Investor/UnbanInvestor/UnbanInvestor.jsx @@ -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 ), diff --git a/src/Services/ban.investor.service.js b/src/Services/ban.investor.service.js index c16fa90..e2caf9e 100644 --- a/src/Services/ban.investor.service.js +++ b/src/Services/ban.investor.service.js @@ -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;