diff --git a/project/frontend/bun.lockb b/project/frontend/bun.lockb index 776a922..6561d45 100755 Binary files a/project/frontend/bun.lockb and b/project/frontend/bun.lockb differ diff --git a/project/frontend/package.json b/project/frontend/package.json index cb88c9a..87b1e9c 100644 --- a/project/frontend/package.json +++ b/project/frontend/package.json @@ -25,6 +25,7 @@ "@tanstack/router-plugin": "^1.114.3", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-material-file-upload": "^0.0.4", "react-pdf": "^9.2.1" }, "devDependencies": { diff --git a/project/frontend/src/components/Header.tsx b/project/frontend/src/components/Header.tsx deleted file mode 100644 index 383cf9e..0000000 --- a/project/frontend/src/components/Header.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Link } from "@tanstack/react-router"; - -export default function Header() { - return ( -
- -
- ); -} diff --git a/project/frontend/src/components/UploadPage.tsx b/project/frontend/src/components/UploadPage.tsx new file mode 100644 index 0000000..172ce61 --- /dev/null +++ b/project/frontend/src/components/UploadPage.tsx @@ -0,0 +1,100 @@ +import { useState } from 'react' +import FileUpload from 'react-material-file-upload' +import {Box, Button, IconButton, Paper} from '@mui/material' +import { useNavigate } from '@tanstack/react-router' +import SettingsIcon from '@mui/icons-material/Settings'; + +export default function UploadPage() { + const [files, setFiles] = useState([]) + const fileTypes = ["pdf"]; + const navigate = useNavigate() + + return ( + + + navigate({ to: '/config' })}> + + + + + + + + + + + ) +} \ No newline at end of file diff --git a/project/frontend/src/main.tsx b/project/frontend/src/main.tsx index ddffcc6..f41d85a 100644 --- a/project/frontend/src/main.tsx +++ b/project/frontend/src/main.tsx @@ -40,9 +40,9 @@ pdfjs.GlobalWorkerOptions.workerSrc = new URL( import.meta.url, ).toString(); -const darkTheme = createTheme({ +const theme = createTheme({ palette: { - mode: "dark", + mode: "light", }, }); @@ -53,7 +53,7 @@ if (rootElement && !rootElement.innerHTML) { root.render( - + diff --git a/project/frontend/src/routeTree.gen.ts b/project/frontend/src/routeTree.gen.ts index b19f273..fecd2db 100644 --- a/project/frontend/src/routeTree.gen.ts +++ b/project/frontend/src/routeTree.gen.ts @@ -11,14 +11,14 @@ // Import Routes import { Route as rootRoute } from './routes/__root' -import { Route as DemoImport } from './routes/demo' +import { Route as ConfigImport } from './routes/config' import { Route as IndexImport } from './routes/index' // Create/Update Routes -const DemoRoute = DemoImport.update({ - id: '/demo', - path: '/demo', +const ConfigRoute = ConfigImport.update({ + id: '/config', + path: '/config', getParentRoute: () => rootRoute, } as any) @@ -39,11 +39,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } - '/demo': { - id: '/demo' - path: '/demo' - fullPath: '/demo' - preLoaderRoute: typeof DemoImport + '/config': { + id: '/config' + path: '/config' + fullPath: '/config' + preLoaderRoute: typeof ConfigImport parentRoute: typeof rootRoute } } @@ -53,37 +53,37 @@ declare module '@tanstack/react-router' { export interface FileRoutesByFullPath { '/': typeof IndexRoute - '/demo': typeof DemoRoute + '/config': typeof ConfigRoute } export interface FileRoutesByTo { '/': typeof IndexRoute - '/demo': typeof DemoRoute + '/config': typeof ConfigRoute } export interface FileRoutesById { __root__: typeof rootRoute '/': typeof IndexRoute - '/demo': typeof DemoRoute + '/config': typeof ConfigRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/demo' + fullPaths: '/' | '/config' fileRoutesByTo: FileRoutesByTo - to: '/' | '/demo' - id: '__root__' | '/' | '/demo' + to: '/' | '/config' + id: '__root__' | '/' | '/config' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute - DemoRoute: typeof DemoRoute + ConfigRoute: typeof ConfigRoute } const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, - DemoRoute: DemoRoute, + ConfigRoute: ConfigRoute, } export const routeTree = rootRoute @@ -97,14 +97,14 @@ export const routeTree = rootRoute "filePath": "__root.tsx", "children": [ "/", - "/demo" + "/config" ] }, "/": { "filePath": "index.tsx" }, - "/demo": { - "filePath": "demo.tsx" + "/config": { + "filePath": "config.tsx" } } } diff --git a/project/frontend/src/routes/config.tsx b/project/frontend/src/routes/config.tsx new file mode 100644 index 0000000..5ddecdb --- /dev/null +++ b/project/frontend/src/routes/config.tsx @@ -0,0 +1,66 @@ +import { createFileRoute } from "@tanstack/react-router"; +import { Box, Button, IconButton, Paper, Typography } from "@mui/material"; +import ArrowBackIcon from "@mui/icons-material/ArrowBack"; +import { useNavigate } from "@tanstack/react-router"; + +export const Route = createFileRoute("/config")({ + component: ConfigPage, +}); + +function ConfigPage() { + const navigate = useNavigate(); + + return ( + + + + navigate({ to: "/" })}> + + + + Konfiguration der Kennzahlen + + + + + + To-do: Table hierhin + + + ); +} \ No newline at end of file diff --git a/project/frontend/src/routes/demo.tsx b/project/frontend/src/routes/demo.tsx deleted file mode 100644 index 8d1e906..0000000 --- a/project/frontend/src/routes/demo.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useQuery } from "@tanstack/react-query"; -import { createFileRoute } from "@tanstack/react-router"; - -export const Route = createFileRoute("/demo")({ - component: TanStackQueryDemo, -}); - -function TanStackQueryDemo() { - const { data } = useQuery({ - queryKey: ["people"], - queryFn: () => - Promise.resolve([{ name: "John Doe" }, { name: "Jane Doe" }]), - initialData: [], - }); - - return ( -
-

People list

-
    - {data.map((person) => ( -
  • {person.name}
  • - ))} -
-
- ); -} diff --git a/project/frontend/src/routes/index.tsx b/project/frontend/src/routes/index.tsx index 7414b29..446d9e4 100644 --- a/project/frontend/src/routes/index.tsx +++ b/project/frontend/src/routes/index.tsx @@ -1,9 +1,11 @@ import { createFileRoute } from "@tanstack/react-router"; +import UploadPage from "../components/UploadPage"; + export const Route = createFileRoute("/")({ component: App, }); function App() { - return <>Test; + return ; }