deleted table
This commit is contained in:
@@ -25,7 +25,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 1,
|
||||
sponserName: "John Doe",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "1234567890",
|
||||
sponserAddress: "123 Main St, Springfield, USA",
|
||||
accountHolderName: "John Doe",
|
||||
@@ -46,7 +46,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 2,
|
||||
sponserName: "Jane Smith",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "9876543210",
|
||||
sponserAddress: "456 Oak St, Metropolis, USA",
|
||||
accountHolderName: "Jane Smith",
|
||||
@@ -67,7 +67,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 3,
|
||||
sponserName: "Alice Johnson",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "1231231234",
|
||||
sponserAddress: "789 Pine St, Gotham, USA",
|
||||
accountHolderName: "Alice Johnson",
|
||||
@@ -88,7 +88,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 4,
|
||||
sponserName: "Bob Brown",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "3213214321",
|
||||
sponserAddress: "101 Maple St, Smallville, USA",
|
||||
accountHolderName: "Bob Brown",
|
||||
@@ -109,7 +109,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 5,
|
||||
sponserName: "Charlie Davis",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "5555555555",
|
||||
sponserAddress: "202 Birch St, Star City, USA",
|
||||
accountHolderName: "Charlie Davis",
|
||||
@@ -130,7 +130,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 6,
|
||||
sponserName: "Daniel Evans",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "4444444444",
|
||||
sponserAddress: "303 Cedar St, Central City, USA",
|
||||
accountHolderName: "Daniel Evans",
|
||||
@@ -151,7 +151,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 7,
|
||||
sponserName: "Ella Fitzgerald",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "3333333333",
|
||||
sponserAddress: "404 Elm St, Coast City, USA",
|
||||
accountHolderName: "Ella Fitzgerald",
|
||||
@@ -172,7 +172,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 8,
|
||||
sponserName: "Frank Green",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "2222222222",
|
||||
sponserAddress: "505 Ash St, Keystone City, USA",
|
||||
accountHolderName: "Frank Green",
|
||||
@@ -193,7 +193,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 9,
|
||||
sponserName: "Grace Hall",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "1111111111",
|
||||
sponserAddress: "606 Willow St, Hub City, USA",
|
||||
accountHolderName: "Grace Hall",
|
||||
@@ -214,7 +214,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 10,
|
||||
sponserName: "Henry Ingram",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "6666666666",
|
||||
sponserAddress: "707 Spruce St, Fawcett City, USA",
|
||||
accountHolderName: "Henry Ingram",
|
||||
@@ -235,7 +235,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 11,
|
||||
sponserName: "Grace Hall",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "1111111111",
|
||||
sponserAddress: "606 Willow St, Hub City, USA",
|
||||
accountHolderName: "Grace Hall",
|
||||
@@ -256,7 +256,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: 12,
|
||||
sponserName: "Henry Ingram",
|
||||
sponserNameArabic:"الرجاء إدخال القيمة",
|
||||
sponserNameArabic: "الرجاء إدخال القيمة",
|
||||
mobileNo: "6666666666",
|
||||
sponserAddress: "707 Spruce St, Fawcett City, USA",
|
||||
accountHolderName: "Henry Ingram",
|
||||
@@ -275,250 +275,71 @@ const GlobalStateProvider = ({ children }) => {
|
||||
createdAt: "6",
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
const [investmentType, setInvestmentType] = useState([
|
||||
// {
|
||||
// id: 1,
|
||||
// investmentName: "Commercial",
|
||||
// mobileNo: "0987654321",
|
||||
// investmentAddress: "1725 Slough Ave, Scranton, USA",
|
||||
// accountHolderName: "Michael Scott",
|
||||
// bankName: "Dunder Mifflin Bank",
|
||||
// accountNumber: "1111222233",
|
||||
// bankBranch: "Scranton Branch",
|
||||
// branchAddress: "101 Paper St, Scranton, USA",
|
||||
// ifscCode: "IFSC11111",
|
||||
// swiftCode: "SWIFT12345",
|
||||
// routingNumber: "123450987",
|
||||
// iban: "IBAN1111222233",
|
||||
// accountType: "checking",
|
||||
// bankPhoneNumber: "0987654321",
|
||||
// bankEmail: "michael.scott@example.com",
|
||||
// status: true,
|
||||
// createdAt: "45",
|
||||
// },
|
||||
{
|
||||
id: 1,
|
||||
investmentName: "Michael Scott",
|
||||
mobileNo: "0987654321",
|
||||
investmentAddress: "1725 Slough Ave, Scranton, USA",
|
||||
accountHolderName: "Michael Scott",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "1111222233",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC11111",
|
||||
swiftCode: "SWIFT12345",
|
||||
routingNumber: "123450987",
|
||||
iban: "IBAN1111222233",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "0987654321",
|
||||
bankEmail: "michael.scott@example.com",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private Company",
|
||||
status: true,
|
||||
createdAt: "45",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
investmentName: "Pam Beesly",
|
||||
mobileNo: "1234509876",
|
||||
investmentAddress: "3487 Palm St, Scranton, USA",
|
||||
accountHolderName: "Pam Beesly",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "4444555566",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC44444",
|
||||
swiftCode: "SWIFT54321",
|
||||
routingNumber: "543211234",
|
||||
iban: "IBAN4444555566",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "1234509876",
|
||||
bankEmail: "pam.beesly@example.com",
|
||||
status: false,
|
||||
createdAt: "45",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
investmentName: "Jim Halpert",
|
||||
mobileNo: "2345678901",
|
||||
investmentAddress: "5701 Maple Ave, Scranton, USA",
|
||||
accountHolderName: "Jim Halpert",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "7777888899",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC77777",
|
||||
swiftCode: "SWIFT87654",
|
||||
routingNumber: "987654321",
|
||||
iban: "IBAN7777888899",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "2345678901",
|
||||
bankEmail: "jim.halpert@example.com",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
createdAt: "12",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
investmentName: "Dwight Schrute",
|
||||
mobileNo: "3456789012",
|
||||
investmentAddress: "1725 Slough Ave, Scranton, USA",
|
||||
accountHolderName: "Dwight Schrute",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "3333444455",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC33333",
|
||||
swiftCode: "SWIFT34567",
|
||||
routingNumber: "765432109",
|
||||
iban: "IBAN3333444455",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "3456789012",
|
||||
bankEmail: "dwight.schrute@example.com",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
createdAt: "7",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
investmentName: "Stanley Hudson",
|
||||
mobileNo: "4567890123",
|
||||
investmentAddress: "202 Industrial St, Scranton, USA",
|
||||
accountHolderName: "Stanley Hudson",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "5555666677",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC55555",
|
||||
swiftCode: "SWIFT45678",
|
||||
routingNumber: "876543210",
|
||||
iban: "IBAN5555666677",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "4567890123",
|
||||
bankEmail: "stanley.hudson@example.com",
|
||||
status: false,
|
||||
createdAt: "4",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
investmentName: "Angela Martin",
|
||||
mobileNo: "5678901234",
|
||||
investmentAddress: "7777 Cat Ave, Scranton, USA",
|
||||
accountHolderName: "Angela Martin",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "8888999900",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC88888",
|
||||
swiftCode: "SWIFT56789",
|
||||
routingNumber: "987654321",
|
||||
iban: "IBAN8888999900",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "5678901234",
|
||||
bankEmail: "angela.martin@example.com",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
createdAt: "2",
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
investmentName: "Kevin Malone",
|
||||
mobileNo: "6789012345",
|
||||
investmentAddress: "3333 Cookie Ln, Scranton, USA",
|
||||
accountHolderName: "Kevin Malone",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "9999000011",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC99999",
|
||||
swiftCode: "SWIFT67890",
|
||||
routingNumber: "876543210",
|
||||
iban: "IBAN9999000011",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "6789012345",
|
||||
bankEmail: "kevin.malone@example.com",
|
||||
status: false,
|
||||
createdAt: "9",
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
investmentName: "Phyllis Vance",
|
||||
mobileNo: "7890123456",
|
||||
investmentAddress: "4545 Knitting Way, Scranton, USA",
|
||||
accountHolderName: "Phyllis Vance",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "0000111122",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC00000",
|
||||
swiftCode: "SWIFT78901",
|
||||
routingNumber: "123456789",
|
||||
iban: "IBAN0000111122",
|
||||
accountType: "checking",
|
||||
bankPhoneNumber: "7890123456",
|
||||
bankEmail: "phyllis.vance@example.com",
|
||||
investmentName: "Commercial",
|
||||
description: "Investment Private",
|
||||
status: true,
|
||||
createdAt: "8",
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
investmentName: "Meredith Palmer",
|
||||
mobileNo: "8901234567",
|
||||
investmentAddress: "6666 Booze Blvd, Scranton, USA",
|
||||
accountHolderName: "Meredith Palmer",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "1111222233",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC11111",
|
||||
swiftCode: "SWIFT89012",
|
||||
routingNumber: "123450987",
|
||||
iban: "IBAN1111222233",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "8901234567",
|
||||
bankEmail: "meredith.palmer@example.com",
|
||||
status: true,
|
||||
createdAt: "1"
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
investmentName: "Ryan Howard",
|
||||
mobileNo: "9012345678",
|
||||
investmentAddress: "7777 Temp Way, Scranton, USA",
|
||||
accountHolderName: "Ryan Howard",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "2222333344",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC22222",
|
||||
swiftCode: "SWIFT90123",
|
||||
routingNumber: "234561098",
|
||||
iban: "IBAN2222333344",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "9012345678",
|
||||
bankEmail: "ryan.howard@example.com",
|
||||
status: false,
|
||||
createdAt: "6",
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
investmentName: "Oscar Martinez",
|
||||
mobileNo: "0123456789",
|
||||
investmentAddress: "2222 Math St, Scranton, USA",
|
||||
accountHolderName: "Oscar Martinez",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "3333444455",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC33333",
|
||||
swiftCode: "SWIFT01234",
|
||||
routingNumber: "345671209",
|
||||
iban: "IBAN3333444455",
|
||||
accountType: "business",
|
||||
bankPhoneNumber: "0123456789",
|
||||
bankEmail: "oscar.martinez@example.com",
|
||||
status: true,
|
||||
createdAt: "1",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
investmentName: "Kelly Kapoor",
|
||||
mobileNo: "9876543210",
|
||||
investmentAddress: "4444 Fashion Ave, Scranton, USA",
|
||||
accountHolderName: "Kelly Kapoor",
|
||||
bankName: "Dunder Mifflin Bank",
|
||||
accountNumber: "4444555566",
|
||||
bankBranch: "Scranton Branch",
|
||||
branchAddress: "101 Paper St, Scranton, USA",
|
||||
ifscCode: "IFSC44444",
|
||||
swiftCode: "SWIFT23456",
|
||||
routingNumber: "456781320",
|
||||
iban: "IBAN4444555566",
|
||||
accountType: "savings",
|
||||
bankPhoneNumber: "9876543210",
|
||||
bankEmail: "kelly.kapoor@example.com",
|
||||
status: false,
|
||||
createdAt: "6",
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
const [investment, setInvestment] = useState([
|
||||
// {
|
||||
|
||||
@@ -64,7 +64,7 @@ import { MdNotificationsNone, MdOutlineAddChart } from "react-icons/md";
|
||||
import { HiOutlineChartSquareBar } from "react-icons/hi";
|
||||
import { GrManual } from "react-icons/gr";
|
||||
import { LuContact } from "react-icons/lu";
|
||||
import shield from "../assets/shield.png"
|
||||
import shield from "../assets/shield.png";
|
||||
import SplashScreen from "../Pages/SplashScreen";
|
||||
|
||||
const DashboardLayout = () => {
|
||||
@@ -74,9 +74,28 @@ const DashboardLayout = () => {
|
||||
const path = location.pathname;
|
||||
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
||||
const [openDrawerClick, setOpenDrawerClick] = useState(true);
|
||||
const { setIsAuthenticate, colorMode, toggleColorMode, setSlideFormRight, slideFromRight } = useContext(GlobalStateContext);
|
||||
const {
|
||||
setIsAuthenticate,
|
||||
colorMode,
|
||||
toggleColorMode,
|
||||
setSlideFormRight,
|
||||
slideFromRight,
|
||||
} = useContext(GlobalStateContext);
|
||||
const [isSplashVisible, setSplashVisible] = useState(true);
|
||||
const [openIndex, setOpenIndex] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
const savedIndex = localStorage.getItem("openAccordionIndex");
|
||||
if (savedIndex !== null) {
|
||||
setOpenIndex(parseInt(savedIndex));
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleAccordionChange = (index) => {
|
||||
const newIndex = openIndex === index ? null : index;
|
||||
setOpenIndex(newIndex);
|
||||
localStorage.setItem("openAccordionIndex", newIndex);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// Set a timer to hide the splash screen after 3 seconds
|
||||
@@ -355,12 +374,11 @@ const DashboardLayout = () => {
|
||||
height={"10%"}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
|
||||
<Image
|
||||
style={{
|
||||
width: 120,
|
||||
}}
|
||||
src={colorMode === "light"?logo : logoDark }
|
||||
src={colorMode === "light" ? logo : logoDark}
|
||||
alt="Logo"
|
||||
/>
|
||||
) : (
|
||||
@@ -368,7 +386,7 @@ const DashboardLayout = () => {
|
||||
style={{
|
||||
width: 30,
|
||||
}}
|
||||
src={colorMode === "light"?logoMini : logoMiniDark }
|
||||
src={colorMode === "light" ? logoMini : logoMiniDark}
|
||||
alt="Logo"
|
||||
/>
|
||||
)}
|
||||
@@ -376,9 +394,20 @@ const DashboardLayout = () => {
|
||||
|
||||
<Box
|
||||
className="ps-2 scroll-bar pe-1"
|
||||
style={{ height: "90%", overflowY: "scroll", overflowX: "hidden" ,paddingBottom:'5rem'}}
|
||||
style={{
|
||||
height: "90%",
|
||||
overflowY: "scroll",
|
||||
overflowX: "hidden",
|
||||
paddingBottom: "5rem",
|
||||
}}
|
||||
>
|
||||
<Accordion m={0} allowToggle>
|
||||
<Accordion
|
||||
m={0}
|
||||
allowToggle
|
||||
defaultIndex={[0]}
|
||||
index={openIndex}
|
||||
onChange={handleAccordionChange}
|
||||
>
|
||||
{nav.map(({ title, type, Icon, submenu, path }, index) => {
|
||||
if (type === "accordion") {
|
||||
return (
|
||||
@@ -398,14 +427,17 @@ const DashboardLayout = () => {
|
||||
alignItems={"center"}
|
||||
>
|
||||
{/* {Icon && title === "Admin" ? <Image w={15} src={shield} /> : <Icon className={`web-text-large`} />} */}
|
||||
{Icon && <Icon fontSize={title === "Admin" ? "18px" :"15px"}/>}
|
||||
{Icon && (
|
||||
<Icon
|
||||
fontSize={title === "Admin" ? "18px" : "15px"}
|
||||
/>
|
||||
)}
|
||||
<Text
|
||||
as={"span"}
|
||||
display={
|
||||
isDrawerOpen || openDrawerClick ? "flex" : "none"
|
||||
}
|
||||
alignItems="center"
|
||||
|
||||
overflow="hidden"
|
||||
textAlign={"left"}
|
||||
>
|
||||
@@ -567,7 +599,6 @@ const DashboardLayout = () => {
|
||||
style={{
|
||||
width: `calc(100% - ${isDrawerOpen || openDrawerClick ? 232 : 74}px)`,
|
||||
transition: "width 0.3s ease-in-out",
|
||||
|
||||
}}
|
||||
>
|
||||
{/* <header className="p-2 ps-0 pt-3 fw-400 border-bottom">
|
||||
@@ -594,7 +625,7 @@ const DashboardLayout = () => {
|
||||
style={{
|
||||
width: isDrawerOpen || openDrawerClick ? 232 : 74,
|
||||
transition: "width 0.3s ease-in-out", // Smooth transition for width change
|
||||
// overflow: "hidden",
|
||||
// overflow: "hidden",
|
||||
backgroundColor: "#0041180A",
|
||||
position: "relative",
|
||||
// backgroundColor: "#002F0F",
|
||||
@@ -809,7 +840,7 @@ const DashboardLayout = () => {
|
||||
}}
|
||||
>
|
||||
{isDrawerOpen || openDrawerClick ? (
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
<ArrowRightIcon className="web-text-small " />
|
||||
) : (
|
||||
<ArrowLeftIcon className="web-text-small" />
|
||||
)}
|
||||
|
||||
@@ -93,7 +93,7 @@ const Login = () => {
|
||||
justifyContent: "center",
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
backgroundColor:"#0041180A"
|
||||
backgroundColor: "#0041180A",
|
||||
}}
|
||||
className="rubix-primary"
|
||||
>
|
||||
|
||||
@@ -71,7 +71,7 @@ const ExchangeRate = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
// "Sr No.",
|
||||
"Sr.No",
|
||||
"From currency",
|
||||
"To currency",
|
||||
"Effective from",
|
||||
@@ -81,24 +81,23 @@ const ExchangeRate = () => {
|
||||
];
|
||||
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
id: item?.id,
|
||||
// "Sr No.": (
|
||||
// <Text
|
||||
// justifyContent={slideFromRight ? "right" : "left"}
|
||||
// as={"span"}
|
||||
// color={"gray.600"}
|
||||
// fontWeight={'600'}
|
||||
// className="d-flex align-items-center fw- web-text-small"
|
||||
// >
|
||||
// {index + 1}.
|
||||
// </Text>
|
||||
// ),
|
||||
"Sr.No": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center fw- web-text-small"
|
||||
>
|
||||
{index + 1}.
|
||||
</Text>
|
||||
),
|
||||
"From currency": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={'600'}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center fw- web-text-small"
|
||||
>
|
||||
{item.fromCurr}
|
||||
@@ -109,7 +108,7 @@ const ExchangeRate = () => {
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={'600'}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center fw- web-text-small"
|
||||
>
|
||||
{item.toCurr}
|
||||
@@ -120,7 +119,7 @@ const ExchangeRate = () => {
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={'600'}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{formatDate(item.effectFrom)}
|
||||
@@ -131,7 +130,7 @@ const ExchangeRate = () => {
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={'600'}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{formatDate(item.effectTill)}
|
||||
@@ -142,7 +141,7 @@ const ExchangeRate = () => {
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
fontWeight={'600'}
|
||||
fontWeight={"600"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item.rate}
|
||||
@@ -153,7 +152,7 @@ const ExchangeRate = () => {
|
||||
// <Button colorScheme="green" size={"xs"} variant={"ghost"}>
|
||||
// Edit
|
||||
// </Button>
|
||||
|
||||
|
||||
<EditExchangeRate setIsLoading={setIsLoading} id={item.id} />
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -16,13 +16,15 @@ import FormInputMain from "../../../Components/FormInputMain";
|
||||
|
||||
export const addInvestmentType = yup.object().shape({
|
||||
investmentName: yup.string().required("Investment name is required"),
|
||||
mobileNo: yup.string().required("Mobile no is required"),
|
||||
investmentAddress: yup.string().required("Investment address is required"),
|
||||
// investmentNameArabic: yup.string().required("Investment name is required"),
|
||||
// mobileNo: yup.string().required("Mobile no is required"),
|
||||
description: yup.string().required("Description is required"),
|
||||
// descriptionArabic: yup.string().required("Description address is required"),
|
||||
|
||||
bankName: yup.string().required("Bank Name is required"),
|
||||
accountNumber: yup.string().required("Account Number is required"),
|
||||
swiftCode: yup.string().required("SWIFT/BIC Code is required"),
|
||||
bankEmail: yup.string().email("Invalid email format"),
|
||||
// bankName: yup.string().required("Bank Name is required"),
|
||||
// accountNumber: yup.string().required("Account Number is required"),
|
||||
// swiftCode: yup.string().required("SWIFT/BIC Code is required"),
|
||||
// bankEmail: yup.string().email("Invalid email format"),
|
||||
|
||||
// routingNumber: yup.string().required("Routing Number is required"),
|
||||
// iban: yup.string().required("IBAN is required"),
|
||||
|
||||
@@ -40,7 +40,7 @@ import { debounce } from "./AddInvestmentType";
|
||||
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
|
||||
|
||||
const InvestmentType = () => {
|
||||
const navigate = useNavigate()
|
||||
const navigate = useNavigate();
|
||||
const toast = useToast();
|
||||
const { investmentType, setInvestmentType, slideFromRight } =
|
||||
useContext(GlobalStateContext);
|
||||
@@ -63,18 +63,19 @@ const InvestmentType = () => {
|
||||
|
||||
// ====================================================[Table Setup]================================================================
|
||||
const tableHeadRow = [
|
||||
"Investment name",
|
||||
"Address",
|
||||
"Mobile no",
|
||||
"Sr.no",
|
||||
"Investment Type Name",
|
||||
"Description",
|
||||
"Status",
|
||||
"Created At",
|
||||
"Action",
|
||||
];
|
||||
|
||||
const handleUpdateStatus = debounce((id) => {
|
||||
setInvestmentType((prevInvestmentType) =>
|
||||
prevInvestmentType.map((investmentType) =>
|
||||
investmentType.id === id ? { ...investmentType, status: !investmentType.status } : investmentType
|
||||
investmentType.id === id
|
||||
? { ...investmentType, status: !investmentType.status }
|
||||
: investmentType
|
||||
)
|
||||
);
|
||||
toast({
|
||||
@@ -101,9 +102,19 @@ const InvestmentType = () => {
|
||||
return nameMatches;
|
||||
});
|
||||
|
||||
const extractedArray = filteredData?.map((item) => ({
|
||||
id: item?.id,
|
||||
"Investment name": (
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
"Sr.no": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"teal.900"}
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{index + 1}
|
||||
</Text>
|
||||
),
|
||||
"Investment Type Name": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
@@ -114,17 +125,10 @@ const InvestmentType = () => {
|
||||
{item.investmentName}
|
||||
</Text>
|
||||
),
|
||||
Address: (
|
||||
<Box w={350} isTruncated={true}>
|
||||
Description: (
|
||||
<Box w={"200px"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
|
||||
{item.investmentAddress}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Mobile no": (
|
||||
<Box w={"auto"} isTruncated={true}>
|
||||
<Text as={"span"} color={"teal.900"} fontWeight={"500"}>
|
||||
{item.mobileNo}
|
||||
{item.description}
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
@@ -147,40 +151,39 @@ const InvestmentType = () => {
|
||||
// </Badge>
|
||||
// ),
|
||||
|
||||
"Created At": (
|
||||
<span className="d-flex justify-content-between align-items-center">
|
||||
<Text as={"span"} color={"gray.600"} fontWeight={"500"}>
|
||||
{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-sponser/${item.id}`}>
|
||||
<MenuItem className="web-text-medium">Edit</MenuItem>
|
||||
</RouterLink>
|
||||
<RouterLink to={`view-sponser/${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>
|
||||
),
|
||||
// "Created At": (
|
||||
// <span className="d-flex justify-content-between align-items-center">
|
||||
// <Text as={"span"} color={"gray.600"} fontWeight={"500"}>
|
||||
// {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-sponser/${item.id}`}>
|
||||
// <MenuItem className="web-text-medium">Edit</MenuItem>
|
||||
// </RouterLink>
|
||||
// <RouterLink to={`view-sponser/${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>
|
||||
// ),
|
||||
Action: (
|
||||
<Box display={"flex"} justifyContent={"space-between"}>
|
||||
|
||||
<Box display={"flex"} justifyContent={"space-evenly"}>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
@@ -192,7 +195,9 @@ const InvestmentType = () => {
|
||||
<Button
|
||||
_hover={{ color: "green.500" }}
|
||||
// transition={"0.5s all"}
|
||||
onClick={()=>{ navigate(`view-investment/${item.id}`)}}
|
||||
onClick={() => {
|
||||
navigate(`view-investment/${item.id}`);
|
||||
}}
|
||||
color="green.300"
|
||||
rounded={"sm"}
|
||||
size={"xs"}
|
||||
@@ -201,8 +206,7 @@ const InvestmentType = () => {
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
|
||||
<Tooltip
|
||||
{/* <Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="Edit"
|
||||
@@ -211,7 +215,9 @@ const InvestmentType = () => {
|
||||
placement="top"
|
||||
>
|
||||
<Button
|
||||
onClick={()=>{ navigate(`edit-investment/${item.id}`)}}
|
||||
onClick={() => {
|
||||
navigate(`edit-investment/${item.id}`);
|
||||
}}
|
||||
_hover={{ color: "blue.500" }}
|
||||
// transition={"0.5s all"}
|
||||
color="blue.400"
|
||||
@@ -220,8 +226,7 @@ const InvestmentType = () => {
|
||||
>
|
||||
<EditIcon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
</Tooltip> */}
|
||||
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
@@ -245,7 +250,6 @@ const InvestmentType = () => {
|
||||
<DeleteIcon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
</Box>
|
||||
),
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useForm } from "react-hook-form"; // assuming react-hook-form is used
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
|
||||
const ViewInvestmentType = () => {
|
||||
const navigate = useNavigate();
|
||||
const params = useParams();
|
||||
const { investmentType } = useContext(GlobalStateContext);
|
||||
const { reset } = useForm(); // assuming react-hook-form
|
||||
|
||||
Reference in New Issue
Block a user