From 410f18f512c5d88cff64cd0c94ae68c7ff4b6337 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Fri, 30 Aug 2024 18:03:11 +0530 Subject: [PATCH] exit resoved --- .../IO_Management/ViewIO/HeaderModal/Exit.jsx | 73 ++++++++++--------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/src/Pages/IO_Management/ViewIO/HeaderModal/Exit.jsx b/src/Pages/IO_Management/ViewIO/HeaderModal/Exit.jsx index 1900951..728a41b 100644 --- a/src/Pages/IO_Management/ViewIO/HeaderModal/Exit.jsx +++ b/src/Pages/IO_Management/ViewIO/HeaderModal/Exit.jsx @@ -221,15 +221,6 @@ const Exit = ({ isOpen, onClose }) => { ), })); - - - - - - - - - const Total = () => { return ( @@ -352,25 +343,26 @@ const Exit = ({ isOpen, onClose }) => { }; const onFinalSubmit = async (data) => { + console.log("hit"); setIsFinalCalculateLoading(true); - if (!isCalcualtedData) { - setIsFinalCalculateLoading(false); - return toast({ - render: () => ( - - ), - }); - } + // if (!isCalcualtedData) { + // setIsFinalCalculateLoading(false); + // return toast({ + // render: () => ( + // + // ), + // }); + // } const finalData = { - transactionAmount: data?.amount, + transactionAmount: IODetails?.ioMVNAV, }; try { - const res = await updateExitToInvestor({ id, data: finalData }) + const res = await updateExitToInvestor({ id, data: finalData }); console.log(finalData); if (res?.error?.status === 401) { @@ -414,23 +406,34 @@ const Exit = ({ isOpen, onClose }) => { Enter Exit Amount */} - $ {parseFloat(IODetails?.ioMVNAV || 0).toLocaleString(undefined, { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - })} + + ${" "} + {parseFloat(IODetails?.ioMVNAV || 0).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })} + - {/* */} {/* {calcualtedData && ( */} - } - // isLoading={isLoading} - /> + } + // isLoading={isLoading} + /> {/* ) } */} @@ -445,7 +448,7 @@ const Exit = ({ isOpen, onClose }) => { }} size={"sm"} rounded={"sm"} - onClick={handleSubmit(onFinalSubmit)} + onClick={() => onFinalSubmit()} isLoading={isFinalCalculateLoading} > Save