mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-11 12:17:41 +02:00
fix: document loading err and report UI
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user