Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import TaskAllocatorPage from "./components/task_allocator/TaskAllocatorPage";
import MyTasks from "./components/task_allocator/MyTasks";
import Signup from "./components/Authentication/Signup";
import Geo from "./components/geolocation/App";
import theme from "./theme";

const App = () => {
useEffect(() => {
Expand All @@ -29,7 +30,7 @@ const App = () => {

return (
<Router>
<ChakraProvider>
<ChakraProvider theme={theme}>
<ChatProvider>
<WorkspaceProvider>
<div className="container">
Expand Down
Binary file added frontend/src/assets/signup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
218 changes: 154 additions & 64 deletions frontend/src/components/Authentication/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import axios from "axios";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import { API_URL } from "../../config/api.config";
import { Box, Flex, Stack, Text, Image } from "@chakra-ui/react";
import signupimg from "../../assets/signup.png";

const Signup = () => {
const [show, setShow] = useState(false);
Expand Down Expand Up @@ -132,71 +134,159 @@ const Signup = () => {
};

return (
<VStack spacing="5px">
<FormControl id="first-name" isRequired>
<FormLabel>Name</FormLabel>
<Input
placeholder="Enter Your Name"
onChange={(e) => setName(e.target.value)}
/>
</FormControl>
<FormControl id="email" isRequired>
<FormLabel>Email Address</FormLabel>
<Input
type="email"
placeholder="Enter Your Email Address"
onChange={(e) => setEmail(e.target.value)}
/>
</FormControl>
<FormControl id="password" isRequired>
<FormLabel>Password</FormLabel>
<InputGroup size="md">
<Input
type={show ? "text" : "password"}
placeholder="Enter Password"
onChange={(e) => setPassword(e.target.value)}
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={handleClick}>
{show ? "Hide" : "Show"}
</Button>
</InputRightElement>
</InputGroup>
</FormControl>
<FormControl id="password" isRequired>
<FormLabel>Confirm Password</FormLabel>
<InputGroup size="md">
<Input
type={show ? "text" : "password"}
placeholder="Confirm password"
onChange={(e) => setConfirmpassword(e.target.value)}
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={handleClick}>
{show ? "Hide" : "Show"}
</Button>
</InputRightElement>
</InputGroup>
</FormControl>
<FormControl id="pic">
<FormLabel>Upload your Picture</FormLabel>
<Input
type="file"
p={1.5}
accept="image/*"
onChange={(e) => postDetails(e.target.files[0])}
/>
</FormControl>
<Button
colorScheme="blue"
width="100%"
style={{ marginTop: 15 }}
onClick={submitHandler}
isLoading={picLoading}
<Flex
minHeight="100vh"
width="100%"
align="center"
justify="center"
bg="#0f1924"
>
<Box
bg="#1b3046ff"
width={["90%", "90%","90%","70%"]}
p={8}
borderRadius="lg"
boxShadow="lg"

>
Sign Up
</Button>
</VStack>
<Text
textAlign="center"
fontSize="4xl"
fontWeight="600"
fontFamily="head"
textColor="#fff"
>Create Your Account</Text>
<Stack
direction={["column", "column", "row"]}
spacing={8}
align="center"
justify="center"
>
<Box
width={["100%", "100%", "60%"]}
>
<VStack spacing="5px" >
<FormControl id="first-name" isRequired>
<FormLabel mb={0} mt={3} fontFamily="subhead" textColor="lgrey">Name</FormLabel>
<Input
fontFamily="content"
placeholder="Enter Your Name"
onChange={(e) => setName(e.target.value)}
/>
</FormControl>
<FormControl id="email" isRequired>
<FormLabel mb={0} mt={3} fontFamily="subhead" textColor="lgrey">Email Address</FormLabel>
<Input
fontFamily="content"
type="email"
placeholder="Enter Your Email Address"
onChange={(e) => setEmail(e.target.value)}
/>
</FormControl>
<FormControl id="password" isRequired>
<FormLabel mb={0} mt={3} fontFamily="subhead" textColor="lgrey">Password</FormLabel>
<InputGroup size="md">
<Input
fontFamily="content"
type={show ? "text" : "password"}
placeholder="Enter Password"
onChange={(e) => setPassword(e.target.value)}
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={handleClick}>
{show ? "Hide" : "Show"}
</Button>
</InputRightElement>
</InputGroup>
</FormControl>
<FormControl id="password" isRequired>
<FormLabel mb={0} mt={3} fontFamily="subhead" textColor="lgrey">Confirm Password</FormLabel>
<InputGroup size="md">
<Input
fontFamily="content"
type={show ? "text" : "password"}
placeholder="Confirm password"
onChange={(e) => setConfirmpassword(e.target.value)}
/>
<InputRightElement width="4.5rem">
<Button h="1.75rem" size="sm" onClick={handleClick}>
{show ? "Hide" : "Show"}
</Button>
</InputRightElement>
</InputGroup>
</FormControl>
<FormControl id="pic">
<FormLabel mb={0} mt={3} fontFamily="subhead" textColor="lgrey">Upload your Picture</FormLabel>
<Box position="relative" width="100%">
<Input
type="file"
accept="image/*"
onChange={(e) => postDetails(e.target.files[0])}
position="absolute"
left={0}
top={0}
width="100%"
height="100%"
opacity={0}
zIndex={2}
cursor="pointer"
/>
<Button
as="span"
bg="#05549e"
color="white"
width="100%"
fontFamily="subhead"
_hover={{ bg: "#0c77dbff" }}
zIndex={1}
>
Choose Profile Photo
</Button>
</Box>
</FormControl>

</VStack>
</Box>
<Box
width={["100%", "100%", "60%"]}
display="flex"
justifyContent="center"
alignItems="center"
mt={[8, 8, 0]}
>
<Image
src={signupimg}
alt="Description"
boxSize={["270px", "300px", "350px"]}
objectFit="cover"
borderRadius="lg"
/>
</Box>



</Stack>
<Button
bg="#05549e"
width="80%"
alignItems="center"
justifyContent="center"
rounded={50}
style={{ marginTop: 15 }}
onClick={submitHandler}
isLoading={picLoading}
textColor="white"
fontFamily="subhead"
_hover={{ bg: "#025fb6ff" }}
mx="auto"
display="block"
>
Sign Up
</Button>
</Box>

</Flex>

);
};

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/task_allocator/AllocatedTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const AllocatedTasks = () => {

return (
<Box p={5}>
<Text fontSize="2xl" mb={4} fontWeight="bold">
<Text fontSize="4xl" mb={4} fontWeight="500" fontFamily="head" textColor="#fff">
Tasks I've Allocated
</Text>
{tasks.length === 0 ? (
Expand Down
32 changes: 19 additions & 13 deletions frontend/src/components/task_allocator/StatusPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,32 @@ const StatusPanel = ({ title, tasks, fetchTasks, config, onTaskClick }) => {
return (
<Box
w="100%"
maxW="400px"
p={4}
borderWidth="1px"
borderRadius="md"
bg="white"
bg="#21364a"
border="none"
boxShadow="md"
>
<Text fontSize="2xl" mb={4}>
<Text fontSize="2xl" mb={4} textColor="#fff">
{title}
</Text>
<VStack spacing={4}>
{tasks.map((task) => (
<TaskCard
key={task._id}
task={task}
fetchTasks={fetchTasks}
config={config}
onClick={() => onTaskClick(task)}
/>
))}
<VStack spacing={4} align="start">
{tasks.length === 0 ? (
<Text textColor="#fff" fontSize="lg" fontFamily="content">
No tasks
</Text>
) : (
tasks.map((task) => (
<TaskCard
key={task._id}
task={task}
fetchTasks={fetchTasks}
config={config}
onClick={() => onTaskClick(task)}
/>
))
)}
</VStack>
</Box>
);
Expand Down
Loading