Compare commits

..

No commits in common. "49209663886040d52fb7554e37c1523c8b6ffe94" and "7f46202633d7ad9a58b2bde3dcb6b7fa344b2ff4" have entirely different histories.

27 changed files with 13 additions and 70 deletions

View file

@ -1,17 +1,14 @@
function Button({ function Button({
text, text,
onClick, onClick,
type,
}: { }: {
text: string; text: string;
onClick: () => void; onClick: () => void;
type: "submit" | "button" | "reset";
}): JSX.Element { }): JSX.Element {
return ( return (
<button <button
onClick={onClick} onClick={onClick}
className="inline-block py-1 px-8 font-bold bg-orange-500 text-white border-2 border-black rounded-full cursor-pointer mt-5 mb-5 transition-colors duration-10 hover:bg-orange-600 hover:text-gray-300 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 4vh;" className="inline-block py-1 px-8 font-bold bg-orange-500 text-white border-2 border-black rounded-full cursor-pointer mt-5 mb-5 transition-colors duration-10 hover:bg-orange-600 hover:text-gray-300 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 4vh;"
type={type}
> >
{text} {text}
</button> </button>

View file

@ -1,8 +1,6 @@
import { useState } from "react"; import { useState } from "react";
import { NewUser } from "../Types/Users"; import { NewUser } from "../Types/Users";
import { api } from "../API/API"; import { api } from "../API/API";
import Logo from "../assets/Logo.svg";
import Button from "./Button";
export default function Register(): JSX.Element { export default function Register(): JSX.Element {
const [username, setUsername] = useState(""); const [username, setUsername] = useState("");
@ -14,32 +12,25 @@ export default function Register(): JSX.Element {
}; };
return ( return (
<div className="flex flex-col h-screen w-screen items-center justify-center"> <div>
<div className="border-4 border-black bg-white flex flex-col items-center justify-center h-fit w-fit rounded-3xl content-center pl-20 pr-20"> <div className="w-full max-w-xs">
<form <form
className="bg-white rounded px-8 pt-6 pb-8 mb-4 items-center justify-center flex flex-col w-fit h-fit" className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"
onSubmit={(e) => { onSubmit={(e) => {
e.preventDefault(); e.preventDefault();
void handleRegister(); void handleRegister();
}} }}
> >
<img <h3 className="pb-2">Register new user</h3>
src={Logo}
className="logo w-[7vw] mb-10 mt-10"
alt="TTIME Logo"
/>
<h3 className="pb-4 mb-2 text-center font-bold text-[18px]">
Register New User
</h3>
<div className="mb-4"> <div className="mb-4">
<label <label
className="block text-gray-700 text-sm font-sans font-bold mb-2" className="block text-gray-700 text-sm font-bold mb-2"
htmlFor="username" htmlFor="username"
> >
Username Username
</label> </label>
<input <input
className="appearance-none border-2 border-black rounded-2xl w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
id="username" id="username"
type="text" type="text"
placeholder="Username" placeholder="Username"
@ -51,13 +42,13 @@ export default function Register(): JSX.Element {
</div> </div>
<div className="mb-6"> <div className="mb-6">
<label <label
className="block text-gray-700 text-sm font-sans font-bold mb-2" className="block text-gray-700 text-sm font-bold mb-2"
htmlFor="password" htmlFor="password"
> >
Password Password
</label> </label>
<input <input
className="appearance-none border-2 border-black rounded-2xl w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
id="password" id="password"
type="password" type="password"
placeholder="Choose your password" placeholder="Choose your password"
@ -68,13 +59,12 @@ export default function Register(): JSX.Element {
/> />
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<Button <button
text="Register" className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
onClick={(): void => {
return;
}}
type="submit" type="submit"
/> >
Register
</button>
</div> </div>
</form> </form>
<p className="text-center text-gray-500 text-xs"></p> <p className="text-center text-gray-500 text-xs"></p>

View file

@ -11,14 +11,12 @@ function AdminAddProject(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminAddUser(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminChangeUsername(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminManageProjects(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminManageUsers(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminProjectAddMember(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminProjectChangeUserRole(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminProjectManageMembers(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminProjectPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,7 +11,6 @@ function AdminProjectStatistics(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminProjectViewMemberInfo(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,14 +11,12 @@ function AdminViewUserInfo(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -67,7 +67,6 @@ function LoginPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</Link> </Link>
<Link to="/register"> <Link to="/register">
@ -76,7 +75,6 @@ function LoginPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</Link> </Link>
</div> </div>

View file

@ -11,14 +11,12 @@ function ChangeRole(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,7 +11,6 @@ function PMOtherUsersTR(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,21 +11,18 @@ function PMProjectMembers(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Time / Role" text="Time / Role"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -29,7 +29,6 @@ function PMProjectPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -19,7 +19,6 @@ function PMTotalTimeActivity(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,7 +11,6 @@ function PMTotalTimeRole(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -11,7 +11,6 @@ function PMUnsignedReports(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -19,21 +19,18 @@ function PMViewUnsignedReport(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Save" text="Save"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -17,14 +17,12 @@ function UserEditTimeReportPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Button <Button
text="Back" text="Back"
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );

View file

@ -18,7 +18,6 @@ function UserNewTimeReportPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
<Link to="/project"> <Link to="/project">
<Button <Button
@ -26,7 +25,6 @@ function UserNewTimeReportPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</Link> </Link>
</> </>

View file

@ -27,7 +27,6 @@ function UserProjectPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</Link> </Link>
</> </>

View file

@ -11,7 +11,6 @@ function UserViewTimeReportsPage(): JSX.Element {
onClick={(): void => { onClick={(): void => {
return; return;
}} }}
type="button"
/> />
</> </>
); );