Adding comments to PMProjectMenu, UserInfoModal, UserProjectListAdmin, UserProjectMenu
This commit is contained in:
parent
4c5c4f2189
commit
f43ad10dd9
4 changed files with 20 additions and 3 deletions
|
@ -1,6 +1,11 @@
|
|||
import { Link, useParams } from "react-router-dom";
|
||||
import { JSX } from "react/jsx-runtime";
|
||||
|
||||
/**
|
||||
* Handles the rendering of the PM Project Menu.
|
||||
* @param {string} projectName - The name of the project.
|
||||
* @returns {JSX.Element} The JSX element representing the PM Project Menu.
|
||||
*/
|
||||
function PMProjectMenu(): JSX.Element {
|
||||
const { projectName } = useParams();
|
||||
return (
|
||||
|
|
|
@ -3,6 +3,14 @@ import Button from "./Button";
|
|||
import DeleteUser from "./DeleteUser";
|
||||
import UserProjectListAdmin from "./UserProjectListAdmin";
|
||||
|
||||
/**
|
||||
* Component representing a modal to display user information.
|
||||
* @param {object} props - Component properties.
|
||||
* @param {boolean} props.isVisible - Determines if the modal is visible.
|
||||
* @param {string} props.username - The username to display.
|
||||
* @param {() => void} props.onClose - Function to handle closing the modal.
|
||||
* @returns {JSX.Element} The JSX element representing the UserInfoModal.
|
||||
*/
|
||||
function UserInfoModal(props: {
|
||||
isVisible: boolean;
|
||||
username: string;
|
||||
|
|
|
@ -2,6 +2,10 @@ import { useEffect, useState } from "react";
|
|||
import { api } from "../API/API";
|
||||
import { Project } from "../Types/goTypes";
|
||||
|
||||
/**
|
||||
* Component for displaying a list of projects associated with the current user.
|
||||
* @returns {JSX.Element} The JSX element representing the UserProjectListAdmin component.
|
||||
*/
|
||||
function UserProjectListAdmin(): JSX.Element {
|
||||
const [projects, setProjects] = useState<Project[]>([]);
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import { useParams, Link } from "react-router-dom";
|
|||
import { JSX } from "react/jsx-runtime";
|
||||
|
||||
/**
|
||||
* Renders the user project menu component.
|
||||
*
|
||||
* @returns JSX.Element representing the user project menu.
|
||||
* Renders the menu for a specific project for the user.
|
||||
* It provides options to view existing time reports and create new ones.
|
||||
* @returns {JSX.Element} The JSX element representing the user project menu.
|
||||
*/
|
||||
function UserProjectMenu(): JSX.Element {
|
||||
const { projectName } = useParams();
|
||||
|
|
Loading…
Add table
Reference in a new issue