diff --git a/apps/OpenSign/src/components/BulkSendUi.js b/apps/OpenSign/src/components/BulkSendUi.js index 9e6a4b657..f04130cbf 100644 --- a/apps/OpenSign/src/components/BulkSendUi.js +++ b/apps/OpenSign/src/components/BulkSendUi.js @@ -20,11 +20,11 @@ const BulkSendUi = (props) => { const [amount, setAmount] = useState({ price: (75.0).toFixed(2), quantity: 500, - totalPrice: 0, priceperbulksend: 0.15, totalQuickSend: 0 }); const [isQuotaReached, setIsQuotaReached] = useState(false); + const [isLoader, setIsLoader] = useState(false); const allowedSigners = 50; useEffect(() => { signatureExist(); @@ -34,24 +34,24 @@ const BulkSendUi = (props) => { //function to check atleast one signature field exist const signatureExist = async () => { if (isEnableSubscription) { - setIsSubmit(true); + setIsLoader(true); try { const allowedquicksend = await Parse.Cloud.run("allowedquicksend"); if (allowedquicksend > 0) { setIsBulkAvailable(true); - const getPlaceholder = props.item?.Placeholders; - const checkIsSignatureExistt = getPlaceholder?.every( - (placeholderObj) => - placeholderObj?.placeHolder?.some((holder) => - holder?.pos?.some((posItem) => posItem?.type === "signature") - ) - ); - setIsSignatureExist(checkIsSignatureExistt); } setAmount((obj) => ({ ...obj, totalQuickSend: allowedquicksend })); - setIsSubmit(false); + const getPlaceholder = props.item?.Placeholders; + const checkIsSignatureExistt = getPlaceholder?.every((placeholderObj) => + placeholderObj?.placeHolder?.some((holder) => + holder?.pos?.some((posItem) => posItem?.type === "signature") + ) + ); + setIsSignatureExist(checkIsSignatureExistt); + setIsLoader(false); } catch (err) { - setIsSubmit(false); + setIsLoader(false); + alert(t("something-went-wrong-mssg")); console.log("Err", err); } } else { @@ -63,6 +63,7 @@ const BulkSendUi = (props) => { ) ); setIsSignatureExist(checkIsSignatureExistt); + setIsLoader(false); } }; useEffect(() => { @@ -246,9 +247,9 @@ const BulkSendUi = (props) => { setAmount((obj) => ({ ...obj, quantity: 500, - priceperapi: 0.15, + priceperbulksend: 0.15, price: (75.0).toFixed(2), - totalapis: _resAddon.addon + totalQuickSend: _resAddon.addon })); } } @@ -274,146 +275,158 @@ const BulkSendUi = (props) => { }; return ( <> - {isSubmit && ( -
- {t("quotaerrquicksend")} -
- -+ {t("quotaerrquicksend")} +
+ +