Skip to content

🔥 The free & Open Source DocuSign alternative

fix: Cannot read properties of undefined (reading 'find') in resend mail & resend mail not available dashboard report

prafull-opensignlabs348f7810b9b0
diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js
index 87627b968..8bc528add 100644
--- a/apps/OpenSign/src/json/ReportJson.js
+++ b/apps/OpenSign/src/json/ReportJson.js
@@ -231,6 +231,14 @@ export default function reportJson(id) {
btnIcon: "fa-solid fa-ellipsis-vertical fa-lg",
action: "option",
subaction: [
+ {
+ btnId: "1631",
+ btnLabel: "Resend",
+ hoverLabel: "Resend",
+ btnIcon: "fa-solid fa-envelope",
+ redirectUrl: "",
+ action: "resend"
+ },
{
btnId: "6788",
btnLabel: "Revoke",
diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js
index e5e603d74..7721ee6cc 100644
--- a/apps/OpenSign/src/primitives/GetReportDisplay.js
+++ b/apps/OpenSign/src/primitives/GetReportDisplay.js
@@ -580,7 +580,7 @@ const ReportTable = (props) => {
}
};
const fetchUserStatus = (user, doc) => {
- const audit = doc.AuditTrail.find(
+ const audit = doc?.AuditTrail?.find(
(x) => x.UserPtr.objectId === user.objectId
);
return (
diff --git a/apps/OpenSignServer/cloud/parsefunction/reportsJson.js b/apps/OpenSignServer/cloud/parsefunction/reportsJson.js
index aa3cf5772..98d2c06b5 100644
--- a/apps/OpenSignServer/cloud/parsefunction/reportsJson.js
+++ b/apps/OpenSignServer/cloud/parsefunction/reportsJson.js
@@ -216,6 +216,9 @@ export default function reportJson(id, userId) {
'Signers.Name',
'Signers.Email',
'Signers.Phone',
+ 'AuditTrail',
+ 'AuditTrail.UserPtr',
+ 'ExpiryDate',
],
};
// Recent signature requests report show on dashboard