Skip to content

Commit

Permalink
Added Mentor Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Kritika-Singhal committed Oct 13, 2020
1 parent 882e271 commit e850dc4
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SignUp from "./Components/Authentication/Signup";
import ProjectDetails from "./Components/Organization/OrganizationDetail/ProjectDetails/ProjectDetailsContainer";
import SelectedProposals from "./Components/Dashboard/Proposals/SelectedProposals";
import YourProposals from "./Components/Dashboard/Proposals/YourProposals";
import Dashboard from "./Users/Mentor/Components/Dashboard/Dashboard";

class App extends Component {
render() {
Expand Down Expand Up @@ -37,6 +38,7 @@ class App extends Component {
component={SelectedProposals}
/>
<Route exact path="/YourProposals" component={YourProposals} />
<Route exact path="/MentorDashboard" component={Dashboard} />
</Switch>
</div>
</BrowserRouter>
Expand Down
7 changes: 7 additions & 0 deletions client/src/Data/Profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
"email": "siddharth.simharaju@gmail.com"
}

],
"mentors": [
{
"id": 1,
"name": "Sidddharth S",
"email": "siddharth.simharaju@gmail.com"
}
]
}
65 changes: 65 additions & 0 deletions client/src/Users/Mentor/Components/Dashboard/DasboardStyling.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { makeStyles } from "@material-ui/core/styles";

const useStyles = makeStyles(theme => ({
container: {
display: "flex",
padding: "0px 30px 30px 30px",
},
dashboard: {
display: "flex",
},
dashpro: {
marginTop: 70,
marginLeft: 200,
fontSize: "24px",
},
dashprop: {
marginTop: 70,
marginLeft: 430,
fontSize: "24px",
},
profile: {
minWidth: 350,
marginTop: 0,
height: 400,
marginLeft: 170,
},
name: {
marginTop: 35,
marginBottom: 20,
},
email: {
marginBottom: 40,
},
editbutton: {
marginLeft: 240,
},
proposal: {
width: 650,
marginTop: 0,
height: 400,
marginLeft: 150,
marginRight: 40,
},
message: {
marginTop: 140,
},
buttonspacing: {
marginLeft: 195,
},
profileimage: {
display: "flex",
"& > *": {
marginLeft: 98,
marginTop: 5,
background: "#4054B2",
},
},

large: {
width: theme.spacing(15),
height: theme.spacing(15),
},
}));

export default useStyles;
27 changes: 27 additions & 0 deletions client/src/Users/Mentor/Components/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import Header from "../../../../Components/Layout/Header";
import DashboardProfile from "./DashboardProfile.js";
import DashboardProposal from "./DashboardProposal.js";
import useStyles from "./DasboardStyling";

export default function Dashboard() {
const classes = useStyles();
return (
<div>
<Header name="Dashboard" />
<div className={classes.dashboard}>
<div className={classes.dashpro}>
<p>Profile</p>
</div>
<div className={classes.dashprop}>
<p>Project Mentoring</p>
</div>
</div>

<div className={classes.container}>
<DashboardProfile />
<DashboardProposal />
</div>
</div>
);
}
49 changes: 49 additions & 0 deletions client/src/Users/Mentor/Components/Dashboard/DashboardProfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from "react";
import Card from "@material-ui/core/Card";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import ProfileImage from "./ProfileImage";
import { mentors } from "../../../../Data/Profile.json";
import useStyles from "./DasboardStyling";

export default function MediaCard() {
const classes = useStyles();

return (
<>
{mentors.map((mt) => (
<Card className={classes.profile}>
<Card elevation={3} />
<CardActions>
<Button size="small" color="primary" className={classes.editbutton}>
Edit
</Button>
</CardActions>

<CardContent>
<ProfileImage />

<Typography
className={classes.name}
variant="h5"
component="h2"
align="center"
>
{mt.name}
</Typography>
<Typography
className={classes.email}
variant="body1"
component="p"
align="center"
>
{mt.email}
</Typography>
</CardContent>
</Card>
))}
</>
);
}
38 changes: 38 additions & 0 deletions client/src/Users/Mentor/Components/Dashboard/DashboardProposal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from "react";
import Card from "@material-ui/core/Card";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import useStyles from "./DasboardStyling";

export default function MediaCard() {
const classes = useStyles();

return (
<Card className={classes.proposal}>
<Card />
<CardContent>
<Typography
className={classes.message}
variant="body1"
component="p"
align="center"
>
You are not mentoring any project yet. The admin will alot you a project.
</Typography>

<CardActions>
<Button
size="small"
variant="contained"
color="primary"
className={classes.buttonspacing}
>
View Organizations
</Button>
</CardActions>
</CardContent>
</Card>
);
}
17 changes: 17 additions & 0 deletions client/src/Users/Mentor/Components/Dashboard/ProfileImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import Avatar from "@material-ui/core/Avatar";
import useStyles from "./DasboardStyling";

export default function ImageAvatars() {
const classes = useStyles();

return (
<div className={classes.profileimage}>
<Avatar
alt="Siddharth S"
src="/static/images/avatar/1.jpg"
className={classes.large}
/>
</div>
);
}
23 changes: 23 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@3.10.10
3 info using node@v12.16.3
4 verbose stack Error: ENOENT: no such file or directory, open 'D:\Design-Initiative-Dashboard-frontend\package.json'
5 verbose cwd D:\Design-Initiative-Dashboard-frontend
6 error Windows_NT 6.1.7601
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
8 error node v12.16.3
9 error npm v3.10.10
10 error path D:\Design-Initiative-Dashboard-frontend\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'D:\Design-Initiative-Dashboard-frontend\package.json'
15 error enoent ENOENT: no such file or directory, open 'D:\Design-Initiative-Dashboard-frontend\package.json'
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]

0 comments on commit e850dc4

Please sign in to comment.