update 30/10

This commit is contained in:
YasinShaikh123
2024-10-30 12:30:20 +05:30
parent f5e7217304
commit eb14139bcf
7 changed files with 45 additions and 37 deletions

View File

@@ -30,9 +30,9 @@ import GlobalStateContext from "../../../Contexts/GlobalStateContext";
import CurrencyInput from "../../../Components/CurrencyInput";
const cashDetails = yup.object().shape({
transactionDate: yup.string().required("Artifact name is required"),
ioTransType_xid: yup.number().required("Artifact name is required"),
transactionAmount: yup.number().required("Artifact name is required"),
transactionDate: yup.string().required("Date is required"),
ioTransType_xid: yup.number().required("Cash transaction is required"),
transactionAmount: yup.number().required("Transaction Amount is required"),
comments: yup.string().notRequired(),
});

View File

@@ -34,8 +34,8 @@ import {
import { formatDatee } from "../../../Components/FormField";
const ioNav = yup.object().shape({
transactionDate: yup.string().required("Artifact name is required"),
transactionAmount: yup.number().required("Artifact name is required"),
transactionDate: yup.string().required("Date is required"),
transactionAmount: yup.number().required("New NAV is required"),
comments: yup.string().notRequired(),
});

View File

@@ -34,7 +34,8 @@ import { formatTimestampInGulfTimezone } from "../../Constants/Constants";
import { IoMdRemoveCircleOutline } from "react-icons/io";
const investmentImageSchema = yup.object().shape({
artifactName: yup.string().required("Artifact image name is required"),
artifactName: yup.string().required("Artifact image name is required")
.max(25, "File name must be at most 25 characters"),
artifactPathName: yup.mixed().required("Artifact image is required"),
});
@@ -171,7 +172,11 @@ const IOArtifactsAdd = ({
};
const handleSave = () => {
if (!alert) {
setAlert(true)
}else{
handleSubmit(onSubmit)();
}
};
const handleClose = () => {
@@ -214,9 +219,9 @@ const IOArtifactsAdd = ({
<DrawerCloseButton />
<DrawerHeader fontSize={"sm"}>IO Artifacts Image</DrawerHeader>
<Box as="form">
<DrawerBody>
<DrawerBody>
<Stack spacing={4}>
<FormControl isInvalid={errors.artifactName}>
<FormControl isInvalid={errors.artifactName} isRequired={true}>
<FormLabel fontSize={"sm"}>Artifact Name</FormLabel>
<Controller
name="artifactName"
@@ -227,6 +232,7 @@ const IOArtifactsAdd = ({
fontSize={"sm"}
type="text"
size={"sm"}
maxLength={25}
/>
)}
/>
@@ -241,6 +247,7 @@ const IOArtifactsAdd = ({
errors.artifactPathName?.message &&
errors.artifactPathName
}
isRequired={true}
>
<FormLabel fontSize={"sm"}>Artifact Image (600 X 300)</FormLabel>
<Input
@@ -333,7 +340,8 @@ const IOArtifactsAdd = ({
colorScheme={"forestGreen"}
rounded={"sm"}
size={"sm"}
onClick={() => setAlert(true)}
// onClick={() => setAlert(true)}
onClick={handleSave}
// type="submit"
>
Save

View File

@@ -199,7 +199,7 @@ const InvestmentDocuments = ({
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton />
<DrawerHeader fontSize="sm">Add Details</DrawerHeader>
<DrawerHeader fontSize="sm">Add Investment Documents</DrawerHeader>
<Box as="form" onSubmit={handleSubmit(onSubmit)}>
<DrawerBody>
<FormControl mb={4} isRequired>

View File

@@ -74,7 +74,7 @@ const Kyc = () => {
/>
</FormControl>
</HStack>
<HStack spacing={4} mb={4}>
<HStack spacing={4} mb={5}>
<FormControl>
<FormLabel mb={1} fontSize={"sm"}>
Block
@@ -102,7 +102,7 @@ const Kyc = () => {
/>
</FormControl>
</HStack>
<HStack spacing={4} mb={4}>
<HStack spacing={4} mb={7}>
<FormControl>
<FormLabel mb={1} fontSize={"sm"}>
Country

View File

@@ -95,7 +95,7 @@ const Transaction = () => {
// "Currency",
// "TO USD",
// "From USD",
"USD amount",
// "USD amount",
"IO Name",
"Payment Method",
];
@@ -163,21 +163,21 @@ const Transaction = () => {
{item.invCurToUSD_Rate}
</Text>
),
"USD amount": (
<Box w={100} display={"flex"} justifyContent={"left"}>
{item?.invCurToUSD_Rate === "0.0000" && (
<Text as={"span"} w={"100%"} color={"teal.900"}>
<Badge ms={1} colorScheme="green" me={1}>
$
</Badge>
{parseFloat(item?.USDAmount || 0).toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})}
</Text>
)}
</Box>
),
// "USD amount": (
// <Box w={100} display={"flex"} justifyContent={"left"}>
// {item?.invCurToUSD_Rate === "0.0000" && (
// <Text as={"span"} w={"100%"} color={"teal.900"}>
// <Badge ms={1} colorScheme="green" me={1}>
// $
// </Badge>
// {parseFloat(item?.USDAmount || 0).toLocaleString(undefined, {
// minimumFractionDigits: 2,
// maximumFractionDigits: 2,
// })}
// </Text>
// )}
// </Box>
// ),
"IO Name": (
<Box w={"auto"} isTruncated={true}>
<Text as={"span"} color={"teal.900"}>

View File

@@ -175,7 +175,7 @@ const AddInvestmentType = () => {
name: "investmentTypeName",
type: "text",
isRequired: true,
section: "Add Details",
section: "",
maxLength: 50,
helperText: `Maximum length should be 50 characters. You have entered ${
watch()?.investmentTypeName?.length || 0
@@ -187,7 +187,7 @@ const AddInvestmentType = () => {
placeHolder: " ",
type: "text",
isRequired: true,
section: "Add Details",
section: "",
arabic: true,
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
@@ -200,7 +200,7 @@ const AddInvestmentType = () => {
name: "note",
type: "textarea",
// isRequired: true,
section: "Add Details",
section: "",
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
watch()?.note?.length || 0
@@ -213,7 +213,7 @@ const AddInvestmentType = () => {
type: "textarea",
// isRequired: true,
arabic: true,
section: "Add Details",
section: "",
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
watch()?.noteArabic?.length || 0
@@ -230,7 +230,7 @@ const AddInvestmentType = () => {
name: "investmentTypeName",
type: "text",
isRequired: true,
section: "Add Details",
section: "",
maxLength: 50,
helperText: `Maximum length should be 50 characters. You have entered ${
watch()?.investmentTypeName?.length || 0
@@ -242,7 +242,7 @@ const AddInvestmentType = () => {
placeHolder: " ",
type: "text",
isRequired: true,
section: "Add Details",
section: "",
arabic: true,
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
@@ -255,7 +255,7 @@ const AddInvestmentType = () => {
name: "note",
type: "textarea",
// isRequired: true,
section: "Add Details",
section: "",
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
watch()?.note?.length || 0
@@ -268,7 +268,7 @@ const AddInvestmentType = () => {
type: "textarea",
// isRequired: true,
arabic: true,
section: "Add Details",
section: "",
maxLength: 255,
helperText: `Maximum length should be 255 characters. You have entered ${
watch()?.noteArabic?.length || 0
@@ -338,7 +338,7 @@ const AddInvestmentType = () => {
isOpen={alert}
onClose={() => setAlert(false)}
alertHandler={handleConfirm}
message={"Are you sure you want to add this?"}
message={id ? "Are you sure you want to update this document?" : " Are you sure you want to add this document?"}
isLoading={isLoadingBtn}
/>
</Box>