first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-03-25 20:44:56 -04:00
commit 97cc85c49d
711 changed files with 109164 additions and 0 deletions
+245
View File
@@ -0,0 +1,245 @@
import React from "react";
import Grid from "@mui/material/Grid";
import Card from "@mui/material/Card";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Button from '@mui/material/Button';
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
const clientsLists = [
{
image: '/images/member1.png',
name: 'Alvarado Turner',
userName: '@alvaradoTurner',
email: 'alvaradoturner@gmail.com',
projectsUrl: '#',
location: 'New York, USA',
phone: '+1 123 456 789',
},
{
image: '/images/member2.png',
name: 'Evangelina Mcclain',
userName: '@evangelinaMcclain',
email: 'evangelina@gmail.com',
projectsUrl: '#',
location: 'Switzerland',
phone: '+1 123 468 789',
},
{
image: '/images/member3.png',
name: 'Candice Munoz',
userName: '@candiceMunoz',
email: 'candiceMunoz@gmail.com',
projectsUrl: '#',
location: 'Germany',
phone: '+1 123 456 842',
},
{
image: '/images/member4.png',
name: 'Bernard Langley',
userName: '@bernardLangley',
email: 'bernardLangley@gmail.com',
projectsUrl: '#',
location: 'Canada',
phone: '+1 123 256 789',
},
{
image: '/images/member5.png',
name: 'Kristie Hall',
userName: '@kristieHall',
email: 'kristieHall@gmail.com',
projectsUrl: '#',
location: 'United States',
phone: '+1 123 456 742',
},
{
image: '/images/member6.png',
name: 'Bolton Obrien',
userName: '@boltonObrien',
email: 'boltonObrien@gmail.com',
projectsUrl: '#',
location: 'Sweden',
phone: '+1 123 346 789',
},
{
image: '/images/member7.png',
name: 'Dee Alvarado',
userName: '@deeAlvarado',
email: 'deeAlvarado@gmail.com',
projectsUrl: '#',
location: 'Japan',
phone: '+1 123 456 953',
},
{
image: '/images/member8.png',
name: 'Cervantes Kramer',
userName: '@cervantesKramer',
email: 'cervantesKramer@gmail.com',
projectsUrl: '#',
location: 'Australia',
phone: '+1 123 368 789',
},
{
image: '/images/member9.png',
name: 'Dejesus Michael',
userName: '@dejesusMichael',
email: 'dejesusMichael@gmail.com',
projectsUrl: '#',
location: 'United Kingdom',
phone: '+1 123 456 742',
},
{
image: '/images/member10.png',
name: 'Alissa Nelson',
userName: '@alissaNelson',
email: 'alissaNelson@gmail.com',
projectsUrl: '#',
location: 'France',
phone: '+1 123 356 789',
},
{
image: '/images/member11.png',
name: 'English Haney',
userName: '@englishHaney',
email: 'englishHaney@gmail.com',
projectsUrl: '#',
location: 'Denmark',
phone: '+1 123 456 566',
},
{
image: '/images/member12.png',
name: 'Edwards Mckenzie',
userName: '@edwardsMckenzie',
email: 'edwardsMckenzie@gmail.com',
projectsUrl: '#',
location: 'New Zealand',
phone: '+1 123 357 789',
},
];
export default function Clients() {
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Clients</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Clients</li>
</ul>
</div>
<Grid
container
rowSpacing={1}
columnSpacing={{ xs: 1, sm: 1, md: 1, lg: 1, xl: 2 }}
>
{clientsLists.map((client) => (
<Grid item xs={12} sm={6} md={6} lg={4} xl={3} key={client.name}>
<Card
sx={{
textAlign: "center",
boxShadow: "none",
borderRadius: "10px",
p: "20px 15px",
mb: "15px",
}}
>
<img
src={client.image}
alt="Member"
width="148px"
height="148px"
className="borRadius100"
/>
<Typography
as="h4"
sx={{
fontSize: 16,
fontWeight: 500,
mt: '10px',
}}
>
{client.name}
</Typography>
<Typography
as="h4"
sx={{
fontSize: 13,
color: '#A9A9C8',
mb: 2,
}}
>
{client.userName}
</Typography>
<Box>
<Link href={`mailto:${client.email}`} className="text-decoration-none">
<Button
variant="contained"
color="primary"
sx={{
textTransform: 'capitalize',
borderRadius: '8px',
m: '0 5px',
color: "#fff !important",
}}
>
Message
</Button>
</Link>
<Link href={client.projectsUrl} className="text-decoration-none">
<Button
variant="contained"
color="secondary"
sx={{
textTransform: 'capitalize',
borderRadius: '8px',
m: '0 5px',
color: "#fff !important",
}}
>
Projects
</Button>
</Link>
</Box>
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
textAlign: 'center',
mt: '30px'
}}
>
<Box>
<Typography color="#A9A9C8" mb={1}>
Location
</Typography>
<Typography fontWeight="500" fontSize="15px">
{client.location}
</Typography>
</Box>
<Box>
<Typography color="#A9A9C8" mb={1}>
Phone
</Typography>
<Typography fontWeight="500" fontSize="15px">
{client.phone}
</Typography>
</Box>
</Box>
</Card>
</Grid>
))}
</Grid>
</>
);
}
+25
View File
@@ -0,0 +1,25 @@
import React from 'react';
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css'
import AllProjects from '@/components/Projects/AllProjects';
const Projects = () => {
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Projects</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Projects</li>
</ul>
</div>
<AllProjects />
</>
)
}
export default Projects;
+48
View File
@@ -0,0 +1,48 @@
import React from "react";
import Grid from "@mui/material/Grid";
import NewProjects from "@/components/Projects/KanbanBoard/NewProjects";
import ToDo from "@/components/Projects/KanbanBoard/ToDo";
import InReview from "@/components/Projects/KanbanBoard/InReview";
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
const KanbanBoard = () => {
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Kanban Board</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Kanban Board</li>
</ul>
</div>
<Grid
container
rowSpacing={1}
justifyContent="center"
columnSpacing={{ xs: 1, sm: 1, md: 1, lg: 1, xl: 2 }}
>
<Grid item xs={12} md={6} lg={6} xl={4}>
{/* NewProjects */}
<NewProjects />
</Grid>
<Grid item xs={12} md={6} lg={6} xl={4}>
{/* ToDo */}
<ToDo />
</Grid>
<Grid item xs={12} md={6} lg={6} xl={4}>
{/* InReview */}
<InReview />
</Grid>
</Grid>
</>
);
};
export default KanbanBoard;
+286
View File
@@ -0,0 +1,286 @@
import React from 'react';
import { Box, Typography } from "@mui/material";
import Card from "@mui/material/Card";
import Grid from "@mui/material/Grid";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
import AddIcon from "@mui/icons-material/Add";
import InputLabel from '@mui/material/InputLabel';
import MenuItem from '@mui/material/MenuItem';
import FormControl from '@mui/material/FormControl';
import Select from '@mui/material/Select';
import CategoriesSelect from '@/components/Projects/ProjectCreate/CategoriesSelect';
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
import dynamic from 'next/dynamic'
import MemberSelect from '@/components/Projects/ProjectCreate/MemberSelect';
const RichTextEditor = dynamic(() => import('@mantine/rte'), {
ssr: false,
})
const ProjectCreate = () => {
const handleSubmit = (event) => {
event.preventDefault();
const data = new FormData(event.currentTarget);
console.log({
email: data.get("email"),
password: data.get("password"),
});
};
// Select Priority
const [priority, setPriority] = React.useState('');
const handleChange = (event) => {
setPriority(event.target.value);
};
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Project Create</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Project Create</li>
</ul>
</div>
<Card
sx={{
boxShadow: "none",
borderRadius: "10px",
p: "25px 20px 15px",
mb: "15px",
}}
>
<Typography
as="h3"
sx={{
fontSize: 18,
fontWeight: 500,
mb: '15px'
}}
>
Create Project
</Typography>
<Box component="form" noValidate onSubmit={handleSubmit}>
<Grid container alignItems="center" spacing={2}>
<Grid item xs={12} md={12} lg={12}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Project Name
</Typography>
<TextField
autoComplete="project-name"
name="projectName"
required
fullWidth
id="projectName"
label="Project Name"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Start Date
</Typography>
<TextField
autoComplete="start-date"
name="startDate"
required
fullWidth
id="startDate"
type="date"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
End Date
</Typography>
<TextField
autoComplete="end-date"
name="endDate"
required
fullWidth
id="endDate"
type="date"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={12}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Project Description
</Typography>
<RichTextEditor
id="rte"
controls={[
['bold', 'italic', 'underline', 'link', 'image'],
['unorderedList', 'h1', 'h2', 'h3', 'h4'],
['sup', 'sub'],
['alignLeft', 'alignCenter', 'alignRight'],
]}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Budget
</Typography>
<TextField
autoComplete="budget"
name="budget"
required
fullWidth
id="budget"
label="Enter rate"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Priority Status
</Typography>
<FormControl fullWidth>
<InputLabel id="demo-simple-select-label">Priority</InputLabel>
<Select
labelId="demo-simple-select-label"
id="demo-simple-select"
value={priority}
label="Priority"
onChange={handleChange}
>
<MenuItem value={10}>High</MenuItem>
<MenuItem value={20}>Medium</MenuItem>
<MenuItem value={30}>Low</MenuItem>
</Select>
</FormControl>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Categories
</Typography>
{/* CategoriesSelect */}
<CategoriesSelect />
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Members
</Typography>
{/* MemberSelect */}
<MemberSelect />
</Grid>
<Grid item xs={12} textAlign="end">
<Button
type="submit"
variant="contained"
sx={{
mt: 1,
textTransform: "capitalize",
borderRadius: "8px",
fontWeight: "500",
fontSize: "13px",
padding: "12px 20px",
color: "#fff !important",
}}
>
<AddIcon
sx={{
position: "relative",
top: "-2px",
}}
className='mr-5px'
/>{" "}
Create Project
</Button>
</Grid>
</Grid>
</Box>
</Card>
</>
)
}
export default ProjectCreate;
+51
View File
@@ -0,0 +1,51 @@
import React from "react";
import Grid from "@mui/material/Grid";
import TotalUsers from "@/components/Projects/Task/TotalUsers";
import CompletedTasks from "@/components/Projects/Task/CompletedTasks";
import TasksPerformance from "@/components/Projects/Task/TasksPerformance";
import MyTasks from "@/components/Projects/Task/MyTasks";
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
const Task = () => {
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Task</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Task</li>
</ul>
</div>
<Grid
container
rowSpacing={1}
columnSpacing={{ xs: 1, sm: 1, md: 1, lg: 1, xl: 2 }}
>
<Grid item xs={12} md={12} lg={6} xl={4}>
{/* TotalUsers */}
<TotalUsers />
</Grid>
<Grid item xs={12} md={12} lg={6} xl={4}>
{/* CompletedTasks */}
<CompletedTasks />
</Grid>
<Grid item xs={12} md={12} lg={12} xl={4}>
{/* TasksPerformance */}
<TasksPerformance />
</Grid>
</Grid>
{/* MyTasks */}
<MyTasks />
</>
);
};
export default Task;
+584
View File
@@ -0,0 +1,584 @@
import React from "react";
import { Box, Typography } from "@mui/material";
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
import Card from "@mui/material/Card";
import Grid from "@mui/material/Grid";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import IconButton from "@mui/material/IconButton";
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
import Avatar from '@mui/material/Avatar';
import AvatarGroup from '@mui/material/AvatarGroup';
import Button from '@mui/material/Button';
import { styled } from "@mui/material/styles";
import LinearProgress, {
linearProgressClasses,
} from "@mui/material/LinearProgress";
const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
height: 5,
borderRadius: 5,
[`&.${linearProgressClasses.colorPrimary}`]: {
backgroundColor:
theme.palette.grey[theme.palette.mode === "light" ? 200 : 800],
},
[`& .${linearProgressClasses.bar}`]: {
borderRadius: 5,
backgroundColor: theme.palette.mode === "light" ? "#757FEF" : "#308fe8",
},
}));
const TeamMembers = [
{
id: 1,
name: "Jason Haston",
image: "/images/member1.png",
designation: "Team Leader",
teamName: "UI/UX Design Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member1.png",
},
{
id: 2,
image: "/images/member2.png",
},
{
id: 3,
image: "/images/member3.png",
},
{
id: 4,
image: "/images/member4.png",
},
{
id: 5,
image: "/images/member5.png",
},
{
id: 6,
image: "/images/member6.png",
},
],
viewDetailsLink: "#",
projectName: "UI/UX Project",
totalTask: "40/80",
taskProgress: "50",
},
{
id: 2,
name: "Willie Miller",
image: "/images/member2.png",
designation: "Team Leader",
teamName: "Frontend Developer Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member2.png",
},
{
id: 2,
image: "/images/member3.png",
},
{
id: 3,
image: "/images/member4.png",
},
{
id: 4,
image: "/images/member5.png",
},
{
id: 5,
image: "/images/member6.png",
},
],
viewDetailsLink: "#",
projectName: "Transfer Money",
totalTask: "60/100",
taskProgress: "60",
},
{
id: 3,
name: "Jordan Stevenson",
image: "/images/member3.png",
designation: "Team Leader",
teamName: "Web Design Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member3.png",
},
{
id: 2,
image: "/images/member4.png",
},
{
id: 3,
image: "/images/member5.png",
},
{
id: 4,
image: "/images/member6.png",
},
{
id: 5,
image: "/images/member7.png",
},
],
viewDetailsLink: "#",
projectName: "Payment App",
totalTask: "70/100",
taskProgress: "70",
},
{
id: 4,
name: "Stevenson",
image: "/images/member4.png",
designation: "Team Leader",
teamName: "ReactJS Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member4.png",
},
{
id: 2,
image: "/images/member5.png",
},
{
id: 3,
image: "/images/member6.png",
},
{
id: 4,
image: "/images/member7.png",
},
{
id: 5,
image: "/images/member8.png",
},
],
viewDetailsLink: "#",
projectName: "React App",
totalTask: "80/100",
taskProgress: "80",
},
{
id: 5,
name: "Marnie Flowers",
image: "/images/member5.png",
designation: "Team Leader",
teamName: "Angular JS Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member5.png",
},
{
id: 2,
image: "/images/member6.png",
},
{
id: 3,
image: "/images/member7.png",
},
{
id: 4,
image: "/images/member8.png",
},
{
id: 5,
image: "/images/member9.png",
},
],
viewDetailsLink: "#",
projectName: "Payment App",
totalTask: "90/100",
taskProgress: "90",
},
{
id: 6,
name: "Steven Hari",
image: "/images/member6.png",
designation: "Team Leader",
teamName: "Vue.js Team",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member6.png",
},
{
id: 2,
image: "/images/member7.png",
},
{
id: 3,
image: "/images/member8.png",
},
{
id: 4,
image: "/images/member9.png",
},
{
id: 5,
image: "/images/member10.png",
},
],
viewDetailsLink: "#",
projectName: "Banking app",
totalTask: "100/100",
taskProgress: "100",
},
{
id: 7,
name: "Keith",
image: "/images/member7.png",
designation: "Team Leader",
teamName: "Content Writing",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member7.png",
},
{
id: 2,
image: "/images/member8.png",
},
{
id: 3,
image: "/images/member9.png",
},
{
id: 4,
image: "/images/member10.png",
},
{
id: 5,
image: "/images/member11.png",
},
],
viewDetailsLink: "#",
projectName: "Blogging Template",
totalTask: "40/100",
taskProgress: "40",
},
{
id: 8,
name: "Marion",
image: "/images/member8.png",
designation: "Team Leader",
teamName: "E-commerce",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member9.png",
},
{
id: 2,
image: "/images/member1.png",
},
{
id: 3,
image: "/images/member2.png",
},
{
id: 4,
image: "/images/member3.png",
},
{
id: 5,
image: "/images/member4.png",
},
],
viewDetailsLink: "#",
projectName: "E-commerce Template",
totalTask: "55/100",
taskProgress: "55",
},
{
id: 9,
name: "Marshall",
image: "/images/member9.png",
designation: "Team Leader",
teamName: "App Development",
introText: "Contrary to popular belief, Lorem Ipsum is not simply",
teamMemberLists: [
{
id: 1,
image: "/images/member9.png",
},
{
id: 2,
image: "/images/member3.png",
},
{
id: 3,
image: "/images/member4.png",
},
{
id: 4,
image: "/images/member5.png",
},
{
id: 5,
image: "/images/member6.png",
},
],
viewDetailsLink: "#",
projectName: "Admin Template",
totalTask: "40/100",
taskProgress: "40",
},
]
const Team = () => {
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
const handleClick = (event) => {
setAnchorEl(event.currentTarget);
};
const handleClose = () => {
setAnchorEl(null);
};
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Team</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Team</li>
</ul>
</div>
<Grid
container
justifyContent="center"
rowSpacing={1}
columnSpacing={{ xs: 1, sm: 1, md: 1, lg: 1, xl: 2 }}
>
{TeamMembers.map((member) => (
<Grid item xs={12} md={6} lg={6} xl={4} key={member.id}>
<Card
sx={{
boxShadow: "none",
borderRadius: "10px",
p: "20px",
mb: "15px",
}}
>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
mb: "20px",
}}
>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<img
src={member.image}
alt="Member"
width="55px"
height="55px"
className="borRadius100"
/>
<Box className="ml-1">
<Typography
as="h3"
sx={{
fontSize: 14,
fontWeight: 500,
}}
>
{member.name}
</Typography>
<Typography
sx={{
fontSize: 13,
}}
>
{member.designation}
</Typography>
</Box>
</Box>
<Box>
<IconButton
onClick={handleClick}
size="small"
sx={{
background: '#fafafa'
}}
aria-controls={open ? "account-menu" : undefined}
aria-haspopup="true"
aria-expanded={open ? "true" : undefined}
>
<MoreHorizIcon />
</IconButton>
</Box>
<Menu
anchorEl={anchorEl}
id="account-menu"
open={open}
onClose={handleClose}
onClick={handleClose}
PaperProps={{
elevation: 0,
sx: {
overflow: "visible",
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
mt: 1.5,
"& .MuiAvatar-root": {
width: 32,
height: 32,
ml: -0.5,
mr: 1,
},
"&:before": {
content: '""',
display: "block",
position: "absolute",
top: 0,
right: 14,
width: 10,
height: 10,
bgcolor: "background.paper",
transform: "translateY(-50%) rotate(45deg)",
zIndex: 0,
},
},
}}
transformOrigin={{ horizontal: "right", vertical: "top" }}
anchorOrigin={{ horizontal: "right", vertical: "bottom" }}
>
<MenuItem sx={{ fontSize: '14px' }}>Open Project</MenuItem>
<MenuItem sx={{ fontSize: '14px' }}>Edit</MenuItem>
<MenuItem sx={{ fontSize: '14px' }}>Delete</MenuItem>
</Menu>
</Box>
<Box mb={2}>
<Typography
as="h3"
sx={{
fontSize: 16,
fontWeight: 500,
mb: "5px"
}}
>
{member.teamName}
</Typography>
<Typography
sx={{
fontSize: 13,
}}
>
{member.introText}
</Typography>
</Box>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
}}
mb={2}
>
<Box>
<AvatarGroup max={4}>
{member.teamMemberLists.map((team) => (
<Avatar key={team.id} src={team.image} alt="Remy Sharp" />
))}
</AvatarGroup>
</Box>
<Box>
<Link href={member.viewDetailsLink} className="text-decoration-none">
<Button
variant="contained"
color="secondary"
sx={{
borderRadius: '4px',
textTransform: "capitalize",
color: "#fff !important",
}}
>
view details
</Button>
</Link>
</Box>
</Box>
<Box>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'end'
}}
mb={1}
>
<Box>
<Typography
as="h3"
sx={{
fontSize: 14,
fontWeight: 500,
mb: "5px"
}}
>
{member.projectName}
</Typography>
<Typography
sx={{
fontSize: 13,
}}
>
{member.totalTask}
</Typography>
</Box>
<Box>
<Typography
sx={{
fontSize: 13,
}}
>
{member.taskProgress}% Completed
</Typography>
</Box>
</Box>
<BorderLinearProgress variant="determinate" value={member.taskProgress} />
</Box>
</Card>
</Grid>
))}
</Grid>
</>
);
};
export default Team;
+910
View File
@@ -0,0 +1,910 @@
import * as React from "react";
import { Box, Typography } from "@mui/material";
import Card from "@mui/material/Card";
import PropTypes from "prop-types";
import { useTheme } from "@mui/material/styles";
import Table from "@mui/material/Table";
import TableHead from "@mui/material/TableHead";
import TableBody from "@mui/material/TableBody";
import TableCell from "@mui/material/TableCell";
import TableContainer from "@mui/material/TableContainer";
import TableFooter from "@mui/material/TableFooter";
import TablePagination from "@mui/material/TablePagination";
import TableRow from "@mui/material/TableRow";
import Paper from "@mui/material/Paper";
import IconButton from "@mui/material/IconButton";
import FirstPageIcon from "@mui/icons-material/FirstPage";
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight";
import LastPageIcon from "@mui/icons-material/LastPage";
import Grid from "@mui/material/Grid";
import Tooltip from "@mui/material/Tooltip";
import DeleteIcon from "@mui/icons-material/Delete";
import DriveFileRenameOutlineIcon from "@mui/icons-material/DriveFileRenameOutline";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
import AddIcon from "@mui/icons-material/Add";
import ClearIcon from "@mui/icons-material/Clear";
import Link from 'next/link';
import styles from '@/styles/PageTitle.module.css';
import Checkbox from '@mui/material/Checkbox';
import { styled } from '@mui/material/styles';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import CloseIcon from '@mui/icons-material/Close';
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
// Create new user Modal
const BootstrapDialog = styled(Dialog)(({ theme }) => ({
'& .MuiDialogContent-root': {
padding: theme.spacing(2),
},
'& .MuiDialogActions-root': {
padding: theme.spacing(1),
},
}));
function BootstrapDialogTitle(props) {
const { children, onClose, ...other } = props;
return (
<DialogTitle sx={{ m: 0, p: 2 }} {...other}>
{children}
{onClose ? (
<IconButton
aria-label="close"
onClick={onClose}
sx={{
position: 'absolute',
right: 8,
top: 8,
color: (theme) => theme.palette.grey[500],
}}
>
<CloseIcon />
</IconButton>
) : null}
</DialogTitle>
);
}
BootstrapDialogTitle.propTypes = {
children: PropTypes.node,
onClose: PropTypes.func.isRequired,
};
// End Create new user Modal
function UsersList(props) {
const theme = useTheme();
const { count, page, rowsPerPage, onPageChange } = props;
const handleFirstPageButtonClick = (event) => {
onPageChange(event, 0);
};
const handleBackButtonClick = (event) => {
onPageChange(event, page - 1);
};
const handleNextButtonClick = (event) => {
onPageChange(event, page + 1);
};
const handleLastPageButtonClick = (event) => {
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
};
return (
<Box sx={{ flexShrink: 0, ml: 2.5 }}>
<IconButton
onClick={handleFirstPageButtonClick}
disabled={page === 0}
aria-label="first page"
>
{theme.direction === "rtl" ? <LastPageIcon /> : <FirstPageIcon />}
</IconButton>
<IconButton
onClick={handleBackButtonClick}
disabled={page === 0}
aria-label="previous page"
>
{theme.direction === "rtl" ? (
<KeyboardArrowRight />
) : (
<KeyboardArrowLeft />
)}
</IconButton>
<IconButton
onClick={handleNextButtonClick}
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
aria-label="next page"
>
{theme.direction === "rtl" ? (
<KeyboardArrowLeft />
) : (
<KeyboardArrowRight />
)}
</IconButton>
<IconButton
onClick={handleLastPageButtonClick}
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
aria-label="last page"
>
{theme.direction === "rtl" ? <FirstPageIcon /> : <LastPageIcon />}
</IconButton>
</Box>
);
}
UsersList.propTypes = {
count: PropTypes.number.isRequired,
onPageChange: PropTypes.func.isRequired,
page: PropTypes.number.isRequired,
rowsPerPage: PropTypes.number.isRequired,
};
function createData(name, userName, image, email, rolls, status, badgeClass, projects) {
return {
name,
userName,
image,
email,
rolls,
status,
badgeClass,
projects
};
}
const rows = [
createData(
"Evangelina Mcclain",
"@jstevenson5c",
"/images/user1.png",
"jordansteve@gmail.com",
"Agent",
"Active",
"successBadge",
"165"
),
createData(
"Candice Munoz",
"@candice3unoz",
"/images/user2.png",
"candicemunoz@gmail.com",
"Administrator",
"Active",
"successBadge",
"120"
),
createData(
"Mike Mcclain",
"@mike4mcclain",
"/images/user3.png",
"mikemcclain@gmail.com",
"Contributor",
"Active",
"successBadge",
"220"
),
createData(
"Bernard Langley",
"@bernardlangley",
"/images/user4.png",
"bernardlangley@gmail.com",
"Agent",
"Deactive",
"dangerBadge",
"122"
),
createData(
"Kristie Hall",
"@kristie7hall",
"/images/user5.png",
"kristiehall@gmail.com",
"Contributor",
"Active",
"successBadge",
"360"
),
createData(
"Bolton Obrien",
"@bolton4obrien",
"/images/user6.png",
"boltonobrien@gmail.com",
"Administrator",
"Active",
"successBadge",
"250"
),
createData(
"Dee Alvarado",
"@dee3alvarado",
"/images/user7.png",
"deealvarado@gmail.com",
"Agent",
"Active",
"successBadge",
"140"
),
createData(
"Cervantes Kramer",
"@cervantes4kramer",
"/images/user8.png",
"cervantes4kramer@gmail.com",
"Agent",
"Active",
"successBadge",
"345"
),
createData(
"Dejesus Michael",
"@dejesus1michael",
"/images/user9.png",
"dejesusmichael@gmail.com",
"Agent",
"Active",
"successBadge",
"323"
),
createData(
"Alissa Nelson",
"@alissa1nelson",
"/images/user10.png",
"alissa1nelson@gmail.com",
"Agent",
"Deactive",
"dangerBadge",
"451"
),
createData(
"Milton",
"@milton",
"/images/user11.png",
"milton@gmail.com",
"Agent",
"Active",
"successBadge",
"432"
),
createData(
"Claude",
"@claude",
"/images/user12.png",
"claude@gmail.com",
"Agent",
"Deactive",
"dangerBadge",
"543"
),
createData(
"Joshua",
"@joshua",
"/images/user13.png",
"joshua@gmail.com",
"Agent",
"Active",
"successBadge",
"543"
),
createData(
"Harvey",
"@harvey",
"/images/user14.png",
"harvey@gmail.com",
"Agent",
"Deactive",
"dangerBadge",
"432"
),
createData(
"Antonio",
"@antonio",
"/images/user15.png",
"antonio@gmail.com",
"Agent",
"Active",
"successBadge",
"765"
),
createData(
"Julian",
"@julian",
"/images/user16.png",
"julian@gmail.com",
"Agent",
"Active",
"successBadge",
"678"
),
createData(
"Harold",
"@harold",
"/images/user17.png",
"harold@gmail.com",
"Agent",
"Deactive",
"dangerBadge",
"165"
),
createData(
"Kingston",
"@kingston",
"/images/user18.png",
"kingston@info.com",
"Agent",
"Active",
"successBadge",
"165"
),
].sort((a, b) => (a.name < b.name ? -1 : 1));
export default function User() {
// Table
const [page, setPage] = React.useState(0);
const [rowsPerPage, setRowsPerPage] = React.useState(10);
// Avoid a layout jump when reaching the last page with empty rows.
const emptyRows =
page > 0 ? Math.max(0, (1 + page) * rowsPerPage - rows.length) : 0;
const handleChangePage = (event, newPage) => {
setPage(newPage);
};
const handleChangeRowsPerPage = (event) => {
setRowsPerPage(parseInt(event.target.value, 10));
setPage(0);
};
// Create new user modal
const [open, setOpen] = React.useState(false);
const handleClickOpen = () => {
setOpen(true);
};
const handleClose = () => {
setOpen(false);
};
const handleSubmit = (event) => {
event.preventDefault();
const data = new FormData(event.currentTarget);
console.log({
email: data.get("email"),
password: data.get("password"),
});
};
// End Add Task Modal
return (
<>
{/* Page title */}
<div className={styles.pageTitle}>
<h1>Users</h1>
<ul>
<li>
<Link href="/">Dashboard</Link>
</li>
<li>Users</li>
</ul>
</div>
<Card
sx={{
boxShadow: "none",
borderRadius: "10px",
p: "25px 20px 15px",
mb: "15px",
}}
>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
borderBottom: "1px solid #EEF0F7",
paddingBottom: "10px",
mb: "20px",
}}
className="for-dark-bottom-border"
>
<Typography
as="h3"
sx={{
fontSize: 18,
fontWeight: 500,
}}
>
Users List
</Typography>
<Button
onClick={handleClickOpen}
variant="contained"
sx={{
textTransform: "capitalize",
borderRadius: "8px",
fontWeight: "500",
fontSize: "13px",
padding: "12px 20px",
color: "#fff !important",
}}
>
<AddIcon
sx={{ position: "relative", top: "-1px" }}
className='mr-5px'
/>{" "}
Create New User
</Button>
</Box>
<TableContainer
component={Paper}
sx={{
boxShadow: "none",
}}
>
<Table
sx={{ minWidth: 900 }}
aria-label="custom pagination table"
className="dark-table"
>
<TableHead sx={{ background: "#F7FAFF" }}>
<TableRow>
<TableCell
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Name
</TableCell>
<TableCell
align="center"
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Email
</TableCell>
<TableCell
align="center"
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Rolls
</TableCell>
<TableCell
align="center"
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Status
</TableCell>
<TableCell
align="center"
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Projects
</TableCell>
<TableCell
align="right"
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
>
Action
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{(rowsPerPage > 0
? rows.slice(
page * rowsPerPage,
page * rowsPerPage + rowsPerPage
)
: rows
).map((row) => (
<TableRow key={row.name}>
<TableCell
style={{
borderBottom: "1px solid #F7FAFF",
paddingTop: "13px",
paddingBottom: "13px",
display: "flex",
alignItems: "center",
}}
>
<Checkbox {...label} size="small" />
<Box
sx={{
display: "flex",
alignItems: "center",
}}
className="ml-10px"
>
<img
src={row.image}
alt="User"
width={40}
height={40}
className="borRadius100"
/>
<Box>
<Typography
as="h4"
sx={{
fontWeight: "500",
fontSize: "13.5px",
}}
className='ml-10px'
>
{row.name}
</Typography>
<Typography
sx={{
fontSize: "12px",
color: "#A9A9C8",
}}
className='ml-10px'
>
{row.userName}
</Typography>
</Box>
</Box>
</TableCell>
<TableCell
align="center"
style={{
borderBottom: "1px solid #F7FAFF",
fontSize: "13px",
paddingTop: "13px",
paddingBottom: "13px",
}}
>
{row.email}
</TableCell>
<TableCell
align="center"
style={{
borderBottom: "1px solid #F7FAFF",
fontSize: "13px",
paddingTop: "13px",
paddingBottom: "13px",
}}
>
{row.rolls}
</TableCell>
<TableCell
align="center"
sx={{
fontWeight: 500,
borderBottom: "1px solid #F7FAFF",
fontSize: "12px",
padding: "8px 10px",
}}
>
<span className={row.badgeClass}>{row.status}</span>
</TableCell>
<TableCell
align="center"
style={{
borderBottom: "1px solid #F7FAFF",
fontSize: "13px",
paddingTop: "13px",
paddingBottom: "13px",
}}
>
{row.projects}
</TableCell>
<TableCell
align="right"
sx={{ borderBottom: "1px solid #F7FAFF" }}
>
<Box
sx={{
display: "inline-block",
}}
>
<Tooltip title="Remove" placement="top">
<IconButton
aria-label="remove"
size="small"
color="danger"
className="danger"
>
<DeleteIcon fontSize="inherit" />
</IconButton>
</Tooltip>
<Tooltip title="Rename" placement="top">
<IconButton
aria-label="rename"
size="small"
color="primary"
className="primary"
>
<DriveFileRenameOutlineIcon fontSize="inherit" />
</IconButton>
</Tooltip>
</Box>
</TableCell>
</TableRow>
))}
{emptyRows > 0 && (
<TableRow style={{ height: 53 * emptyRows }}>
<TableCell
colSpan={5}
style={{ borderBottom: "1px solid #F7FAFF" }}
/>
</TableRow>
)}
</TableBody>
<TableFooter>
<TableRow>
<TablePagination
rowsPerPageOptions={[5, 10, 25, { label: "All", value: -1 }]}
colSpan={8}
count={rows.length}
rowsPerPage={rowsPerPage}
page={page}
SelectProps={{
inputProps: {
"aria-label": "rows per page",
},
native: true,
}}
onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage}
ActionsComponent={UsersList}
style={{ borderBottom: "none" }}
/>
</TableRow>
</TableFooter>
</Table>
</TableContainer>
</Card>
{/* Create new user modal */}
<BootstrapDialog
onClose={handleClose}
aria-labelledby="customized-dialog-title"
open={open}
>
<Box>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
background: "#EDEFF5",
borderRadius: "8px",
padding: "20px 20px",
}}
className="bg-black"
>
<Typography
id="modal-modal-title"
variant="h6"
component="h2"
sx={{
fontWeight: "500",
fontSize: "18px",
}}
>
Create New User
</Typography>
<IconButton
aria-label="remove"
size="small"
onClick={handleClose}
>
<ClearIcon />
</IconButton>
</Box>
<Box component="form" noValidate onSubmit={handleSubmit}>
<Box
sx={{
background: "#fff",
padding: "20px 20px",
borderRadius: "8px",
}}
className="dark-BG-101010"
>
<Grid container alignItems="center" spacing={2}>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Image
</Typography>
<TextField
autoComplete="image"
name="image"
required
fullWidth
id="image"
type="file"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Name
</Typography>
<TextField
autoComplete="name"
name="name"
required
fullWidth
id="name"
label="Name"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
User Name
</Typography>
<TextField
autoComplete="user-name"
name="userName"
required
fullWidth
id="userName"
label="User Name"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Email
</Typography>
<TextField
autoComplete="email"
name="email"
required
fullWidth
id="email"
label="example@info.com"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Rolls
</Typography>
<TextField
autoComplete="rolls"
name="rolls"
required
fullWidth
id="rolls"
label="Rolls"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} md={12} lg={6}>
<Typography
as="h5"
sx={{
fontWeight: "500",
fontSize: "14px",
mb: "12px",
}}
>
Projects
</Typography>
<TextField
autoComplete="projects"
name="projects"
required
fullWidth
id="projects"
label="Example 5"
autoFocus
InputProps={{
style: { borderRadius: 8 },
}}
/>
</Grid>
<Grid item xs={12} textAlign="end">
<Button
type="submit"
variant="contained"
sx={{
mt: 1,
textTransform: "capitalize",
borderRadius: "8px",
fontWeight: "500",
fontSize: "13px",
padding: "12px 20px",
color: "#fff !important"
}}
>
<AddIcon
sx={{
position: "relative",
top: "-2px",
}}
className='mr-5px'
/>{" "}
Create New User
</Button>
</Grid>
</Grid>
</Box>
</Box>
</Box>
</BootstrapDialog>
</>
);
}