fix: send wrong user activeMailAdapter data in sendmailv3 and signPdf function

This commit is contained in:
RaktimaNXG
2024-04-26 17:45:22 +05:30
parent 8cd90911a8
commit 5693fa230b
2 changed files with 8 additions and 15 deletions
+6 -5
View File
@@ -591,8 +591,9 @@ function PdfRequestFiles() {
);
//get ExistUserPtr object id of user class to get tenantDetails
const objectId = pdfDetails?.[0]?.ExtUserPtr?.UserId?.objectId;
const res = await contractUsers(jsonSender?.email);
//get ExistUserPtr email of user class to get userDetails
const currentUserEmail = pdfDetails?.[0]?.ExtUserPtr?.Email;
const res = await contractUsers(currentUserEmail);
let activeMailAdapter = "";
if (res === "Error: Something went wrong!") {
setHandleError("Error: Something went wrong!");
@@ -1138,9 +1139,9 @@ function PdfRequestFiles() {
isDecline.currnt === "Sure"
? "Are you sure want to decline this document ?"
: isDecline.currnt === "YouDeclined"
? "You have declined this document!"
: isDecline.currnt === "another" &&
"You can not sign this document as it has been declined/revoked."
? "You have declined this document!"
: isDecline.currnt === "another" &&
"You can not sign this document as it has been declined/revoked."
}
footerMessage={isDecline.currnt === "Sure"}
declineDoc={declineDoc}
+2 -10
View File
@@ -173,15 +173,6 @@ function PlaceHolderSign() {
: rowLevel?.objectId && rowLevel.objectId;
const documentId = docId ? docId : objectId && objectId;
const senderUser =
localStorage.getItem(
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
) &&
localStorage.getItem(
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
);
const jsonSender = JSON.parse(senderUser);
useEffect(() => {
if (documentId) {
getDocumentDetails();
@@ -406,7 +397,8 @@ function PlaceHolderSign() {
};
setIsLoading(loadObj);
}
const res = await contractUsers(jsonSender.email);
const currentUserEmail = documentData[0]?.ExtUserPtr?.Email;
const res = await contractUsers(currentUserEmail);
if (res === "Error: Something went wrong!") {
const loadObj = {
isLoad: false