first commit
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
import React, { Component } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
class ActiveCourseChart extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
series: [72, 56, 50],
|
||||
options: {
|
||||
chart: {
|
||||
type: "donut",
|
||||
},
|
||||
legend: {
|
||||
offsetY: 2,
|
||||
position: "bottom",
|
||||
horizontalAlign: "center",
|
||||
},
|
||||
labels: ["Courses Done", "On Progress", "To Do"],
|
||||
colors: ["#757FEF", "#EE368C", "#00B69B"],
|
||||
tooltip: {
|
||||
y: {
|
||||
formatter: function (val) {
|
||||
return "" + val + "%";
|
||||
},
|
||||
},
|
||||
},
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 480,
|
||||
options: {
|
||||
chart: {
|
||||
width: 200,
|
||||
},
|
||||
legend: {
|
||||
position: "bottom",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series}
|
||||
height="350"
|
||||
type="donut"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ActiveCourseChart;
|
||||
@@ -0,0 +1,110 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
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 ActiveCourseChart from "./ActiveCourseChart";
|
||||
|
||||
const ActiveCourse = () => {
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
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,
|
||||
}}
|
||||
>
|
||||
Active Course
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
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' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
{/* Live Visits Chart */}
|
||||
<ActiveCourseChart />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ActiveCourse;
|
||||
@@ -0,0 +1,241 @@
|
||||
import React, { Component } from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Link from "@mui/material/Link";
|
||||
import dynamic from "next/dynamic";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
class CourseCompletionList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
series: [25],
|
||||
series2: [50],
|
||||
series3: [30],
|
||||
series4: [50],
|
||||
options: {
|
||||
chart: {
|
||||
offsetX: -8,
|
||||
},
|
||||
plotOptions: {
|
||||
radialBar: {
|
||||
hollow: {
|
||||
size: "50%",
|
||||
},
|
||||
track: {
|
||||
background: "#A9C8FB",
|
||||
},
|
||||
dataLabels: {
|
||||
name: {
|
||||
show: false,
|
||||
},
|
||||
value: {
|
||||
offsetY: 3,
|
||||
color: "#757FEF",
|
||||
fontSize: "13px",
|
||||
fontWeight: "500",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
fill: {
|
||||
colors: ["#757FEF"],
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
{/* Course completion 1 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box className="mr-1">
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Data With Python
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
5 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 2 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series2}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Code Foundation
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
15 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 3 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series3}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Styling With CSS
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
13 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 4 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series4}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Code Learn
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
15 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CourseCompletionList;
|
||||
@@ -0,0 +1,111 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
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 CourseCompletionList from "./CourseCompletionList";
|
||||
|
||||
const CourseCompletion = () => {
|
||||
// Dropdown
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
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,
|
||||
}}
|
||||
>
|
||||
Course Completion
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
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' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
{/* CourseCompletionList */}
|
||||
<CourseCompletionList />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default CourseCompletion;
|
||||
@@ -0,0 +1,380 @@
|
||||
import * as React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import { Typography } from "@mui/material";
|
||||
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 Link from "@mui/material/Link";
|
||||
|
||||
function CreatedCourse(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>
|
||||
);
|
||||
}
|
||||
|
||||
CreatedCourse.propTypes = {
|
||||
count: PropTypes.number.isRequired,
|
||||
onPageChange: PropTypes.func.isRequired,
|
||||
page: PropTypes.number.isRequired,
|
||||
rowsPerPage: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
function createData(
|
||||
courseName,
|
||||
courseLink,
|
||||
image,
|
||||
result,
|
||||
badgeClass,
|
||||
expirationTime,
|
||||
endTime
|
||||
) {
|
||||
return {
|
||||
courseName,
|
||||
courseLink,
|
||||
image,
|
||||
result,
|
||||
badgeClass,
|
||||
expirationTime,
|
||||
endTime,
|
||||
};
|
||||
}
|
||||
|
||||
const rows = [
|
||||
createData(
|
||||
"Build an iOS Application in Swift Learn the fundamentals",
|
||||
"#",
|
||||
"/images/course-brand3.png",
|
||||
"Passed",
|
||||
"successBadge",
|
||||
"2021-12-19 02:00 PM",
|
||||
"2021-12-19 04:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Node.js for Beginners: Go From Zero to Hero with Node.js",
|
||||
"#",
|
||||
"/images/course-brand1.png",
|
||||
"87%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 10:00 AM",
|
||||
"2021-12-19 12:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Learn the fundamentals of working with Angular and how to create",
|
||||
"#",
|
||||
"/images/course-brand2.png",
|
||||
"Failed",
|
||||
"dangerBadge",
|
||||
"2021-12-19 11:00 AM",
|
||||
"2021-12-19 01:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Programming Language Become a React Native Developer",
|
||||
"#",
|
||||
"/images/course-brand4.png",
|
||||
"90%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 04:00 PM",
|
||||
"2021-12-19 06:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Build an iOS Application in Swift Learn the fundamentals",
|
||||
"#",
|
||||
"/images/course-brand3.png",
|
||||
"Passed",
|
||||
"successBadge",
|
||||
"2021-12-19 02:00 PM",
|
||||
"2021-12-19 04:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Node.js for Beginners: Go From Zero to Hero with Node.js",
|
||||
"#",
|
||||
"/images/course-brand1.png",
|
||||
"87%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 10:00 AM",
|
||||
"2021-12-19 12:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Learn the fundamentals of working with Angular and how to create",
|
||||
"#",
|
||||
"/images/course-brand2.png",
|
||||
"Failed",
|
||||
"dangerBadge",
|
||||
"2021-12-19 11:00 AM",
|
||||
"2021-12-19 01:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Programming Language Become a React Native Developer",
|
||||
"#",
|
||||
"/images/course-brand4.png",
|
||||
"90%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 04:00 PM",
|
||||
"2021-12-19 06:00 PM"
|
||||
),
|
||||
].sort((a, b) => (a.courseName < b.courseName ? -1 : 1));
|
||||
|
||||
export default function CreatedCourses() {
|
||||
// Table
|
||||
const [page, setPage] = React.useState(0);
|
||||
const [rowsPerPage, setRowsPerPage] = React.useState(6);
|
||||
|
||||
// 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);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<TableContainer
|
||||
component={Paper}
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
}}
|
||||
>
|
||||
<Table
|
||||
sx={{ minWidth: 650 }}
|
||||
aria-label="custom pagination table"
|
||||
className="dark-table"
|
||||
>
|
||||
<TableHead sx={{ background: "#F7FAFF" }}>
|
||||
<TableRow>
|
||||
<TableCell
|
||||
style={{
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
>
|
||||
Courses
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="center"
|
||||
style={{
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
>
|
||||
Result
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
style={{
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
>
|
||||
Start Time
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="right"
|
||||
style={{
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
>
|
||||
End Time
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
||||
<TableBody>
|
||||
{(rowsPerPage > 0
|
||||
? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
||||
: rows
|
||||
).map((row) => (
|
||||
<TableRow key={row.courseName}>
|
||||
<TableCell
|
||||
style={{
|
||||
width: 350,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={row.image}
|
||||
alt="Product Img"
|
||||
width={65}
|
||||
className="borderRadius10"
|
||||
/>
|
||||
<Typography
|
||||
sx={{
|
||||
fontWeight: "500",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
className="ml-10px"
|
||||
>
|
||||
<Link
|
||||
href={row.courseLink}
|
||||
underline="none"
|
||||
color="#260944"
|
||||
>
|
||||
{row.courseName}
|
||||
</Link>
|
||||
</Typography>
|
||||
</Box>
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="center"
|
||||
style={{
|
||||
fontWeight: 500,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "12px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
<span className={row.badgeClass}>{row.result}</span>
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
style={{
|
||||
width: 120,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
fontSize: "13px",
|
||||
}}
|
||||
>
|
||||
{row.expirationTime}
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="right"
|
||||
style={{
|
||||
width: 120,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
fontSize: "13px",
|
||||
}}
|
||||
>
|
||||
{row.endTime}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
|
||||
{emptyRows > 0 && (
|
||||
<TableRow style={{ height: 53 * emptyRows }}>
|
||||
<TableCell
|
||||
colSpan={4}
|
||||
style={{ borderBottom: "1px solid #F7FAFF" }}
|
||||
/>
|
||||
</TableRow>
|
||||
)}
|
||||
</TableBody>
|
||||
|
||||
<TableFooter>
|
||||
<TableRow>
|
||||
<TablePagination
|
||||
rowsPerPageOptions={[5, 10, 25, { label: "All", value: -1 }]}
|
||||
colSpan={4}
|
||||
count={rows.length}
|
||||
rowsPerPage={rowsPerPage}
|
||||
page={page}
|
||||
SelectProps={{
|
||||
inputProps: {
|
||||
"aria-label": "rows per page",
|
||||
},
|
||||
native: true,
|
||||
}}
|
||||
onPageChange={handleChangePage}
|
||||
onRowsPerPageChange={handleChangeRowsPerPage}
|
||||
ActionsComponent={CreatedCourse}
|
||||
style={{ borderBottom: "none" }}
|
||||
/>
|
||||
</TableRow>
|
||||
</TableFooter>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,366 @@
|
||||
import * as React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import { Typography } from "@mui/material";
|
||||
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 Link from "@mui/material/Link";
|
||||
|
||||
function EnrolledCourse(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>
|
||||
);
|
||||
}
|
||||
|
||||
EnrolledCourse.propTypes = {
|
||||
count: PropTypes.number.isRequired,
|
||||
onPageChange: PropTypes.func.isRequired,
|
||||
page: PropTypes.number.isRequired,
|
||||
rowsPerPage: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
function createData(
|
||||
courseName,
|
||||
courseLink,
|
||||
image,
|
||||
result,
|
||||
badgeClass,
|
||||
expirationTime,
|
||||
endTime
|
||||
) {
|
||||
return {
|
||||
courseName,
|
||||
courseLink,
|
||||
image,
|
||||
result,
|
||||
badgeClass,
|
||||
expirationTime,
|
||||
endTime,
|
||||
};
|
||||
}
|
||||
|
||||
const rows = [
|
||||
createData(
|
||||
"Node.js for Beginners: Go From Zero to Hero with Node.js",
|
||||
"#",
|
||||
"/images/course-brand1.png",
|
||||
"87%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 10:00 AM",
|
||||
"2021-12-19 12:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Learn the fundamentals of working with Angular and how to create",
|
||||
"#",
|
||||
"/images/course-brand2.png",
|
||||
"Failed",
|
||||
"dangerBadge",
|
||||
"2021-12-19 11:00 AM",
|
||||
"2021-12-19 01:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Build an iOS Application in Swift Learn the fundamentals",
|
||||
"#",
|
||||
"/images/course-brand3.png",
|
||||
"Passed",
|
||||
"successBadge",
|
||||
"2021-12-19 02:00 PM",
|
||||
"2021-12-19 04:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Programming Language Become a React Native Developer",
|
||||
"#",
|
||||
"/images/course-brand4.png",
|
||||
"90%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 04:00 PM",
|
||||
"2021-12-19 06:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Node.js for Beginners Go From Zero to Hero with Node.js",
|
||||
"#",
|
||||
"/images/course-brand1.png",
|
||||
"87%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 10:00 AM",
|
||||
"2021-12-19 12:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Learn the fundamentals of working with React and how to create",
|
||||
"#",
|
||||
"/images/course-brand2.png",
|
||||
"Failed",
|
||||
"dangerBadge",
|
||||
"2021-12-19 11:00 AM",
|
||||
"2021-12-19 01:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Build an Android Application in Swift Learn the fundamentals",
|
||||
"#",
|
||||
"/images/course-brand3.png",
|
||||
"Passed",
|
||||
"successBadge",
|
||||
"2021-12-19 02:00 PM",
|
||||
"2021-12-19 04:00 PM"
|
||||
),
|
||||
createData(
|
||||
"Programming Language Become a React.js Developer",
|
||||
"#",
|
||||
"/images/course-brand4.png",
|
||||
"90%",
|
||||
"primaryBadge",
|
||||
"2021-12-19 04:00 PM",
|
||||
"2021-12-19 06:00 PM"
|
||||
),
|
||||
].sort((a, b) => (a.courseName < b.courseName ? -1 : 1));
|
||||
|
||||
export default function EnrolledCourses() {
|
||||
// Table
|
||||
const [page, setPage] = React.useState(0);
|
||||
const [rowsPerPage, setRowsPerPage] = React.useState(6);
|
||||
|
||||
// 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);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<TableContainer
|
||||
component={Paper}
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
}}
|
||||
>
|
||||
<Table
|
||||
sx={{ minWidth: 650 }}
|
||||
aria-label="custom pagination table"
|
||||
className="dark-table"
|
||||
>
|
||||
<TableHead sx={{ background: "#F7FAFF" }}>
|
||||
<TableRow>
|
||||
<TableCell
|
||||
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
|
||||
>
|
||||
Courses
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="center"
|
||||
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
|
||||
>
|
||||
Result
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
|
||||
>
|
||||
Start Time
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="right"
|
||||
sx={{ borderBottom: "1px solid #F7FAFF", fontSize: "13.5px" }}
|
||||
>
|
||||
End Time
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
||||
<TableBody>
|
||||
{(rowsPerPage > 0
|
||||
? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
||||
: rows
|
||||
).map((row) => (
|
||||
<TableRow key={row.courseName}>
|
||||
<TableCell
|
||||
style={{
|
||||
width: 350,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={row.image}
|
||||
alt="Product Img"
|
||||
width={65}
|
||||
className="borderRadius10"
|
||||
/>
|
||||
<Typography
|
||||
sx={{
|
||||
fontWeight: "500",
|
||||
fontSize: "13.5px",
|
||||
}}
|
||||
className="ml-10px"
|
||||
>
|
||||
<Link
|
||||
href={row.courseLink}
|
||||
underline="none"
|
||||
color="#260944"
|
||||
>
|
||||
{row.courseName}
|
||||
</Link>
|
||||
</Typography>
|
||||
</Box>
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="center"
|
||||
style={{
|
||||
fontWeight: 500,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "12px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
<span className={row.badgeClass}>{row.result}</span>
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
style={{
|
||||
width: 120,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
{row.expirationTime}
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
align="right"
|
||||
style={{
|
||||
width: 120,
|
||||
borderBottom: "1px solid #F7FAFF",
|
||||
fontSize: "13px",
|
||||
paddingTop: "13px",
|
||||
paddingBottom: "13px",
|
||||
}}
|
||||
>
|
||||
{row.endTime}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
|
||||
{emptyRows > 0 && (
|
||||
<TableRow style={{ height: 53 * emptyRows }}>
|
||||
<TableCell
|
||||
colSpan={4}
|
||||
style={{ borderBottom: "1px solid #F7FAFF" }}
|
||||
/>
|
||||
</TableRow>
|
||||
)}
|
||||
</TableBody>
|
||||
|
||||
<TableFooter>
|
||||
<TableRow>
|
||||
<TablePagination
|
||||
rowsPerPageOptions={[5, 10, 25, { label: "All", value: -1 }]}
|
||||
colSpan={4}
|
||||
count={rows.length}
|
||||
rowsPerPage={rowsPerPage}
|
||||
page={page}
|
||||
SelectProps={{
|
||||
inputProps: {
|
||||
"aria-label": "rows per page",
|
||||
},
|
||||
native: true,
|
||||
}}
|
||||
onPageChange={handleChangePage}
|
||||
onRowsPerPageChange={handleChangeRowsPerPage}
|
||||
ActionsComponent={EnrolledCourse}
|
||||
style={{ borderBottom: "none" }}
|
||||
/>
|
||||
</TableRow>
|
||||
</TableFooter>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
.tabs ul {
|
||||
border-bottom: 1px solid #EEF0F7;
|
||||
}
|
||||
.tabs ul li {
|
||||
color: #260944;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
background: #F5F7FA;
|
||||
padding: 8px 25px;
|
||||
border-radius: 5px 5px 0px 0px;
|
||||
outline: 0;
|
||||
}
|
||||
.tabs ul li:focus:after {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* For dark mode */
|
||||
[class="dark"] .tabs ul {
|
||||
border-bottom: 1px solid var(--borderColor);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import React from "react";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
|
||||
import EnrolledCourses from "./EnrolledCourses";
|
||||
import CreatedCourses from "./CreatedCourses";
|
||||
import styles from '@/components/Dashboard/LMSCourses/Courses/Tabs.module.css';
|
||||
|
||||
const Courses = () => {
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px 25px 15px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Tabs className={styles.tabs}>
|
||||
<TabList>
|
||||
<Tab>Enrolled</Tab>
|
||||
<Tab>Created</Tab>
|
||||
</TabList>
|
||||
|
||||
<TabPanel>
|
||||
<EnrolledCourses />
|
||||
</TabPanel>
|
||||
|
||||
<TabPanel>
|
||||
<CreatedCourses />
|
||||
</TabPanel>
|
||||
</Tabs>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Courses;
|
||||
@@ -0,0 +1,123 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
import Grid from "@mui/material/Grid";
|
||||
|
||||
const CurrentCoursesData = [
|
||||
{
|
||||
id: "1",
|
||||
title: "C++",
|
||||
subTitle: "It & Software",
|
||||
image: "/images/c+.png",
|
||||
score: "4.5 Score",
|
||||
duration: "37 Days Left",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
title: "JavaScript",
|
||||
subTitle: "Web Development",
|
||||
image: "/images/js.png",
|
||||
score: "4.5 Score",
|
||||
duration: "35 Days Left",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
title: "Haskell",
|
||||
subTitle: "Programming",
|
||||
image: "/images/haskell.png",
|
||||
score: "4.5 Score",
|
||||
duration: "30 Days Left",
|
||||
},
|
||||
];
|
||||
|
||||
const CurrentCourses = () => {
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "20px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Current Courses
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 2 }}>
|
||||
{CurrentCoursesData.map((course) => (
|
||||
<Grid item xs={12} md={12} lg={4} key={course.id}>
|
||||
<Box
|
||||
sx={{
|
||||
background: "#F7F7FC",
|
||||
borderRadius: "10px",
|
||||
padding: "25px 20px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="18px" fontWeight="700">
|
||||
{course.title}
|
||||
</Typography>
|
||||
<Typography
|
||||
textTransform="uppercase"
|
||||
color="primary"
|
||||
fontSize="12px"
|
||||
mt="5px"
|
||||
>
|
||||
{course.subTitle}
|
||||
</Typography>
|
||||
</Box>
|
||||
<img src={course.image} alt="" />
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
marginTop: "25px",
|
||||
}}
|
||||
>
|
||||
<Typography fontSize="13px" fontWeight="500">
|
||||
{course.score}
|
||||
</Typography>
|
||||
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
{course.duration}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default CurrentCourses;
|
||||
@@ -0,0 +1,161 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
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 Chart from "chart.js/auto";
|
||||
import { Bar } from "react-chartjs-2";
|
||||
|
||||
const options = {
|
||||
indexAxis: "y",
|
||||
elements: {
|
||||
bar: {
|
||||
// borderWidth: 1,
|
||||
},
|
||||
},
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: "bottom",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const labels = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
];
|
||||
|
||||
const data = {
|
||||
labels,
|
||||
datasets: [
|
||||
{
|
||||
label: "Achivement",
|
||||
data: [90, 80, 85, 70, 60, 50, 40, 60,],
|
||||
borderColor: "#F765A3",
|
||||
backgroundColor: "#FFA5CB",
|
||||
},
|
||||
{
|
||||
label: "Learning Path",
|
||||
data: [80, 70, 75, 65, 55, 45, 35, 55,],
|
||||
borderColor: "#A155B9",
|
||||
backgroundColor: "#E697FF",
|
||||
},
|
||||
{
|
||||
label: "IQ Test Score",
|
||||
data: [70, 60, 70, 60, 50, 40, 30, 50,],
|
||||
borderColor: "#757FEF",
|
||||
backgroundColor: "#2DB6F5",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const ExperienceIQ = () => {
|
||||
// Dropdown
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
mb: "10px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Experience IQ
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
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' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
<Bar options={options} data={data} height={340} />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ExperienceIQ;
|
||||
@@ -0,0 +1,91 @@
|
||||
import React from "react";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import Box from "@mui/material/Box";
|
||||
import Card from "@mui/material/Card";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
const FeaturesData = [
|
||||
{
|
||||
id: "1",
|
||||
title: "120",
|
||||
subTitle: "Enrolled Courses",
|
||||
image: "/images/icon1.png",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
title: "17",
|
||||
subTitle: "Active Courses",
|
||||
image: "/images/icon2.png",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
title: "64",
|
||||
subTitle: "Completed Courses",
|
||||
image: "/images/icon3.png",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
title: "2.1M",
|
||||
subTitle: "Total Students",
|
||||
image: "/images/icon4.png",
|
||||
},
|
||||
];
|
||||
|
||||
const Features = () => {
|
||||
return (
|
||||
<>
|
||||
<Grid
|
||||
container
|
||||
justifyContent="center"
|
||||
rowSpacing={1}
|
||||
columnSpacing={{ xs: 1, sm: 2, md: 2 }}
|
||||
>
|
||||
{FeaturesData.map((feature) => (
|
||||
<Grid item xs={12} sm={6} md={6} lg={6} xl={3} key={feature.id}>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
width: "84px",
|
||||
height: "84px",
|
||||
borderRadius: "100%",
|
||||
}}
|
||||
className="mr-15px"
|
||||
>
|
||||
<img src={feature.image} alt="Icon" />
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Typography
|
||||
variant="h1"
|
||||
sx={{ fontSize: 28, fontWeight: 700, mb: "5px" }}
|
||||
>
|
||||
{feature.title}
|
||||
</Typography>
|
||||
|
||||
<Typography variant="p" sx={{ fontSize: 14 }}>
|
||||
{feature.subTitle}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
</Card>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Features;
|
||||
@@ -0,0 +1,155 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
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 dynamic from "next/dynamic";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const HoursSpent = () => {
|
||||
// Select Form
|
||||
const [select, setSelect] = React.useState("");
|
||||
const handleChange = (event) => {
|
||||
setSelect(event.target.value);
|
||||
};
|
||||
|
||||
// Chart
|
||||
const series = [
|
||||
{
|
||||
name: "Spent",
|
||||
data: [21, 22, 10, 28, 16, 20, 25],
|
||||
},
|
||||
];
|
||||
const options = {
|
||||
chart: {
|
||||
toolbar: {
|
||||
show: false,
|
||||
},
|
||||
events: {
|
||||
click: function (chart, w, e) {
|
||||
// console.log(chart, w, e)
|
||||
},
|
||||
},
|
||||
},
|
||||
colors: ["#757FEF"],
|
||||
plotOptions: {
|
||||
bar: {
|
||||
columnWidth: "40%",
|
||||
distributed: true,
|
||||
},
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false,
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
xaxis: {
|
||||
categories: [
|
||||
["Sat"],
|
||||
["Sun"],
|
||||
["Mon"],
|
||||
["Tue"],
|
||||
["Wed"],
|
||||
["Thu"],
|
||||
["Fri"],
|
||||
],
|
||||
labels: {
|
||||
style: {
|
||||
colors: "#A9A9C8",
|
||||
fontSize: "12px",
|
||||
},
|
||||
},
|
||||
},
|
||||
yaxis: {
|
||||
labels: {
|
||||
style: {
|
||||
colors: "#A9A9C8",
|
||||
fontSize: "12px",
|
||||
},
|
||||
},
|
||||
axisBorder: {
|
||||
show: false,
|
||||
colors: "#f6f6f7",
|
||||
},
|
||||
},
|
||||
fill: {
|
||||
opacity: 1,
|
||||
},
|
||||
tooltip: {
|
||||
y: {
|
||||
formatter: function (val) {
|
||||
return "" + val + " Hours";
|
||||
},
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
show: true,
|
||||
borderColor: "#EDEFF5",
|
||||
strokeDashArray: 5,
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "10px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Hours Spent
|
||||
</Typography>
|
||||
<Box>
|
||||
<FormControl sx={{ minWidth: 120 }} size="small">
|
||||
<InputLabel id="demo-select-small" sx={{ fontSize: '14px' }}>Select</InputLabel>
|
||||
<Select
|
||||
labelId="demo-select-small"
|
||||
id="demo-select-small"
|
||||
value={select}
|
||||
label="Select"
|
||||
onChange={handleChange}
|
||||
sx={{ fontSize: '14px' }}
|
||||
>
|
||||
<MenuItem value={0} sx={{ fontSize: '14px' }}>Today</MenuItem>
|
||||
<MenuItem value={1} sx={{ fontSize: '14px' }}>This Week</MenuItem>
|
||||
<MenuItem value={2} sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem value={3} sx={{ fontSize: '14px' }}>Last 12 Months</MenuItem>
|
||||
<MenuItem value={4} sx={{ fontSize: '14px' }}>All Time</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Chart options={options} series={series} type="bar" height={250} />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default HoursSpent;
|
||||
@@ -0,0 +1,24 @@
|
||||
.messagesList {
|
||||
border-bottom: 1px solid #F7FAFF;
|
||||
border-right: 2px solid transparent;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.messagesList:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.messagesList:hover {
|
||||
background: #FAFAFA;
|
||||
border-right: 2px solid #757FEF;
|
||||
}
|
||||
|
||||
/* For dark mode */
|
||||
[class="dark"] .messagesList {
|
||||
border-bottom: 1px solid var(--borderColor);
|
||||
}
|
||||
[class="dark"] .messagesList:hover {
|
||||
background: var(--colorBlack);
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
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 Badge from '@mui/material/Badge';
|
||||
import styles from "@/components/Dashboard/LMSCourses/Messages/Messages.module.css";
|
||||
|
||||
const MessagesData = [
|
||||
{
|
||||
id: "1",
|
||||
name: "Johen Mandel",
|
||||
text: "Hi, i want make enquiries...",
|
||||
image: "/images/user15.png",
|
||||
badgeBgColor: "#5570F1",
|
||||
newTag: "New",
|
||||
number: "1",
|
||||
time: "12:55 AM"
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "Thomas Albart",
|
||||
text: "Hi, i want make enquiries...",
|
||||
image: "/images/user16.png",
|
||||
badgeBgColor: "#5570F1",
|
||||
newTag: "New",
|
||||
number: "2",
|
||||
time: "6:55 AM"
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "Maical Doe",
|
||||
text: "Hi, i want make enquiries...",
|
||||
image: "/images/user17.png",
|
||||
badgeBgColor: "#5570F1",
|
||||
newTag: "New",
|
||||
number: "3",
|
||||
time: "8:00 AM"
|
||||
},
|
||||
];
|
||||
|
||||
const Messages = () => {
|
||||
// Dropdown
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "20px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
mb: "10px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 17,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Messages
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
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' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
{MessagesData.slice(0, 3).map((message) => (
|
||||
<div className={styles.messagesList} key={message.id}>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
position: "relative"
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
src={message.image}
|
||||
alt="User"
|
||||
width="45"
|
||||
height="45"
|
||||
className="borderRadius10"
|
||||
/>
|
||||
</div>
|
||||
<Badge
|
||||
style={{ backgroundColor: `${message.badgeBgColor}` }}
|
||||
sx={{
|
||||
width: '13px',
|
||||
height: '13px',
|
||||
position: 'absolute',
|
||||
borderRadius: '100%',
|
||||
border: '2px solid #fff',
|
||||
top: '0',
|
||||
right: '-5px'
|
||||
}}
|
||||
></Badge>
|
||||
</Box>
|
||||
|
||||
<Box className="ml-1">
|
||||
<Typography as="h4" fontSize="13px" fontWeight="500" mb="5px">
|
||||
{message.name}
|
||||
</Typography>
|
||||
<Typography fontSize="12px">
|
||||
{message.text}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box textAlign="right">
|
||||
<Typography component="div">
|
||||
<Typography
|
||||
component="span"
|
||||
sx={{
|
||||
background: "#FEF5EA",
|
||||
color: "#260944",
|
||||
borderRadius: "8px",
|
||||
fontSize: "10px",
|
||||
padding: "2px 7px",
|
||||
display: "inline-block",
|
||||
}}
|
||||
className="mr-10px"
|
||||
>
|
||||
{message.newTag}
|
||||
</Typography>
|
||||
|
||||
<Typography
|
||||
component="span"
|
||||
sx={{
|
||||
background: "#FFCC91",
|
||||
color: "#260944",
|
||||
borderRadius: "8px",
|
||||
fontSize: "10px",
|
||||
width: "20px",
|
||||
height: "20px",
|
||||
display: "inline-block",
|
||||
lineHeight: "20px",
|
||||
textAlign: "center",
|
||||
borderRadius: "100px",
|
||||
}}
|
||||
>
|
||||
{message.number}
|
||||
</Typography>
|
||||
</Typography>
|
||||
|
||||
<Typography
|
||||
sx={{
|
||||
color: "#A9A9C8",
|
||||
fontSize: "11px",
|
||||
marginTop: "5px",
|
||||
}}
|
||||
>
|
||||
{message.time}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
</div>
|
||||
))}
|
||||
</Box>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Messages;
|
||||
@@ -0,0 +1,166 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
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";
|
||||
|
||||
const MyPlanningData = [
|
||||
{
|
||||
id: "1",
|
||||
image: "/images/3d1.png",
|
||||
title: "Animation Learning",
|
||||
dateTime: "Dec 14, 08:30 PM",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
image: "/images/3d2.png",
|
||||
title: "UI/UX Research",
|
||||
dateTime: "Dec 15, 09:30 PM",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
image: "/images/3d3.png",
|
||||
title: "Machine Learning",
|
||||
dateTime: "Dec 16, 10:30 PM",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
image: "/images/3d4.png",
|
||||
title: "Web Development",
|
||||
dateTime: "Dec 17, 11:30 PM",
|
||||
},
|
||||
];
|
||||
|
||||
const MyPlanning = () => {
|
||||
// Dropdown
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px 20px",
|
||||
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: 16,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
My Planning
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
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' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
{MyPlanningData.map((plan) => (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
backgroundColor: "#F7F7FC",
|
||||
borderRadius: '10px',
|
||||
p: "25px 15px",
|
||||
mt: "15px"
|
||||
}}
|
||||
key={plan.id}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<img
|
||||
src={plan.image}
|
||||
alt="Image"
|
||||
width="40px"
|
||||
height="40px"
|
||||
className="borderRadius10"
|
||||
/>
|
||||
|
||||
<Box className="ml-1">
|
||||
<Typography as="h4" fontWeight={500} fontSize="13px">
|
||||
{plan.title}
|
||||
</Typography>
|
||||
<Typography color="#A9A9C8;" fontSize="12px">
|
||||
{plan.dateTime}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
))}
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MyPlanning;
|
||||
@@ -0,0 +1,173 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
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 Grid from "@mui/material/Grid";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
const TopInstructorData = [
|
||||
{
|
||||
id: "1",
|
||||
image: "/images/user9.png",
|
||||
name: "Melanie Grutt",
|
||||
userName: "@melgrutt",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
image: "/images/user10.png",
|
||||
name: "Theron Trump",
|
||||
userName: "@therontrump",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
image: "/images/user11.png",
|
||||
name: "Johen Mark",
|
||||
userName: "@johenmark",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
image: "/images/user12.png",
|
||||
name: "Nicholas Tanner",
|
||||
userName: "@nilyeager",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
image: "/images/user13.png",
|
||||
name: "Tyler Mark",
|
||||
userName: "@tylemark",
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
image: "/images/user14.png",
|
||||
name: "Martina Albart",
|
||||
userName: "@martina",
|
||||
},
|
||||
];
|
||||
|
||||
const TopInstructor = () => {
|
||||
// Select Form
|
||||
const [select, setSelect] = React.useState("");
|
||||
const handleChange = (event) => {
|
||||
setSelect(event.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "10px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Top Instructor
|
||||
</Typography>
|
||||
<Box>
|
||||
<FormControl sx={{ minWidth: 120 }} size="small">
|
||||
<InputLabel id="demo-select-small" sx={{ fontSize: '14px' }}>Select</InputLabel>
|
||||
<Select
|
||||
labelId="demo-select-small"
|
||||
id="demo-select-small"
|
||||
value={select}
|
||||
label="Select"
|
||||
onChange={handleChange}
|
||||
sx={{ fontSize: '14px' }}
|
||||
>
|
||||
<MenuItem value={0} sx={{ fontSize: '14px' }}>Today</MenuItem>
|
||||
<MenuItem value={1} sx={{ fontSize: '14px' }}>This Week</MenuItem>
|
||||
<MenuItem value={2} sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem value={3} sx={{ fontSize: '14px' }}>Last 12 Months</MenuItem>
|
||||
<MenuItem value={4} sx={{ fontSize: '14px' }}>All Time</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 2 }}>
|
||||
{TopInstructorData.map((instructor) => (
|
||||
<Grid item xs={12} md={12} lg={6} key={instructor.id}>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
backgroundColor: "#F7F7FC",
|
||||
borderRadius: "10px",
|
||||
p: "18px 15px",
|
||||
mt: "5px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={instructor.image}
|
||||
alt="Image"
|
||||
width="45px"
|
||||
height="45px"
|
||||
className="borderRadius10"
|
||||
/>
|
||||
|
||||
<Box className="ml-1">
|
||||
<Typography as="h4" fontWeight={500} fontSize="13px">
|
||||
{instructor.name}
|
||||
</Typography>
|
||||
<Typography color="#A9A9C8;" fontSize="12px">
|
||||
{instructor.userName}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Button
|
||||
sx={{
|
||||
background: "#fff",
|
||||
color: "#A9A9C8",
|
||||
width: "30px",
|
||||
height: "30px",
|
||||
p: "0",
|
||||
minWidth: "auto",
|
||||
fontSize: "17px",
|
||||
borderRadius: "100%",
|
||||
}}
|
||||
>
|
||||
<i className="ri-add-line"></i>
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TopInstructor;
|
||||
@@ -0,0 +1,155 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
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 Grid from "@mui/material/Grid";
|
||||
|
||||
const TopStudentsData = [
|
||||
{
|
||||
id: "1",
|
||||
image: "/images/user18.png",
|
||||
name: "Melanie Grutt",
|
||||
userName: "@melgrutt",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
image: "/images/user19.png",
|
||||
name: "Theron Trump",
|
||||
userName: "@therontrump",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
image: "/images/user20.png",
|
||||
name: "Johen Mark",
|
||||
userName: "@johenmark",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
image: "/images/user21.png",
|
||||
name: "Nicholas Tanner",
|
||||
userName: "@nilyeager",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
image: "/images/user22.png",
|
||||
name: "Tyler Mark",
|
||||
userName: "@tylemark",
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
image: "/images/user23.png",
|
||||
name: "Martina Albart",
|
||||
userName: "@martina",
|
||||
},
|
||||
];
|
||||
|
||||
const TopStudents = () => {
|
||||
// Select Form
|
||||
const [select, setSelect] = React.useState("");
|
||||
const handleChange = (event) => {
|
||||
setSelect(event.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px 20px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "10px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 17,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Top Students
|
||||
</Typography>
|
||||
<Box>
|
||||
<FormControl sx={{ minWidth: 120 }} size="small">
|
||||
<InputLabel id="demo-select-small" sx={{ fontSize: '14px' }}>Select</InputLabel>
|
||||
<Select
|
||||
labelId="demo-select-small"
|
||||
id="demo-select-small"
|
||||
value={select}
|
||||
label="Select"
|
||||
onChange={handleChange}
|
||||
sx={{ fontSize: '14px' }}
|
||||
>
|
||||
<MenuItem value={0} sx={{ fontSize: '14px' }}>Today</MenuItem>
|
||||
<MenuItem value={1} sx={{ fontSize: '14px' }}>This Week</MenuItem>
|
||||
<MenuItem value={2} sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem value={3} sx={{ fontSize: '14px' }}>Last 12 Months</MenuItem>
|
||||
<MenuItem value={4} sx={{ fontSize: '14px' }}>All Time</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 2 }}>
|
||||
{TopStudentsData.map((student) => (
|
||||
<Grid item xs={12} md={6} lg={6} key={student.id}>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
backgroundColor: "#F7F7FC",
|
||||
borderRadius: "10px",
|
||||
p: "15px 12px",
|
||||
mt: "10px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={student.image}
|
||||
alt="Image"
|
||||
width="35px"
|
||||
height="35px"
|
||||
className="borRadius100"
|
||||
/>
|
||||
|
||||
<Box className="ml-1">
|
||||
<Typography as="h4" fontWeight={500} fontSize="12.5px">
|
||||
{student.name}
|
||||
</Typography>
|
||||
<Typography color="#A9A9C8;" fontSize="12px">
|
||||
{student.userName}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Grid>
|
||||
))}
|
||||
</Grid>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TopStudents;
|
||||
@@ -0,0 +1,44 @@
|
||||
.box {
|
||||
background: #757FEF;
|
||||
border-radius: 10px;
|
||||
padding: 25px 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.boxList {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
padding-left: 17px;
|
||||
border-bottom: 1px solid #878fe5;
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.boxList:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.boxList::before {
|
||||
content: '';
|
||||
background: linear-gradient(149.1deg, #99B8F3 14.61%, #177FCB 130.18%);
|
||||
box-shadow: 0px 2.98686px 13.4409px rgba(126, 172, 235, 0.25);
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 5px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
.boxList h4 {
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.boxList p {
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import React from "react";
|
||||
import styles from "@/components/Dashboard/LMSCourses/TotalWatched/TotalWatched.module.css";
|
||||
|
||||
const TotalWatched = () => {
|
||||
return (
|
||||
<>
|
||||
<div className={styles.box}>
|
||||
<div className={styles.boxList}>
|
||||
<h4>Total Watched</h4>
|
||||
<p>
|
||||
<i className="ri-bar-chart-line"></i> 66:15h
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.boxList}>
|
||||
<h4>Assignment Completed</h4>
|
||||
<p>81%</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.boxList}>
|
||||
<h4>Monthly Progress</h4>
|
||||
<p>81%</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.boxList}>
|
||||
<h4>Overall Pass Percentage</h4>
|
||||
<p>81%</p>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TotalWatched;
|
||||
@@ -0,0 +1,138 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
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 {
|
||||
LineChart,
|
||||
Line,
|
||||
XAxis,
|
||||
YAxis,
|
||||
CartesianGrid,
|
||||
Tooltip,
|
||||
Legend,
|
||||
ResponsiveContainer
|
||||
} from "recharts";
|
||||
|
||||
const data = [
|
||||
{
|
||||
name: "01 Jan",
|
||||
Practice: 15,
|
||||
Theory: 10,
|
||||
},
|
||||
{
|
||||
name: "02 Jan",
|
||||
Practice: 11,
|
||||
Theory: 16,
|
||||
},
|
||||
{
|
||||
name: "03 Jan",
|
||||
Practice: 17,
|
||||
Theory: 12,
|
||||
},
|
||||
{
|
||||
name: "04 Jan",
|
||||
Practice: 13,
|
||||
Theory: 18,
|
||||
},
|
||||
{
|
||||
name: "05 Jan",
|
||||
Practice: 19,
|
||||
Theory: 14,
|
||||
},
|
||||
{
|
||||
name: "06 Jan",
|
||||
Practice: 15,
|
||||
Theory: 20,
|
||||
},
|
||||
{
|
||||
name: "07 Jan",
|
||||
Practice: 16,
|
||||
Theory: 22,
|
||||
},
|
||||
];
|
||||
|
||||
const YourProgress = () => {
|
||||
// Select Form
|
||||
const [select, setSelect] = React.useState("");
|
||||
const handleChange = (event) => {
|
||||
setSelect(event.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "30px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Your Progress
|
||||
</Typography>
|
||||
<Box>
|
||||
<FormControl sx={{ minWidth: 120 }} size="small">
|
||||
<InputLabel id="demo-select-small" sx={{ fontSize: '14px' }}>Select</InputLabel>
|
||||
<Select
|
||||
labelId="demo-select-small"
|
||||
id="demo-select-small"
|
||||
value={select}
|
||||
label="Select"
|
||||
onChange={handleChange}
|
||||
sx={{ fontSize: '14px' }}
|
||||
>
|
||||
<MenuItem value={0} sx={{ fontSize: '14px' }}>Today</MenuItem>
|
||||
<MenuItem value={1} sx={{ fontSize: '14px' }}>This Week</MenuItem>
|
||||
<MenuItem value={2} sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem value={3} sx={{ fontSize: '14px' }}>Last 12 Months</MenuItem>
|
||||
<MenuItem value={4} sx={{ fontSize: '14px' }}>All Time</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<ResponsiveContainer width="100%" aspect={2.0/1.0}>
|
||||
<LineChart data={data}>
|
||||
<CartesianGrid strokeDasharray="3 3" stroke="#EDEFF5" />
|
||||
<XAxis dataKey="name" padding={{ left: 30, right: 30 }} stroke="#A9A9C8" fontSize={14} />
|
||||
<YAxis unit=" Hr" stroke="#A9A9C8" fontSize={14} />
|
||||
<Tooltip />
|
||||
<Legend />
|
||||
<Line
|
||||
type="monotone"
|
||||
dataKey="Theory"
|
||||
stroke="#757FEF"
|
||||
activeDot={{ r: 8 }}
|
||||
unit=" Hours"
|
||||
/>
|
||||
<Line type="monotone" dataKey="Practice" stroke="#2DB6F5" unit=" Hours" />
|
||||
</LineChart>
|
||||
</ResponsiveContainer>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default YourProgress;
|
||||
Reference in New Issue
Block a user