Small fixes

This commit is contained in:
Peter KW 2024-03-28 01:34:49 +01:00
parent b6d1a2926e
commit 19cb8dbd94
2 changed files with 13 additions and 9 deletions

View file

@ -19,9 +19,12 @@ function ProjectInfoModal(props: {
className="fixed inset-0 bg-black bg-opacity-30 backdrop-blur-sm className="fixed inset-0 bg-black bg-opacity-30 backdrop-blur-sm
flex justify-center items-center" flex justify-center items-center"
> >
<div className="border-4 border-black bg-white p-2 rounded-2xl text-center h-[41vh] w-[40vw] flex flex-col"> <div className="border-4 border-black bg-white p-2 rounded-2xl text-center h-[47vh] w-[40] flex flex-col">
<div className="pl-20 pr-20"> <div className="pl-20 pr-20">
<h1 className="font-bold text-[32px] mb-[20px]">Project members:</h1> <h1 className="font-bold text-[32px] mb-[20px]">
{localStorage.getItem("projectName") ?? ""}
</h1>
<h2 className="font-bold text-[24px] mb-[20px]">Project members:</h2>
<div className="border-2 border-black p-2 rounded-lg text-center overflow-scroll h-[26vh]"> <div className="border-2 border-black p-2 rounded-lg text-center overflow-scroll h-[26vh]">
<ul className="text-left font-medium space-y-2"> <ul className="text-left font-medium space-y-2">
<div></div> <div></div>
@ -51,12 +54,11 @@ function ProjectInfoModal(props: {
}} }}
type="button" type="button"
/> />
<Link to={"/addUserToProject"}> <Link to={"/adminProjectAddMember"}>
<Button <Button
text={"Add Member"} text={"Add Member"}
onClick={function (): void { onClick={function (): void {
// Might wanna change this later return;
localStorage.setItem("projectName", props.projectname);
}} }}
type="button" type="button"
/> />

View file

@ -2,7 +2,6 @@ import { useState } from "react";
import { NewProject } from "../Types/goTypes"; import { NewProject } from "../Types/goTypes";
import ProjectInfoModal from "./ProjectInfoModal"; import ProjectInfoModal from "./ProjectInfoModal";
import UserInfoModal from "./UserInfoModal"; import UserInfoModal from "./UserInfoModal";
import DeleteUser from "./DeleteUser";
/** /**
* A list of projects for admin manage projects page, that sets an onClick * A list of projects for admin manage projects page, that sets an onClick
@ -28,8 +27,9 @@ export function ProjectListAdmin(props: {
setUserModalVisible(true); setUserModalVisible(true);
}; };
const handleClickProject = (username: string): void => { const handleClickProject = (projectname: string): void => {
setProjectname(username); setProjectname(projectname);
localStorage.setItem("projectName", projectname);
setProjectModalVisible(true); setProjectModalVisible(true);
}; };
@ -55,7 +55,9 @@ export function ProjectListAdmin(props: {
manageMember={true} manageMember={true}
onClose={handleCloseUser} onClose={handleCloseUser}
//TODO: CHANGE TO REMOVE USER FROM PROJECT //TODO: CHANGE TO REMOVE USER FROM PROJECT
onDelete={() => DeleteUser} onDelete={() => {
return;
}}
isVisible={userModalVisible} isVisible={userModalVisible}
username={username} username={username}
/> />