Skip to content

Commit

Permalink
Merge pull request #45 from yousufislam191:develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
yousufislam191 authored May 20, 2024
2 parents f7b2d42 + 2002594 commit 19b97b1
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 60 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@
- Role-based authorization
- Account activated through token email verification
- Reset password through token email verification
- Update profile
- Update user profile
- Manage users by admin
- Task management
- Task status management
- Search and filter tasks
- Delete tasks
- Update tasks
- Automatically send reminder emails to users 15 minutes before the deadline for an assigned task
- Automatically move failed task data to the failed task table from the main table in the database
<h3>Technology that have been used</h3>

[React.js](https://react.dev/learn),
Expand Down Expand Up @@ -125,9 +131,9 @@ Here are all the API endpoints for this project. And you can also [**visit**][10

<h2 align="left">Task API</h2>

- `GET /api/task` : Get all tasks. _[for admin only]_
- `GET /api/task/:id` : Get task by id.
- `GET /api/task/user-all-task/:id` : Get all task for a particular user.
- `POST /api/task` : Get all tasks. _[for admin only]_
- `GET /api/task/single-task/:id` : Get task by id.
- `POST /api/task/user-tasks` : Get all task for a particular user.
- `POST /api/task/create-task` : Create new task. _[for admin only]_
- `PUT /api/task/:id` : Update task by id. _[for admin only]_
- `PUT /api/task/status/:id` : Update task status. _[for user only]_
Expand Down Expand Up @@ -156,5 +162,5 @@ Seed API has been used for enhancing development purposes. For the production gr
[6]: https://twitter.com/yousufislam_191
[7]: https://github.com/yousufislam191
[8]: https://kaggle.com/yousufislam191
[9]: https://yousufislam191.github.io/resume/
[9]: https://yousufislam191.github.io
[10]: https://documenter.getpostman.com/view/27853638/2s9YCBsoy2
26 changes: 13 additions & 13 deletions client/src/components/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Box,
Button,
CircularProgress,
Divider,
Fade,
Modal,
TextField,
Expand Down Expand Up @@ -143,25 +144,22 @@ const Profile = ({ onUpdateProfile }) => {
<>
<ToastContainer />
<div style={{ width: "100%" }}>
<Box
sx={{
backgroundColor: "lightgray",
borderRadius: 1,
py: 2,
px: 3,
mb: 3,
}}
<Typography
component="h5"
variant="h5"
align="left"
fontWeight="bold"
sx={{ mb: 1 }}
>
<Typography component="h1" variant="h3" align="left">
Edit Profile
</Typography>
</Box>

Edit Profile
</Typography>
<Divider />
<Box
sx={{
display: "flex",
flexDirection: "column",
gap: "2rem",
mt: 3,
"@media (min-width: 600px)": {
flexDirection: "row",
},
Expand Down Expand Up @@ -190,6 +188,7 @@ const Profile = ({ onUpdateProfile }) => {
label="Name"
value={isEditable ? editedDetails.name || "" : user.name || ""}
variant="outlined"
size="small"
disabled={!isEditable}
onChange={(e) =>
setEditedDetails({ ...user, name: e.target.value })
Expand Down Expand Up @@ -262,6 +261,7 @@ const Profile = ({ onUpdateProfile }) => {
label="Email"
value={user.email}
variant="outlined"
size="small"
disabled
/>

Expand Down
18 changes: 6 additions & 12 deletions client/src/components/TaskTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ const TaskTable = ({
{/* ...Table Body */}
{data?.allTasks.length === 0 ? (
<Typography
component="h1"
variant="h3"
align="left"
sx={{ mt: 2 }}
component="h4"
variant="h4"
align="center"
sx={{ mt: 4 }}
>
No Task Available
</Typography>
Expand Down Expand Up @@ -235,15 +235,9 @@ const TaskTable = ({
</Box>
</>
)}
<h1
style={{
display: "flex",
justifyContent: "center",
marginTop: "4rem",
}}
>
<Typography component="h6" variant="h6" align="center" sx={{ mt: 4 }}>
No Task Available
</h1>
</Typography>
</>
) : (
<>
Expand Down
75 changes: 45 additions & 30 deletions client/src/components/UsersTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
useMediaQuery,
Grid,
Box,
Divider,
} from "@mui/material";
import UserTableSingleRow from "./UserTableSingleRow";
import { StyledTableCell } from "../layout/tableTheme";
Expand All @@ -32,10 +33,17 @@ const UsersTable = ({ notAvailableMessage, onUpdateUsers, loading }) => {
return isLargeScreen ? (
<>
<ToastContainer />
<Typography component="h1" variant="h3" align="left" sx={{ mb: 4 }}>
<Typography
component="h5"
variant="h5"
align="left"
fontWeight="bold"
sx={{ mb: 1 }}
>
Manage Users
</Typography>
<TableContainer component={Paper}>
<Divider />
<TableContainer sx={{ mt: 3 }} component={Paper}>
<Table sx={{ minWidth: 700 }} aria-label="customized table">
<TableHead>
<TableRow>
Expand All @@ -55,15 +63,14 @@ const UsersTable = ({ notAvailableMessage, onUpdateUsers, loading }) => {
!notAvailableMessage ? (
<TableBody>
{allUsers?.length === 0 ? (
<h1
style={{
display: "flex",
justifyContent: "center",
marginTop: "4rem",
}}
<Typography
component="h4"
variant="h4"
align="center"
sx={{ mt: 4 }}
>
No Users Available
</h1>
</Typography>
) : (
allUsers?.map((singleData) => (
<UserTableSingleRow
Expand Down Expand Up @@ -94,30 +101,38 @@ const UsersTable = ({ notAvailableMessage, onUpdateUsers, loading }) => {
) : (
<>
<ToastContainer />
<Box
sx={{
backgroundColor: "lightgray",
borderRadius: 1,
py: 2,
px: 3,
mb: 2,
}}
<Typography
component="h5"
variant="h5"
align="left"
fontWeight="bold"
sx={{ mb: 1 }}
>
<Typography component="h1" variant="h3" align="left">
Manage Users
</Typography>
</Box>
Manage Users
</Typography>
<Divider />
{loading ? (
!notAvailableMessage ? (
<Grid container spacing={2}>
{allUsers?.map((singleData) => (
<UserCardSingleContent
key={singleData.id}
singleData={singleData}
onTost={handleTost}
onUpdateUsers={onUpdateUsers}
/>
))}
<Grid container spacing={2} sx={{ mt: 2 }}>
{allUsers?.length === 0 ? (
<Typography
component="h6"
variant="h6"
align="center"
sx={{ mt: 4 }}
>
No Users Available
</Typography>
) : (
allUsers?.map((singleData) => (
<UserCardSingleContent
key={singleData.id}
singleData={singleData}
onTost={handleTost}
onUpdateUsers={onUpdateUsers}
/>
))
)}
</Grid>
) : (
<Typography component="h1" variant="h3" align="left" sx={{ mt: 2 }}>
Expand Down

0 comments on commit 19b97b1

Please sign in to comment.