From 95c629533ec4069c1adc130754f5b3a9c23d000f Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Thu, 14 Nov 2024 12:18:54 +0530 Subject: [PATCH 1/6] update --- src/Components/Loaders/FullscreenLoaders.jsx | 24 +++++--- src/Components/Loaders/Loader01.jsx | 32 +++++++---- src/Pages/SplashScreen.jsx | 60 ++++++++++++-------- 3 files changed, 73 insertions(+), 43 deletions(-) diff --git a/src/Components/Loaders/FullscreenLoaders.jsx b/src/Components/Loaders/FullscreenLoaders.jsx index a821ce3..4f2348a 100644 --- a/src/Components/Loaders/FullscreenLoaders.jsx +++ b/src/Components/Loaders/FullscreenLoaders.jsx @@ -1,18 +1,19 @@ import { Box, Spinner, Text } from "@chakra-ui/react"; import React from "react"; -import './FullscreenLoaders.css' +import "./FullscreenLoaders.css"; -const FullscreenLoaders = ({height}) => { +const FullscreenLoaders = ({ height }) => { return (
+ > + {/*
@@ -21,8 +22,17 @@ const FullscreenLoaders = ({height}) => {
-
- {/* Loading... */} +
*/} + {/* Loading... */} + {/*
*/} + + ); }; diff --git a/src/Components/Loaders/Loader01.jsx b/src/Components/Loaders/Loader01.jsx index d730e32..1ca3a81 100644 --- a/src/Components/Loaders/Loader01.jsx +++ b/src/Components/Loaders/Loader01.jsx @@ -1,19 +1,29 @@ import React from "react"; -import './FullscreenLoaders.css' +import "./FullscreenLoaders.css"; +import { Spinner } from "@chakra-ui/react"; const Loader01 = () => { return ( + //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
-
-
-
-
-
-
-
-
-
-
+ // {/*
*/} + + ); }; diff --git a/src/Pages/SplashScreen.jsx b/src/Pages/SplashScreen.jsx index a975efa..47f0bc6 100644 --- a/src/Pages/SplashScreen.jsx +++ b/src/Pages/SplashScreen.jsx @@ -1,31 +1,41 @@ -import { Box, Image, Spinner, Text } from '@chakra-ui/react' -import React from 'react' -import logo from '../assets/logo2.png' +import { Box, Image, Spinner, Text } from "@chakra-ui/react"; +import React from "react"; +import logo from "../assets/logo2.png"; const SplashScreen = () => { return ( - - {/* */} -
-
-
-
-
-
-
-
-
-
-
- ) -} + -export default SplashScreen \ No newline at end of file + {/*
*/} + {/* */} + {/*
+
+
+
+
+
+
+
+
+
*/} + + + + ); +}; + +export default SplashScreen; -- 2.34.1 From 272e94caf05bd0ecbb20bf2667a4d475e074942e Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Fri, 22 Nov 2024 18:57:49 +0530 Subject: [PATCH 2/6] upodate --- src/Services/token.serivce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/token.serivce.js b/src/Services/token.serivce.js index 143762c..639fdf8 100644 --- a/src/Services/token.serivce.js +++ b/src/Services/token.serivce.js @@ -46,7 +46,7 @@ export const baseQuery = async (args, api, extraOptions) => { if (refreshResult.data) { // Save new tokens localStorage.setItem("accessToken", refreshResult?.data?.data?.access?.token); - localStorage.setItem("role", refreshResult?.data?.data?.role); + // localStorage.setItem("role", refreshResult?.data?.data?.role); // console.log(refreshResult?.data?.data?.role); -- 2.34.1 From 9d4d5301e508bed9a9a59ae071fc60b4dbae6f1f Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Fri, 6 Dec 2024 16:09:36 +0530 Subject: [PATCH 3/6] update --- src/Constants/Constants.js | 17 ++++++++++++++++- src/Services/token.serivce.js | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Constants/Constants.js b/src/Constants/Constants.js index aaf5bd7..da74880 100644 --- a/src/Constants/Constants.js +++ b/src/Constants/Constants.js @@ -1,6 +1,7 @@ import dns from "node:dns" import * as XLSX from 'xlsx'; +import CryptoJS from "crypto-js"; export const generateSerialNumber = (index, currentPage, pageSize) => { @@ -218,4 +219,18 @@ export function formatDateToYYYYMMDD(dateString) { // Combine the formatted parts return `${year}-${month}-${day}`; -} \ No newline at end of file +} + + +// Encrypt a string +export const encryptString = (text) => { + const ciphertext = CryptoJS.AES.encrypt(text, import.meta.env.VITE_ROLE_ENCRYPTION_KEY).toString(); + return ciphertext; +}; + +// Decrypt a string +export const decryptString = (ciphertext) => { + const bytes = CryptoJS.AES.decrypt(ciphertext, import.meta.env.VITE_ROLE_ENCRYPTION_KEY); + const originalText = bytes.toString(CryptoJS.enc.Utf8); + return originalText; +}; \ No newline at end of file diff --git a/src/Services/token.serivce.js b/src/Services/token.serivce.js index 639fdf8..1b2b827 100644 --- a/src/Services/token.serivce.js +++ b/src/Services/token.serivce.js @@ -1,4 +1,5 @@ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; +import { encryptString } from '../Constants/Constants' // Define a base query function with RTK Query // export const baseQuery = fetchBaseQuery({ @@ -100,7 +101,7 @@ export const apiSlice = createApi({ localStorage.setItem("refreshToken", data?.data?.refresh?.token); // localStorage.setItem('refreshTokenExp', data?.data?.refresh?.expires); localStorage.setItem("accessTokenExp", data?.data?.access?.expires); - localStorage.setItem("role", data?.data?.role); + localStorage.setItem("role", encryptString(data?.data?.role)); } catch (error) { console.error("Login failed:", error); } -- 2.34.1 From 2c8965c16a424133636d5777d9ad656520e1ce00 Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:11:18 +0530 Subject: [PATCH 4/6] working chenge password --- src/Pages/ChangePassword.jsx | 139 ++++++++++++------ .../CreateIO/IOCashDetails/IOCashDetails.jsx | 2 +- .../CreateIO/IOCashDetails/Pending.jsx | 4 +- .../CreateIO/IONAVDetails/IONAVDetails.jsx | 2 +- .../CreateIO/IONAVDetails/Pending.jsx | 2 +- .../CreateIO/IOTransaction/Pending.jsx | 2 +- .../IOTransaction/ViewAmountInvested.jsx | 2 +- .../CreateIO/IOTransaction/ViewCancel.jsx | 2 +- .../ViewDistributionInvestor.jsx | 2 +- .../CreateIO/IOTransaction/ViewExit.jsx | 2 +- .../IO_Management/ViewIO/ViewIOdataHeader.jsx | 2 +- src/Pages/SubAdmin/SubAdmin.jsx | 18 ++- src/Pages/SubAdmin/SubAdminUpdateCreate.jsx | 5 +- src/Services/subadmin.service.js | 2 +- 14 files changed, 119 insertions(+), 67 deletions(-) diff --git a/src/Pages/ChangePassword.jsx b/src/Pages/ChangePassword.jsx index 84624c2..69ac7dd 100644 --- a/src/Pages/ChangePassword.jsx +++ b/src/Pages/ChangePassword.jsx @@ -5,6 +5,8 @@ import { FormErrorMessage, FormLabel, Input, + InputGroup, + InputRightElement, Modal, ModalBody, ModalCloseButton, @@ -49,10 +51,9 @@ const ChangePassword = ({ const [isLoading, setIsLoading] = useState(false); const [alert, setAlert] = useState(false); const toast = useToast(); - - const [showPassword, setShowPassword] = useState(false); - const [subject, setSubject] = useState(""); - const togglePasswordVisibility = () => setShowPassword(!showPassword); + const [showCurrentPassword, setShowCurrentPassword] = useState(false); + const [showNewPassword, setShowNewPassword] = useState(false); + const [showConfirmPassword, setShowConfirmPassword] = useState(false); // ======================[ Cotext Api ] const { IODetails } = useContext(GlobalStateContext); const found = data?.find((item) => item?.id === actionId); @@ -72,29 +73,29 @@ const ChangePassword = ({ resolver: yupResolver(ioNav), }); -// const onSubmit = async (data) => { -// setIsLoading(true); + // const onSubmit = async (data) => { + // setIsLoading(true); -// try { -// const res = await addNavDetails({ data, id }); -// if (res?.data?.statusCode === 201) { -// setIsLoading(false); -// toast({ -// render: () => , -// }); -// handleClose(); -// } else if (res?.error?.status === 400) { -// toast({ -// render: () => ( -// -// ), -// }); -// handleClose(); -// } -// } catch (error) { -// console.log(error); -// } -// }; + // try { + // const res = await addNavDetails({ data, id }); + // if (res?.data?.statusCode === 201) { + // setIsLoading(false); + // toast({ + // render: () => , + // }); + // handleClose(); + // } else if (res?.error?.status === 400) { + // toast({ + // render: () => ( + // + // ), + // }); + // handleClose(); + // } + // } catch (error) { + // console.log(error); + // } + // }; const handleSave = () => { handleSubmit(onSubmit)(); @@ -105,7 +106,6 @@ const ChangePassword = ({ setAlert(false); onClose(); }; - return ( <> @@ -122,40 +122,93 @@ const ChangePassword = ({ - Current Password - + Current Password + + + setSubject(e.target.value)} focusBorderColor="forestGreen.300" rounded={4} - type={showPassword ? "text" : "password"} - /> + type={showCurrentPassword ? "text" : "password"} // Toggles between "text" and "password" based on the `show` state + /> + + + + {errors.ChangePassword?.message} + - New Password - + New Password + + + setSubject(e.target.value)} focusBorderColor="forestGreen.300" rounded={4} - type="text" - /> + type={showNewPassword ? "text" : "password"} // Toggles between "text" and "password" based on the `show` state + /> + + + + {errors.newPassword?.message} + - Re-Type New Password - + Re-Type New Password + + + setSubject(e.target.value)} focusBorderColor="forestGreen.300" rounded={4} - type="text" - /> + type={showConfirmPassword ? "text" : "password"} // Toggles between "text" and "password" based on the `show` state + /> + + + + {errors.conformPassword?.message} @@ -165,7 +218,7 @@ const ChangePassword = ({ ), diff --git a/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx b/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx index 9af6d74..18aba78 100644 --- a/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx +++ b/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx @@ -236,7 +236,7 @@ const ViewAmountInvested = ({ isOpen, onClose, id: investorId }) => { /> - {localStorage?.getItem("role") !== "Maker" && + {localStorage?.getItem("role") !== import.meta.env.VITE_VITE_MAKER && ), diff --git a/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx b/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx index 18aba78..6c8cdbc 100644 --- a/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx +++ b/src/Pages/IO_Management/CreateIO/IOTransaction/ViewAmountInvested.jsx @@ -27,6 +27,7 @@ import CurrencyInput from "../../../../Components/CurrencyInput"; import RequestRejectModal from "./RequestRejectModal"; import ApproveInvestedModal from "./ApproveInvestedModal"; import { formatDate } from "../../../Master/Sponser/Sponsers"; +import { encryptString } from "../../../../Constants/Constants"; // Validation schema const validationSchema = yup.object().shape({ @@ -236,7 +237,7 @@ const ViewAmountInvested = ({ isOpen, onClose, id: investorId }) => { /> - {localStorage?.getItem("role") !== import.meta.env.VITE_VITE_MAKER && + {localStorage?.getItem("role") !== encryptString(import.meta.env.VITE_VITE_MAKER) && - - {errors.ChangePassword?.message} + + {errors.oldPassword?.message} - - + {/* New Password */} + + New Password setSubject(e.target.value)} + {...register("newPassword")} + fontSize="sm" + type={showNewPassword ? "text" : "password"} focusBorderColor="forestGreen.300" - rounded={4} - type={showNewPassword ? "text" : "password"} // Toggles between "text" and "password" based on the `show` state /> - + {errors.newPassword?.message} - - - Re-Type New Password + {/* Confirm Password */} + + + Confirm New Password setSubject(e.target.value)} + {...register("confirmNewPassword")} + fontSize="sm" + type={showConfirmPassword ? "text" : "password"} focusBorderColor="forestGreen.300" - rounded={4} - type={showConfirmPassword ? "text" : "password"} // Toggles between "text" and "password" based on the `show` state /> - - {errors.conformPassword?.message} + + {errors.confirmNewPassword?.message} @@ -219,22 +198,20 @@ const ChangePassword = ({ - @@ -245,8 +222,8 @@ const ChangePassword = ({ setAlert(false)} - alertHandler={handleSave} - message={"Are you sure you want to change password?"} + alertHandler={handleSubmit(onSubmit)} + message={"Are you sure you want to change the password?"} isLoading={isLoading} /> diff --git a/src/Pages/ForgetPassword.jsx b/src/Pages/ForgetPassword.jsx index 8b78aba..23ed47b 100644 --- a/src/Pages/ForgetPassword.jsx +++ b/src/Pages/ForgetPassword.jsx @@ -1,178 +1,134 @@ import { - Button, - DrawerFooter, - FormControl, - FormErrorMessage, - FormLabel, - Input, - Modal, - ModalBody, - ModalCloseButton, - ModalContent, - ModalHeader, - ModalOverlay, - Stack, - useToast, - } from "@chakra-ui/react"; - import * as yup from "yup"; - import React, { useState, useEffect, useContext } from "react"; - import { useForm, Controller } from "react-hook-form"; - import { yupResolver } from "@hookform/resolvers/yup"; - import { v4 as uuidv4 } from "uuid"; - import { useParams } from "react-router-dom"; - import CustomAlertDialog from "../Components/CustomAlertDialog"; - import ToastBox from "../Components/ToastBox"; - import GlobalStateContext from "../Contexts/GlobalStateContext"; - import CurrencyInput from "../Components/CurrencyInput"; - - const ioNav = yup.object().shape({ - transactionDate: yup.string().required("Date is required"), - transactionAmount: yup.string().required("New NAV is required"), - comments: yup - .string() - .notRequired() - .max(200, "Approve Comment cannot be more than 200 characters"), + Button, + DrawerFooter, + FormControl, + FormErrorMessage, + FormLabel, + Input, + Modal, + ModalBody, + ModalCloseButton, + ModalContent, + ModalHeader, + ModalOverlay, + Stack, + useToast, +} from "@chakra-ui/react"; +import * as yup from "yup"; +import React, { useState} from "react"; +import { useForm, Controller } from "react-hook-form"; +import { yupResolver } from "@hookform/resolvers/yup"; +import { useForgetPasswordMutation } from "../Services/forget.password.service"; +import ToastBox from "../Components/ToastBox"; + +const validationSchema = yup.object().shape({ + emailAddress: yup + .string() + .email("Invalid email format") + .required("Email, Phone, or Username is required"), +}); + +const ForgetPassword = ({ isOpen, onClose, firstField }) => { + const toast = useToast(); + const [isLoading, setIsLoading] = useState(false); + + const [forgetPassword] = useForgetPasswordMutation(); + + const { + control, + handleSubmit, + formState: { errors }, + } = useForm({ + resolver: yupResolver(validationSchema), }); - - const ForgetPassword = ({ - isOpen, - onClose, - firstField, - actionId, - setActionId, - data, - }) => { - const params = useParams(); - const id = params?.id; - const [file, setFile] = useState(""); - const [fileName, setFileName] = useState(""); - const [isLoading, setIsLoading] = useState(false); - const [alert, setAlert] = useState(false); - const toast = useToast(); - - const [showPassword, setShowPassword] = useState(false); - const [subject, setSubject] = useState(""); - // ======================[ Cotext Api ] - const { IODetails } = useContext(GlobalStateContext); - const found = data?.find((item) => item?.id === actionId); - - // const [addNavDetails] = useAddNavDetailsMutation() - // const { - // data - // } = useGetArtifactsQuery(id) - - const { - control, - handleSubmit, - watch, - reset, - formState: { errors }, - } = useForm({ - resolver: yupResolver(ioNav), - }); - - // const onSubmit = async (data) => { - // setIsLoading(true); - - // try { - // const res = await addNavDetails({ data, id }); - // if (res?.data?.statusCode === 201) { - // setIsLoading(false); - // toast({ - // render: () => , - // }); - // handleClose(); - // } else if (res?.error?.status === 400) { - // toast({ - // render: () => ( - // - // ), - // }); - // handleClose(); - // } - // } catch (error) { - // console.log(error); - // } - // }; - - const handleSave = () => { - handleSubmit(onSubmit)(); - }; - - const handleClose = () => { - setIsLoading(false); - setAlert(false); - onClose(); - }; + + const onSubmit = async (formData) => { - - return ( - <> - - - - Forget Password - - - - - Email, Phone, or UserName - setSubject(e.target.value)} - focusBorderColor="forestGreen.300" - rounded={4} - // type={showPassword ? "text" : "password"} - type="text" - /> - - {errors.ChangePassword?.message} - - - - - - - {/* */} - - - - - - - setAlert(false)} - alertHandler={handleSave} - message={"Are you sure you want to change password?"} - isLoading={isLoading} - /> - - ); + setIsLoading(true); + try { + const res = await forgetPassword(formData); + if (res?.data?.statusCode === 200) { + toast({ + render: () => , + }); + handleClose(); + } else if (res?.error?.status === 401) { + toast({ + render: () => ( + + ), + }); + handleClose(); + } + } catch (error) { + console.error(error); + } finally { + setIsLoading(false); + } }; - - export default ForgetPassword; - \ No newline at end of file + + const handleClose = () => { + setIsLoading(false); + onClose(); + }; + + return ( + + + +
+ Forget Password + + + + + + Email, Phone, or Username + + ( + + )} + /> + + {errors.emailAddress?.message} + + + + + + + + + +
+
+ ); +}; + +export default ForgetPassword; diff --git a/src/Pages/Login.jsx b/src/Pages/Login.jsx index c871975..2eef3aa 100644 --- a/src/Pages/Login.jsx +++ b/src/Pages/Login.jsx @@ -256,6 +256,8 @@ const Login = () => { color={"whitesmoke"} colorScheme="green.500" size="lg" + fontWeight={500} + fontSize={"md"} > Log In diff --git a/src/Pages/SubAdmin/SubAdminUpdateCreate.jsx b/src/Pages/SubAdmin/SubAdminUpdateCreate.jsx index 948e78a..c483125 100644 --- a/src/Pages/SubAdmin/SubAdminUpdateCreate.jsx +++ b/src/Pages/SubAdmin/SubAdminUpdateCreate.jsx @@ -29,10 +29,8 @@ export const addSubAdmin = yup.object().shape({ .max(50, "First Name cannot exceed 50 characters") .matches(/^[^\d]+$/, "First Name cannot contain numbers"), - lastName: yup - .string() - .required("Last Name name in arabic is required"), - emailAddress: yup.string().email("Invalid email address").notRequired(), + lastName: yup.string().required("Last Name name in arabic is required"), + emailAddress: yup.string().email("Invalid email address").notRequired(), // .test("emailValidity", "Email address is invalid", async function (value) { // if (!value) { // return true; // Allow if the field is empty @@ -95,29 +93,30 @@ const SubAdminUpdateCreate = () => { lastName: subAdminByIdData?.data?.lastName, emailAddress: subAdminByIdData?.data?.emailAddress, }); - setIsSwitchOn(subAdminByIdData?.data?.role[0]?.role===encryptString(import.meta.env.VITE_VITE_MAKER)); + setIsSwitchOn( + subAdminByIdData?.data?.role[0]?.role === + encryptString(import.meta.env.VITE_VITE_MAKER) + ); console.log(subAdminByIdData?.data?.role); } }, [subAdminByIdData, reset]); - if (false) { return ; } // ============================ [API]=============================== - const handleConfirm = async () => { setIsLoadingBtn(true); const id = params?.id; console.log(isSwitchOn); - + if (id) { try { const formData = { ...form, - role_xid: isSwitchOn?2:1, + // role_xid: !isSwitchOn ? 1 : 2, }; await updateSubAdmin({ data: formData, id }).then((response) => { if (response?.data?.statusCode) { @@ -151,7 +150,7 @@ const SubAdminUpdateCreate = () => { try { const formData = { ...form, - role_xid: isSwitchOn?2:1, + role_xid: isSwitchOn ? 1 : 2, }; await createSubAdmin(formData).then((response) => { console.log(response); @@ -282,11 +281,11 @@ const SubAdminUpdateCreate = () => { }, {}); // ==================== [On Submit] ======================== -console.log(errors); + console.log(errors); const onSubmit = async (data) => { console.log("Hit"); - + if (Object.keys(errors).length === 0) { setForm(data); setAlert(true); @@ -314,10 +313,14 @@ console.log(errors); Add Details - + {params?.id ? ( + "" + ) : ( + + )} {/* ====================== [Form Input] ====================== */} diff --git a/src/Routes/Nav.js b/src/Routes/Nav.js index 58996f4..76bf644 100644 --- a/src/Routes/Nav.js +++ b/src/Routes/Nav.js @@ -104,25 +104,23 @@ export const nav = [ title: "INVESTORS REQUEST", type: "title", }, -{ - title: "Fawateer Deposit", - submenu: [ - { - title: "Aprover Request", - path: "/fawateer", - icon: RiMoneyDollarBoxLine, - }, - { - title: "View History", - path: "/fawateer-history", - icon: RiExchangeBoxLine, - }, - ], - type: "accordion", - Icon: HiOutlineBanknotes, -} -, - + { + title: "Fawateer Deposit", + submenu: [ + { + title: "Aprover Request", + path: "/fawateer", + icon: RiMoneyDollarBoxLine, + }, + { + title: "View History", + path: "/fawateer-history", + icon: RiExchangeBoxLine, + }, + ], + type: "accordion", + Icon: HiOutlineBanknotes, + }, { title: "Bank Deposit", submenu: [ diff --git a/src/Services/change.password.service.js b/src/Services/change.password.service.js index 4c8adc3..1d82772 100644 --- a/src/Services/change.password.service.js +++ b/src/Services/change.password.service.js @@ -11,10 +11,7 @@ export const changePasswordMake = createApi({ baseQuery: baseQuery, tagTypes: ["getPassword"], endpoints: (builder) => ({ - - // // ========[ update ]======== - updatePassword: builder.mutation({ query: (data) => ({ url: `/auth/admin/update-password`, diff --git a/src/Services/forget.password.service.js b/src/Services/forget.password.service.js new file mode 100644 index 0000000..9af9f54 --- /dev/null +++ b/src/Services/forget.password.service.js @@ -0,0 +1,30 @@ + +// Need to use the React-specific entry point to import createApi +import { createApi} from "@reduxjs/toolkit/query/react"; +import { baseQuery } from "./token.serivce"; + + + +// Define a service using a base URL and expected endpoints +export const forgetPasswordMake = createApi({ + reducerPath: "forgetPassword", + baseQuery: baseQuery, + tagTypes: ["getPassword"], + endpoints: (builder) => ({ + // // ========[ update ]======== + forgetPassword: builder.mutation({ + query: (data) => ({ + url: `/auth/admin/forget-password`, + method: "POST", + body: data, + }), + invalidatesTags: ["getPassword"], + }), + + }), +}); + +// Export hooks for usage in functional components +export const { + useForgetPasswordMutation +} = forgetPasswordMake; diff --git a/src/Services/token.serivce.js b/src/Services/token.serivce.js index 1b2b827..9b0cc29 100644 --- a/src/Services/token.serivce.js +++ b/src/Services/token.serivce.js @@ -127,6 +127,6 @@ export const apiSlice = createApi({ }), -}); +}); export const { useLoginMutation, useRefreshTokenMutation, useLogoutMutation } = apiSlice; diff --git a/src/Store/Store.js b/src/Store/Store.js index 42f2add..8d1bc65 100644 --- a/src/Store/Store.js +++ b/src/Store/Store.js @@ -19,6 +19,7 @@ import { fawateerRequest } from "../Services/fawateer.request.service"; import { fawateerMaker } from "../Services/fawateer.maker.service"; import { sabAdminMaster } from "../Services/subadmin.service"; import { changePasswordMake } from "../Services/change.password.service"; +import { forgetPasswordMake } from "../Services/forget.password.service"; export const store = configureStore({ reducer: { @@ -39,6 +40,7 @@ export const store = configureStore({ [fawateerMaker.reducerPath]: fawateerMaker.reducer, [sabAdminMaster.reducerPath]: sabAdminMaster.reducer, [changePasswordMake.reducerPath]: changePasswordMake.reducer, + [forgetPasswordMake.reducerPath]: forgetPasswordMake.reducer, // Add other reducers as needed }, @@ -65,6 +67,7 @@ export const store = configureStore({ fawateerMaker.middleware, sabAdminMaster.middleware, changePasswordMake.middleware, + forgetPasswordMake.middleware, ), }); -- 2.34.1