From d000f95d51559ea631a30fba5675658684bb1f31 Mon Sep 17 00:00:00 2001 From: rockyeverlast Date: Mon, 24 Jun 2024 20:02:01 +0530 Subject: [PATCH] Added pages and Routes for Navbar --- src/Pages/AccountDeletion/DeletionHistory.jsx | 12 + src/Pages/AccountDeletion/DeletionRequest.jsx | 12 + src/Pages/Admin/Academy.jsx | 12 + src/Pages/Admin/BankDetails.jsx | 12 + src/Pages/Admin/BankInvestor.jsx | 12 + src/Pages/Admin/Contact.jsx | 12 + src/Pages/Admin/Notification.jsx | 12 + src/Pages/Admin/Users.jsx | 12 + src/Pages/AssetClan/AssetClan.jsx | 16 - src/Pages/ExchangeRate/ExchangeRate.jsx | 16 - src/Pages/IO_Management/Create.jsx | 13 + src/Pages/IO_Management/View.jsx | 13 + src/Pages/Investment/AddInvestment.jsx | 437 -------------- src/Pages/Investment/Investment.jsx | 532 ------------------ .../InvestorPendingRequest.jsx | 12 + src/Pages/InvestorUpgrade/UpgradeHistory.jsx | 12 + .../Investor_Management/InvestorDetails.jsx | 12 + .../InvestorTransactions.jsx | 12 + .../Master/InvestmentType/InvestmentType.jsx | 12 + src/Pages/WithDrawal/PendingRequest.jsx | 12 + src/Pages/WithDrawal/ViewHistory.jsx | 12 + src/Routes/Nav.js | 72 +-- src/Routes/Routes.js | 51 +- 23 files changed, 289 insertions(+), 1041 deletions(-) create mode 100644 src/Pages/AccountDeletion/DeletionHistory.jsx create mode 100644 src/Pages/AccountDeletion/DeletionRequest.jsx create mode 100644 src/Pages/Admin/Academy.jsx create mode 100644 src/Pages/Admin/BankDetails.jsx create mode 100644 src/Pages/Admin/BankInvestor.jsx create mode 100644 src/Pages/Admin/Contact.jsx create mode 100644 src/Pages/Admin/Notification.jsx create mode 100644 src/Pages/Admin/Users.jsx delete mode 100644 src/Pages/AssetClan/AssetClan.jsx delete mode 100644 src/Pages/ExchangeRate/ExchangeRate.jsx create mode 100644 src/Pages/IO_Management/Create.jsx create mode 100644 src/Pages/IO_Management/View.jsx delete mode 100644 src/Pages/Investment/AddInvestment.jsx delete mode 100644 src/Pages/Investment/Investment.jsx create mode 100644 src/Pages/InvestorUpgrade/InvestorPendingRequest.jsx create mode 100644 src/Pages/InvestorUpgrade/UpgradeHistory.jsx create mode 100644 src/Pages/Investor_Management/InvestorDetails.jsx create mode 100644 src/Pages/Investor_Management/InvestorTransactions.jsx create mode 100644 src/Pages/Master/InvestmentType/InvestmentType.jsx create mode 100644 src/Pages/WithDrawal/PendingRequest.jsx create mode 100644 src/Pages/WithDrawal/ViewHistory.jsx diff --git a/src/Pages/AccountDeletion/DeletionHistory.jsx b/src/Pages/AccountDeletion/DeletionHistory.jsx new file mode 100644 index 0000000..898994f --- /dev/null +++ b/src/Pages/AccountDeletion/DeletionHistory.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const DeletionHistory = () => { + return ( + + Account deletion request + + ); +}; + +export default DeletionHistory; diff --git a/src/Pages/AccountDeletion/DeletionRequest.jsx b/src/Pages/AccountDeletion/DeletionRequest.jsx new file mode 100644 index 0000000..c58d7aa --- /dev/null +++ b/src/Pages/AccountDeletion/DeletionRequest.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const DeletionRequest = () => { + return ( + + Pending deletion request + + ); +}; + +export default DeletionRequest; diff --git a/src/Pages/Admin/Academy.jsx b/src/Pages/Admin/Academy.jsx new file mode 100644 index 0000000..a41eb07 --- /dev/null +++ b/src/Pages/Admin/Academy.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const Academy = () => { + return ( + + Academy Page + + ); +}; + +export default Academy; diff --git a/src/Pages/Admin/BankDetails.jsx b/src/Pages/Admin/BankDetails.jsx new file mode 100644 index 0000000..41896d6 --- /dev/null +++ b/src/Pages/Admin/BankDetails.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const BankDetails = () => { + return ( + + Bank Details + + ); +}; + +export default BankDetails; diff --git a/src/Pages/Admin/BankInvestor.jsx b/src/Pages/Admin/BankInvestor.jsx new file mode 100644 index 0000000..f7d24ed --- /dev/null +++ b/src/Pages/Admin/BankInvestor.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const BankInvestor = () => { + return ( + + Admin Bank Investor Page + + ); +}; + +export default BankInvestor; diff --git a/src/Pages/Admin/Contact.jsx b/src/Pages/Admin/Contact.jsx new file mode 100644 index 0000000..c0b4704 --- /dev/null +++ b/src/Pages/Admin/Contact.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const Contact = () => { + return ( + + Contact Us Page + + ); +}; + +export default Contact; diff --git a/src/Pages/Admin/Notification.jsx b/src/Pages/Admin/Notification.jsx new file mode 100644 index 0000000..57ffe15 --- /dev/null +++ b/src/Pages/Admin/Notification.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const Notification = () => { + return ( + + Notification + + ); +}; + +export default Notification; diff --git a/src/Pages/Admin/Users.jsx b/src/Pages/Admin/Users.jsx new file mode 100644 index 0000000..c820738 --- /dev/null +++ b/src/Pages/Admin/Users.jsx @@ -0,0 +1,12 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + +const Users = () => { + return ( + + Users Page + + ); +}; + +export default Users; diff --git a/src/Pages/AssetClan/AssetClan.jsx b/src/Pages/AssetClan/AssetClan.jsx deleted file mode 100644 index b0e1c7e..0000000 --- a/src/Pages/AssetClan/AssetClan.jsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Box, Input } from "@chakra-ui/react"; -import React from "react"; -import { OPACITY_ON_LOAD } from "../../Layout/animations"; - -const AssetClan = () => { - return ( - - ); -}; - -export default AssetClan; diff --git a/src/Pages/ExchangeRate/ExchangeRate.jsx b/src/Pages/ExchangeRate/ExchangeRate.jsx deleted file mode 100644 index 772137b..0000000 --- a/src/Pages/ExchangeRate/ExchangeRate.jsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Box, Input } from "@chakra-ui/react"; -import React from "react"; -import { OPACITY_ON_LOAD } from "../../Layout/animations"; - -const ExchangeRate = () => { - return ( - - ); -}; - -export default ExchangeRate; diff --git a/src/Pages/IO_Management/Create.jsx b/src/Pages/IO_Management/Create.jsx new file mode 100644 index 0000000..6fd4d27 --- /dev/null +++ b/src/Pages/IO_Management/Create.jsx @@ -0,0 +1,13 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + + +const Create = () => { + return ( + + IO management Create + + ); +}; + +export default Create; diff --git a/src/Pages/IO_Management/View.jsx b/src/Pages/IO_Management/View.jsx new file mode 100644 index 0000000..13a7dc7 --- /dev/null +++ b/src/Pages/IO_Management/View.jsx @@ -0,0 +1,13 @@ +import { Box, Text } from "@chakra-ui/react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; + + +const View = () => { + return ( + + IO management View + + ); +}; + +export default View; diff --git a/src/Pages/Investment/AddInvestment.jsx b/src/Pages/Investment/AddInvestment.jsx deleted file mode 100644 index 4e823e3..0000000 --- a/src/Pages/Investment/AddInvestment.jsx +++ /dev/null @@ -1,437 +0,0 @@ -import { - Box, - FormControl, - FormHelperText, - FormLabel, - Input, - Text, - Stack, - Textarea, - Heading, - Button, - useToast, - Divider, - Image, - Select, -} from "@chakra-ui/react"; -import React, { useState } from "react"; -import fallbackImage from "../../assets/fallBackImage.png"; -import fallbackImageLarge from "../../assets/ultp-fallback-img.webp"; -import { TiWarning } from "react-icons/ti"; - -import { motion } from "framer-motion"; -import { OPACITY_ON_LOAD } from "../../Layout/animations"; - -import { yupResolver } from "@hookform/resolvers/yup"; -import { Controller, useForm } from "react-hook-form"; -import { investmentSchema } from "../../Validations/Validations"; -import { useCreateBlogMutation } from "../../Services/api.service"; -import { useNavigate } from "react-router-dom"; -import Loader01 from "../../Components/Loaders/Loader01"; -import ReactQuill from "react-quill"; -import "react-quill/dist/quill.snow.css"; -import ChipSelector from "../../Components/ChipSelector/ChipSelector"; -import Header from "../../Components/Header"; -import ToastBox from "../../Components/ToastBox"; - -const AddInvestment = () => { - const toast = useToast(); - const navigate = useNavigate(); - const [createBlog] = useCreateBlogMutation(); // Invoke the hook to get the mutation function - const [isLoading, setIsLoading] = useState(false); - const [selectedImage, setSelectedImage] = useState(fallbackImage); - const [selectedImageLarge, setSelectedImageLarge] = - useState(fallbackImageLarge); - const [largeImageData, setLargeImageData] = useState(null); - const [smallImageData, setSmallImageData] = useState(null); - const [chips, setChips] = useState([]); - const [value, setValue] = useState(""); - const [metaDescription, setMetaDescription] = useState(""); - const [investments, setInvestments] = useState([]); - const [status, setStatus] = useState("available"); - const [statusAr, setStatusAr] = useState("available"); - - const handleDescriptionChange = (e) => { - setMetaDescription(e.target.value); - }; - - const { - control, - register, - handleSubmit, - reset, - setValue: setYupFormValue, - formState: { errors }, - } = useForm({ - resolver: yupResolver(investmentSchema), - }); - - const handleInputChange = (e, field) => { - setYupFormValue(field, e.target.value); - setYupFormValue(`${field}_ar`, e.target.value); - }; - - const handleArabicInputChange = (e, field) => { - setYupFormValue(field, e.target.value); - setYupFormValue(field.replace("_ar", ""), e.target.value); - }; - - const handleStatusChange = (e) => { - setStatus(e.target.value); - setStatusAr(e.target.value); - }; - - const handleStatusArChange = (e) => { - setStatusAr(e.target.value); - setStatus(e.target.value); - }; - - const onSubmit = (data) => { - const newInvestment = { - name: data.name, - address: data.address, - mobile: data.mobile, - bankDetails: data.bankDetails, - bankAccount: data.bankAccount, - status: data.status, - }; - - setInvestments([...investments, newInvestment]); - reset(); - navigate("/investment"); - }; - - return ( - -
-
- - - - - - Name - - handleInputChange(e, "name")} - /> - - Maximum characters must be 100 characters. - - - {errors.name && ( - - {" "} - {errors.name.message} - - )} - - - - - Address - -