Skip to content

🔥 The free & Open Source DocuSign alternative

fix: document loading err and report UI

prafull-opensignlabs97c2f183ca72
diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js
index 136994fd4..b9176d19b 100644
--- a/apps/OpenSign/src/primitives/GetReportDisplay.js
+++ b/apps/OpenSign/src/primitives/GetReportDisplay.js
@@ -1165,7 +1165,7 @@ const ReportTable = (props) => {
<Loader />
</div>
)}
- <div className="p-2 w-full overflow-hidden bg-base-100 text-base-content op-card shadow-lg">
+ <div className="p-2 w-full bg-base-100 text-base-content op-card shadow-lg">
{isCelebration && (
<div className="relative z-[1000]">
<Confetti
@@ -1227,10 +1227,10 @@ const ReportTable = (props) => {
</div>
<div
className={`${
- isDashboard && props.List?.length > 0 ? "min-h-[317px]" : "h-full"
- } overflow-auto w-full`}
+ isDashboard && props.List?.length > 0 ? "min-h-[317px]" : "h-screen"
+ } overflow-auto w-full border-b`}
>
- <table className="op-table border-collapse w-full ">
+ <table className="op-table border-collapse w-full">
<thead className="text-[14px]">
<tr className="border-y-[1px]">
{props.heading?.map((item, index) => (
@@ -1609,6 +1609,7 @@ const ReportTable = (props) => {
)}`}
</span>
)}
+ {/* template report */}
{isOption[item.objectId] &&
act.action === "option" && (
<ul className="absolute -right-1 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
@@ -1665,6 +1666,7 @@ const ReportTable = (props) => {
{t(`btnLabel.${act.btnLabel}`)}
</span>
)}
+ {/* doc report */}
{isOption[item.objectId] &&
act.action === "option" && (
<ul className="absolute -right-1 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
diff --git a/apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js b/apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js
index d0f7731e9..1c3204bf9 100644
--- a/apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js
+++ b/apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js
@@ -316,13 +316,16 @@ async function PDF(req) {
}
}
const _resDoc = resDoc?.toJSON();
- // `FileAdapter` && `ActiveFileAdapter` is used to save file in user's fileAdapter
- const ActiveFileAdapter = _resDoc?.ExtUserPtr?.TenantId?.ActiveFileAdapter;
- const FileAdapter =
- _resDoc?.ExtUserPtr?.TenantId?.FileAdapters?.find(x => x.id === ActiveFileAdapter) || {};
+ // `fileAdapterId` is used check document uploaded in custom file adapter and get customFileAdapter id
+ const fileAdapterId = _resDoc?.FileAdapterId || '';
let adapterConfig = {};
- if (FileAdapter && ActiveFileAdapter) {
- adapterConfig = { ActiveFileAdapter: ActiveFileAdapter, ...FileAdapter };
+ if (fileAdapterId) {
+ // `FileAdapter` is used to credintials of file adapter
+ const FileAdapter =
+ _resDoc?.ExtUserPtr?.TenantId?.FileAdapters?.find(x => x.id === fileAdapterId) || {};
+ if (FileAdapter) {
+ adapterConfig = FileAdapter;
+ }
}
let signUser;
let className;