update 24-06-2024
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap");
|
||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
/* font-family: "League Spartan", sans-serif !important; */
|
||||
font-family: "Poppins", sans-serif !important;
|
||||
|
||||
/* font-family: "Lato", sans-serif !important; */
|
||||
}
|
||||
|
||||
.pointer {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React from "react";
|
||||
import { Table, TableContainer, Tbody, Td, Th, Thead, Tr, Skeleton, TableCaption, Tfoot } from "@chakra-ui/react";
|
||||
import EmptySearchList from "../EmptySearchList";
|
||||
import Pagination from "../Pagination";
|
||||
|
||||
const DataTable = ({ data, isLoading, tableHeadRow, emptyMessage }) => {
|
||||
const DataTable = ({ data, isLoading, tableHeadRow, emptyMessage, totalPages }) => {
|
||||
const columnWidth = data && data[0] ? `${(100 / Object.keys(data[0]).length).toFixed(2)}%` : "auto";
|
||||
return (
|
||||
<TableContainer overflowX={"hidden"} className="h-auto mb-3 w-100">
|
||||
@@ -10,8 +11,9 @@ const DataTable = ({ data, isLoading, tableHeadRow, emptyMessage }) => {
|
||||
<EmptySearchList message={emptyMessage} />
|
||||
) : (
|
||||
<Table size="sm">
|
||||
<TableCaption>Rubix v1.0.0</TableCaption>
|
||||
<Thead backgroundColor="purple.50">
|
||||
{/* <TableCaption><Pagination totalItems={totalPages} /></TableCaption> */}
|
||||
<TableCaption>Tanami v1.0</TableCaption>
|
||||
<Thead backgroundColor="gray.50">
|
||||
<Tr>
|
||||
{tableHeadRow.map((heading, index) => (
|
||||
<Th key={index} p={3} w={columnWidth}>
|
||||
@@ -23,7 +25,7 @@ const DataTable = ({ data, isLoading, tableHeadRow, emptyMessage }) => {
|
||||
</Thead>
|
||||
<Tbody className="web-text-small">
|
||||
{isLoading
|
||||
? Array.from({ length: 12 }).map((_, index) => (
|
||||
? Array?.from({ length: 10 }).map((_, index) => (
|
||||
<Tr key={index}>
|
||||
{tableHeadRow.map((_, i) => (
|
||||
<Td key={i} style={{ whiteSpace: "nowrap", textOverflow: "ellipsis" }} className="web-text-small" w={columnWidth}>
|
||||
|
||||
50
src/Components/FormField.jsx
Normal file
50
src/Components/FormField.jsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import { FormControl, FormLabel, Input, Textarea } from '@chakra-ui/react';
|
||||
import React from 'react'
|
||||
import { Controller } from 'react-hook-form';
|
||||
import { TiWarning } from 'react-icons/ti';
|
||||
|
||||
const FormField = ({
|
||||
label,
|
||||
control,
|
||||
name,
|
||||
type = "text",
|
||||
errors,
|
||||
isRequired,
|
||||
...props
|
||||
}) => (
|
||||
// <FormControl isInvalid={errors[name]}>
|
||||
// <FormControl isRequired={isRequired}>
|
||||
<FormControl >
|
||||
<FormLabel fontSize={"sm"}>{label}</FormLabel>
|
||||
<Controller
|
||||
control={control}
|
||||
name={name}
|
||||
defaultValue=""
|
||||
render={({ field }) => {
|
||||
return type === "textarea" ? (
|
||||
<Textarea
|
||||
focusBorderColor="forestGreen.400"
|
||||
size={"sm"}
|
||||
{...field}
|
||||
{...props}
|
||||
/>
|
||||
) : (
|
||||
<Input
|
||||
focusBorderColor="forestGreen.300"
|
||||
size={"sm"}
|
||||
type={type}
|
||||
{...field}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{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>
|
||||
);
|
||||
|
||||
export default FormField
|
||||
@@ -18,35 +18,17 @@ import { IoMdDownload } from "react-icons/io";
|
||||
import * as XLSX from "xlsx";
|
||||
import { useGetNewsLetterEmailQuery } from "../Services/api.service";
|
||||
|
||||
const HeaderMain = ({ link, btnTitle, title, icon, logOutHandler }) => {
|
||||
const { data, error, isLoading } = useGetNewsLetterEmailQuery();
|
||||
const HeaderMain = ({ link, btnTitle, title, icon, logOutHandler, slideDirecttion }) => {
|
||||
|
||||
|
||||
const handleDownload = () => {
|
||||
if (Array.isArray(data?.data?.rows)) {
|
||||
const worksheet = XLSX.utils.json_to_sheet(data?.data?.rows);
|
||||
const workbook = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1");
|
||||
XLSX.writeFile(workbook, "newsletter_emails.xlsx");
|
||||
} else {
|
||||
// // console.error(
|
||||
// "Expected data to be an array but received:",
|
||||
// data?.data?.rows
|
||||
// );
|
||||
}
|
||||
};
|
||||
return (
|
||||
<Box
|
||||
backgroundColor={"#fff"}
|
||||
// bg="white.900"
|
||||
// backdropFilter="blur(10px) hue-rotate(90deg)"
|
||||
// h={12}
|
||||
className={` pt-2 pb-2 fw-400 border-bottom d-flex justify-content-between align-items-center`}
|
||||
className={` pt-2 pb-2 fw-400 border-bottom d-flex ${slideDirecttion ? "flex-row-reverse ps-2" : ""} justify-content-between align-items-center`}
|
||||
>
|
||||
{/* <span className="fs-5">Community</span> */}
|
||||
|
||||
<Text
|
||||
as={"span"}
|
||||
fontWeight={"bold"}
|
||||
fontWeight={"500"}
|
||||
color={"forestGreen.500"}
|
||||
className="fs-6 "
|
||||
>
|
||||
|
||||
76
src/Components/Pagination.jsx
Normal file
76
src/Components/Pagination.jsx
Normal file
@@ -0,0 +1,76 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Select, HStack, Text, Box, IconButton } from '@chakra-ui/react';
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from '@chakra-ui/icons';
|
||||
|
||||
const Pagination = ({ totalItems, itemsPerPageOptions = [ 10, 15] }) => {
|
||||
const [pageSize, setPageSize] = useState(itemsPerPageOptions[0]);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
|
||||
const totalPages = Math.ceil(totalItems / pageSize);
|
||||
|
||||
const handlePageSizeChange = (e) => {
|
||||
setPageSize(Number(e.target.value));
|
||||
setCurrentPage(1); // Reset to first page whenever page size changes
|
||||
};
|
||||
|
||||
const paginationPrev = () => {
|
||||
if (currentPage > 1) {
|
||||
setCurrentPage(currentPage - 1);
|
||||
}
|
||||
};
|
||||
|
||||
const paginationNext = () => {
|
||||
if (currentPage < totalPages) {
|
||||
setCurrentPage(currentPage + 1);
|
||||
}
|
||||
};
|
||||
|
||||
const displayRange = {
|
||||
start: (currentPage - 1) * pageSize + 1,
|
||||
end: Math.min(currentPage * pageSize, totalItems),
|
||||
};
|
||||
|
||||
return (
|
||||
<HStack d="flex" justifyContent="flex-end" alignItems="center" >
|
||||
{/* <Text className='web-text-small'>Tanami v0.1</Text> */}
|
||||
|
||||
<HStack>
|
||||
<Select
|
||||
className="pointer web-text-small"
|
||||
width={"90px"}
|
||||
rounded="sm"
|
||||
size="sm"
|
||||
value={pageSize}
|
||||
onChange={handlePageSizeChange}
|
||||
>
|
||||
{itemsPerPageOptions.map((size) => (
|
||||
<option key={size} value={size}>
|
||||
{size}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
<IconButton
|
||||
size={'sm'}
|
||||
rounded="sm"
|
||||
icon={<ChevronLeftIcon />}
|
||||
onClick={paginationPrev}
|
||||
className="link pointer"
|
||||
isDisabled={currentPage === 1}
|
||||
/>
|
||||
<Text className="web-text-medium" as={"span"}>
|
||||
{displayRange.start} - {displayRange.end} of {totalItems}
|
||||
</Text>
|
||||
<IconButton
|
||||
icon={<ChevronRightIcon />}
|
||||
size={'sm'}
|
||||
rounded="sm"
|
||||
onClick={paginationNext}
|
||||
className="link pointer"
|
||||
isDisabled={currentPage === totalPages}
|
||||
/>
|
||||
</HStack>
|
||||
</HStack>
|
||||
);
|
||||
};
|
||||
|
||||
export default Pagination;
|
||||
@@ -12,6 +12,248 @@ const GlobalStateProvider = ({ children }) => {
|
||||
const [memberIfo, setMemberInfo] = useState();
|
||||
const [communityMembers, setCommityMembers] = useState();
|
||||
|
||||
const [sponser, setSponser] = useState([
|
||||
{
|
||||
id: 1,
|
||||
sponserName: "John Doe",
|
||||
mobileNo: "1234567890",
|
||||
sponserAddress: "123 Main St, Springfield, USA",
|
||||
accountHolderName: "John Doe",
|
||||
bankName: "Example Bank",
|
||||
accountNumber: "1234567890",
|
||||
bankBranch: "Main Branch",
|
||||
branchAddress: "456 Elm St, Springfield, USA",
|
||||
ifscCode: "IFSC12345",
|
||||
swiftCode: "SWIFT56789",
|
||||
routingNumber: "987654321",
|
||||
iban: "IBAN987654321",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "9876543210",
|
||||
bankEmail: "john.doe@example.com",
|
||||
status: true,
|
||||
createdAt: "45",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
sponserName: "Jane Smith",
|
||||
mobileNo: "9876543210",
|
||||
sponserAddress: "456 Oak St, Metropolis, USA",
|
||||
accountHolderName: "Jane Smith",
|
||||
bankName: "Another Bank",
|
||||
accountNumber: "0987654321",
|
||||
bankBranch: "Downtown Branch",
|
||||
branchAddress: "789 Pine St, Metropolis, USA",
|
||||
ifscCode: "IFSC54321",
|
||||
swiftCode: "SWIFT98765",
|
||||
routingNumber: "123456789",
|
||||
iban: "IBAN123456789",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "1234567890",
|
||||
bankEmail: "jane.smith@example.com",
|
||||
status: false,
|
||||
createdAt: "45",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
sponserName: "Alice Johnson",
|
||||
mobileNo: "1231231234",
|
||||
sponserAddress: "789 Pine St, Gotham, USA",
|
||||
accountHolderName: "Alice Johnson",
|
||||
bankName: "Gotham Bank",
|
||||
accountNumber: "5678901234",
|
||||
bankBranch: "Uptown Branch",
|
||||
branchAddress: "101 Oak St, Gotham, USA",
|
||||
ifscCode: "IFSC67890",
|
||||
swiftCode: "SWIFT34567",
|
||||
routingNumber: "987654321",
|
||||
iban: "IBAN345678901",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "5556667777",
|
||||
bankEmail: "alice.johnson@example.com",
|
||||
status: true,
|
||||
createdAt: "12",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
sponserName: "Bob Brown",
|
||||
mobileNo: "3213214321",
|
||||
sponserAddress: "101 Maple St, Smallville, USA",
|
||||
accountHolderName: "Bob Brown",
|
||||
bankName: "Smallville Credit Union",
|
||||
accountNumber: "5432109876",
|
||||
bankBranch: "Main Street Branch",
|
||||
branchAddress: "202 Pine St, Smallville, USA",
|
||||
ifscCode: "IFSC43210",
|
||||
swiftCode: "SWIFT87654",
|
||||
routingNumber: "123456789",
|
||||
iban: "IBAN567890123",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "8889990000",
|
||||
bankEmail: "bob.brown@example.com",
|
||||
status: true,
|
||||
createdAt: "7",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
sponserName: "Charlie Davis",
|
||||
mobileNo: "5555555555",
|
||||
sponserAddress: "202 Birch St, Star City, USA",
|
||||
accountHolderName: "Charlie Davis",
|
||||
bankName: "Star City Bank",
|
||||
accountNumber: "9876543210",
|
||||
bankBranch: "Downtown Branch",
|
||||
branchAddress: "303 Oak St, Star City, USA",
|
||||
ifscCode: "IFSC55555",
|
||||
swiftCode: "SWIFT00000",
|
||||
routingNumber: "111223344",
|
||||
iban: "IBAN999988887",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "1112223333",
|
||||
bankEmail: "charlie.davis@example.com",
|
||||
status: false,
|
||||
createdAt: "4",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
sponserName: "Daniel Evans",
|
||||
mobileNo: "4444444444",
|
||||
sponserAddress: "303 Cedar St, Central City, USA",
|
||||
accountHolderName: "Daniel Evans",
|
||||
bankName: "Central City Bank",
|
||||
accountNumber: "4444555566",
|
||||
bankBranch: "Uptown Branch",
|
||||
branchAddress: "404 Elm St, Central City, USA",
|
||||
ifscCode: "IFSC44444",
|
||||
swiftCode: "SWIFT11111",
|
||||
routingNumber: "555666777",
|
||||
iban: "IBAN4444555566",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "4445556666",
|
||||
bankEmail: "daniel.evans@example.com",
|
||||
status: true,
|
||||
createdAt: "2",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
sponserName: "Ella Fitzgerald",
|
||||
mobileNo: "3333333333",
|
||||
sponserAddress: "404 Elm St, Coast City, USA",
|
||||
accountHolderName: "Ella Fitzgerald",
|
||||
bankName: "Coast City Bank",
|
||||
accountNumber: "3333444455",
|
||||
bankBranch: "Downtown Branch",
|
||||
branchAddress: "505 Cedar St, Coast City, USA",
|
||||
ifscCode: "IFSC77777",
|
||||
swiftCode: "SWIFT22222",
|
||||
routingNumber: "888999000",
|
||||
iban: "IBAN888999000",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "7778889999",
|
||||
bankEmail: "ella.fitzgerald@example.com",
|
||||
status: false,
|
||||
createdAt: "9",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
sponserName: "Frank Green",
|
||||
mobileNo: "2222222222",
|
||||
sponserAddress: "505 Ash St, Keystone City, USA",
|
||||
accountHolderName: "Frank Green",
|
||||
bankName: "Keystone City Bank",
|
||||
accountNumber: "2222333344",
|
||||
bankBranch: "Main Branch",
|
||||
branchAddress: "606 Birch St, Keystone City, USA",
|
||||
ifscCode: "IFSC88888",
|
||||
swiftCode: "SWIFT33333",
|
||||
routingNumber: "444555666",
|
||||
iban: "IBAN444555666",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "2222333444",
|
||||
bankEmail: "frank.green@example.com",
|
||||
status: true,
|
||||
createdAt: "8",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
sponserName: "Grace Hall",
|
||||
mobileNo: "1111111111",
|
||||
sponserAddress: "606 Willow St, Hub City, USA",
|
||||
accountHolderName: "Grace Hall",
|
||||
bankName: "Hub City Bank",
|
||||
accountNumber: "1111222233",
|
||||
bankBranch: "Downtown Branch",
|
||||
branchAddress: "707 Cedar St, Hub City, USA",
|
||||
ifscCode: "IFSC99999",
|
||||
swiftCode: "SWIFT44444",
|
||||
routingNumber: "555566677",
|
||||
iban: "IBAN555566677",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "1111222333",
|
||||
bankEmail: "grace.hall@example.com",
|
||||
status: true,
|
||||
createdAt: "1",
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
sponserName: "Henry Ingram",
|
||||
mobileNo: "6666666666",
|
||||
sponserAddress: "707 Spruce St, Fawcett City, USA",
|
||||
accountHolderName: "Henry Ingram",
|
||||
bankName: "Fawcett City Bank",
|
||||
accountNumber: "6666777788",
|
||||
bankBranch: "Main Street Branch",
|
||||
branchAddress: "808 Oak St, Fawcett City, USA",
|
||||
ifscCode: "IFSC66666",
|
||||
swiftCode: "SWIFT55555",
|
||||
routingNumber: "999000111",
|
||||
iban: "IBAN999000111",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "6666777888",
|
||||
bankEmail: "henry.ingram@example.com",
|
||||
status: false,
|
||||
createdAt: "6",
|
||||
},{
|
||||
id: 11,
|
||||
sponserName: "Grace Hall",
|
||||
mobileNo: "1111111111",
|
||||
sponserAddress: "606 Willow St, Hub City, USA",
|
||||
accountHolderName: "Grace Hall",
|
||||
bankName: "Hub City Bank",
|
||||
accountNumber: "1111222233",
|
||||
bankBranch: "Downtown Branch",
|
||||
branchAddress: "707 Cedar St, Hub City, USA",
|
||||
ifscCode: "IFSC99999",
|
||||
swiftCode: "SWIFT44444",
|
||||
routingNumber: "555566677",
|
||||
iban: "IBAN555566677",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "1111222333",
|
||||
bankEmail: "grace.hall@example.com",
|
||||
status: true,
|
||||
createdAt: "1",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
sponserName: "Henry Ingram",
|
||||
mobileNo: "6666666666",
|
||||
sponserAddress: "707 Spruce St, Fawcett City, USA",
|
||||
accountHolderName: "Henry Ingram",
|
||||
bankName: "Fawcett City Bank",
|
||||
accountNumber: "6666777788",
|
||||
bankBranch: "Main Street Branch",
|
||||
branchAddress: "808 Oak St, Fawcett City, USA",
|
||||
ifscCode: "IFSC66666",
|
||||
swiftCode: "SWIFT55555",
|
||||
routingNumber: "999000111",
|
||||
iban: "IBAN999000111",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "6666777888",
|
||||
bankEmail: "henry.ingram@example.com",
|
||||
status: false,
|
||||
createdAt: "6",
|
||||
},
|
||||
]);
|
||||
|
||||
return (
|
||||
<GlobalStateContext.Provider
|
||||
value={{
|
||||
@@ -21,6 +263,8 @@ const GlobalStateProvider = ({ children }) => {
|
||||
setMemberInfo,
|
||||
communityMembers,
|
||||
setCommityMembers,
|
||||
sponser,
|
||||
setSponser,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -34,11 +34,18 @@ import {
|
||||
WrapItem,
|
||||
Popover,
|
||||
Tag,
|
||||
Accordion,
|
||||
AccordionItem,
|
||||
AccordionButton,
|
||||
AccordionIcon,
|
||||
AccordionPanel,
|
||||
} from "@chakra-ui/react";
|
||||
import GlobalStateContext from "../Contexts/GlobalStateContext";
|
||||
import Cookies from "js-cookie"; // Import the Cookies library
|
||||
import Header from "../Components/Header";
|
||||
import HeaderMain from "../Components/HeaderMain";
|
||||
import { IoMdSwap } from "react-icons/io";
|
||||
import { RiExchangeBoxLine, RiMoneyDollarBoxLine } from "react-icons/ri";
|
||||
|
||||
const DashboardLayout = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -48,6 +55,7 @@ const DashboardLayout = () => {
|
||||
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
||||
const [openDrawerClick, setOpenDrawerClick] = useState(true);
|
||||
const { setIsAuthenticate } = useContext(GlobalStateContext);
|
||||
const [slideFromRight, setSlideFormRight] = useState(false);
|
||||
|
||||
const openDrawerOnClick = () => {
|
||||
setOpenDrawerClick(!openDrawerClick);
|
||||
@@ -65,24 +73,19 @@ const DashboardLayout = () => {
|
||||
switch (path) {
|
||||
case "/":
|
||||
return "👋🏻 Hi, Admin";
|
||||
case "/investment":
|
||||
return "Investment";
|
||||
case "/blogs-articles":
|
||||
return "Blogs and Articles";
|
||||
case "/videos":
|
||||
return "Videos";
|
||||
case "/news":
|
||||
return "News";
|
||||
case "/events":
|
||||
return "Events";
|
||||
case "/whitepaper":
|
||||
return "Whitepaper";
|
||||
case "/community/":
|
||||
return "Community";
|
||||
case "/community":
|
||||
return "Community";
|
||||
case "/community/view/":
|
||||
return "Community";
|
||||
case "/sponser":
|
||||
case "/sponser/add-sponser":
|
||||
return (
|
||||
<span className="d-flex align-items-end gap-2">
|
||||
<RiMoneyDollarBoxLine className="h4 m-0" /> Sponser
|
||||
</span>
|
||||
);
|
||||
case "/exchange-rate":
|
||||
return (
|
||||
<span className="d-flex align-items-end gap-2">
|
||||
<RiExchangeBoxLine className="h4 m-0 fw-normal" /> Echange rate
|
||||
</span>
|
||||
);
|
||||
case "/community/add-comunity":
|
||||
return (
|
||||
<Text color={"teal.800"} className="d-flex align-items-center">
|
||||
@@ -97,7 +100,7 @@ const DashboardLayout = () => {
|
||||
return (
|
||||
<span className="d-flex align-items-center">
|
||||
<Link to={"/community/"}>
|
||||
<ArrowBackIcon className="me-2 fs-3 link p-1 rounded-1" />
|
||||
<ArrowBackIcon className="me-2 fs-3 link p-1 rounded-1" />
|
||||
</Link>
|
||||
Community
|
||||
</span>
|
||||
@@ -116,9 +119,6 @@ const DashboardLayout = () => {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Box
|
||||
style={{
|
||||
@@ -126,204 +126,501 @@ const DashboardLayout = () => {
|
||||
width: "100vw",
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
|
||||
// backgroundColor:"#101015"
|
||||
// backgroundColor:"#000000"
|
||||
}}
|
||||
className="d-flex"
|
||||
pe={0.5}
|
||||
|
||||
>
|
||||
<aside
|
||||
className="h-100 position-relative sideBar pe-1"
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
// onMouseLeave={() => setIsDrawerOpen(false)}
|
||||
style={{
|
||||
width: isDrawerOpen || openDrawerClick ? 225 : 70,
|
||||
transition: "width 0.3s ease-in-out", // Smooth transition for width change
|
||||
overflow: "hidden", // Hide overflow to prevent content overflow during transition
|
||||
backgroundColor:"#0041180A",
|
||||
// backgroundColor: "#002F0F",
|
||||
<Box
|
||||
bottom={4}
|
||||
right={!slideFromRight ? 4 : "auto"}
|
||||
left={slideFromRight ? 4 : "auto"}
|
||||
backgroundColor={"#fff"}
|
||||
rounded={"full"}
|
||||
p={2}
|
||||
w={8}
|
||||
h={8}
|
||||
display={"flex"}
|
||||
justifyContent={"center"}
|
||||
alignItems={"center"}
|
||||
color={"#004118"}
|
||||
fontWeight={"800"}
|
||||
cursor={"pointer"}
|
||||
position={"absolute"}
|
||||
transition={"0.5s"}
|
||||
boxShadow={"md"}
|
||||
onClick={() => setSlideFormRight(!slideFromRight)}
|
||||
_hover={{
|
||||
opacity: 1,
|
||||
}}
|
||||
zIndex={999}
|
||||
>
|
||||
<div
|
||||
className={`d-flex ${isDrawerOpen || openDrawerClick ? "justify-content-start" : "justify-content-center"} p-3 pt-3 pb-4 position-relative `}
|
||||
height={"10%"}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<img
|
||||
style={{
|
||||
width: 120,
|
||||
}}
|
||||
src={logo}
|
||||
alt="Logo"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
style={{
|
||||
width: 30,
|
||||
}}
|
||||
src={logoMini}
|
||||
alt="Logo"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<IoMdSwap />
|
||||
</Box>
|
||||
|
||||
<div
|
||||
className="ps-2 scroll-bar "
|
||||
style={{ height: "80%", overflowY: "scroll", overflowX:"hidden" }}
|
||||
>
|
||||
{nav.map(({ title, path, Icon }, index) => (
|
||||
<Box
|
||||
// color={"whitesmoke"}
|
||||
color={"gray.600"}
|
||||
key={index}
|
||||
className=" mb-1 w-100 d-flex "
|
||||
>
|
||||
{path ? (
|
||||
<NavLink
|
||||
style={{
|
||||
height: "auto",
|
||||
}}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-1 web-text-medium ps-3"
|
||||
: "p-2 ps-1 web-text-xlarge justify-content-center"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100 `}
|
||||
to={path}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
display:
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "flex",
|
||||
alignItems: "center",
|
||||
paddingBottom: 0,
|
||||
}}
|
||||
>
|
||||
<Icon className="web-text-large" />
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
display:
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none",
|
||||
alignItems: "center",
|
||||
padding: 3,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
</NavLink>
|
||||
) : (
|
||||
<span className="web-text-xxsmall fw-600 mt-1 text-secondary fw-bold">
|
||||
{title}
|
||||
</span>
|
||||
)}
|
||||
</Box>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* <section
|
||||
className="d-flex justify-content-center border-top p-2 "
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
<Popover placement="top">
|
||||
<Portal>
|
||||
<PopoverContent maxW="220px" className="ms-2">
|
||||
<PopoverArrow />
|
||||
<PopoverBody className="web-text-medium pointer link">
|
||||
Profile
|
||||
</PopoverBody>
|
||||
<Link to={"/help-and-support"}>
|
||||
<PopoverBody className="web-text-medium pointer ">
|
||||
Help & Support
|
||||
</PopoverBody>
|
||||
</Link>
|
||||
<PopoverFooter
|
||||
onClick={logOutHandler}
|
||||
className="web-text-medium pointer link"
|
||||
>
|
||||
Log Out
|
||||
</PopoverFooter>
|
||||
</PopoverContent>
|
||||
</Portal>
|
||||
<PopoverTrigger>
|
||||
<Box
|
||||
// onClick={logOutHandler}
|
||||
className="d-flex pointer align-items-center"
|
||||
>
|
||||
<Avatar
|
||||
size="xs"
|
||||
name="Dan Abrahmov"
|
||||
src="https://bit.ly/dan-abramov"
|
||||
/>
|
||||
<Box
|
||||
color={"whitesmoke"}
|
||||
style={{
|
||||
opacity: isDrawerOpen || openDrawerClick ? 1 : 0,
|
||||
display: isDrawerOpen || openDrawerClick ? "flex" : "none",
|
||||
transition: "opacity 0.3s ease-in-out",
|
||||
}}
|
||||
className=" overflow-hidden ms-3 flex-column "
|
||||
>
|
||||
<Text as={"span"} className="web-text-small">
|
||||
Hello, developer admin
|
||||
</Text>
|
||||
<Text as={"span"} className="web-text-xsmall">
|
||||
siddhesh@rubix.com
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
</PopoverTrigger>
|
||||
</Popover>
|
||||
</section> */}
|
||||
</aside>
|
||||
|
||||
<main
|
||||
className={`h-100 ${path === "/" ? "ps-0" : "ps-3" } `}
|
||||
style={{
|
||||
width: `calc(100% - ${isDrawerOpen || openDrawerClick ? 225 : 70}px)`,
|
||||
transition: "width 0.3s ease-in-out",
|
||||
position: "relative",
|
||||
// boxShadow:
|
||||
// "rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset",
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"lg"}
|
||||
{slideFromRight ? null : (
|
||||
<aside
|
||||
className="h-100 position-relative sideBar pe-1"
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
// onMouseLeave={() => setIsDrawerOpen(false)}
|
||||
onClick={openDrawerOnClick}
|
||||
style={{
|
||||
width: 18,
|
||||
height: 26,
|
||||
position: "absolute",
|
||||
left: -28,
|
||||
bottom: 80,
|
||||
zIndex: 6,
|
||||
width: isDrawerOpen || openDrawerClick ? 225 : 74,
|
||||
transition: "width 0.3s ease-in-out", // Smooth transition for width change
|
||||
overflow: "hidden", // Hide overflow to prevent content overflow during transition
|
||||
backgroundColor: "#0041180A",
|
||||
position: "relative",
|
||||
// backgroundColor: "#002F0F",
|
||||
}}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<ArrowLeftIcon className="web-text-small" />
|
||||
) : (
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
)}
|
||||
</Button>
|
||||
<div
|
||||
className={`d-flex ${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "justify-content-start"
|
||||
: "justify-content-center"
|
||||
} p-3 pt-3 pb-4 position-relative `}
|
||||
height={"10%"}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<img
|
||||
style={{
|
||||
width: 120,
|
||||
}}
|
||||
src={logo}
|
||||
alt="Logo"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
style={{
|
||||
width: 30,
|
||||
}}
|
||||
src={logoMini}
|
||||
alt="Logo"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Box
|
||||
className="ps-2 scroll-bar"
|
||||
style={{ height: "80%", overflowY: "scroll", overflowX: "hidden" }}
|
||||
>
|
||||
<Accordion m={0} allowToggle>
|
||||
{nav.map(({ title, type, Icon, submenu, path }, index) => {
|
||||
if (type === "accordion") {
|
||||
return (
|
||||
<AccordionItem key={index} border={"none"}>
|
||||
<AccordionButton
|
||||
style={{ height: "auto" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 web-text-medium ps-3 justify-content-between"
|
||||
: "p-2 ps-1 web-text-xlarge justify-content-center"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100 mb-1`}
|
||||
>
|
||||
<Box
|
||||
as="span"
|
||||
display={"flex"}
|
||||
gap={2}
|
||||
alignItems={"center"}
|
||||
>
|
||||
{Icon && <Icon className="web-text-large" />}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
</Box>
|
||||
<AccordionIcon />
|
||||
</AccordionButton>
|
||||
<AccordionPanel
|
||||
p={0}
|
||||
pb={1}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
{submenu?.map(
|
||||
(
|
||||
{ title: subMenuTitle, path: link, icon: SubIcon },
|
||||
i
|
||||
) => (
|
||||
<Box
|
||||
key={i}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? " web-text-medium ps-4"
|
||||
: " web-text-xlarge justify-content-center"
|
||||
} d-flex align-items-center p-0`}
|
||||
>
|
||||
<Box
|
||||
backgroundColor={"gray.300"}
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
width: 2,
|
||||
left: 20,
|
||||
height:
|
||||
i === submenu?.length - 1 ? "55%" : "120%",
|
||||
borderRadius: "0 0 10px 10px",
|
||||
}}
|
||||
/>
|
||||
<Box
|
||||
backgroundColor={"gray.300"}
|
||||
style={{
|
||||
position: "absolute",
|
||||
width: 8,
|
||||
left: 20,
|
||||
height: 2,
|
||||
}}
|
||||
/>
|
||||
|
||||
<NavLink
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 ps-1 ms-1 web-text-medium "
|
||||
: "p-2 ps-0 ms-0 zindex-3 ms-4 web-text-xlarge justify-content-center"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100 `}
|
||||
to={link}
|
||||
>
|
||||
{SubIcon && (
|
||||
<SubIcon
|
||||
className="web-text-large ms-2"
|
||||
style={{ zIndex: 111 }}
|
||||
/>
|
||||
)}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "flex"
|
||||
: "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{subMenuTitle}
|
||||
</Text>
|
||||
</NavLink>
|
||||
</Box>
|
||||
)
|
||||
)}
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
);
|
||||
} else if (type === "title") {
|
||||
return (
|
||||
<Text
|
||||
as={"span"}
|
||||
key={index}
|
||||
className="web-text-xxsmall fw-600 mt-1 text-secondary fw-bold"
|
||||
padding={0}
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
);
|
||||
} else if (type === "single") {
|
||||
return (
|
||||
<NavLink
|
||||
key={index}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 web-text-medium"
|
||||
: "p-2 ps-0 web-text-xlarge justify-content-start"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100`}
|
||||
to={path}
|
||||
>
|
||||
{Icon && <Icon className="web-text-large ms-2" />}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
</NavLink>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
})}
|
||||
</Accordion>
|
||||
</Box>
|
||||
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"lg"}
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
// onMouseLeave={() => setIsDrawerOpen(false)}
|
||||
onClick={openDrawerOnClick}
|
||||
style={{
|
||||
width: 18,
|
||||
height: 26,
|
||||
position: "absolute",
|
||||
right: 0,
|
||||
bottom: 28,
|
||||
zIndex: 333,
|
||||
}}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<ArrowLeftIcon className="web-text-small" />
|
||||
) : (
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
)}
|
||||
</Button>
|
||||
</aside>
|
||||
)}
|
||||
|
||||
<main
|
||||
className={`h-100 ${slideFromRight ? "pe-3" : "ps-3"} `}
|
||||
style={{
|
||||
width: `calc(100% - ${isDrawerOpen || openDrawerClick ? 225 : 74}px)`,
|
||||
transition: "width 0.3s ease-in-out",
|
||||
}}
|
||||
>
|
||||
{/* <header className="p-2 ps-0 pt-3 fw-400 border-bottom">
|
||||
<span className="fs-5">{getTitle()}</span>
|
||||
</header> */}
|
||||
|
||||
<HeaderMain logOutHandler={logOutHandler} icon title={getTitle()}/>
|
||||
<HeaderMain
|
||||
slideDirecttion={slideFromRight}
|
||||
logOutHandler={logOutHandler}
|
||||
icon
|
||||
title={getTitle()}
|
||||
/>
|
||||
|
||||
<AppContent />
|
||||
</main>
|
||||
|
||||
{/* =======[ Left ]============ */}
|
||||
|
||||
{slideFromRight ? (
|
||||
<aside
|
||||
className="h-100 position-relative sideBar pe-1"
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
// onMouseLeave={() => setIsDrawerOpen(false)}
|
||||
style={{
|
||||
width: isDrawerOpen || openDrawerClick ? 225 : 74,
|
||||
transition: "width 0.3s ease-in-out", // Smooth transition for width change
|
||||
overflow: "hidden", // Hide overflow to prevent content overflow during transition
|
||||
backgroundColor: "#0041180A",
|
||||
position: "relative",
|
||||
// backgroundColor: "#002F0F",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className={`d-flex ${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "justify-content-end"
|
||||
: "justify-content-center"
|
||||
} p-3 pt-3 pb-4 position-relative `}
|
||||
height={"10%"}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<img
|
||||
style={{
|
||||
width: 120,
|
||||
}}
|
||||
src={logo}
|
||||
alt="Logo"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
style={{
|
||||
width: 30,
|
||||
}}
|
||||
src={logoMini}
|
||||
alt="Logo"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Box
|
||||
className="ps-2 scroll-bar"
|
||||
style={{ height: "80%", overflowY: "scroll", overflowX: "hidden" }}
|
||||
>
|
||||
<Accordion m={0} allowToggle>
|
||||
{nav.map(({ title, type, Icon, submenu, path }, index) => {
|
||||
if (type === "accordion") {
|
||||
return (
|
||||
<AccordionItem key={index} border={"none"}>
|
||||
<AccordionButton
|
||||
style={{ height: "auto" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 web-text-medium ps-3 justify-content-between"
|
||||
: "p-2 ps-1 web-text-xlarge justify-content-center"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100 mb-1`}
|
||||
>
|
||||
<Box
|
||||
as="span"
|
||||
display={"flex"}
|
||||
gap={2}
|
||||
alignItems={"center"}
|
||||
>
|
||||
{Icon && <Icon className="web-text-large" />}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
</Box>
|
||||
<AccordionIcon />
|
||||
</AccordionButton>
|
||||
<AccordionPanel
|
||||
p={0}
|
||||
pb={1}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={1}
|
||||
>
|
||||
{submenu?.map(
|
||||
(
|
||||
{ title: subMenuTitle, path: link, icon: SubIcon },
|
||||
i
|
||||
) => (
|
||||
<Box
|
||||
key={i}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? " web-text-medium ps-4"
|
||||
: " web-text-xlarge justify-content-center"
|
||||
} d-flex align-items-center p-0`}
|
||||
>
|
||||
<Box
|
||||
backgroundColor={"gray.300"}
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
width: 2,
|
||||
left: 20,
|
||||
height:
|
||||
i === submenu?.length - 1 ? "55%" : "120%",
|
||||
borderRadius: "0 0 10px 10px",
|
||||
}}
|
||||
/>
|
||||
<Box
|
||||
backgroundColor={"gray.300"}
|
||||
style={{
|
||||
position: "absolute",
|
||||
width: 8,
|
||||
left: 20,
|
||||
height: 2,
|
||||
}}
|
||||
/>
|
||||
|
||||
<NavLink
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 ps-1 ms-1 web-text-medium "
|
||||
: "p-2 ps-0 ms-0 zindex-3 ms-4 web-text-xlarge justify-content-center"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100 `}
|
||||
to={link}
|
||||
>
|
||||
{SubIcon && (
|
||||
<SubIcon
|
||||
className="web-text-large ms-2"
|
||||
style={{ zIndex: 111 }}
|
||||
/>
|
||||
)}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "flex"
|
||||
: "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{subMenuTitle}
|
||||
</Text>
|
||||
</NavLink>
|
||||
</Box>
|
||||
)
|
||||
)}
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
);
|
||||
} else if (type === "title") {
|
||||
return (
|
||||
<Text
|
||||
as={"span"}
|
||||
key={index}
|
||||
className="web-text-xxsmall fw-600 mt-1 text-secondary fw-bold"
|
||||
padding={0}
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
);
|
||||
} else if (type === "single") {
|
||||
return (
|
||||
<NavLink
|
||||
key={index}
|
||||
style={{ height: "auto", position: "relative" }}
|
||||
className={`${
|
||||
isDrawerOpen || openDrawerClick
|
||||
? "p-2 web-text-medium"
|
||||
: "p-2 ps-0 web-text-xlarge justify-content-start"
|
||||
} rounded-1 link d-flex align-items-center gap-2 w-100`}
|
||||
to={path}
|
||||
>
|
||||
{Icon && <Icon className="web-text-large ms-2" />}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none"
|
||||
}
|
||||
alignItems="center"
|
||||
overflow="hidden"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
</NavLink>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
})}
|
||||
</Accordion>
|
||||
</Box>
|
||||
|
||||
<Button
|
||||
colorScheme={"forestGreen"}
|
||||
rounded={"lg"}
|
||||
// onMouseOver={() => setIsDrawerOpen(true)}
|
||||
// onMouseLeave={() => setIsDrawerOpen(false)}
|
||||
onClick={openDrawerOnClick}
|
||||
style={{
|
||||
width: 18,
|
||||
height: 26,
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
bottom: 28,
|
||||
zIndex: 333,
|
||||
}}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
) : (
|
||||
<ArrowLeftIcon className="web-text-small" />
|
||||
)}
|
||||
</Button>
|
||||
</aside>
|
||||
) : null}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
11
src/Pages/Master/ExchangeRate/ExchangeRate.jsx
Normal file
11
src/Pages/Master/ExchangeRate/ExchangeRate.jsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Box } from '@chakra-ui/react'
|
||||
import React from 'react'
|
||||
import { OPACITY_ON_LOAD } from '../../../Layout/animations'
|
||||
|
||||
const ExchangeRate = () => {
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} bg={"green.200"} overflowY={"scroll"} height={"100vh"}></Box>
|
||||
)
|
||||
}
|
||||
|
||||
export default ExchangeRate
|
||||
227
src/Pages/Master/Sponser/AddSponser.jsx
Normal file
227
src/Pages/Master/Sponser/AddSponser.jsx
Normal file
@@ -0,0 +1,227 @@
|
||||
import React, { useContext } from "react";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import {
|
||||
Box,
|
||||
Divider,
|
||||
FormControl,
|
||||
FormLabel,
|
||||
Heading,
|
||||
Input,
|
||||
Select,
|
||||
Textarea,
|
||||
Button,
|
||||
Text,
|
||||
} from "@chakra-ui/react";
|
||||
import { useForm, Controller } from "react-hook-form";
|
||||
import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import * as yup from "yup";
|
||||
import { WarningTwoIcon } from "@chakra-ui/icons";
|
||||
import { TiWarning } from "react-icons/ti";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import FormField from "../../../Components/FormField";
|
||||
|
||||
const schema = yup.object().shape({
|
||||
sponserName: yup.string().required("Sponser name is required"),
|
||||
mobileNo: yup.string().required("Mobile no is required"),
|
||||
sponserAddress: yup.string().required("Sponser address is required"),
|
||||
accountHolderName: yup.string().required("Account Holder's Name is required"),
|
||||
bankName: yup.string().required("Bank Name is required"),
|
||||
accountNumber: yup.string().required("Account Number is required"),
|
||||
bankBranch: yup.string().required("Bank Branch is required"),
|
||||
branchAddress: yup.string().required("Branch Address is required"),
|
||||
ifscCode: yup.string().required("IFSC Code is required"),
|
||||
swiftCode: yup.string().required("SWIFT/BIC Code is required"),
|
||||
routingNumber: yup.string().required("Routing Number is required"),
|
||||
iban: yup.string().required("IBAN is required"),
|
||||
accountType: yup.string().required("Account Type is required"),
|
||||
bankPhoneNumber: yup.string().required("Bank Phone Number is required"),
|
||||
bankEmail: yup.string().email("Invalid email format"),
|
||||
});
|
||||
|
||||
|
||||
|
||||
const AddSponser = () => {
|
||||
const navigate = useNavigate()
|
||||
const { sponser, setSponser } = useContext(GlobalStateContext);
|
||||
const {
|
||||
control,
|
||||
handleSubmit,
|
||||
formState: { errors },
|
||||
} = useForm({
|
||||
resolver: yupResolver(schema),
|
||||
});
|
||||
|
||||
console.log(errors);
|
||||
|
||||
const onSubmit = (data) => {
|
||||
setSponser([{...data, status: true}, ...sponser]);
|
||||
navigate('/sponser');
|
||||
};
|
||||
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"} pb={14}>
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<Heading as="h6" size="xs" mt={4}>
|
||||
Personal Details
|
||||
</Heading>
|
||||
<Box display={"flex"} gap={0}>
|
||||
{Array(2).fill(
|
||||
<Box
|
||||
width={"50%"}
|
||||
p={5}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={4}
|
||||
>
|
||||
<FormField
|
||||
label="Sponser name"
|
||||
name="sponserName"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Mobile no"
|
||||
name="mobileNo"
|
||||
type="tel"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Sponser address"
|
||||
name="sponserAddress"
|
||||
type="textarea"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
<Divider />
|
||||
|
||||
<Heading as="h6" size="xs" mt={4}>
|
||||
Bank Details
|
||||
</Heading>
|
||||
<Box display={"flex"} gap={0}>
|
||||
{Array(2).fill(
|
||||
<Box
|
||||
width={"50%"}
|
||||
p={5}
|
||||
display={"flex"}
|
||||
flexDirection={"column"}
|
||||
gap={4}
|
||||
>
|
||||
<FormField
|
||||
label="Account Holder's Name"
|
||||
name="accountHolderName"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Bank Name"
|
||||
name="bankName"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Account Number"
|
||||
name="accountNumber"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Bank Branch"
|
||||
name="bankBranch"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Branch Address"
|
||||
name="branchAddress"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="IFSC Code"
|
||||
name="ifscCode"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="SWIFT/BIC Code"
|
||||
name="swiftCode"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Routing Number"
|
||||
name="routingNumber"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="IBAN"
|
||||
name="iban"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Type of Account"
|
||||
name="accountType"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
component={
|
||||
<Select size={"sm"}>
|
||||
<option value="savings">Savings</option>
|
||||
<option value="checking">Checking</option>
|
||||
<option value="business">Business</option>
|
||||
</Select>
|
||||
}
|
||||
/>
|
||||
<FormField
|
||||
label="Bank Phone Number"
|
||||
name="bankPhoneNumber"
|
||||
control={control}
|
||||
errors={errors}
|
||||
isRequired={true}
|
||||
/>
|
||||
<FormField
|
||||
label="Bank Email (optional)"
|
||||
name="bankEmail"
|
||||
control={control}
|
||||
errors={errors}
|
||||
/>
|
||||
|
||||
{/* <Button size={"sm"} rounded={"sm"} type="submit" colorScheme="green">
|
||||
Submit
|
||||
</Button> */}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
</Box>
|
||||
|
||||
<Box display={'flex'} justifyContent={"flex-end"} p={4}>
|
||||
<Button size={"sm"} width={"50%"} rounded={"sm"} type="submit" colorScheme="green">
|
||||
Submit
|
||||
</Button>
|
||||
</Box>
|
||||
</form>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddSponser;
|
||||
226
src/Pages/Master/Sponser/Sponsers.jsx
Normal file
226
src/Pages/Master/Sponser/Sponsers.jsx
Normal file
@@ -0,0 +1,226 @@
|
||||
import {
|
||||
Avatar,
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
HStack,
|
||||
Input,
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuList,
|
||||
Portal,
|
||||
Select,
|
||||
Switch,
|
||||
Tag,
|
||||
Text,
|
||||
} from "@chakra-ui/react";
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
import DataTable from "../../../Components/DataTable/DataTable";
|
||||
import { HiDotsVertical } from "react-icons/hi";
|
||||
import { Link, Link as RouterLink } from "react-router-dom";
|
||||
import { AddIcon, EmailIcon } from "@chakra-ui/icons";
|
||||
import Pagination from "../../../Components/Pagination";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
|
||||
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
const Sponser = () => {
|
||||
const { sponser, setSponser } = useContext(GlobalStateContext);
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [deleteAlert, setDeleteAlert] = useState(false);
|
||||
const [actionId, setActionId] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// Simulate loading
|
||||
const timer = setTimeout(() => {
|
||||
setIsLoading(false);
|
||||
}, 1500);
|
||||
|
||||
// Cleanup the timer on component unmount
|
||||
return () => clearTimeout(timer);
|
||||
}, []);
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
"Sponser name",
|
||||
"Address",
|
||||
"Mobile no",
|
||||
"Status",
|
||||
"Created At",
|
||||
];
|
||||
|
||||
const handleUpdateStatus = (id) => {
|
||||
console.log(`Status updated for id: ${id}`);
|
||||
// Add your status update logic here
|
||||
};
|
||||
|
||||
// ====================================================[Table Filter]================================================================
|
||||
const filteredData = sponser.filter((item) => {
|
||||
// Filter by name (case insensitive)
|
||||
const name = item.sponserName;
|
||||
const searchLower = searchTerm.toLowerCase();
|
||||
const nameMatches = name.toLowerCase().includes(searchLower);
|
||||
|
||||
// Filter by status
|
||||
// const status = item.status;
|
||||
// const statusLower = status ? "active" : "inactive";
|
||||
|
||||
// const statusMatches =
|
||||
// statusFilter === "all" ||
|
||||
// (statusFilter === "active" && status === true) ||
|
||||
// (statusFilter === "inactive" && status === false);
|
||||
|
||||
return nameMatches;
|
||||
});
|
||||
|
||||
const extractedArray = filteredData?.map((item) => ({
|
||||
"Sponser name": (
|
||||
<Text
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{item.sponserName}
|
||||
</Text>
|
||||
),
|
||||
Address: (
|
||||
<Box w={350} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.sponserAddress}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Mobile no": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{item.mobileNo}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
Status:
|
||||
// <Switch
|
||||
// size={"sm"}
|
||||
// colorScheme="teal"
|
||||
// onChange={() => handleUpdateStatus(item.id)}
|
||||
// isChecked={item.status}
|
||||
// />
|
||||
|
||||
item?.status ? (
|
||||
<Badge variant={"outline"} colorScheme="green">
|
||||
Passed
|
||||
</Badge>
|
||||
) : (
|
||||
<Badge variant={"outline"} colorScheme="red">
|
||||
Not passes
|
||||
</Badge>
|
||||
),
|
||||
"Created At": (
|
||||
<span className="d-flex justify-content-between align-items-center">
|
||||
<Text as={"span"} color={"gray.600"} className=" fw-bold">
|
||||
{formatDate(item.createdAt)}
|
||||
</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>
|
||||
),
|
||||
}));
|
||||
|
||||
const handleDelete = () => {
|
||||
const updatedSponsors = sponser.filter((sponsor) => sponsor.id !== actionId);
|
||||
|
||||
setTimeout(() => {
|
||||
setSponser(updatedSponsors);
|
||||
setDeleteAlert(false);
|
||||
setIsLoading(false);
|
||||
}, 100);
|
||||
setIsLoading(true);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
|
||||
<Box bg="white.500">
|
||||
<HStack
|
||||
display={"flex"}
|
||||
justifyContent={"space-between"}
|
||||
ps={1}
|
||||
pe={1}
|
||||
pb={4}
|
||||
pt={4}
|
||||
spacing="24px"
|
||||
>
|
||||
<Input
|
||||
type="search"
|
||||
width={300}
|
||||
placeholder="Search..."
|
||||
size="sm"
|
||||
rounded="sm"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
|
||||
<HStack display={"flex"} alignItems={"center"}>
|
||||
<Pagination totalItems={10} />
|
||||
|
||||
<Link to={"/sponser/add-sponser"}>
|
||||
<Button
|
||||
leftIcon={<AddIcon />}
|
||||
colorScheme={"green"}
|
||||
rounded={"sm"}
|
||||
size={"sm"}
|
||||
>
|
||||
Add sponsers
|
||||
</Button>
|
||||
</Link>
|
||||
</HStack>
|
||||
</HStack>
|
||||
</Box>
|
||||
|
||||
<DataTable
|
||||
emptyMessage={`We don't have any Sponers `}
|
||||
tableHeadRow={tableHeadRow}
|
||||
data={extractedArray}
|
||||
isLoading={isLoading}
|
||||
// totalPages={10}
|
||||
/>
|
||||
|
||||
<CustomAlertDialog
|
||||
onClose={()=> setDeleteAlert(false)}
|
||||
isOpen={deleteAlert}
|
||||
message={"Are you sure you want to delete sponers?"}
|
||||
alertHandler={handleDelete}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sponser;
|
||||
@@ -1,10 +1,9 @@
|
||||
import { Box, Image, Text } from '@chakra-ui/react'
|
||||
import noInternet from "../assets/Error.svg"
|
||||
import noInternet from "../assets/noInternet.jpg"
|
||||
|
||||
const NoInternetScreen = () => {
|
||||
return (
|
||||
<Box
|
||||
w={'100vw'}
|
||||
h={'100vh'}
|
||||
display={'flex'}
|
||||
justifyContent={'center'}
|
||||
@@ -13,7 +12,7 @@ const NoInternetScreen = () => {
|
||||
gap={5}
|
||||
>
|
||||
<Image src={noInternet} w={300} />
|
||||
<Text color={'blue.800'} as={'span'} className='fw-bold'>No Internet !</Text>
|
||||
{/* <Text color={'blue.800'} as={'span'} className='fw-bold'>No Internet !</Text> */}
|
||||
</Box>
|
||||
|
||||
)
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
|
||||
import { Box, Image } from "@chakra-ui/react"
|
||||
import error from "../assets/Error.svg"
|
||||
const NotFound = () => {
|
||||
return (
|
||||
<div>NotFound</div>
|
||||
|
||||
<Box
|
||||
h={'100vh'}
|
||||
display={'flex'}
|
||||
justifyContent={'center'}
|
||||
alignItems={'center'}
|
||||
flexDirection={'column'}
|
||||
gap={5}
|
||||
>
|
||||
<Image src={error} w={300} />
|
||||
{/* <Text color={'blue.800'} as={'span'} className='fw-bold'>No Internet !</Text> */}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ import CommunityBannerCard from "./CommunityBannerCard";
|
||||
import Header from "../../Components/Header";
|
||||
import { TABLE_PAGINATION } from "../../Constants/Paginations";
|
||||
import ToastBox from "../../Components/ToastBox";
|
||||
import TabularView from "../../Components/TabularView/TabularView";
|
||||
import TabularView from "../../../Components/TabularView/TabularView";
|
||||
const API_URL = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
const Community = () => {
|
||||
@@ -1,97 +1,162 @@
|
||||
import { FaHome, FaTable } from "react-icons/fa";
|
||||
import { FiHome } from "react-icons/fi";
|
||||
import { RiBloggerLine } from "react-icons/ri";
|
||||
import { LuVideo } from "react-icons/lu";
|
||||
import { HiOutlineNewspaper } from "react-icons/hi";
|
||||
import { IoMdPaper } from "react-icons/io";
|
||||
import { MdOutlineEvent } from "react-icons/md";
|
||||
import { CgCommunity } from "react-icons/cg";
|
||||
import { AiOutlineIdcard } from "react-icons/ai";
|
||||
import { LuMonitorPause } from "react-icons/lu";
|
||||
import { MdOutlinePrivacyTip } from "react-icons/md";
|
||||
import { GrDocumentVerified } from "react-icons/gr";
|
||||
import { FaQuestionCircle } from "react-icons/fa";
|
||||
import { MdOutlineSettingsApplications } from "react-icons/md";
|
||||
import { MdOutlineUnsubscribe } from "react-icons/md";
|
||||
import { TbBrandMedium } from "react-icons/tb";
|
||||
import { RiMoneyDollarBoxLine } from "react-icons/ri";
|
||||
import { RiExchangeBoxLine } from "react-icons/ri";
|
||||
import { VscSymbolClass } from "react-icons/vsc";
|
||||
import { FiUsers } from "react-icons/fi";
|
||||
|
||||
|
||||
export const nav = [
|
||||
// {
|
||||
// title: "Home",
|
||||
// path: "/",
|
||||
// Icon: FiHome,
|
||||
// },
|
||||
{
|
||||
title: "MAIN MENU",
|
||||
path: null,
|
||||
type: "title",
|
||||
},
|
||||
{
|
||||
title: "Investment",
|
||||
path: "/investment",
|
||||
title: "Master",
|
||||
submenu: [
|
||||
{
|
||||
title: "Sponser",
|
||||
path: "/sponser",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "Exchange rate",
|
||||
path: "/exchange-rate",
|
||||
icon:RiExchangeBoxLine
|
||||
},
|
||||
{
|
||||
title: "Asset classes",
|
||||
path: "/view",
|
||||
icon:VscSymbolClass
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: TbBrandMedium,
|
||||
},
|
||||
{
|
||||
title: "User",
|
||||
submenu: [
|
||||
{
|
||||
title: "Sponser",
|
||||
path: "/loop",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "Class",
|
||||
path: "/class",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "View",
|
||||
path: "/view",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: FiUsers,
|
||||
},
|
||||
{
|
||||
title: "Single Link",
|
||||
type: "single",
|
||||
path: "/",
|
||||
Icon: HiOutlineNewspaper,
|
||||
},
|
||||
// {
|
||||
// title: "Banners",
|
||||
// path: "/banner",
|
||||
// Icon: AiOutlineIdcard,
|
||||
// title: "SPONSER",
|
||||
// type: "title",
|
||||
// },
|
||||
// {
|
||||
// title: "Blogs",
|
||||
// path: "/blogs-articles",
|
||||
// Icon: RiBloggerLine,
|
||||
// },
|
||||
// {
|
||||
// title: "Videos",
|
||||
// path: "/videos",
|
||||
// Icon: LuVideo,
|
||||
// },
|
||||
// {
|
||||
// title: "News",
|
||||
// path: "/news",
|
||||
// title: "Single Link",
|
||||
// type: "single",
|
||||
// path: "/",
|
||||
// Icon: HiOutlineNewspaper,
|
||||
// },
|
||||
// {
|
||||
// title: "Events",
|
||||
// path: "/events",
|
||||
// Icon: MdOutlineEvent,
|
||||
// },
|
||||
// {
|
||||
// title: "Whitepaper",
|
||||
// path: "/whitepaper",
|
||||
// Icon: IoMdPaper,
|
||||
// },
|
||||
// {
|
||||
// title: "Community",
|
||||
// path: "/community",
|
||||
// Icon: CgCommunity,
|
||||
// },
|
||||
// {
|
||||
// title: "Usecase",
|
||||
// path: "/usecase",
|
||||
// Icon: LuMonitorPause,
|
||||
// },
|
||||
// {
|
||||
// title: "Terms & Conditions",
|
||||
// path: "/terms",
|
||||
// Icon: GrDocumentVerified,
|
||||
// },
|
||||
// {
|
||||
// title: "Privacy Policy",
|
||||
// path: "/policy",
|
||||
// Icon: MdOutlinePrivacyTip,
|
||||
// },
|
||||
// {
|
||||
// title: "FAQ",
|
||||
// path: "/faq",
|
||||
// Icon: FaQuestionCircle,
|
||||
// },
|
||||
// {
|
||||
// title: "Partners Card",
|
||||
// path: "/partners",
|
||||
// Icon: MdOutlineSettingsApplications,
|
||||
// },
|
||||
// {
|
||||
// title: "News Letter",
|
||||
// path: "/newsLetter",
|
||||
// Icon: MdOutlineUnsubscribe,
|
||||
// },
|
||||
];
|
||||
|
||||
|
||||
|
||||
export const nestedNav = [
|
||||
{
|
||||
title: "MAIN MENU",
|
||||
type: "accordion",
|
||||
accArray: [
|
||||
{
|
||||
title: "Master",
|
||||
submenu: [
|
||||
{
|
||||
title: "Sponser",
|
||||
path: "/sponser",
|
||||
icon:RiMoneyDollarBoxLine
|
||||
},
|
||||
{
|
||||
title: "Exchange rate",
|
||||
path: "/exchange-rate",
|
||||
icon:RiExchangeBoxLine
|
||||
},
|
||||
{
|
||||
title: "Asset classes",
|
||||
path: "/view",
|
||||
icon:VscSymbolClass
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: TbBrandMedium,
|
||||
},
|
||||
{
|
||||
title: "User",
|
||||
submenu: [
|
||||
{
|
||||
title: "Sponser",
|
||||
path: "/loop",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "Class",
|
||||
path: "/class",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "View",
|
||||
path: "/view",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: HiOutlineNewspaper,
|
||||
},
|
||||
]
|
||||
},
|
||||
,
|
||||
{
|
||||
title: "User",
|
||||
submenu: [
|
||||
{
|
||||
title: "Sponser",
|
||||
path: "/loop",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "Class",
|
||||
path: "/class",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
{
|
||||
title: "View",
|
||||
path: "/view",
|
||||
icon:TbBrandMedium
|
||||
},
|
||||
],
|
||||
type: "accordion",
|
||||
Icon: FiUsers,
|
||||
},
|
||||
{
|
||||
title: "SPONSER",
|
||||
type: "title",
|
||||
},
|
||||
{
|
||||
title: "Single Link",
|
||||
type: "single",
|
||||
path: "/",
|
||||
Icon: HiOutlineNewspaper,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,214 +1,16 @@
|
||||
import BlogsAndArticles from "../Pages/BlogsAndArticles/BlogsAndArticles";
|
||||
import AddComunity from "../Pages/Community/AddComunity";
|
||||
import Community from "../Pages/Community/Community";
|
||||
import ComunityEditPage from "../Pages/Community/ComunityEditPage";
|
||||
import ComunityViewPage from "../Pages/Community/ComunityViewPage";
|
||||
import Events from "../Pages/Events/Events";
|
||||
import Banner from "../Pages/Banners/Banner";
|
||||
import Videos from "../Pages/Videos/Videos";
|
||||
import BannerCommunity from "../Pages/Banners/BannerCommunity/BannerCommunity";
|
||||
import BannerComunityEditPage from "../Pages/Banners/BannerCommunity/BannerCommunityEdit";
|
||||
import BannerComunityViewPage from "../Pages/Banners/BannerCommunity/BannerCommunityView";
|
||||
import AddBlogsAndArticles from "../Pages/BlogsAndArticles/AddBlogsAndArticles";
|
||||
import News from "../Pages/News/News";
|
||||
import AddNews from "../Pages/News/AddNews";
|
||||
import EditNews from "../Pages/News/EditNews";
|
||||
import ViewNews from "../Pages/News/ViewNews";
|
||||
import ViewBlogsAndArticles from "../Pages/BlogsAndArticles/ViewBlogsAndArticles";
|
||||
import EditBlogsAndArticles from "../Pages/BlogsAndArticles/EditBlogsAndArticles";
|
||||
import BannerLearn from "../Pages/Banners/BannerLearn/BannerLearn";
|
||||
import HelpAndSupport from "../Pages/News/HelpAndSupport";
|
||||
import AddEvents from "../Pages/Events/AddEvents";
|
||||
import ViewLearnBanner from "../Pages/Banners/BannerLearn/BannerLearnView";
|
||||
import BannerBuildView from "../Pages/Banners/BannerBuild/BannerBuildView";
|
||||
import BannerBuild from "../Pages/Banners/BannerBuild/BannerBuild";
|
||||
import BannerNews from "../Pages/Banners/BannerNews/BannerNews";
|
||||
import BannerCommunityAdd from "../Pages/Banners/BannerCommunity/BannerCommunityAdd";
|
||||
import BannerLearnAdd from "../Pages/Banners/BannerLearn/BannerLearnAdd";
|
||||
import BannerBuildAdd from "../Pages/Banners/BannerBuild/BannerBuildAdd";
|
||||
import BannerNewsView from "../Pages/Banners/BannerNews/BannerNewsView";
|
||||
import HomeBanner from "../Pages/Banners/HomeBanner/HomeBanner";
|
||||
import BannerNewsAdd from "../Pages/Banners/BannerNews/BannerNewsAdd";
|
||||
import HomeBannerView from "../Pages/Banners/HomeBanner/HomeBannerView";
|
||||
import HomeBannerAdd from "../Pages/Banners/HomeBanner/HomeBannerAdd";
|
||||
import AddWhitepapers from "../Pages/Whitepapers/AddWhitepapers";
|
||||
import ViewWhitePaper from "../Pages/Whitepapers/ViewWhitePaper";
|
||||
import EditWhitepaper from "../Pages/Whitepapers/EditWhitepaper";
|
||||
import UnderConstruction from "../Pages/UnderConstruction";
|
||||
import BannerEdit from "../Components/Banner/BannerEdit";
|
||||
import BannerLearnEdit from "../Pages/Banners/BannerLearn/BannerLearnEdit";
|
||||
import BannerBuildEdit from "../Pages/Banners/BannerBuild/BannerBuildEdit";
|
||||
import BannerNewsEdit from "../Pages/Banners/BannerNews/BannerNewsEdit";
|
||||
import BannerHomeEdit from "../Pages/Banners/HomeBanner/HomeBannerEdit";
|
||||
import ViewEvents from "../Pages/Events/ViewEvents";
|
||||
import EditEvents from "../Pages/Events/EditEvents";
|
||||
import AddVideos from "../Pages/Videos/AddVideos";
|
||||
import ViewVideos from "../Pages/Videos/ViewVideos";
|
||||
import EditVideos from "../Pages/Videos/EditVideos";
|
||||
import EcoBanner from "../Pages/Banners/EcoBanner/EcoBanner";
|
||||
import EcoBannerAdd from "../Pages/Banners/EcoBanner/EcoBannerAdd";
|
||||
import EcoBannerView from "../Pages/Banners/EcoBanner/EcoBannerView";
|
||||
import EcoBannerEdit from "../Pages/Banners/EcoBanner/EcoBannerEdit";
|
||||
import Usecase from "../Pages/Usecase/Usecase";
|
||||
import AddUseCase from "../Pages/Usecase/AddUseCase";
|
||||
import ViewUseCase from "../Pages/Usecase/ViewUseCase";
|
||||
import EditUseCase from "../Pages/Usecase/EditUseCase";
|
||||
|
||||
import Whitepapers from "../Pages/Whitepapers/Whitepapers";
|
||||
import WelcomePage from "../Pages/WelcomePage";
|
||||
import AddTerms from "../Pages/Terms/AddTerms";
|
||||
import Terms from "../Pages/Terms/Terms";
|
||||
import EditTerms from "../Pages/Terms/EditTerms";
|
||||
import ViewTerms from "../Pages/Terms/ViewTerms";
|
||||
import AddPolicy from "../Pages/Policy/AddPolicy";
|
||||
import ViewPolicy from "../Pages/Policy/ViewPolicy";
|
||||
import EditPolicy from "../Pages/Policy/EditPolicy";
|
||||
import Policy from "../Pages/Policy/Policy";
|
||||
import Faq from "../Pages/Faq/Faq";
|
||||
import AddFaq from "../Pages/Faq/AddFaq";
|
||||
import ViewFaq from "../Pages/Faq/ViewFaq";
|
||||
import EditFaq from "../Pages/Faq/EditFaq";
|
||||
import Partner from "../Pages/Partners/Partner";
|
||||
import AddPartner from "../Pages/Partners/AddPartners";
|
||||
import ViewPartner from "../Pages/Partners/ViewPartner";
|
||||
import EditPartner from "../Pages/Partners/EditPartners";
|
||||
import newsLetter from "../Pages/NewLetter/NewsLetter";
|
||||
import NewsLetter from "../Pages/NewLetter/NewsLetter";
|
||||
import Investment from "../Pages/Investment/Investment";
|
||||
import ExchangeRate from "../Pages/Master/ExchangeRate/ExchangeRate";
|
||||
import AddSponser from "../Pages/Master/Sponser/AddSponser";
|
||||
import Sponser from "../Pages/Master/Sponser/Sponsers";
|
||||
|
||||
export const RouteLink = [
|
||||
{ path: "/", Component: WelcomePage },
|
||||
{ path: "/banner", Component: Banner },
|
||||
{ path: "/help-and-support", Component: HelpAndSupport },
|
||||
|
||||
// =============[ Videos ]================
|
||||
{ path: "/videos", Component: Videos },
|
||||
{ path: "videos/add-videos", Component: AddVideos },
|
||||
{ path: "videos/view/:id", Component: ViewVideos },
|
||||
{ path: "videos/edit/:id", Component: EditVideos },
|
||||
|
||||
// =============[ Whitepapers ]================
|
||||
{ path: "/whitepaper", Component: Whitepapers },
|
||||
{ path: "whitepaper/add-whitepaper", Component: AddWhitepapers },
|
||||
{ path: "whitepaper/view/:id", Component: ViewWhitePaper },
|
||||
{ path: "whitepaper/edit/:id", Component: EditWhitepaper },
|
||||
|
||||
// =============[ Community ]================
|
||||
{ path: "/community", Component: Community },
|
||||
{ path: "community/view/:id", Component: ComunityViewPage },
|
||||
{ path: "community/edit/:id", Component: ComunityEditPage },
|
||||
{ path: "community/add-community", Component: AddComunity },
|
||||
|
||||
// =============[ Community banner ]================
|
||||
{ path: "banner/banner-community", Component: BannerCommunity },
|
||||
{ path: "banner/banner-community/add-banner", Component: BannerCommunityAdd },
|
||||
{
|
||||
path: "banner/banner-community/edit/:id",
|
||||
Component: BannerComunityEditPage,
|
||||
},
|
||||
{
|
||||
path: "banner/banner-community/view/:id",
|
||||
Component: BannerComunityViewPage,
|
||||
},
|
||||
|
||||
// =============[ learn banner ]================
|
||||
{ path: "banner/learn", Component: BannerLearn },
|
||||
{ path: "banner/learn/add-banner", Component: BannerLearnAdd },
|
||||
{ path: "banner/learn/view/:id", Component: ViewLearnBanner },
|
||||
{ path: "banner/learn/edit/:id", Component: BannerLearnEdit },
|
||||
|
||||
// =============[ eco banner ]================
|
||||
{ path: "banner/eco", Component: EcoBanner },
|
||||
{ path: "banner/eco/add-banner", Component: EcoBannerAdd },
|
||||
{ path: "banner/eco/view/:id", Component: EcoBannerView },
|
||||
{ path: "banner/eco/edit/:id", Component: EcoBannerEdit },
|
||||
|
||||
// =============[ build banner ]================
|
||||
{ path: "banner/build", Component: BannerBuild },
|
||||
{ path: "banner/build/add-banner", Component: BannerBuildAdd },
|
||||
{ path: "banner/build/view/:id", Component: BannerBuildView },
|
||||
{ path: "banner/build/edit/:id", Component: BannerBuildEdit },
|
||||
|
||||
// =============[ news banner ]================
|
||||
{ path: "banner/news", Component: BannerNews },
|
||||
{ path: "banner/news/add-banner", Component: BannerNewsAdd },
|
||||
{ path: "banner/news/view/:id", Component: BannerNewsView },
|
||||
{ path: "banner/news/edit/:id", Component: BannerNewsEdit },
|
||||
|
||||
// =============[ ecosystem banner ]================
|
||||
{ path: "banner/ecosystem", Component: UnderConstruction },
|
||||
{ path: "banner/ecosystem/add-banner", Component: UnderConstruction },
|
||||
{ path: "banner/ecosystem/view/:id", Component: UnderConstruction },
|
||||
{ path: "banner/ecosystem/edit/:id", Component: UnderConstruction },
|
||||
|
||||
// =============[ home banner ]================
|
||||
{ path: "banner/home", Component: HomeBanner },
|
||||
{ path: "banner/home/add-banner", Component: HomeBannerAdd },
|
||||
{ path: "banner/home/view/:id", Component: HomeBannerView },
|
||||
{ path: "banner/home/edit/:id", Component: BannerHomeEdit },
|
||||
|
||||
// =============[ blog ]================
|
||||
{ path: "/blogs-articles", Component: BlogsAndArticles },
|
||||
{ path: "blogs-articles/add-blog", Component: AddBlogsAndArticles },
|
||||
{ path: "blogs-articles/view/:id", Component: ViewBlogsAndArticles },
|
||||
{ path: "blogs-articles/edit/:id", Component: EditBlogsAndArticles },
|
||||
|
||||
// =============[ news ]================
|
||||
{ path: "/news", Component: News },
|
||||
{ path: "/news/view/:id", Component: ViewNews },
|
||||
{ path: "/news/add-news", Component: AddNews },
|
||||
{ path: "/news/edit/:id", Component: EditNews },
|
||||
|
||||
// =============[ events ]================
|
||||
{ path: "/events", Component: Events },
|
||||
{ path: "/events/add-events", Component: AddEvents },
|
||||
{ path: "/events/view/:id", Component: ViewEvents },
|
||||
{ path: "/events/edit/:id", Component: EditEvents },
|
||||
|
||||
|
||||
// =============[ useCase ]================
|
||||
{ path: "/usecase", Component: Usecase },
|
||||
{ path: "/usecase/add-usecase", Component: AddUseCase },
|
||||
{ path: "/usecase/view/:id", Component: ViewUseCase },
|
||||
{ path: "/usecase/edit/:id", Component: EditUseCase },
|
||||
|
||||
|
||||
// =============[ Terms ]================
|
||||
{ path: "/terms", Component: Terms },
|
||||
{ path: "/terms/add-terms", Component: AddTerms },
|
||||
{ path: "/terms/view/:id", Component: ViewTerms },
|
||||
{ path: "/terms/edit/:id", Component: EditTerms },
|
||||
|
||||
// =============[ Policy ]================
|
||||
{ path: "/policy", Component: Policy },
|
||||
{ path: "/policy/add-policy", Component: AddPolicy },
|
||||
{ path: "/policy/view/:id", Component: ViewPolicy },
|
||||
{ path: "/policy/edit/:id", Component: EditPolicy },
|
||||
|
||||
// =============[ Faq ]================
|
||||
{ path: "/faq", Component: Faq },
|
||||
{ path: "/faq/add-faq", Component: AddFaq },
|
||||
{ path: "/faq/view/:id", Component: ViewFaq },
|
||||
{ path: "/faq/edit/:id", Component: EditFaq },
|
||||
|
||||
// =============[ Partners ]================
|
||||
{ path: "/partners", Component: Partner },
|
||||
{ path: "/partners/add-partners", Component: AddPartner },
|
||||
{ path: "/partners/view/:id", Component: ViewPartner },
|
||||
{ path: "/partners/edit/:id", Component: EditPartner },
|
||||
|
||||
// =============[ NewLetter ]================
|
||||
{ path: "/newsLetter", Component: NewsLetter },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// =============[ Tanami ]================
|
||||
{ path: "/investment", Component: Investment },
|
||||
|
||||
{ path: "/sponser", Component: Sponser },
|
||||
{ path: "/sponser/add-sponser", Component: AddSponser },
|
||||
|
||||
|
||||
|
||||
|
||||
{ path: "/exchange-rate", Component: ExchangeRate },
|
||||
];
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 58 KiB |
BIN
src/assets/noInternet.jpg
Normal file
BIN
src/assets/noInternet.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
Reference in New Issue
Block a user