From 26777e2ada974c2f496214c98697f19c38021964 Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:22:37 +0530 Subject: [PATCH] investor-amount --- .../HeaderModal/DistributionInvestor.jsx | 73 +++++++++---------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/src/Pages/IO_Management/ViewIO/HeaderModal/DistributionInvestor.jsx b/src/Pages/IO_Management/ViewIO/HeaderModal/DistributionInvestor.jsx index 421f613..e0a9f5a 100644 --- a/src/Pages/IO_Management/ViewIO/HeaderModal/DistributionInvestor.jsx +++ b/src/Pages/IO_Management/ViewIO/HeaderModal/DistributionInvestor.jsx @@ -31,18 +31,13 @@ import { Controller, useForm } from "react-hook-form"; import * as yup from "yup"; import { yupResolver } from "@hookform/resolvers/yup"; - export const investor = yup.object().shape({ amount: yup.string().required("Amount is required"), }); - - -const DistributionInvestor = ({ isOpen, onClose, }) => { - - - const params = useParams() - const id = params?.id +const DistributionInvestor = ({ isOpen, onClose }) => { + const params = useParams(); + const id = params?.id; // const { // data:IObyID, @@ -50,7 +45,7 @@ const DistributionInvestor = ({ isOpen, onClose, }) => { // isLoading, // } = useGetDistributionInvestorMutation(id); - const [ getDistributionInvestment ] = useGetDistributionInvestorMutation() + const [getDistributionInvestment] = useGetDistributionInvestorMutation(); const { control, @@ -65,19 +60,13 @@ const DistributionInvestor = ({ isOpen, onClose, }) => { // try { // const res = getDistributionInvestment({id,data}) // console.log(res); - + // } catch (error) { - + // } // },[]) - - // console.log(IObyID); - - - - // ====================================================[Table Setup]================================================================ const tableHeadRow = [ @@ -259,14 +248,11 @@ const DistributionInvestor = ({ isOpen, onClose, }) => { ); }; + const onSubmit = (data) => { + console.log(data); + }; - - const onSubmit = (data) =>{ - console.log( data ); - - - - } + console.log(errors); return ( @@ -283,27 +269,36 @@ const DistributionInvestor = ({ isOpen, onClose, }) => { {/* */} - Amount to Distribute + Amount to Distribute + ( - + )} /> - - {errors.amount?.message} - - - + + + + {errors.amount?.message} + +