From 62f192630548bc7e1c4aa78e683c3753632a7e4a Mon Sep 17 00:00:00 2001 From: Mattias Date: Sun, 17 Mar 2024 13:39:16 +0100 Subject: [PATCH 01/24] Corrected NewWeeklyReport (prev. TimeReports) and changed imports --- .../{TimeReport.tsx => NewWeeklyReport.tsx} | 62 ++++++++++--------- .../PMTotalTimeActivity.tsx | 2 +- .../PMViewUnsignedReport.tsx | 2 +- .../UserPages/UserEditTimeReportPage.tsx | 2 +- .../Pages/UserPages/UserNewTimeReportPage.tsx | 2 +- 5 files changed, 36 insertions(+), 34 deletions(-) rename frontend/src/Components/{TimeReport.tsx => NewWeeklyReport.tsx} (80%) diff --git a/frontend/src/Components/TimeReport.tsx b/frontend/src/Components/NewWeeklyReport.tsx similarity index 80% rename from frontend/src/Components/TimeReport.tsx rename to frontend/src/Components/NewWeeklyReport.tsx index cb33ad9..1f613ac 100644 --- a/frontend/src/Components/TimeReport.tsx +++ b/frontend/src/Components/NewWeeklyReport.tsx @@ -1,30 +1,32 @@ import { useState } from "react"; -import { TimeReport } from "../Types/TimeReport"; +import { NewWeeklyReport } from "../Types/goTypes"; import { api } from "../API/API"; import { useNavigate } from "react-router-dom"; import Button from "./Button"; export default function NewTimeReport(): JSX.Element { - const [week, setWeek] = useState(""); - const [development, setDevelopment] = useState("0"); - const [meeting, setMeeting] = useState("0"); - const [administration, setAdministration] = useState("0"); - const [ownwork, setOwnWork] = useState("0"); - const [studies, setStudies] = useState("0"); - const [testing, setTesting] = useState("0"); + const [projectName, setProjectName] = useState(""); + const [week, setWeek] = useState(0); + const [developmentTime, setDevelopmentTime] = useState(0); + const [meetingTime, setMeetingTime] = useState(0); + const [adminTime, setAdminTime] = useState(0); + const [ownWorkTime, setOwnWorkTime] = useState(0); + const [studyTime, setStudyTime] = useState(0); + const [testingTime, setTestingTime] = useState(0); const handleNewTimeReport = async (): Promise => { - const newTimeReport: TimeReport = { + const newTimeReport: NewWeeklyReport = { + projectName, week, - development, - meeting, - administration, - ownwork, - studies, - testing, + developmentTime, + meetingTime, + adminTime, + ownWorkTime, + studyTime, + testingTime, }; await Promise.resolve(); - // await api.registerTimeReport(newTimeReport); This needs to be implemented! + // await api.submitWeeklyReport(newTimeReport, token); Token is not defined yet }; const navigate = useNavigate(); @@ -34,7 +36,7 @@ export default function NewTimeReport(): JSX.Element {
{ - if (week === "") { + if (week === 0) { alert("Please enter a week number"); e.preventDefault(); return; @@ -50,7 +52,7 @@ export default function NewTimeReport(): JSX.Element { type="week" placeholder="Week" onChange={(e) => { - const weekNumber = e.target.value.split("-W")[1]; + const weekNumber = parseInt(e.target.value.split("-W")[1]); setWeek(weekNumber); }} onKeyDown={(event) => { @@ -79,9 +81,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={development} + value={developmentTime} onChange={(e) => { - setDevelopment(e.target.value); + setDevelopmentTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; @@ -98,9 +100,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={meeting} + value={meetingTime} onChange={(e) => { - setMeeting(e.target.value); + setMeetingTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; @@ -117,9 +119,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={administration} + value={adminTime} onChange={(e) => { - setAdministration(e.target.value); + setAdminTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; @@ -136,9 +138,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={ownwork} + value={ownWorkTime} onChange={(e) => { - setOwnWork(e.target.value); + setOwnWorkTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; @@ -155,9 +157,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={studies} + value={studyTime} onChange={(e) => { - setStudies(e.target.value); + setStudyTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; @@ -174,9 +176,9 @@ export default function NewTimeReport(): JSX.Element { type="number" min="0" className="border-2 border-black rounded-md text-center w-1/2" - value={testing} + value={testingTime} onChange={(e) => { - setTesting(e.target.value); + setTestingTime(parseInt(e.target.value)); }} onKeyDown={(event) => { const keyValue = event.key; diff --git a/frontend/src/Pages/ProjectManagerPages/PMTotalTimeActivity.tsx b/frontend/src/Pages/ProjectManagerPages/PMTotalTimeActivity.tsx index 5ae5a4b..63e623a 100644 --- a/frontend/src/Pages/ProjectManagerPages/PMTotalTimeActivity.tsx +++ b/frontend/src/Pages/ProjectManagerPages/PMTotalTimeActivity.tsx @@ -1,6 +1,6 @@ import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; -import TimeReport from "../../Components/TimeReport"; +import TimeReport from "../../Components/NewWeeklyReport"; function PMTotalTimeActivity(): JSX.Element { const content = ( diff --git a/frontend/src/Pages/ProjectManagerPages/PMViewUnsignedReport.tsx b/frontend/src/Pages/ProjectManagerPages/PMViewUnsignedReport.tsx index 8bf9143..f9d5998 100644 --- a/frontend/src/Pages/ProjectManagerPages/PMViewUnsignedReport.tsx +++ b/frontend/src/Pages/ProjectManagerPages/PMViewUnsignedReport.tsx @@ -1,6 +1,6 @@ import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; -import TimeReport from "../../Components/TimeReport"; +import TimeReport from "../../Components/NewWeeklyReport"; function PMViewUnsignedReport(): JSX.Element { const content = ( diff --git a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx index af3bbc1..97e49e3 100644 --- a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx +++ b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx @@ -1,6 +1,6 @@ import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; -import NewTimeReport from "../../Components/TimeReport"; +import NewTimeReport from "../../Components/NewWeeklyReport"; function UserEditTimeReportPage(): JSX.Element { const content = ( diff --git a/frontend/src/Pages/UserPages/UserNewTimeReportPage.tsx b/frontend/src/Pages/UserPages/UserNewTimeReportPage.tsx index ca84770..d4db5a4 100644 --- a/frontend/src/Pages/UserPages/UserNewTimeReportPage.tsx +++ b/frontend/src/Pages/UserPages/UserNewTimeReportPage.tsx @@ -1,6 +1,6 @@ import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; -import NewTimeReport from "../../Components/TimeReport"; +import NewTimeReport from "../../Components/NewWeeklyReport"; import { Link } from "react-router-dom"; function UserNewTimeReportPage(): JSX.Element { From f3931f905aab55abf27239215afcf219b3cacd09 Mon Sep 17 00:00:00 2001 From: Mattias Date: Sun, 17 Mar 2024 14:19:57 +0100 Subject: [PATCH 02/24] Minor changes --- frontend/src/Components/NewWeeklyReport.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/Components/NewWeeklyReport.tsx b/frontend/src/Components/NewWeeklyReport.tsx index 1f613ac..510b877 100644 --- a/frontend/src/Components/NewWeeklyReport.tsx +++ b/frontend/src/Components/NewWeeklyReport.tsx @@ -1,10 +1,10 @@ -import { useState } from "react"; +import { useState, useContext } from "react"; import { NewWeeklyReport } from "../Types/goTypes"; import { api } from "../API/API"; import { useNavigate } from "react-router-dom"; import Button from "./Button"; -export default function NewTimeReport(): JSX.Element { +export default function NewWeeklyReport(): JSX.Element { const [projectName, setProjectName] = useState(""); const [week, setWeek] = useState(0); const [developmentTime, setDevelopmentTime] = useState(0); @@ -14,8 +14,8 @@ export default function NewTimeReport(): JSX.Element { const [studyTime, setStudyTime] = useState(0); const [testingTime, setTestingTime] = useState(0); - const handleNewTimeReport = async (): Promise => { - const newTimeReport: NewWeeklyReport = { + const handleNewWeeklyReport = async (): Promise => { + const newWeeklyReport: NewWeeklyReport = { projectName, week, developmentTime, @@ -26,7 +26,7 @@ export default function NewTimeReport(): JSX.Element { testingTime, }; await Promise.resolve(); - // await api.submitWeeklyReport(newTimeReport, token); Token is not defined yet + //await api.submitWeeklyReport(newWeeklyReport, token); Token is not yet imported }; const navigate = useNavigate(); @@ -42,7 +42,7 @@ export default function NewTimeReport(): JSX.Element { return; } e.preventDefault(); - void handleNewTimeReport(); + void handleNewWeeklyReport(); navigate("/project"); }} > From 46eebee84f547768aa8fe6cb59b70702a2d6c1f4 Mon Sep 17 00:00:00 2001 From: Davenludd Date: Sun, 17 Mar 2024 14:21:38 +0100 Subject: [PATCH 03/24] Refactor API.ts for improved readability and maintainability --- frontend/src/API/API.ts | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/frontend/src/API/API.ts b/frontend/src/API/API.ts index ed64f71..52fd5b9 100644 --- a/frontend/src/API/API.ts +++ b/frontend/src/API/API.ts @@ -22,12 +22,17 @@ interface API { token: string, ): Promise>; /** Submit a weekly report */ - submitWeeklyReport(project: NewWeeklyReport, token: string): Promise>; + submitWeeklyReport( + project: NewWeeklyReport, + token: string, + ): Promise>; /** Renew the token */ renewToken(token: string): Promise>; /** Gets all the projects of a user*/ - getUserProjects(username: string, token: string): Promise>; - + getUserProjects( + username: string, + token: string, + ): Promise>; } // Export an instance of the API @@ -55,7 +60,7 @@ export const api: API = { async removeUser( username: string, - token: string + token: string, ): Promise> { try { const response = await fetch("/api/userdelete", { @@ -80,7 +85,7 @@ export const api: API = { async createProject( project: NewProject, - token: string + token: string, ): Promise> { try { const response = await fetch("/api/project", { @@ -135,18 +140,26 @@ export const api: API = { }); if (!response.ok) { - return Promise.resolve({ success: false, message: "Failed to get user projects" }); + return Promise.resolve({ + success: false, + message: "Failed to get user projects", + }); } else { const data = (await response.json()) as Project[]; return Promise.resolve({ success: true, data }); } - } - catch (e) { - return Promise.resolve({ success: false, message: "Failed to get user projects" }); + } catch (e) { + return Promise.resolve({ + success: false, + message: "Failed to get user projects", + }); } }, - - submitWeeklyReport: function (project: NewWeeklyReport, token: string): Promise> { + + submitWeeklyReport: function ( + project: NewWeeklyReport, + token: string, + ): Promise> { try { return fetch("/api/submitWeeklyReport", { method: "POST", @@ -158,7 +171,10 @@ export const api: API = { }) .then((response) => { if (!response.ok) { - return { success: false, message: "Failed to submit weekly report" }; + return { + success: false, + message: "Failed to submit weekly report", + }; } else { return response.json(); } @@ -167,7 +183,10 @@ export const api: API = { return { success: true, data }; }); } catch (e) { - return Promise.resolve({ success: false, message: "Failed to submit weekly report" }); + return Promise.resolve({ + success: false, + message: "Failed to submit weekly report", + }); } - } + }, }; From d6d2b6d170fbcb572da96b0807b67207e05ad344 Mon Sep 17 00:00:00 2001 From: Mattias Date: Sat, 16 Mar 2024 02:47:17 +0100 Subject: [PATCH 04/24] Visual fixes --- frontend/src/Components/Register.tsx | 53 +++++++++++++++++++--------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/frontend/src/Components/Register.tsx b/frontend/src/Components/Register.tsx index 0c0fcd0..9b435f1 100644 --- a/frontend/src/Components/Register.tsx +++ b/frontend/src/Components/Register.tsx @@ -40,6 +40,7 @@ export default function Register(): JSX.Element { }; return ( +
Register New User - { - setUsername(e.target.value); - }} - /> - { - setPassword(e.target.value); - }} - /> +
+ + { + setUsername(e.target.value); + }} + /> +
+
+ + { + setPassword(e.target.value); + }} + /> +
{isOpen && ( From 164ff781b3e4799f977872bbd1455644d83cd7c4 Mon Sep 17 00:00:00 2001 From: Davenludd Date: Mon, 18 Mar 2024 10:43:52 +0100 Subject: [PATCH 14/24] Add useEffect hook to handle authority navigation and log response in YourProjectsPage --- frontend/src/Pages/App.tsx | 19 +++++++++++-------- frontend/src/Pages/YourProjectsPage.tsx | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/Pages/App.tsx b/frontend/src/Pages/App.tsx index 7ded3b6..4263815 100644 --- a/frontend/src/Pages/App.tsx +++ b/frontend/src/Pages/App.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useState, useEffect } from "react"; import LoginPage from "./LoginPage"; import { useNavigate } from "react-router-dom"; @@ -6,13 +6,16 @@ import { useNavigate } from "react-router-dom"; function App(): JSX.Element { const navigate = useNavigate(); const [authority, setAuthority] = useState(0); - if (authority === 1) { - navigate("/admin"); - } else if (authority === 2) { - navigate("/pm"); - } else if (authority === 3) { - navigate("/user"); - } + + useEffect(() => { + if (authority === 1) { + navigate("/admin"); + } else if (authority === 2) { + navigate("/pm"); + } else if (authority === 3) { + navigate("/user"); + } + }, [authority, navigate]); return ; } diff --git a/frontend/src/Pages/YourProjectsPage.tsx b/frontend/src/Pages/YourProjectsPage.tsx index 4e43bb6..30912a6 100644 --- a/frontend/src/Pages/YourProjectsPage.tsx +++ b/frontend/src/Pages/YourProjectsPage.tsx @@ -11,6 +11,7 @@ function UserProjectPage(): JSX.Element { const username = localStorage.getItem("username") ?? ""; // replace with actual username const token = localStorage.getItem("accessToken") ?? ""; // replace with actual token const response = await api.getUserProjects(username, token); + console.log(response); if (response.success) { setProjects(response.data ?? []); } else { From 3f8d56963ba03b25c25cd30fd5a8fdd003680aff Mon Sep 17 00:00:00 2001 From: Davenludd Date: Mon, 18 Mar 2024 12:49:58 +0100 Subject: [PATCH 15/24] Add ProjectNameContext to NewWeeklyReport and handle project selection in YourProjectsPage --- frontend/src/Components/NewWeeklyReport.tsx | 3 ++- frontend/src/Pages/YourProjectsPage.tsx | 25 +++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/frontend/src/Components/NewWeeklyReport.tsx b/frontend/src/Components/NewWeeklyReport.tsx index f5d92da..4f919aa 100644 --- a/frontend/src/Components/NewWeeklyReport.tsx +++ b/frontend/src/Components/NewWeeklyReport.tsx @@ -3,6 +3,7 @@ import { NewWeeklyReport } from "../Types/goTypes"; import { api } from "../API/API"; import { useNavigate } from "react-router-dom"; import Button from "./Button"; +import { ProjectNameContext } from "../Pages/YourProjectsPage"; export default function NewWeeklyReport(): JSX.Element { const [week, setWeek] = useState(0); @@ -13,7 +14,7 @@ export default function NewWeeklyReport(): JSX.Element { const [studyTime, setStudyTime] = useState(0); const [testingTime, setTestingTime] = useState(0); - // const projectName = useContext(projectNameContext); + const projectName = useContext(ProjectNameContext); const token = localStorage.getItem("accessToken") ?? ""; const handleNewWeeklyReport = async (): Promise => { diff --git a/frontend/src/Pages/YourProjectsPage.tsx b/frontend/src/Pages/YourProjectsPage.tsx index 30912a6..aabc606 100644 --- a/frontend/src/Pages/YourProjectsPage.tsx +++ b/frontend/src/Pages/YourProjectsPage.tsx @@ -1,11 +1,14 @@ -import React, { useState } from "react"; +import React, { useState, createContext, useEffect } from "react"; import { Project } from "../Types/goTypes"; import { api } from "../API/API"; import { Link } from "react-router-dom"; import BasicWindow from "../Components/BasicWindow"; +export const ProjectNameContext = createContext(""); + function UserProjectPage(): JSX.Element { const [projects, setProjects] = useState([]); + const [selectedProject, setSelectedProject] = useState(""); const getProjects = async (): Promise => { const username = localStorage.getItem("username") ?? ""; // replace with actual username @@ -18,20 +21,34 @@ function UserProjectPage(): JSX.Element { console.error(response.message); } }; + // Call getProjects when the component mounts + useEffect(() => { + getProjects(); + }, []); + + const handleProjectClick = (projectName: string): void => { + setSelectedProject(projectName); + }; const content = ( - <> +

Your Projects

{projects.map((project, index) => ( - + { + handleProjectClick(project.name); + }} + key={index} + >

{project.name}

))}
- +
); const buttons = <>; From 69d406720980d55b5bface33a47d89b24d413a40 Mon Sep 17 00:00:00 2001 From: Mattias Date: Mon, 18 Mar 2024 14:40:20 +0100 Subject: [PATCH 16/24] Added new component for viewing weeklyreport --- frontend/src/Components/ViewWeeklyReport.tsx | 243 +++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 frontend/src/Components/ViewWeeklyReport.tsx diff --git a/frontend/src/Components/ViewWeeklyReport.tsx b/frontend/src/Components/ViewWeeklyReport.tsx new file mode 100644 index 0000000..d6d4692 --- /dev/null +++ b/frontend/src/Components/ViewWeeklyReport.tsx @@ -0,0 +1,243 @@ +import { useState, useEffect } from "react"; +import { NewWeeklyReport } from "../Types/goTypes"; +import { api } from "../API/API"; +import { useNavigate } from "react-router-dom"; +import Button from "./Button"; + +export default function GetWeeklyReport(): JSX.Element { + const [projectName, setProjectName] = useState(""); + const [week, setWeek] = useState(0); + const [developmentTime, setDevelopmentTime] = useState(0); + const [meetingTime, setMeetingTime] = useState(0); + const [adminTime, setAdminTime] = useState(0); + const [ownWorkTime, setOwnWorkTime] = useState(0); + const [studyTime, setStudyTime] = useState(0); + const [testingTime, setTestingTime] = useState(0); + + const token = localStorage.getItem("accessToken") ?? ""; + + useEffect(() => { + const fetchWeeklyReport = async (): Promise => { + const response = await api.getWeeklyReport( + "username", + projectName, + "week", + token, + ); + + if (response.success) { + const report: NewWeeklyReport = response.data ?? { + projectName: "", + week: 0, + developmentTime: 0, + meetingTime: 0, + adminTime: 0, + ownWorkTime: 0, + studyTime: 0, + testingTime: 0, + }; + setProjectName(report.projectName); + setWeek(report.week); + setDevelopmentTime(report.developmentTime); + setMeetingTime(report.meetingTime); + setAdminTime(report.adminTime); + setOwnWorkTime(report.ownWorkTime); + setStudyTime(report.studyTime); + setTestingTime(report.testingTime); + } else { + console.error("Failed to fetch weekly report:", response.message); + } + }; + + fetchWeeklyReport(); + }, []); + + const handleNewWeeklyReport = async (): Promise => { + const newWeeklyReport: NewWeeklyReport = { + projectName, + week, + developmentTime, + meetingTime, + adminTime, + ownWorkTime, + studyTime, + testingTime, + }; + + await api.submitWeeklyReport(newWeeklyReport, token); + }; + + const navigate = useNavigate(); + + return ( + <> +
+ { + if (week === 0) { + alert("Please enter a week number"); + e.preventDefault(); + return; + } + e.preventDefault(); + void handleNewWeeklyReport(); + navigate("/project"); + }} + > +
+ { + const weekNumber = parseInt(e.target.value.split("-W")[1]); + setWeek(weekNumber); + }} + onKeyDown={(event) => { + event.preventDefault(); + }} + onPaste={(event) => { + event.preventDefault(); + }} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Activity + + Total Time (min) +
Development + { + setDevelopmentTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
Meeting + { + setMeetingTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
Administration + { + setAdminTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
Own Work + { + setOwnWorkTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
Studies + { + setStudyTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
Testing + { + setTestingTime(parseInt(e.target.value)); + }} + onKeyDown={(event) => { + const keyValue = event.key; + if (!/\d/.test(keyValue) && keyValue !== "Backspace") + event.preventDefault(); + }} + /> +
+
+ +
+ + ); +} From 0634f836893470d4297cc8f0373b2e5d128f52b9 Mon Sep 17 00:00:00 2001 From: Mattias Date: Mon, 18 Mar 2024 14:40:32 +0100 Subject: [PATCH 17/24] Now displaying the right component --- frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx index d82ea8c..9da19fe 100644 --- a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx +++ b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx @@ -1,13 +1,13 @@ import BasicWindow from "../../Components/BasicWindow"; import Button from "../../Components/Button"; import BackButton from "../../Components/BackButton"; -import NewTimeReport from "../../Components/NewWeeklyReport"; +import ViewWeeklyReport from "../../Components/ViewWeeklyReport"; function UserEditTimeReportPage(): JSX.Element { const content = ( <>

Edit Time Report

- + ); From b82f73d192f4c7a3f8f09229e02c2ab165258562 Mon Sep 17 00:00:00 2001 From: Mattias Date: Mon, 18 Mar 2024 14:42:21 +0100 Subject: [PATCH 18/24] Removed button --- frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx index 9da19fe..0acef75 100644 --- a/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx +++ b/frontend/src/Pages/UserPages/UserEditTimeReportPage.tsx @@ -1,5 +1,4 @@ import BasicWindow from "../../Components/BasicWindow"; -import Button from "../../Components/Button"; import BackButton from "../../Components/BackButton"; import ViewWeeklyReport from "../../Components/ViewWeeklyReport"; @@ -13,13 +12,6 @@ function UserEditTimeReportPage(): JSX.Element { const buttons = ( <> -