Files
Business-Management/frontend/src/components/Nav.tsx
T
curo1305 0d34867a69 Add PDF document service with AI extraction and per-app settings
- New `features/doc-service` FastAPI microservice: PDF upload, async
  text extraction (pdfplumber), AI classification via Anthropic/Ollama/
  LM Studio, per-user categories, file download
- Alembic migration isolated with `alembic_version_doc_service` table
- Main backend: httpx proxy routers for /api/documents/* and
  /api/documents/categories/*, admin settings API at /api/settings/*
- Runtime config in /config/doc_service_config.json (shared Docker
  volume); api_key masking on reads; atomic write with os.replace()
- Frontend: DocumentsPage, DocumentAdminSettingsPage, updated AppsPage
  launcher hub, simplified Nav (removed Settings link), new routes
- docker-compose: doc-service service, doc_data + app_config volumes,
  removed internal:true from backend-net for outbound AI API calls
- Fix pre-commit hook: probe Docker socket path so git subprocess picks
  up Docker Desktop on macOS
- Fix security_check.py: use sys.executable for bandit so venv python
  is used instead of system python

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 05:28:11 +02:00

26 lines
803 B
TypeScript

import { Link } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";
import { useAuth } from "../hooks/useAuth";
import { getMe } from "../api/client";
export default function Nav() {
const { logout } = useAuth();
const { data: user } = useQuery({ queryKey: ["me"], queryFn: getMe });
return (
<nav style={{
display: "flex",
alignItems: "center",
gap: 16,
padding: "12px 24px",
borderBottom: "1px solid #ccc",
}}>
<Link to="/" style={{ fontWeight: "bold" }}>Home</Link>
<Link to="/apps">Apps</Link>
{user?.is_admin && <Link to="/admin">Admin</Link>}
<Link to="/profile" style={{ marginLeft: "auto" }}>Profile</Link>
<button onClick={logout} style={{ cursor: "pointer" }}>Logout</button>
</nav>
);
}