diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index f860543e0..446913c42 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -477,7 +477,7 @@ "role-not-found": "Role not found.", "do-not-access": "You don't have access, please contact the admin.", "add-admin": "Add admin", - "opensign-setup": "Opensign Setup", + "opensign-setup": "OpenSign Setup", "join-discord": "Join our discord server", "admin-already-exist": "Admin already exist.", "password-update-alert-1": "Password updated successfully.", @@ -533,7 +533,7 @@ "filed-required-correctly": "Please fill required details correctly.", "admin-created": "Admin created", "invalid-masterkey": "Invalid masterkey", - "opensign-Setup": "Opensign Setup", + "opensign-Setup": "OpenSign Setup", "master-key": " Master key", "profile-update-alert": "Profile updated successfully.", "date": "Date", @@ -595,7 +595,7 @@ "Recently sent for signatures": "This is a list of documents you've sent to other parties for signature.", "Drafts": "This are documents you have started but have not finalized for sending.", "public-template": "This video demonstrates how to set up your personalized public profile, such as ‘https://opensign.me/your-username’. You’ll also learn how to customize your tagline and make your templates available for public signing." - }, + }, "enter-email-plaholder": "Add an email address and hit enter", "success-email-alert": "Email sent successfully!", "expired-doc-title": "Expired Document", @@ -646,6 +646,7 @@ "copy-code":"COPY", "copied-code":"COPIED", "Installation":"Installation", - "Usage" :"Usage" + "Usage" :"Usage", + "unauthorized-modal":"You don't have permission to perform this action, please contact {{adminName}}<{{adminEmail}}>." } diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 3644e5d04..ad580582e 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -476,7 +476,7 @@ "role-not-found": "Rôle introuvable.", "do-not-access": "Vous n'y avez pas accès, veuillez contacter l'administrateur.", "add-admin": "Ajouter un administrateur", - "opensign-setup": "Configuration d'Opensign", + "opensign-setup": "Configuration d'OpenSign", "join-discord": "Rejoignez notre serveur Discord", "admin-already-exist": "L'administrateur existe déjà.", "password-update-alert-1": "Mot de passe mis à jour avec succès.", @@ -532,7 +532,7 @@ "filed-required-correctly": "Veuillez remplir correctement les informations requises.", "admin-created": "Administrateur créé", "invalid-masterkey": "Clé principale invalide", - "opensign-Setup": "Configuration d'Opensign", + "opensign-Setup": "Configuration d'OpenSign", "master-key": "La clef maitresse", "profile-update-alert": "Mise à jour du profil réussie.", "date": "Date", @@ -646,6 +646,7 @@ "copy-code":"COPIE", "copied-code":"COPIÉ", "Installation":"Installation", - "Usage" :"Usage" - + "Usage" :"Usage", + "unauthorized-modal":"Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminName}}<{{adminEmail}}>." + } diff --git a/apps/OpenSign/src/components/BulkSendUi.js b/apps/OpenSign/src/components/BulkSendUi.js index 4491a08d3..6e42344a5 100644 --- a/apps/OpenSign/src/components/BulkSendUi.js +++ b/apps/OpenSign/src/components/BulkSendUi.js @@ -29,6 +29,12 @@ const BulkSendUi = (props) => { const [isQuotaReached, setIsQuotaReached] = useState(false); const [isLoader, setIsLoader] = useState(false); const [isFreePlan, setIsFreePlan] = useState(false); + const [admin, setAdmin] = useState({ + objectId: "", + name: "", + email: "", + isAdmin: true + }); const allowedSigners = 50; useEffect(() => { signatureExist(); @@ -41,6 +47,27 @@ const BulkSendUi = (props) => { setIsLoader(true); try { const subscription = await fetchSubscription(); + const extUser = + localStorage.getItem("Extand_Class") && + JSON.parse(localStorage.getItem("Extand_Class"))?.[0]; + if ( + subscription?.adminId && + extUser?.objectId === subscription?.adminId + ) { + setAdmin((obj) => ({ + ...obj, + objectId: subscription?.adminId, + isAdmin: true + })); + } else { + setAdmin((obj) => ({ + ...obj, + isAdmin: false, + name: extUser?.CreatedBy?.name, + email: extUser?.CreatedBy?.email + })); + } + setAdmin((obj) => ({ ...obj, objectId: subscription?.adminId })); if (subscription?.plan === "freeplan") { setIsFreePlan(true); } @@ -69,6 +96,7 @@ const BulkSendUi = (props) => { } } else { setIsBulkAvailable(true); + setAdmin((obj) => ({ ...obj, isAdmin: true })); const getPlaceholder = props.item?.Placeholders; const checkIsSignatureExistt = getPlaceholder?.every((placeholderObj) => placeholderObj?.placeHolder?.some((holder) => @@ -417,46 +445,57 @@ const BulkSendUi = (props) => { ) : ( -