hot fix
This commit is contained in:
@@ -90,9 +90,9 @@ const AddCashDetails = ({ isOpen, onClose, firstField, actionId, setActionId, da
|
||||
toast({
|
||||
render: () => <ToastBox message={res?.error?.data?.message } status={"error"} />,
|
||||
});
|
||||
setAlert(false);
|
||||
}
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ const IOArtifactsAdd = ({ isOpen, onClose, firstField, actionId, setActionId, da
|
||||
|
||||
<DrawerBody>
|
||||
<Stack spacing={4}>
|
||||
<FormControl isInvalid={errors.artifactName}>
|
||||
<FormControl isInvalid={errors.artifactName} isRequired={true}>
|
||||
<FormLabel fontSize={"sm"}>Artifact Name</FormLabel>
|
||||
<Controller
|
||||
name="artifactName"
|
||||
@@ -166,7 +166,7 @@ const IOArtifactsAdd = ({ isOpen, onClose, firstField, actionId, setActionId, da
|
||||
</FormErrorMessage>
|
||||
</FormControl>
|
||||
|
||||
<FormControl isInvalid={errors.artifactStreamingURL}>
|
||||
<FormControl isInvalid={errors.artifactStreamingURL} isRequired={true}>
|
||||
<FormLabel fontSize={"sm"}>Artifact Streaming URL</FormLabel>
|
||||
<Controller
|
||||
name="artifactStreamingURL"
|
||||
|
||||
@@ -74,6 +74,11 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
|
||||
amount: yup
|
||||
.string()
|
||||
.required("Amount is required")
|
||||
.test(
|
||||
"is-positive",
|
||||
"Amount should be greater than zero",
|
||||
(value) => parseFloat(value) > 0 // Check if the amount is greater than zero
|
||||
)
|
||||
.test(
|
||||
"max",
|
||||
`Distribution amount should not be greater than IO cash amount ${IODetails?.ioCash}`,
|
||||
@@ -86,6 +91,7 @@ const DistributionInvestor = ({ isOpen, onClose }) => {
|
||||
}
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
const investor = yup.object().shape({
|
||||
amount: yup.string().required("Amount is required"),
|
||||
|
||||
Reference in New Issue
Block a user