feat: Propagate tenantId to document workspace and panel props.
This commit is contained in:
@@ -769,6 +769,8 @@ const DesktopWorkspace: React.FC<DocumentsViewProps> = ({
|
|||||||
|
|
||||||
const viewProps: DesktopWorkspaceViewProps = {
|
const viewProps: DesktopWorkspaceViewProps = {
|
||||||
...passThroughProps,
|
...passThroughProps,
|
||||||
|
tenantId,
|
||||||
|
viewId,
|
||||||
engine,
|
engine,
|
||||||
items,
|
items,
|
||||||
containerRef,
|
containerRef,
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export interface UseDocumentsPanelPropsArgs {
|
|||||||
documentLinks?: Map<Identifier, DocumentLinkLike>;
|
documentLinks?: Map<Identifier, DocumentLinkLike>;
|
||||||
ensureDownloadUrl?: (documentId: Identifier, options?: { force?: boolean }) => Promise<DocumentLinkLike | null>;
|
ensureDownloadUrl?: (documentId: Identifier, options?: { force?: boolean }) => Promise<DocumentLinkLike | null>;
|
||||||
selectionValue: WorkspaceSelectionValue;
|
selectionValue: WorkspaceSelectionValue;
|
||||||
|
currentTenantId?: Identifier | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DocumentsPanelProps = ReturnType<typeof useDocumentsPanelProps>;
|
export type DocumentsPanelProps = ReturnType<typeof useDocumentsPanelProps>;
|
||||||
@@ -120,6 +121,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
|||||||
documentLinks,
|
documentLinks,
|
||||||
ensureDownloadUrl,
|
ensureDownloadUrl,
|
||||||
selectionValue,
|
selectionValue,
|
||||||
|
currentTenantId,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return useMemo(
|
return useMemo(
|
||||||
@@ -172,6 +174,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
|||||||
documentLinks,
|
documentLinks,
|
||||||
ensureDownloadUrl,
|
ensureDownloadUrl,
|
||||||
selectionValue,
|
selectionValue,
|
||||||
|
currentTenantId,
|
||||||
}),
|
}),
|
||||||
[
|
[
|
||||||
activeCorrespondentFilters,
|
activeCorrespondentFilters,
|
||||||
@@ -220,6 +223,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
|||||||
documentLinks,
|
documentLinks,
|
||||||
ensureDownloadUrl,
|
ensureDownloadUrl,
|
||||||
selectionValue,
|
selectionValue,
|
||||||
|
currentTenantId,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1239,6 +1239,7 @@ const useDocumentsWorkspace = ({
|
|||||||
documentLinks,
|
documentLinks,
|
||||||
ensureDownloadUrl,
|
ensureDownloadUrl,
|
||||||
selectionValue: selection,
|
selectionValue: selection,
|
||||||
|
currentTenantId,
|
||||||
});
|
});
|
||||||
const documentsTableProps = useMemo(
|
const documentsTableProps = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user