Added pages and Routes for Navbar
This commit is contained in:
12
src/Pages/AccountDeletion/DeletionHistory.jsx
Normal file
12
src/Pages/AccountDeletion/DeletionHistory.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const DeletionHistory = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Account deletion request</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeletionHistory;
|
||||
12
src/Pages/AccountDeletion/DeletionRequest.jsx
Normal file
12
src/Pages/AccountDeletion/DeletionRequest.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const DeletionRequest = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Pending deletion request</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeletionRequest;
|
||||
12
src/Pages/Admin/Academy.jsx
Normal file
12
src/Pages/Admin/Academy.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const Academy = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Academy Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Academy;
|
||||
12
src/Pages/Admin/BankDetails.jsx
Normal file
12
src/Pages/Admin/BankDetails.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const BankDetails = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Bank Details</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default BankDetails;
|
||||
12
src/Pages/Admin/BankInvestor.jsx
Normal file
12
src/Pages/Admin/BankInvestor.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const BankInvestor = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Admin Bank Investor Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default BankInvestor;
|
||||
12
src/Pages/Admin/Contact.jsx
Normal file
12
src/Pages/Admin/Contact.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const Contact = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Contact Us Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Contact;
|
||||
12
src/Pages/Admin/Notification.jsx
Normal file
12
src/Pages/Admin/Notification.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const Notification = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Notification</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Notification;
|
||||
12
src/Pages/Admin/Users.jsx
Normal file
12
src/Pages/Admin/Users.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const Users = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Users Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Users;
|
||||
@@ -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 (
|
||||
<Box
|
||||
{...OPACITY_ON_LOAD}
|
||||
bg={"green.100"}
|
||||
overflowY={"scroll"}
|
||||
height={"100vh"}
|
||||
></Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default AssetClan;
|
||||
@@ -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 (
|
||||
<Box
|
||||
{...OPACITY_ON_LOAD}
|
||||
bg={"green.100"}
|
||||
overflowY={"scroll"}
|
||||
height={"100vh"}
|
||||
></Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default ExchangeRate;
|
||||
13
src/Pages/IO_Management/Create.jsx
Normal file
13
src/Pages/IO_Management/Create.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
|
||||
const Create = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}> IO management Create</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Create;
|
||||
13
src/Pages/IO_Management/View.jsx
Normal file
13
src/Pages/IO_Management/View.jsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
|
||||
const View = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}> IO management View</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default View;
|
||||
@@ -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 (
|
||||
<Box
|
||||
{...OPACITY_ON_LOAD}
|
||||
overflowY={"scroll"}
|
||||
height={"100vh"}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
>
|
||||
<Header title={"Add Investment"} />
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<Box display={"flex"}>
|
||||
<Box className="col-6 pt-4 p-4">
|
||||
<Box>
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Name
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("name")}
|
||||
placeholder="Enter Name"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleInputChange(e, "name")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.name && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.name.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Address
|
||||
</FormLabel>
|
||||
<Textarea
|
||||
rows={2}
|
||||
{...register("address")}
|
||||
placeholder="Enter Address"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
onChange={(e) => handleInputChange(e, "address")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.address && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.address.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Mobile
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("mobile")}
|
||||
placeholder="Enter Mobile"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleInputChange(e, "mobile")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.mobile && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.mobile.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Bank details
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("bankDetails")}
|
||||
placeholder="Enter Bank details"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleInputChange(e, "bankDetails")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.bankDetails && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.bankDetails.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Bank account
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("bankAccount")}
|
||||
placeholder="Enter Bank account"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleInputChange(e, "bankAccount")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.bankAccount && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.bankAccount.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired id="status" mb={3}>
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Status
|
||||
</FormLabel>
|
||||
<Select
|
||||
name="status"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
required
|
||||
value={status}
|
||||
onChange={handleStatusChange}
|
||||
>
|
||||
<option disabled value="select">
|
||||
Select
|
||||
</option>
|
||||
<option value="available">Available</option>
|
||||
<option value="upcoming">Upcoming</option>
|
||||
<option value="closed">Closed</option>
|
||||
</Select>
|
||||
{errors.status && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.status.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Arabic input */}
|
||||
<Box className="col-6 pt-4 p-4">
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Name (Arabic)
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("name_ar")}
|
||||
placeholder="Enter Name (Arabic)"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleArabicInputChange(e, "name_ar")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.name_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.name_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Address (Arabic)
|
||||
</FormLabel>
|
||||
<Textarea
|
||||
rows={2}
|
||||
{...register("address_ar")}
|
||||
placeholder="Enter Address (Arabic)"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
onChange={(e) => handleArabicInputChange(e, "address_ar")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.address_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.address_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Mobile (Arabic)
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("mobile_ar")}
|
||||
placeholder="Enter Mobile (Arabic)"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleArabicInputChange(e, "mobile_ar")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.mobile_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.mobile_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Bank details (Arabic)
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("bankDetails_ar")}
|
||||
placeholder="Enter Bank details (Arabic)"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleArabicInputChange(e, "bankDetails_ar")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.bankDetails_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.bankDetails_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired className="mb-3">
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Bank account (Arabic)
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register("bankAccount_ar")}
|
||||
placeholder="Enter Bank account (Arabic)"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
maxLength={90}
|
||||
onChange={(e) => handleArabicInputChange(e, "bankAccount_ar")}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
Maximum characters must be 100 characters.
|
||||
</FormHelperText>
|
||||
|
||||
{errors.bankAccount_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.bankAccount_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
|
||||
<FormControl isRequired id="status_ar" mb={3}>
|
||||
<FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Status (Arabic)
|
||||
</FormLabel>
|
||||
<Select
|
||||
name="status_ar"
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
required
|
||||
value={statusAr}
|
||||
onChange={handleStatusArChange}
|
||||
>
|
||||
<option disabled value="select">
|
||||
Select
|
||||
</option>
|
||||
<option value="available">Available</option>
|
||||
<option value="upcoming">Upcoming</option>
|
||||
<option value="closed">Closed</option>
|
||||
</Select>
|
||||
{errors.status_ar && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
<TiWarning className="fw-bold fs-5 " />{" "}
|
||||
{errors.status_ar.message}
|
||||
</span>
|
||||
)}
|
||||
</FormControl>
|
||||
<Box className=" d-flex justify-content-end p-4 m-4">
|
||||
<Button
|
||||
isLoading={isLoading}
|
||||
spinner={<Loader01 />}
|
||||
color={"whitesmoke"}
|
||||
backgroundColor={"#004118"}
|
||||
_hover={{
|
||||
backgroundColor: "#005d22",
|
||||
}}
|
||||
type="submit"
|
||||
size="sm"
|
||||
rounded={"sm"}
|
||||
>
|
||||
New Investment
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</form>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddInvestment;
|
||||
@@ -1,532 +0,0 @@
|
||||
import React, { useRef, useState } from "react";
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
Link,
|
||||
Tag,
|
||||
Text,
|
||||
WrapItem,
|
||||
Tooltip,
|
||||
Divider,
|
||||
Stack,
|
||||
HStack,
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
Image,
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuList,
|
||||
MenuItem,
|
||||
Switch,
|
||||
Portal,
|
||||
useDisclosure,
|
||||
AlertDialog,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogContent,
|
||||
AlertDialogHeader,
|
||||
AlertDialogCloseButton,
|
||||
AlertDialogBody,
|
||||
AlertDialogFooter,
|
||||
useToast,
|
||||
Skeleton,
|
||||
VStack,
|
||||
Badge,
|
||||
} from "@chakra-ui/react";
|
||||
import { AddIcon } from "@chakra-ui/icons";
|
||||
import DataTable from "../../Components/DataTable/DataTable";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
import { Link as RouterLink } from "react-router-dom";
|
||||
import {
|
||||
useDeleteBlogMutation,
|
||||
useDeleteCommunityMutation,
|
||||
useGetBlogQuery,
|
||||
useGetCommunityBannerQuery,
|
||||
useGetCommunityByIdQuery,
|
||||
useGetCommunityQuery,
|
||||
useUpdateBlogStatusMutation,
|
||||
useUpdateCommunityStatusMutation,
|
||||
} from "../../Services/api.service";
|
||||
import { HiDotsVertical } from "react-icons/hi";
|
||||
import { formatDate } from "../../Components/Functions/UTCConvertor";
|
||||
import CustomAlertDialog from "../../Components/CustomAlertDialog";
|
||||
import Header from "../../Components/Header";
|
||||
import ToastBox from "../../Components/ToastBox";
|
||||
import TabularView from "../../Components/TabularView/TabularView";
|
||||
import { TABLE_PAGINATION } from "../../Constants/Paginations";
|
||||
const API_URL = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
const Investment = ({ investments = [] }) => {
|
||||
// ====================================================[Hooks]===================================================================
|
||||
const toast = useToast();
|
||||
const [pageSize, setPageSize] = useState(TABLE_PAGINATION?.size);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
|
||||
const [deleteAlert, setDeleteAlert] = useState(false);
|
||||
const [actionId, setActionId] = useState(null);
|
||||
const [deleteIsLoading, setDeleteIsLoading] = useState(false);
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
const [statusFilter, setStatusFilter] = useState("all");
|
||||
// const blog = useGetBlogQuery({ page: currentPage, size: pageSize });
|
||||
// const [deleteBlog] = useDeleteBlogMutation();
|
||||
// const [updateBlogStatus] = useUpdateBlogStatusMutation();
|
||||
// ====================================================[Functions]===================================================================
|
||||
|
||||
const staticData = [
|
||||
{
|
||||
id: 1,
|
||||
name: "EcoTech Innovations",
|
||||
address: "Baharain",
|
||||
mobile: "Available",
|
||||
bank_details: "+ $ 25.500",
|
||||
bank_account: "100",
|
||||
status: "Available",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Solaris Ventures",
|
||||
address: "Kuwait",
|
||||
mobile: "Upcoming",
|
||||
bank_details: "+ $ 20.500",
|
||||
bank_account: "50",
|
||||
status: "Upcoming",
|
||||
},
|
||||
];
|
||||
|
||||
const handleDelete = async (id) => {
|
||||
setDeleteIsLoading(true);
|
||||
// Simulate deletion
|
||||
setTimeout(() => {
|
||||
setDeleteIsLoading(false);
|
||||
setDeleteAlert(false);
|
||||
toast({
|
||||
title: "Deleted",
|
||||
description: `Item with id ${id} has been deleted.`,
|
||||
status: "success",
|
||||
duration: 3000,
|
||||
isClosable: true,
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const handleUpdateStatus = async (id) => {
|
||||
// Simulate status update
|
||||
toast({
|
||||
title: "Updated",
|
||||
description: `Status for item with id ${id} has been updated.`,
|
||||
status: "success",
|
||||
duration: 3000,
|
||||
isClosable: true,
|
||||
});
|
||||
};
|
||||
|
||||
const filteredData = staticData.filter((item) => {
|
||||
const nameMatches = item.name
|
||||
.toLowerCase()
|
||||
.includes(searchTerm.toLowerCase());
|
||||
const statusMatches =
|
||||
statusFilter === "all" ||
|
||||
(statusFilter === "active" && item.active_blog) ||
|
||||
(statusFilter === "inactive" && !item.active_blog);
|
||||
|
||||
return nameMatches && statusMatches;
|
||||
});
|
||||
|
||||
const tableHeadRow = [
|
||||
"S/N",
|
||||
"Name",
|
||||
"Address",
|
||||
"Mobile",
|
||||
"Active",
|
||||
"Bank Details",
|
||||
"Bank Account",
|
||||
"Status",
|
||||
];
|
||||
|
||||
const extractedArray = filteredData.map((item, index) => ({
|
||||
"S/N": (
|
||||
<RouterLink className="d-flex align-items-center gap-2 pointer">
|
||||
<span className="d-flex flex-column" style={{ width: "auto" }}>
|
||||
<Text
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex fw-bold align-items-center web-text-small"
|
||||
>
|
||||
{index + 1}.
|
||||
</Text>
|
||||
</span>
|
||||
</RouterLink>
|
||||
),
|
||||
Name: (
|
||||
<Tooltip
|
||||
className="rounded-2 web-text-xsmall"
|
||||
width={"fit-content"}
|
||||
placement="top"
|
||||
hasArrow
|
||||
bg="blue.200"
|
||||
>
|
||||
<Box display={"flex"} alignItems={"center"} w={"auto"}>
|
||||
<Text as={"span"} isTruncated={true}>
|
||||
{item.name}
|
||||
</Text>
|
||||
</Box>
|
||||
</Tooltip>
|
||||
),
|
||||
Address: (
|
||||
<Box
|
||||
display={"flex"}
|
||||
flexWrap={"wrap"}
|
||||
gap={1}
|
||||
alignItems={"center"}
|
||||
w={"auto"}
|
||||
>
|
||||
<Text as={"span"} isTruncated={true}>
|
||||
{item.address}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
Mobile: (
|
||||
<Box display={"flex"} alignItems={"center"} w={"auto"}>
|
||||
<Text as={"span"} isTruncated={true}>
|
||||
{item.mobile}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
Active: (
|
||||
<Switch
|
||||
size={"sm"}
|
||||
colorScheme="teal"
|
||||
onChange={() => handleUpdateStatus(item.id)}
|
||||
isChecked={item.active_blog}
|
||||
/>
|
||||
),
|
||||
"Bank Details": (
|
||||
<Box display={"flex"} alignItems={"center"} w={"auto"}>
|
||||
<Text as={"span"} isTruncated={true}>
|
||||
{item.bank_details}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Bank Account": (
|
||||
<Box display={"flex"} alignItems={"center"} w={"auto"}>
|
||||
<Text as={"span"} isTruncated={true}>
|
||||
{item.bank_account}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
Status: (
|
||||
<span className="d-flex justify-content-between align-items-center">
|
||||
<Text as={"span"} color={"gray.600"}>
|
||||
{item.status}
|
||||
</Text>
|
||||
<Menu>
|
||||
<MenuButton className="link p-1 rounded-1">
|
||||
<HiDotsVertical className="rubix-text-dark fs-6" />
|
||||
</MenuButton>
|
||||
<Portal>
|
||||
<MenuList minWidth="80px">
|
||||
<RouterLink to={`edit/${item.id}`}>
|
||||
<MenuItem className="web-text-medium">Edit</MenuItem>
|
||||
</RouterLink>
|
||||
<RouterLink to={`view/${item.id}`}>
|
||||
<MenuItem className="web-text-medium">View</MenuItem>
|
||||
</RouterLink>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
setActionId(item.id);
|
||||
setDeleteAlert(true);
|
||||
}}
|
||||
className="web-text-medium"
|
||||
>
|
||||
Delete
|
||||
</MenuItem>
|
||||
</MenuList>
|
||||
</Portal>
|
||||
</Menu>
|
||||
</span>
|
||||
),
|
||||
}));
|
||||
|
||||
return (
|
||||
<>
|
||||
<TabularView
|
||||
title={""}
|
||||
btnTitle={"Add Investment"}
|
||||
link={"/investment/add-investment"}
|
||||
apiData={{
|
||||
isLoading: false,
|
||||
data: { totalItems: investments.length, totalPages: 1 },
|
||||
}}
|
||||
tableHeadRow={tableHeadRow}
|
||||
extractedArray={extractedArray}
|
||||
searchTerm={searchTerm}
|
||||
setSearchTerm={setSearchTerm}
|
||||
statusFilter={statusFilter}
|
||||
setStatusFilter={setStatusFilter}
|
||||
pageSize={pageSize}
|
||||
setPageSize={setPageSize}
|
||||
currentPage={currentPage}
|
||||
setCurrentPage={setCurrentPage}
|
||||
totalItems={investments.length}
|
||||
totalPages={1}
|
||||
noDataTitle={"Investments"}
|
||||
/>
|
||||
<CustomAlertDialog
|
||||
onClose={() => setDeleteAlert(false)}
|
||||
isOpen={deleteAlert}
|
||||
alertHandler={() => handleDelete(actionId)}
|
||||
message={"Are you sure you want to delete this item?"}
|
||||
isLoading={deleteIsLoading}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
// const handleDelete = async (communityId) => {
|
||||
// try {
|
||||
// // Trigger the mutation
|
||||
// setDeleteIsLoading(true);
|
||||
// await deleteBlog(communityId)
|
||||
// .then((response) => {
|
||||
// // Handle the response here
|
||||
// // // console.log("Mutation response:", response?.data?.statusCode);
|
||||
// // // console.log("Mutation response:", response?.data?.message);
|
||||
|
||||
// if (response?.data?.statusCode === 201) {
|
||||
// setDeleteIsLoading(false);
|
||||
// setDeleteAlert(false);
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// // // console.error("Error creating community:", error);
|
||||
// setDeleteIsLoading(false);
|
||||
// setDeleteAlert(false);
|
||||
// });
|
||||
// } catch (error) {
|
||||
// // Handle errors
|
||||
// // // console.error("Error deleting community:", error);
|
||||
// }
|
||||
// };
|
||||
|
||||
// const handleUpdateStatus = async (id) => {
|
||||
// try {
|
||||
// // Trigger the mutation
|
||||
// await updateBlogStatus({ id })
|
||||
// .then((response) => {
|
||||
// if (response?.data?.statusCode === 201) {
|
||||
// toast({
|
||||
// render: () => (
|
||||
// <ToastBox
|
||||
// status={"success"}
|
||||
// message={response?.data?.message}
|
||||
// />
|
||||
// ),
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// // // console.log(error);
|
||||
// });
|
||||
// } catch (error) {
|
||||
// // Handle errors
|
||||
// // // console.error("Error updating community status:", error);
|
||||
// }
|
||||
// };
|
||||
|
||||
// // ====================================================[Table Filter]================================================================
|
||||
// const filteredData = blog?.data?.data?.rows?.filter((item) => {
|
||||
// // Filter by name (case insensitive)
|
||||
// const name = item.author_name;
|
||||
// const searchLower = searchTerm.toLowerCase();
|
||||
// const nameMatches = name.toLowerCase().includes(searchLower);
|
||||
|
||||
// // Filter by status
|
||||
// const status = item.active_blog;
|
||||
|
||||
// const statusMatches =
|
||||
// statusFilter === "all" ||
|
||||
// (statusFilter === "active" && status === true) ||
|
||||
// (statusFilter === "inactive" && status === false);
|
||||
|
||||
// return nameMatches && statusMatches;
|
||||
// });
|
||||
|
||||
// // ====================================================[Table Setup]================================================================
|
||||
// const tableHeadRow = [
|
||||
// "S/N",
|
||||
// // "Discription",
|
||||
// "InvestorName",
|
||||
// "Country",
|
||||
// "InvestedAmount",
|
||||
// "USDAmount",
|
||||
// ];
|
||||
// const extractedArray = filteredData?.map((item, index) => {
|
||||
// return {
|
||||
// "S/N": (
|
||||
// <RouterLink
|
||||
// // to={`view/${item.id}`}
|
||||
// className="d-flex align-items-center gap-2 pointer"
|
||||
// >
|
||||
// {/* <Avatar
|
||||
// size="sm"
|
||||
// name="Default"
|
||||
// src={`${API_URL}/${item.profile_image}`}
|
||||
// /> */}
|
||||
// <span className="d-flex flex-column">
|
||||
// <Text
|
||||
// as={"span"}
|
||||
// color={"gray.600"}
|
||||
// className="d-flex fw-bold align-items-center web-text-small"
|
||||
// >
|
||||
// {/* {item?.author_name} */}
|
||||
// 1.
|
||||
// </Text>
|
||||
// {/* <span className="d-flex align-items-center web-text-xsmall text-secondary">
|
||||
// {item?.author_designation}
|
||||
// </span> */}
|
||||
// </span>
|
||||
// </RouterLink>
|
||||
// ),
|
||||
// // Discription: (
|
||||
// // <Tooltip
|
||||
// // className="rounded-2 web-text-xsmall"
|
||||
// // width={"fit-content"}
|
||||
// // placement="top"
|
||||
// // hasArrow
|
||||
// // label={item?.meta_description}
|
||||
// // bg="blue.200"
|
||||
// // >
|
||||
// // <Box display={"flex"} alignItems={"center"} w={200}>
|
||||
// // <Text as={"span"} isTruncated={true}>
|
||||
// // {item?.meta_description}
|
||||
// // </Text>
|
||||
// // </Box>
|
||||
// // </Tooltip>
|
||||
// // ),
|
||||
// InvestorName: (
|
||||
// <Tooltip
|
||||
// className="rounded-2 web-text-xsmall"
|
||||
// width={"fit-content"}
|
||||
// placement="top"
|
||||
// hasArrow
|
||||
// // label={item?.summary}
|
||||
// bg="blue.200"
|
||||
// >
|
||||
// <Box display={"flex"} alignItems={"center"} w={400}>
|
||||
// <Text as={"span"} isTruncated={true}>
|
||||
// {/* {item?.summary} */}
|
||||
// Faisal
|
||||
// </Text>
|
||||
// </Box>
|
||||
// </Tooltip>
|
||||
// ),
|
||||
// Country: (
|
||||
// <Box
|
||||
// display={"flex"}
|
||||
// flexWrap={"wrap"}
|
||||
// gap={1}
|
||||
// alignItems={"center"}
|
||||
// w={200}
|
||||
// >
|
||||
// {/* {item?.tags?.map(({ id, tag }) => (
|
||||
// <Badge
|
||||
// rounded={"full"}
|
||||
// key={id}
|
||||
// variant="solid"
|
||||
// fontWeight={"normal"}
|
||||
// size={"sm"}
|
||||
// ps={3}
|
||||
// pe={3}
|
||||
// pt={0.5}
|
||||
// pb={0.5}
|
||||
// backgroundColor={"#565263"}
|
||||
// >
|
||||
// {tag}
|
||||
// </Badge>
|
||||
// ))} */}
|
||||
// <Text as={"span"} isTruncated={true}>
|
||||
// Baharain
|
||||
// </Text>
|
||||
// </Box>
|
||||
// ),
|
||||
// InvestedAmount: (
|
||||
// // <Switch
|
||||
// // size={"sm"}
|
||||
// // colorScheme="teal"
|
||||
// // onChange={() => handleUpdateStatus(item.id)}
|
||||
// // isChecked={item.active_blog}
|
||||
// // />
|
||||
|
||||
// <Box display={"flex"} alignItems={"center"} w={400}>
|
||||
// <Text as={"span"} isTruncated={true}>
|
||||
// 60000
|
||||
// </Text>
|
||||
// </Box>
|
||||
// ),
|
||||
// USDAmount: (
|
||||
// <span className="d-flex justify-content-between align-items-center">
|
||||
// <Text as={"span"} color={"gray.600"} className=" fw-bold">
|
||||
// {/* {formatDate(item?.createdAt)} */}
|
||||
// 3000
|
||||
// </Text>
|
||||
// <Menu>
|
||||
// <MenuButton className="link p-1 rounded-1">
|
||||
// <HiDotsVertical className="rubix-text-dark fs-6" />
|
||||
// </MenuButton>
|
||||
// <Portal>
|
||||
// <MenuList minWidth="80px">
|
||||
// <RouterLink to={`edit/${item.id}`}>
|
||||
// <MenuItem className="web-text-medium">Edit</MenuItem>
|
||||
// </RouterLink>
|
||||
// <RouterLink to={`view/${item.id}`}>
|
||||
// <MenuItem className="web-text-medium">View</MenuItem>
|
||||
// </RouterLink>
|
||||
// <MenuItem
|
||||
// onClick={() => {
|
||||
// setActionId(item.id);
|
||||
// setDeleteAlert(true);
|
||||
// }}
|
||||
// className="web-text-medium"
|
||||
// >
|
||||
// Delete
|
||||
// </MenuItem>
|
||||
// </MenuList>
|
||||
// </Portal>
|
||||
// </Menu>
|
||||
// </span>
|
||||
// ),
|
||||
// };
|
||||
// });
|
||||
|
||||
// return (
|
||||
// <>
|
||||
// <TabularView
|
||||
// title={"Investments"}
|
||||
// btnTitle={"Create"}
|
||||
// link={"/blogs-articles/add-blog"}
|
||||
// apiData={blog}
|
||||
// tableHeadRow={tableHeadRow}
|
||||
// extractedArray={extractedArray}
|
||||
// searchTerm={searchTerm}
|
||||
// setSearchTerm={setSearchTerm}
|
||||
// statusFilter={statusFilter}
|
||||
// setStatusFilter={setStatusFilter}
|
||||
// pageSize={pageSize}
|
||||
// setPageSize={setPageSize}
|
||||
// currentPage={currentPage}
|
||||
// setCurrentPage={setCurrentPage}
|
||||
// totalItems={blog?.data?.data?.totalItems}
|
||||
// totalPages={blog?.data?.data?.totalPages}
|
||||
// noDataTitle={"Investments"}
|
||||
// />
|
||||
// <CustomAlertDialog
|
||||
// onClose={() => setDeleteAlert(false)}
|
||||
// isOpen={deleteAlert}
|
||||
// alertHandler={() => handleDelete(actionId)}
|
||||
// message={"Are you sure you want to delete blogs?"}
|
||||
// isLoading={deleteIsLoading}
|
||||
// />
|
||||
// </>
|
||||
// );
|
||||
};
|
||||
|
||||
export default Investment;
|
||||
12
src/Pages/InvestorUpgrade/InvestorPendingRequest.jsx
Normal file
12
src/Pages/InvestorUpgrade/InvestorPendingRequest.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const InvestorPendingRequest = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Investor pending request</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default InvestorPendingRequest;
|
||||
12
src/Pages/InvestorUpgrade/UpgradeHistory.jsx
Normal file
12
src/Pages/InvestorUpgrade/UpgradeHistory.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const upgradeHistory = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Investor upgradation History</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default upgradeHistory;
|
||||
12
src/Pages/Investor_Management/InvestorDetails.jsx
Normal file
12
src/Pages/Investor_Management/InvestorDetails.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const InvestorDetails = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}> Investor Details Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default InvestorDetails;
|
||||
12
src/Pages/Investor_Management/InvestorTransactions.jsx
Normal file
12
src/Pages/Investor_Management/InvestorTransactions.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const InvestorTransactions = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}> Investor Transactions Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default InvestorTransactions;
|
||||
12
src/Pages/Master/InvestmentType/InvestmentType.jsx
Normal file
12
src/Pages/Master/InvestmentType/InvestmentType.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
|
||||
const InvestmentType = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}> Investment type page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default InvestmentType;
|
||||
12
src/Pages/WithDrawal/PendingRequest.jsx
Normal file
12
src/Pages/WithDrawal/PendingRequest.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const PendingRequest = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>Pending Request Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default PendingRequest;
|
||||
12
src/Pages/WithDrawal/ViewHistory.jsx
Normal file
12
src/Pages/WithDrawal/ViewHistory.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
|
||||
const ViewHistory = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Text as={"h1"}>View History Page</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default ViewHistory;
|
||||
@@ -30,7 +30,7 @@ export const nav = [
|
||||
{
|
||||
title: "Sponser Master",
|
||||
path: "/sponser",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
icon: RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "Investment Type",
|
||||
@@ -39,8 +39,8 @@ export const nav = [
|
||||
},
|
||||
{
|
||||
title: "Exchange Rate",
|
||||
path: "/view",
|
||||
icon:RiExchangeBoxLine
|
||||
path: "/exchange-rate",
|
||||
icon: RiExchangeBoxLine
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -51,13 +51,13 @@ export const nav = [
|
||||
submenu: [
|
||||
{
|
||||
title: "Create IO",
|
||||
path: "/Create IO",
|
||||
icon:MdOutlineAddChart
|
||||
path: "/create",
|
||||
icon: MdOutlineAddChart
|
||||
},
|
||||
{
|
||||
title: "View IO",
|
||||
path: "/View IO",
|
||||
icon:HiOutlineChartSquareBar
|
||||
path: "/view",
|
||||
icon: HiOutlineChartSquareBar
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -68,13 +68,13 @@ export const nav = [
|
||||
submenu: [
|
||||
{
|
||||
title: "Investor Details",
|
||||
path: "/View Investor Transactions",
|
||||
icon:TbListDetails
|
||||
path: "/investor-details",
|
||||
icon: TbListDetails
|
||||
},
|
||||
{
|
||||
title: "Investor Transactions",
|
||||
path: "/View IO",
|
||||
icon:TbTransactionDollar
|
||||
path: "/investor-transactions",
|
||||
icon: TbTransactionDollar
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -88,13 +88,13 @@ export const nav = [
|
||||
submenu: [
|
||||
{
|
||||
title: "Pending Request",
|
||||
path: "/Pending Request",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
path: "/pending-request",
|
||||
icon: RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "View History",
|
||||
path: "/View History",
|
||||
icon:RiExchangeBoxLine
|
||||
path: "/view-history",
|
||||
icon: RiExchangeBoxLine
|
||||
}
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -105,13 +105,13 @@ export const nav = [
|
||||
submenu: [
|
||||
{
|
||||
title: "Pending Request",
|
||||
path: "/Pending Request",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
path: "/investor-request",
|
||||
icon: RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "View History",
|
||||
path: "/View History",
|
||||
icon:RiExchangeBoxLine
|
||||
path: "/upgrade-history",
|
||||
icon: RiExchangeBoxLine
|
||||
}
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -122,13 +122,13 @@ export const nav = [
|
||||
submenu: [
|
||||
{
|
||||
title: "Pending Request",
|
||||
path: "/Pending Request",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
path: "/deletion-request",
|
||||
icon: RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "View History",
|
||||
path: "/View History",
|
||||
icon:RiExchangeBoxLine
|
||||
path: "/deletion-history",
|
||||
icon: RiExchangeBoxLine
|
||||
}
|
||||
],
|
||||
type: "accordion",
|
||||
@@ -137,38 +137,38 @@ export const nav = [
|
||||
{
|
||||
title: "MANAGE ADMIN",
|
||||
type: "title",
|
||||
},{
|
||||
}, {
|
||||
title: "Admin",
|
||||
submenu: [
|
||||
{
|
||||
title: "Bank / Urban Investor",
|
||||
path: "/Pending Request",
|
||||
icon:TbReportMoney
|
||||
path: "/bank-investor",
|
||||
icon: TbReportMoney
|
||||
},
|
||||
{
|
||||
title: "Academy",
|
||||
path: "/Academy",
|
||||
icon:SiAcademia
|
||||
path: "/academy",
|
||||
icon: SiAcademia
|
||||
},
|
||||
{
|
||||
title: "Notification",
|
||||
path: "/Notification",
|
||||
icon:MdNotificationsNone
|
||||
path: "/notification",
|
||||
icon: MdNotificationsNone
|
||||
},
|
||||
{
|
||||
title: "Contact Details",
|
||||
path: "/Contact Details",
|
||||
icon:LuContact
|
||||
path: "/contact",
|
||||
icon: LuContact
|
||||
},
|
||||
{
|
||||
title: "Users",
|
||||
path: "/Users",
|
||||
icon:RiFileUserLine
|
||||
path: "/users",
|
||||
icon: RiFileUserLine
|
||||
},
|
||||
{
|
||||
title: "Bank Details",
|
||||
path: "/Bank Details",
|
||||
icon:RiBankLine
|
||||
path: "/bank-details",
|
||||
icon: RiBankLine
|
||||
}
|
||||
],
|
||||
type: "accordion",
|
||||
|
||||
@@ -1,15 +1,58 @@
|
||||
|
||||
import DeletionHistory from "../Pages/AccountDeletion/DeletionHistory";
|
||||
import DeletionRequest from "../Pages/AccountDeletion/DeletionRequest";
|
||||
import Academy from "../Pages/Admin/Academy";
|
||||
import BankDetails from "../Pages/Admin/BankDetails";
|
||||
import BankInvestor from "../Pages/Admin/BankInvestor";
|
||||
import Contact from "../Pages/Admin/Contact";
|
||||
import Notification from "../Pages/Admin/Notification";
|
||||
import Users from "../Pages/Admin/Users";
|
||||
import Create from "../Pages/IO_Management/Create";
|
||||
import View from "../Pages/IO_Management/View";
|
||||
import InvestorPendingRequest from "../Pages/InvestorUpgrade/InvestorPendingRequest";
|
||||
import upgradeHistory from "../Pages/InvestorUpgrade/UpgradeHistory";
|
||||
import InvestorDetails from "../Pages/Investor_Management/InvestorDetails";
|
||||
import InvestorTransactions from "../Pages/Investor_Management/InvestorTransactions";
|
||||
import ExchangeRate from "../Pages/Master/ExchangeRate/ExchangeRate";
|
||||
import InvestmentType from "../Pages/Master/InvestmentType/InvestmentType";
|
||||
import AddSponser from "../Pages/Master/Sponser/AddSponser";
|
||||
import Sponser from "../Pages/Master/Sponser/Sponsers";
|
||||
import PendingRequest from "../Pages/WithDrawal/PendingRequest";
|
||||
import ViewHistory from "../Pages/WithDrawal/ViewHistory";
|
||||
|
||||
export const RouteLink = [
|
||||
// =============[ Tanami ]================
|
||||
// ===============[ Management]===============
|
||||
{ path: "/sponser", Component: Sponser },
|
||||
{ path: "/sponser/add-sponser", Component: AddSponser },
|
||||
|
||||
|
||||
|
||||
|
||||
{ path: "/exchange-rate", Component: ExchangeRate },
|
||||
{ path: "/investment-type", Component: InvestmentType },
|
||||
|
||||
// ===============[ IO Management]===============
|
||||
{ path: "/create", Component: Create },
|
||||
{ path: "/view", Component: View },
|
||||
|
||||
// ===============[ Investor Management]===============
|
||||
{ path: "/investor-details", Component: InvestorDetails },
|
||||
{ path: "/investor-transactions", Component: InvestorTransactions },
|
||||
|
||||
// ===============[ Withdrawal]===============
|
||||
{ path: "/pending-request", Component: PendingRequest },
|
||||
{ path: "/view-history", Component: ViewHistory },
|
||||
|
||||
// ===============[ Withdrawal]===============
|
||||
{ path: "/upgrade-history", Component: upgradeHistory },
|
||||
{ path: "/investor-request", Component: InvestorPendingRequest },
|
||||
|
||||
// ===============[ Deletion]===============
|
||||
{ path: "/deletion-request", Component: DeletionRequest },
|
||||
{ path: "/deletion-history", Component: DeletionHistory },
|
||||
|
||||
// ===============[ Admin]===============
|
||||
{ path: "/bank-investor", Component: BankInvestor },
|
||||
{ path: "/academy", Component: Academy },
|
||||
{ path: "/notification", Component: Notification },
|
||||
{ path: "/contact", Component: Contact },
|
||||
{ path: "/users", Component: Users },
|
||||
{ path: "/bank-details", Component: BankDetails },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user