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 = {
|
||||
...passThroughProps,
|
||||
tenantId,
|
||||
viewId,
|
||||
engine,
|
||||
items,
|
||||
containerRef,
|
||||
|
||||
@@ -68,6 +68,7 @@ export interface UseDocumentsPanelPropsArgs {
|
||||
documentLinks?: Map<Identifier, DocumentLinkLike>;
|
||||
ensureDownloadUrl?: (documentId: Identifier, options?: { force?: boolean }) => Promise<DocumentLinkLike | null>;
|
||||
selectionValue: WorkspaceSelectionValue;
|
||||
currentTenantId?: Identifier | null;
|
||||
}
|
||||
|
||||
export type DocumentsPanelProps = ReturnType<typeof useDocumentsPanelProps>;
|
||||
@@ -120,6 +121,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
documentLinks,
|
||||
ensureDownloadUrl,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
} = props;
|
||||
|
||||
return useMemo(
|
||||
@@ -172,6 +174,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
documentLinks,
|
||||
ensureDownloadUrl,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
}),
|
||||
[
|
||||
activeCorrespondentFilters,
|
||||
@@ -220,6 +223,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
|
||||
documentLinks,
|
||||
ensureDownloadUrl,
|
||||
selectionValue,
|
||||
currentTenantId,
|
||||
],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1239,6 +1239,7 @@ const useDocumentsWorkspace = ({
|
||||
documentLinks,
|
||||
ensureDownloadUrl,
|
||||
selectionValue: selection,
|
||||
currentTenantId,
|
||||
});
|
||||
const documentsTableProps = useMemo(
|
||||
() => ({
|
||||
|
||||
Reference in New Issue
Block a user