From 348f7810b9b05a6738150ecdd28804809f196ddf Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Fri, 17 May 2024 10:09:15 +0530 Subject: [PATCH] fix: Cannot read properties of undefined (reading 'find') in resend mail & resend mail not available dashboard report --- apps/OpenSign/src/json/ReportJson.js | 8 ++++++++ apps/OpenSign/src/primitives/GetReportDisplay.js | 2 +- apps/OpenSignServer/cloud/parsefunction/reportsJson.js | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) 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