detailpanel

This commit is contained in:
2025-11-01 19:39:51 +01:00
parent 366f716b1c
commit 03bc311403
5 changed files with 142 additions and 52 deletions
@@ -247,6 +247,7 @@ const DocumentSummarySection = ({
onUpdateIssued,
resolveFolderPath,
onFolderNavigate,
showFolderPath = true,
}) => {
const summary = useMemo(() => {
if (!document) {
@@ -283,7 +284,11 @@ const DocumentSummarySection = ({
}, [correspondents, document?.correspondents]);
const folderPath = useMemo(() => {
if (!document?.folder_id || typeof resolveFolderPath !== 'function') {
if (
!showFolderPath
|| !document?.folder_id
|| typeof resolveFolderPath !== 'function'
) {
return null;
}
const segments = resolveFolderPath(document.folder_id);
@@ -294,7 +299,7 @@ const DocumentSummarySection = ({
return null;
}
return filtered;
}, [document?.folder_id, resolveFolderPath]);
}, [document?.folder_id, resolveFolderPath, showFolderPath]);
const folderDisplayNode = useMemo(() => {
if (!folderPath || !folderPath.length) {
@@ -521,7 +526,7 @@ const DocumentSummarySection = ({
</>
)}
</div>
{folderDisplayNode ? (
{showFolderPath && folderDisplayNode ? (
<div className="doc-title-row__path" aria-label="Folder path">
{folderDisplayNode}
</div>