diff --git a/package.json b/package.json index fc8332f..65441ab 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "prepare": "husky install", "generate": "python scripts/generate.py", "g": "python scripts/generate.py", - "todo": "python scripts/todo.py", "comment:check": "python scripts/check_comment.py", "backend:check": "python scripts/check_backend.py", "backend:create": "npm run backend:create:tables", diff --git a/src/components/DocBaseOverview/DocBaseOverview.tsx b/src/components/DocBaseOverview/DocBaseOverview.tsx index 2e54735..c84a5e8 100644 --- a/src/components/DocBaseOverview/DocBaseOverview.tsx +++ b/src/components/DocBaseOverview/DocBaseOverview.tsx @@ -5,7 +5,10 @@ import './DocBaseOverview.scss'; import APIService from '../../utils/ApiService'; import MyDocument from '../../types/MyDocument'; import { Link } from 'react-router-dom'; -import { useLoadDocbaseTask } from '../../providers/DocBaseTaskProvider'; +import { + useLoadDocbaseTask, + useStartInteractiveTablePopulation, +} from '../../providers/DocBaseTaskProvider'; import { useShowChoiceNotification, useShowNotification, @@ -29,6 +32,8 @@ function DocBaseOverview({ organizationProp }: Props) { const showNotification = useShowNotification(); const getOrganizations = useGetOrganizations(); const loadDocbaseTask = useLoadDocbaseTask(); + const startDocBaseInteractiveTablePopulation = + useStartInteractiveTablePopulation(); useEffect(() => { APIService.getOrganizationNames().then((orgs) => { @@ -66,6 +71,10 @@ function DocBaseOverview({ organizationProp }: Props) { loadDocbaseTask(selectedOrgID, document.name); }; + const startInteractiveTablePopulation = (document: MyDocument) => { + startDocBaseInteractiveTablePopulation(selectedOrgID, document.name); + }; + const removeDocument = (document: MyDocument) => { showChoiceNotification( 'Delete DocBase', @@ -168,6 +177,14 @@ function DocBaseOverview({ organizationProp }: Props) { > View DocBase + { + startInteractiveTablePopulation(docBase); + }} + > + Start interactive table population + { diff --git a/src/components/DocbaseViewer/DocbaseViewer.tsx b/src/components/DocbaseViewer/DocbaseViewer.tsx index 3dd8aac..71b0ff6 100644 --- a/src/components/DocbaseViewer/DocbaseViewer.tsx +++ b/src/components/DocbaseViewer/DocbaseViewer.tsx @@ -47,18 +47,15 @@ function DocbaseViewer({ docBase, onClose }: Props) { onClose(); }} > - {/* */}

Documents

{docBase.docs.map((doc, index) => { - return ; + return ( + + ); })}