|
| 1 | +import React from 'react'; |
| 2 | +import { makeStyles } from '@material-ui/core/styles'; |
| 3 | + |
| 4 | +import { |
| 5 | + Typography, |
| 6 | + Box, |
| 7 | + Card, |
| 8 | + CardContent, |
| 9 | + Grid, |
| 10 | + LinearProgress |
| 11 | +} from '@material-ui/core'; |
| 12 | +import { Link } from 'react-router-dom'; |
| 13 | +import { withStyles } from '@material-ui/styles'; |
| 14 | + |
| 15 | +const useStyles = makeStyles(theme => ({ |
| 16 | + card: { |
| 17 | + height: '100%', |
| 18 | + display: 'flex', |
| 19 | + flexDirection: 'column', |
| 20 | + borderRadius: '10px', |
| 21 | + margin: '12px', |
| 22 | + boxShadow: '0px 0px 30px rgba(0, 0, 0, 0.13)' |
| 23 | + }, |
| 24 | + cardContent: { |
| 25 | + margin: '15px 5px' |
| 26 | + }, |
| 27 | + complete: { |
| 28 | + fontWeight: '600' |
| 29 | + } |
| 30 | +})); |
| 31 | + |
| 32 | +export default function EnrolledCourse({ course }) { |
| 33 | + const classes = useStyles(); |
| 34 | + return ( |
| 35 | + <Box> |
| 36 | + <Card |
| 37 | + className={classes.card} |
| 38 | + display="flex" |
| 39 | + style={{ |
| 40 | + maxWidth: '320px' |
| 41 | + }} |
| 42 | + > |
| 43 | + <CardContent className={classes.cardContent}> |
| 44 | + <Box display="flex" flexDirection="column"> |
| 45 | + <Typography |
| 46 | + align="left" |
| 47 | + variant="h5" |
| 48 | + style={{ |
| 49 | + color: '#0085FF', |
| 50 | + paddingBottom: '11px' |
| 51 | + }} |
| 52 | + > |
| 53 | + {course.difficulty} |
| 54 | + </Typography> |
| 55 | + <Typography |
| 56 | + align="left" |
| 57 | + variant="h6" |
| 58 | + style={{ |
| 59 | + color: '#B20000', |
| 60 | + marginBottom: '12px' |
| 61 | + }} |
| 62 | + > |
| 63 | + {course.domain} |
| 64 | + </Typography> |
| 65 | + |
| 66 | + <Typography variant="h4" align="left"> |
| 67 | + {course.title} |
| 68 | + </Typography> |
| 69 | + </Box> |
| 70 | + </CardContent> |
| 71 | + |
| 72 | + <Box> |
| 73 | + <Grid container md={12} justify="space-around" alignItems="center"> |
| 74 | + <Grid item md={4}> |
| 75 | + <Typography |
| 76 | + fontWeight="" |
| 77 | + noWrap |
| 78 | + variant="caption" |
| 79 | + style={{ fontWeight: 'bold' }} |
| 80 | + > |
| 81 | + Application Date |
| 82 | + </Typography> |
| 83 | + </Grid> |
| 84 | + <Grid item md={2}> |
| 85 | + <Typography noWrap variant="caption"> |
| 86 | + 12:00 PM |
| 87 | + </Typography> |
| 88 | + </Grid> |
| 89 | + <Grid item md={4}> |
| 90 | + <Typography noWrap variant="caption"> |
| 91 | + 19th sept 2020 |
| 92 | + </Typography> |
| 93 | + </Grid> |
| 94 | + </Grid> |
| 95 | + |
| 96 | + <Grid |
| 97 | + container |
| 98 | + md={12} |
| 99 | + justify="space-around" |
| 100 | + alignItems="center" |
| 101 | + style={{ padding: '10px' }} |
| 102 | + > |
| 103 | + <Grid container md={3} sm={3} xs={3} row> |
| 104 | + <ActiveLinearProgress |
| 105 | + variant="determinate" |
| 106 | + value="99" |
| 107 | + ></ActiveLinearProgress> |
| 108 | + <Typography className={classes.complete} variant="caption"> |
| 109 | + {'Application Filled'} |
| 110 | + </Typography> |
| 111 | + </Grid> |
| 112 | + <Grid container md={3} sm={3} xs={3} row> |
| 113 | + <ActiveLinearProgress |
| 114 | + variant="determinate" |
| 115 | + value="99" |
| 116 | + ></ActiveLinearProgress> |
| 117 | + <Typography className={classes.complete} variant="caption"> |
| 118 | + {'Got Shortlisted'} |
| 119 | + </Typography> |
| 120 | + </Grid> |
| 121 | + <Grid container md={3} sm={3} xs={3} row> |
| 122 | + <ActiveLinearProgress |
| 123 | + variant="determinate" |
| 124 | + value="99" |
| 125 | + ></ActiveLinearProgress> |
| 126 | + <Typography className={classes.complete} variant="caption"> |
| 127 | + {'Online Meeting'} |
| 128 | + </Typography> |
| 129 | + </Grid> |
| 130 | + <Grid container md={3} sm={3} xs={3} row> |
| 131 | + <ActiveLinearProgress |
| 132 | + variant="determinate" |
| 133 | + value="99" |
| 134 | + ></ActiveLinearProgress> |
| 135 | + <Typography className={classes.complete} variant="caption"> |
| 136 | + {'Enroll In course'} |
| 137 | + </Typography> |
| 138 | + </Grid> |
| 139 | + </Grid> |
| 140 | + </Box> |
| 141 | + <CardContent style={{ textAlign: 'center' }}> |
| 142 | + <img |
| 143 | + src="/static/images/courses/courseComplete.png" |
| 144 | + alt="success flag" |
| 145 | + /> |
| 146 | + </CardContent> |
| 147 | + |
| 148 | + <CardContent className={classes.cardContent}> |
| 149 | + <Typography |
| 150 | + variant="caption" |
| 151 | + align="center" |
| 152 | + display="block" |
| 153 | + style={{ fontWeight: 600, fontSize: '12px' }} |
| 154 | + > |
| 155 | + Congrats!! You Can Enroll Now |
| 156 | + </Typography> |
| 157 | + <Typography |
| 158 | + variant="caption" |
| 159 | + align="center" |
| 160 | + display="block" |
| 161 | + style={{ fontWeight: 500, fontSize: '10px', color: '#4CAC00' }} |
| 162 | + > |
| 163 | + You have successfully completed the application process. You can now |
| 164 | + enroll into the course through the enroll now button given below. |
| 165 | + </Typography> |
| 166 | + </CardContent> |
| 167 | + |
| 168 | + <Link |
| 169 | + display="flex" |
| 170 | + justifyContent="center" |
| 171 | + to={course.link} |
| 172 | + style={{ |
| 173 | + background: '#A60000', |
| 174 | + color: '#FF4C00', |
| 175 | + textDecoration: 'none', |
| 176 | + marginBottom: '16px' |
| 177 | + }} |
| 178 | + > |
| 179 | + <Typography |
| 180 | + align="center" |
| 181 | + style={{ |
| 182 | + color: '#FFFFFF' |
| 183 | + }} |
| 184 | + > |
| 185 | + <Box m={1} fontWeight={600}> |
| 186 | + Enroll Now |
| 187 | + </Box> |
| 188 | + </Typography> |
| 189 | + </Link> |
| 190 | + <Typography |
| 191 | + style={{ |
| 192 | + fontSize: '0.56rem', |
| 193 | + padding: '0px 12px 10px', |
| 194 | + color: '#787878' |
| 195 | + }} |
| 196 | + variant="caption" |
| 197 | + > |
| 198 | + You will be able to enroll into the course as soon as you successfully |
| 199 | + completed your online meeting. |
| 200 | + </Typography> |
| 201 | + </Card> |
| 202 | + </Box> |
| 203 | + ); |
| 204 | +} |
| 205 | + |
| 206 | +const ActiveLinearProgress = withStyles(theme => ({ |
| 207 | + root: { |
| 208 | + width: '100%', |
| 209 | + marginTop: '10px', |
| 210 | + marginBottom: '10px' |
| 211 | + }, |
| 212 | + colorPrimary: { |
| 213 | + backgroundColor: '#FFF' |
| 214 | + }, |
| 215 | + bar: { |
| 216 | + borderRadius: 5, |
| 217 | + backgroundColor: '#4CAC00' |
| 218 | + } |
| 219 | +}))(LinearProgress); |
0 commit comments