update fix

This commit is contained in:
YasinShaikh123
2024-10-11 20:16:36 +05:30
parent 61c81b100c
commit 7f5d3065ca
6 changed files with 143 additions and 20 deletions

View File

@@ -238,6 +238,21 @@ const DashboardLayout = ({ isOnline }) => {
Deposite withdrawal request
</span>
);
case path.startsWith("/fawateer"):
return (
<span className="d-flex align-items-end gap-2">
<RiMoneyDollarBoxLine className="h4 m-0 fw-normal" />
Fawateer Deposit
</span>
);
case path.startsWith("/fawateer-history"):
return (
<span className="d-flex align-items-end gap-2">
<RiMoneyDollarBoxLine className="h4 m-0 fw-normal" />
Fawateer Deposit
</span>
);
case path.startsWith("/withdraw-request"):
return (

View File

@@ -34,7 +34,7 @@ const validationSchema = Yup.object().shape({
.typeError('Transaction amount must be a number') // Custom error message if it's not a number
.positive('Transaction amount must be greater than zero'),
spportFile_path: Yup.mixed().required("Support file is required"),
makerComment: Yup.string().required("Description is required"),
makerComment: Yup.string(),
});
const CreateRequest = () => {
@@ -231,7 +231,7 @@ const CreateRequest = () => {
</FormControl>
{/* Support File Field with Preview */}
<FormControl w={"49%"} mb={2} isInvalid={errors.spportFile_path}>
<FormControl isRequired w={"49%"} mb={2} isInvalid={errors.spportFile_path}>
<FormLabel textAlign={"left"} fontSize={"xs"} color={"gray.600"}>
Support file
</FormLabel>
@@ -243,9 +243,10 @@ const CreateRequest = () => {
rounded={"sm"}
type={"file"}
className="form-control"
name="spportFile_path"
placeholder={"Support file"}
{...register("spportFile_path")}
onChange={handleFileChange}
// onChange={handleFileChange}
/>
<FormHelperText fontSize={'xs'} fontWeight={500} style={{ color: "red" }}>{errors.spportFile_path?.message}</FormHelperText>
@@ -272,7 +273,7 @@ const CreateRequest = () => {
</FormControl>
{/* Description Field */}
<FormControl isRequired w={"100%"} mb={2} isInvalid={errors.makerComment}>
<FormControl w={"100%"} mb={2} isInvalid={errors.makerComment}>
<FormLabel textAlign={"left"} fontSize={"xs"} color={"gray.600"}>
Description
</FormLabel>

View File

@@ -176,6 +176,12 @@ const handleCheckboxChange = (id) => {
),
}));
const handleClose = () => {
setSelectorInvestor(null)
handleClose()
}
return (
<Modal
isCentered

View File

@@ -5,13 +5,14 @@ import {
Button,
HStack,
Input,
Link,
Text,
Tooltip,
useDisclosure,
useToast,
} from "@chakra-ui/react";
import React, { useContext, useEffect, useState } from "react";
import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
import { CheckIcon, CloseIcon, ExternalLinkIcon } from "@chakra-ui/icons";
import Pagination from "../../../Components/Pagination";
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
@@ -110,8 +111,9 @@ const ApproveHistory = () => {
"Last Name",
"E-mail ID",
"Phone Number",
"Transaction Date",
"Transaction Amount",
"Deposit Date",
"Deposit Amount (BHD)",
"Support Image",
"Status",
];
@@ -169,7 +171,7 @@ const ApproveHistory = () => {
</Text>
</Box>
),
"Transaction Date": (
"Deposit Date": (
<Box
w={"100px"}
isTruncated={true}
@@ -180,7 +182,7 @@ const ApproveHistory = () => {
</Text>
</Box>
),
"Transaction Amount": (
"Deposit Amount (BHD)": (
<Box w={"130px"} isTruncated={true} display={"flex"}>
<Text as={"span"} color={"teal.900"}>
{/* {item.investorAmount} */}
@@ -192,6 +194,38 @@ const ApproveHistory = () => {
</Text>
</Box>
),
"Support Image": (
<Text
color={"green.500"}
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
>
<Badge
px={2}
py={0.5}
textTransform={"inherit"}
fontWeight={500}
colorScheme={"forestGreen"}
>
<Link
href={import.meta.env.VITE_IMAGE_URL + item?.spportFile_path}
isExternal
display={"flex"}
alignItems={"center"}
>
<Box me={"1px"}
as="span"
cursor={"pointer"}
>
View
</Box>
<ExternalLinkIcon />
</Link>
</Badge>
</Text>
),
Status: (
<Box isTruncated={true} display={"flex"}>
<Badge

View File

@@ -5,13 +5,14 @@ import {
Button,
HStack,
Input,
Link,
Text,
Tooltip,
useDisclosure,
useToast,
} from "@chakra-ui/react";
import React, { useContext, useEffect, useState } from "react";
import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
import { CheckIcon, CloseIcon, ExternalLinkIcon } from "@chakra-ui/icons";
import Pagination from "../../../Components/Pagination";
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
@@ -130,8 +131,9 @@ import {
"Last Name",
"E-mail ID",
"Phone Number",
"Transaction Date",
"Transaction Amount",
"Deposit Date",
"Deposit Amount (BHD)",
"Support Image",
"Status",
];
@@ -189,7 +191,7 @@ import {
</Text>
</Box>
),
"Transaction Date": (
"Deposit Date": (
<Box
w={"100px"}
isTruncated={true}
@@ -200,7 +202,7 @@ import {
</Text>
</Box>
),
"Transaction Amount": (
"Deposit Amount (BHD)": (
<Box w={"130px"} isTruncated={true} display={"flex"}>
<Text as={"span"} color={"teal.900"}>
{/* {item.investorAmount} */}
@@ -212,6 +214,38 @@ import {
</Text>
</Box>
),
"Support Image": (
<Text
color={"green.500"}
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
>
<Badge
px={2}
py={0.5}
textTransform={"inherit"}
fontWeight={500}
colorScheme={"forestGreen"}
>
<Link
href={import.meta.env.VITE_IMAGE_URL + item?.spportFile_path}
isExternal
display={"flex"}
alignItems={"center"}
>
<Box me={"1px"}
as="span"
cursor={"pointer"}
>
View
</Box>
<ExternalLinkIcon />
</Link>
</Badge>
</Text>
),
Status: (
<Box isTruncated={true} display={"flex"}>
<Badge

View File

@@ -5,13 +5,14 @@ import {
Button,
HStack,
Input,
Link,
Text,
Tooltip,
useDisclosure,
useToast,
} from "@chakra-ui/react";
import React, { useContext, useEffect, useState } from "react";
import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
import { CheckIcon, CloseIcon, ExternalLinkIcon } from "@chakra-ui/icons";
import Pagination from "../../../Components/Pagination";
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
import CustomAlertDialog from "../../../Components/CustomAlertDialog";
@@ -134,9 +135,9 @@ import RequestRejectModal from "./RequestRejectModal";
"Last Name",
"E-mail ID",
"Phone Number",
"Transaction Date",
"Transaction Amount",
// "Status",
"Deposit Date",
"Deposit Amount (BHD)",
"Support Image",
"Action",
];
@@ -195,14 +196,14 @@ import RequestRejectModal from "./RequestRejectModal";
</Text>
</Box>
),
"Transaction Date": (
"Deposit Date": (
<Box isTruncated={true} display={'flex'} >
<Text as={"span"} color={"teal.900"}>
{formatDate(item?.transaction_date)}
</Text>
</Box>
),
"Transaction Amount": (
"Deposit Amount (BHD)": (
<Box isTruncated={true} display={'flex'} >
<Text as={"span"} color={"teal.900"}>
{/* {item.investorAmount} */}
@@ -214,6 +215,38 @@ import RequestRejectModal from "./RequestRejectModal";
</Text>
</Box>
),
"Support Image": (
<Text
color={"green.500"}
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
>
<Badge
px={2}
py={0.5}
textTransform={"inherit"}
fontWeight={500}
colorScheme={"forestGreen"}
>
<Link
href={import.meta.env.VITE_IMAGE_URL + item?.spportFile_path}
isExternal
display={"flex"}
alignItems={"center"}
>
<Box me={"1px"}
as="span"
cursor={"pointer"}
>
View
</Box>
<ExternalLinkIcon />
</Link>
</Badge>
</Text>
),
"Status": (
<Box isTruncated={true} display={'flex'} >
<Badge