diff --git a/frontend/public/AdvanTex.jpg b/frontend/public/AdvanTex.jpg deleted file mode 100644 index 3e7e720..0000000 Binary files a/frontend/public/AdvanTex.jpg and /dev/null differ diff --git a/frontend/public/assets/cake.png b/frontend/public/assets/cake.png new file mode 100644 index 0000000..2bdb9c7 Binary files /dev/null and b/frontend/public/assets/cake.png differ diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/frontend/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/frontend/public/test.html b/frontend/public/test.html deleted file mode 100644 index 16a8102..0000000 --- a/frontend/public/test.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Loading - - - - - \ No newline at end of file diff --git a/frontend/src/components/PhilSwift.tsx b/frontend/src/components/PhilSwift.tsx new file mode 100644 index 0000000..270a8d5 --- /dev/null +++ b/frontend/src/components/PhilSwift.tsx @@ -0,0 +1,46 @@ +import React from "react"; + +export default function PhilSwift() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index a652d45..194f79a 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx @@ -1,6 +1,6 @@ import { Box, Divider } from "@mui/material" import SidebarElement from "./SidebarElement" -import { ArrowBack, Home, Logout, Newspaper, Person, TableChartOutlined, Event } from "@mui/icons-material" +import { ArrowBack, Home, Logout, Person, TableChartOutlined, Event } from "@mui/icons-material" function Sidebar() { @@ -12,7 +12,6 @@ function Sidebar() { top: "0", left: "0", - backgroundColor: "#121212", boxShadow: "0 0 10px #00000055", zIndex: 1000, diff --git a/frontend/src/components/SidebarElement.tsx b/frontend/src/components/SidebarElement.tsx index 19e93df..ceaa278 100644 --- a/frontend/src/components/SidebarElement.tsx +++ b/frontend/src/components/SidebarElement.tsx @@ -25,7 +25,7 @@ function SidebarElement({ height: "50px", cursor: "pointer", - backgroundColor: theme => location.pathname === Path ? theme.palette.primary.light : "#00000011", + backgroundColor: theme => location.pathname === Path ? theme.palette.primary.main : theme.palette.secondary.main, display: "flex", flexDirection: "row", diff --git a/frontend/src/components/Vector.svg b/frontend/src/components/Vector.svg new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 518576c..288706b 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -4,13 +4,14 @@ import App from "./App"; import { createTheme, ThemeProvider, CssBaseline } from "@mui/material"; import { BrowserRouter } from "react-router-dom"; + // fonts import '@fontsource-variable/overpass'; import '@fontsource-variable/lexend'; const theme = createTheme({ palette: { - mode: "dark", + mode: "light", primary: { main: "#003263", }, diff --git a/frontend/src/pages/LandingPage.tsx b/frontend/src/pages/LandingPage.tsx index 496c066..f658a74 100644 --- a/frontend/src/pages/LandingPage.tsx +++ b/frontend/src/pages/LandingPage.tsx @@ -1,133 +1,23 @@ -import { Typography, Button, Box, Grid, CircularProgress } from "@mui/material"; -import { BadgeOutlined } from "@mui/icons-material"; -import { useTheme } from "@mui/material"; -import { useLocation } from "react-router-dom"; -import { useEffect, useState } from "react"; -import axios from "axios"; -import { getBaseURL } from "../functions"; +import { Avatar, Box, Stack, Typography } from "@mui/material"; +import PhilSwift from "../components/PhilSwift"; function LandingPage() { - const theme = useTheme(); - const location = useLocation(); - - useEffect(() => { - const element = document.getElementById(location.hash.replaceAll("#", "")); - if (element) { - element.scrollIntoView({ behavior: "smooth" }); - } - }, [location]); return ( <> - - - - - Wir sind dabei ! - - - Danke an die bisherigen Teilnehmer ! - - - + + ); } -export default LandingPage; \ No newline at end of file +export default LandingPage; diff --git a/frontend/src/pages/admin/Import.tsx b/frontend/src/pages/admin/Import.tsx index 30730d0..16d7f09 100644 --- a/frontend/src/pages/admin/Import.tsx +++ b/frontend/src/pages/admin/Import.tsx @@ -24,7 +24,7 @@ function Import() { .slice(1) .map((row) => { const values = row.split(";"); - + if (values.length === csvHeader.length) { const obj: { [key: string]: string } = {}; csvHeader.forEach((header, index) => { @@ -64,12 +64,12 @@ function Import() { accept=".csv" onChange={handleOnChange} /> - +
{csvData.length > 0 ? (
- Imported Data + Fehlerhafte Daten ({ id: index, ...row }))} columns={ @@ -80,18 +80,23 @@ function Import() { field: header, headerName: header.replace(/"/g, ""), width: 150, - valueFormatter(params) { + editable: true, + valueFormatter: (params) => { if (params.value) { - if (moment(params.value, "DD/MM/YYYY").isValid()) { - return moment(params.value).format( - "DD/MM/YYYY" - ); + if ( + moment( + params.value, + "DD.MM.YYYY", + false + ).isValid() && !header.includes("name") + ) { + return params.value; } + + return `Falsches Datum: ${params.value}`; } - return params.value; + return ""; }, - - } as GridColDef) ) : [] @@ -99,7 +104,7 @@ function Import() { />
) : ( -

No data to display

+

Keine Daten zum anzeigen

)}
);