diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 446913c42..51507ea96 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -633,9 +633,9 @@ "decline-by":"Declined/revoked by", "document-declined": "Document declined", "Add-Webhook":"Add Webhook", - "quotamailselfsign": "You've reached your limit of 20 emails for this month. Upgrade now to continue sending emails directly.", - "quotamail": "You've reached your limit of 20 signature request emails for this month. Upgrade now to continue sending emails directly.", - "quotamailTip":"Tip: You can still sign unlimited documents by manually sharing the signing request links below.", + "quotamailinfo": "You can send upto 15 signature request emails every month. Upgrade now to send unlimited signing requests directly.", + "quotamail": "You've reached your limit of 15 signature request emails for this month. Upgrade now to continue sending emails directly.", + "quotamailTip":"Tip: You can still sign unlimited documents by manually sharing the signing request links.", "quotamailhead":"Quota Reached", "public-template-mssg-1":"To integrate OpenSign into your React or Next.js project, simply run the following command:", "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add opensign-react.", diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index ad580582e..f9ff9669b 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -633,9 +633,9 @@ "decline-by" :"Refusé/révoqué par", "document-declined":"document refusé", "Add-Webhook":"Ajouter Webhook", - "quotamailselfsign": "Vous avez atteint votre limite de 20 e-mails pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", - "quotamail": "Vous avez atteint votre limite de 20 e-mails de demande de signature pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", - "quotamailTip":"Astuce : Vous pouvez toujours signer un nombre illimité de documents en partageant manuellement les liens de demande de signature ci-dessous.", + "quotamailinfo": "Vous pouvez envoyer jusqu'à 15 e-mails de demande de signature chaque mois. Mettez à niveau maintenant pour envoyer directement des demandes de signature illimitées.", + "quotamail": "Vous avez atteint votre limite de 15 e-mails de demande de signature pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", + "quotamailTip":"Astuce : Vous pouvez toujours signer un nombre illimité de documents en partageant manuellement les liens de demande de signature.", "quotamailhead":"Quota atteint", "public-template-mssg-1" :"Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add opensign-react.", diff --git a/apps/OpenSign/src/components/BulkSendUi.js b/apps/OpenSign/src/components/BulkSendUi.js index 6e42344a5..8c588d299 100644 --- a/apps/OpenSign/src/components/BulkSendUi.js +++ b/apps/OpenSign/src/components/BulkSendUi.js @@ -77,7 +77,9 @@ const BulkSendUi = (props) => { const addoncredits = resCredits?.addoncredits || 0; const totalcredits = allowedcredits + addoncredits; if (totalcredits > 0) { - setIsBulkAvailable(true); + if (subscription?.plan !== "freeplan") { + setIsBulkAvailable(true); + } } setAmount((obj) => ({ ...obj, totalcredits: totalcredits })); } diff --git a/apps/OpenSign/src/components/Header.js b/apps/OpenSign/src/components/Header.js index 22340a834..4ecef1754 100644 --- a/apps/OpenSign/src/components/Header.js +++ b/apps/OpenSign/src/components/Header.js @@ -13,6 +13,8 @@ import { import { isEnableSubscription, isStaging } from "../constant/const"; import { validplan } from "../json/plansArr"; import { useTranslation } from "react-i18next"; +import ModalUi from "../primitives/ModalUi"; +import QuotaCard from "../primitives/QuotaCard"; const Header = ({ showSidebar }) => { const { t, i18n } = useTranslation(); @@ -27,6 +29,7 @@ const Header = ({ showSidebar }) => { localStorage.getItem("appLogo") || " " ); const [emailUsed, setEmailUsed] = useState(0); + const [isModal, setIsModal] = useState(false); const toggleDropdown = () => { setIsOpen(!isOpen); @@ -111,6 +114,9 @@ const Header = ({ showSidebar }) => { const handleNavigation = () => { navigate("/subscription"); }; + const handleMailUsed = () => { + setIsModal(!isModal); + }; return (
{isEnableSubscription && ( @@ -203,14 +209,6 @@ const Header = ({ showSidebar }) => { tabIndex={0} className="mt-3 z-[1] p-2 shadow op-menu op-menu-sm op-dropdown-content text-base-content bg-base-100 rounded-box w-52" > - {isEnableSubscription && isTeam?.plan === "freeplan" && ( -
  • - - Email used:{" "} - {emailUsed}/20 - -
  • - )}
  • openInNewTab("https://docs.opensignlabs.com")}> {t("docs")} @@ -241,6 +239,14 @@ const Header = ({ showSidebar }) => { Console
  • + {isEnableSubscription && isTeam?.plan === "freeplan" && ( +
  • + + + {emailUsed}/20 sent this month + +
  • + )}
  • {" "} @@ -251,6 +257,9 @@ const Header = ({ showSidebar }) => {
  • + + + ); }; diff --git a/apps/OpenSign/src/components/pdf/EmailComponent.js b/apps/OpenSign/src/components/pdf/EmailComponent.js index f0404439c..83b61fb40 100644 --- a/apps/OpenSign/src/components/pdf/EmailComponent.js +++ b/apps/OpenSign/src/components/pdf/EmailComponent.js @@ -15,8 +15,7 @@ function EmailComponent({ sender, setIsAlert, extUserId, - activeMailAdapter, - planCode + activeMailAdapter }) { const { t } = useTranslation(); const [emailList, setEmailList] = useState([]); @@ -51,7 +50,6 @@ function EmailComponent({ recipient: emailList[i], subject: `${sender.name} has signed the doc - ${pdfName}`, from: sender.email, - plan: planCode, html: "
    - isAlert.alertMessage === "quotareached" - ? false - : setIsAlert({ isShow: false, alertMessage: "" }) + setIsAlert({ isShow: false, alertMessage: "" }) } > - {isAlert.alertMessage === "quotareached" ? ( - - setIsAlert({ isShow: false, alertMessage: "" }) - } - /> - ) : ( -
    -

    {isAlert.alertMessage}

    -
    - )} +
    +

    {isAlert.alertMessage}

    +
    {/* this modal is used show this document is already sign */} @@ -1343,7 +1327,6 @@ function SignYourSelf() { setIsAlert={setIsAlert} extUserId={extUserId} activeMailAdapter={activeMailAdapter} - planCode={isSubscribe?.plan} /> {/* pdf header which contain funish back button */}
    { +const QuotaCard = ({ isPaidInfo, handlClose }) => { const { t } = useTranslation(); const navigate = useNavigate(); - return isSignyourself ? ( + return isPaidInfo ? ( <>
    {

    {t("upgrade-to") + " Paid " + t("plan")}

    -

    {t("quotamailselfsign")}

    +

    {t("quotamailinfo")}

    +

    {t("quotamailTip")}