Skip to content

Commit 23a1cbc

Browse files
authored
fix: add sac posts (#409)
1 parent fc1975d commit 23a1cbc

File tree

5 files changed

+159
-79
lines changed

5 files changed

+159
-79
lines changed

client/src/components/guide/Options.js

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
import React from 'react';
2+
3+
import Image from 'next/image';
24
import Link from 'next/link';
35

4-
import makeStyles from '@mui/styles/makeStyles';
5-
import { Typography, Grid, Button } from '@mui/material';
66
import DownloadIcon from '@mui/icons-material/Download';
7-
8-
// placeholder
9-
import { OPTIONS } from '../../assets/placeholder/guide';
7+
import { Button, Grid, Typography } from '@mui/material';
8+
import makeStyles from '@mui/styles/makeStyles';
109

1110
// images
1211
import icon1 from '../../assets/images/guide/optIcon1.png';
1312
import icon2 from '../../assets/images/guide/optIcon2.png';
14-
import icon3 from '../../assets/images/guide/optIcon3.png';
1513
import icon4 from '../../assets/images/guide/optIcon4.png';
16-
17-
// components
18-
import SubCategories from '../widgets/SubCategory';
19-
14+
// placeholder
15+
import { OPTIONS } from '../../assets/placeholder/guide';
2016
// theme
2117
import theme from '../../config/themes/light';
22-
import Image from 'next/image';
18+
// components
19+
import SubCategories from '../widgets/SubCategory';
2320

2421
const Options = () => {
2522
const classes = useStyles(theme);

client/src/components/widgets/PostHolder.js

+26-15
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import React from 'react';
22

3-
import { Typography, Grid } from '@mui/material';
4-
import makeStyles from '@mui/styles/makeStyles';
5-
63
import { PhoneOutlined } from '@mui/icons-material';
4+
import { Grid, Typography } from '@mui/material';
5+
import makeStyles from '@mui/styles/makeStyles';
76

8-
const PostHolders = () => {
7+
const PostHolders = ({ position, name, email, phone }) => {
98
const classes = useStyles();
109
return (
1110
<Grid
@@ -15,20 +14,24 @@ const PostHolders = () => {
1514
alignItems='flex-start'
1615
>
1716
<Typography variant='body2' className={classes.position}>
18-
Second year
17+
{position}
1918
</Typography>
20-
<Typography variant='body2' className={classes.holderDetails}>
21-
name: Anish Patro
19+
<Typography variant='body2' className={classes.name}>
20+
{name}
2221
</Typography>
2322
<Typography variant='body2' className={classes.holderDetails}>
24-
Roll: 121CE0877
23+
<strong>Email:-</strong> {email}
2524
</Typography>
26-
<div className={classes.phoneDetails}>
27-
<PhoneOutlined className={classes.phone} />
28-
<Typography className={classes.number} variant='body2'>
29-
9999999999
30-
</Typography>
31-
</div>
25+
{phone ? (
26+
<div className={classes.phoneDetails}>
27+
<PhoneOutlined className={classes.phone} />
28+
<Typography className={classes.number} variant='body2'>
29+
{phone}
30+
</Typography>
31+
</div>
32+
) : (
33+
<></>
34+
)}
3235
</Grid>
3336
);
3437
};
@@ -39,16 +42,24 @@ const useStyles = makeStyles((theme) => ({
3942
position: {
4043
color: theme.palette.secondary.neutral80,
4144
fontFamily: 'Source Sans Pro',
42-
fontSize: '16px',
45+
fontSize: '20px',
4346
marginBottom: '5px',
4447
marginTop: '5px',
48+
fontWeight: '600',
4549
},
4650
holderDetails: {
4751
fontFamily: theme.typography.fontFamily,
4852
fontSize: '20px',
4953
color: '#000',
5054
marginBottom: '5px',
5155
},
56+
name: {
57+
fontFamily: theme.typography.fontFamily,
58+
fontSize: '20px',
59+
color: '#000',
60+
marginBottom: '5px',
61+
fontWeight: '600',
62+
},
5263
phoneDetails: {
5364
display: 'flex',
5465
flexDirection: 'row',

client/src/components/widgets/SacInfoNavbar.js

+99-34
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,137 @@
11
import React, { useState } from 'react';
2+
23
import {
34
ButtonBase,
45
Container,
56
Typography,
67
useMediaQuery,
78
} from '@mui/material';
8-
import theme from '../../config/themes/light';
9-
109
import makeStyles from '@mui/styles/makeStyles';
10+
11+
import theme from '../../config/themes/light';
12+
import PostHolders from './PostHolder';
1113
import SocietyCards from './SocietyCards';
1214

1315
const STAGE = {
16+
DSW: 'Dean SW',
17+
SP: 'Sac President',
1418
SOB: 'SAC Office Bearers',
15-
DNF: 'Dean’s Nominee for Fests',
16-
DNS: 'Dean’s Nominee for societies',
17-
FC: 'Fest Convenors',
19+
};
20+
21+
const POSTS = {
22+
FMS: [
23+
{
24+
position: 'Vice President',
25+
name: 'Prof. Binod Bihari Sahu',
26+
phone: '0661-2462782',
27+
28+
},
29+
{
30+
position: 'Vice President',
31+
name: 'Dr. Balaji P.S.',
32+
phone: '0661-2462528',
33+
34+
},
35+
],
36+
LCS: [
37+
{
38+
position: 'Vice President',
39+
name: 'Dr. Akshaya Kumar Rath',
40+
phone: '0661-2462697',
41+
42+
},
43+
{
44+
position: 'Vice President',
45+
name: 'Dr. Winny Routray',
46+
phone: '',
47+
48+
},
49+
],
50+
GSS: [
51+
{
52+
position: 'Vice President',
53+
name: 'Prof. Ramesh Kumar Mohapatra',
54+
phone: '0661-2462366',
55+
56+
},
57+
{
58+
position: 'Vice President',
59+
name: 'Dr. Mayank Yadav',
60+
phone: '',
61+
62+
},
63+
],
64+
TS: [
65+
{
66+
position: 'Vice President',
67+
name: 'Dr. Kaustav Chaudhury',
68+
phone: '0661-2462535 ',
69+
70+
},
71+
{
72+
position: 'Vice President',
73+
name: 'Dr. Prasun Chongder',
74+
phone: '',
75+
76+
},
77+
],
1878
};
1979

2080
const SacInfoNavbar = () => {
21-
const [stage, setStage] = useState(STAGE.SOB);
81+
const [stage, setStage] = useState(STAGE.DSW);
2282
const classes = useStyles();
2383
const matches = useMediaQuery(theme.breakpoints.down('md'));
2484

2585
const renderTeam = () => {
2686
switch (stage) {
27-
case STAGE.SOB:
87+
case STAGE.DSW:
2888
return (
2989
<>
30-
<SocietyCards society='Film and Music Society' />
31-
<SocietyCards society='Literary and Cultural Society' />{' '}
32-
<SocietyCards society='Games and Sports Society' />
33-
<SocietyCards society='Technical Society' />{' '}
90+
<PostHolders
91+
position='Dean SW'
92+
name='Prof. Sidhartha S. Jena'
93+
94+
/>
3495
</>
3596
);
36-
case STAGE.DNF:
97+
case STAGE.SP:
3798
return (
3899
<>
39-
<SocietyCards society='Film and Music Society' />
40-
<SocietyCards society='Literary and Cultural Society' />
41-
<SocietyCards society='Games and Sports Society' />
42-
<SocietyCards society='Technical Society' />{' '}
100+
<PostHolders
101+
position='Sac President'
102+
name='Prof. Poonam Singh'
103+
104+
/>
43105
</>
44106
);
45-
case STAGE.DNS:
46-
return (
47-
<>
48-
<SocietyCards society='Film and Music Society' />
49-
<SocietyCards society='Literary and Cultural Society' />{' '}
50-
<SocietyCards society='Games and Sports Society' />
51-
<SocietyCards society='Technical Society' />{' '}
52-
</>
53-
);
54-
case STAGE.FC:
107+
case STAGE.SOB:
55108
return (
56109
<>
57-
<SocietyCards society='Film and Music Society' />
58-
<SocietyCards society='Literary and Cultural Society' />{' '}
59-
<SocietyCards society='Games and Sports Society' />
60-
<SocietyCards society='Technical Society' />{' '}
110+
<SocietyCards society='Film and Music Society' posts={POSTS.FMS} />
111+
<SocietyCards
112+
society='Literary and Cultural Society'
113+
posts={POSTS.LCS}
114+
/>{' '}
115+
<SocietyCards
116+
society='Games and Sports Society'
117+
posts={POSTS.GSS}
118+
/>
119+
<SocietyCards society='Technical Society' posts={POSTS.TS} />{' '}
61120
</>
62121
);
63122
default:
64123
return (
65124
<>
66-
<SocietyCards society='Film and Music Society' />
67-
<SocietyCards society='Literary and Cultural Society' />{' '}
68-
<SocietyCards society='Games and Sports Society' />
69-
<SocietyCards society='Technical Society' />{' '}
125+
<SocietyCards society='Film and Music Society' posts={POSTS.FMS} />
126+
<SocietyCards
127+
society='Literary and Cultural Society'
128+
posts={POSTS.LCS}
129+
/>{' '}
130+
<SocietyCards
131+
society='Games and Sports Society'
132+
posts={POSTS.GSS}
133+
/>
134+
<SocietyCards society='Technical Society' posts={POSTS.TS} />{' '}
70135
</>
71136
);
72137
}

client/src/components/widgets/SocietyCards.js

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import React, { useState } from 'react';
22

33
import clsx from 'clsx';
4+
5+
import { ExpandMore } from '@mui/icons-material';
46
import {
5-
Typography,
67
Card,
78
CardActions,
8-
IconButton,
9-
Collapse,
109
CardContent,
10+
Collapse,
11+
IconButton,
12+
Typography,
1113
} from '@mui/material';
1214
import makeStyles from '@mui/styles/makeStyles';
13-
import { ExpandMore } from '@mui/icons-material';
14-
import PostHolders from '../widgets/PostHolder';
1515

16-
const SocietyCards = ({ society }) => {
16+
import PostHolders from './PostHolder';
17+
18+
const SocietyCards = ({ society, posts }) => {
1719
const classes = useStyles();
1820
const [expanded, setExpanded] = useState(false);
1921

@@ -37,14 +39,19 @@ const SocietyCards = ({ society }) => {
3739
{society}
3840
</Typography>
3941
</CardActions>
40-
{/* <Collapse in={expanded} timeout='auto' unmountOnExit>
42+
<Collapse in={expanded} timeout='auto' unmountOnExit>
4143
<CardContent className={classes.hallDetails}>
42-
<PostHolders />
43-
<PostHolders />
44-
<PostHolders />
45-
<PostHolders />
44+
{posts?.map(({ position, name, email, phone }) => (
45+
<PostHolders
46+
key={name}
47+
position={position}
48+
name={name}
49+
email={email}
50+
phone={phone}
51+
/>
52+
))}
4653
</CardContent>
47-
</Collapse> */}
54+
</Collapse>
4855
</Card>
4956
);
5057
};

client/src/screens/Sac.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
2-
import { Container, Typography } from '@mui/material';
3-
import BackButton from '../components/shared/button/BackButton';
4-
import makeStyles from '@mui/styles/makeStyles';
52

63
import Image from 'next/dist/client/image';
74

5+
import { Container, Typography } from '@mui/material';
6+
import makeStyles from '@mui/styles/makeStyles';
7+
88
// images
99
import SACimagexs from '../assets/images/contact/sac2.png';
10-
10+
import BackButton from '../components/shared/button/BackButton';
1111
// import
1212
import ClubInfoNavbar from '../components/widgets/ClubInfoNavbar';
1313
import SacInfoNavbar from '../components/widgets/SacInfoNavbar';
@@ -49,13 +49,13 @@ const SacAndClub = () => {
4949
</div>
5050
</div>
5151
</div>
52-
{/* <div className={classes.hr}>
52+
<div className={classes.hr}>
5353
<Typography variant='h2' className={classes.title}>
5454
SAC Info
5555
</Typography>
5656
<div className={classes.underline} />
57-
</div> */}
58-
{/* <SacInfoNavbar /> */}
57+
</div>
58+
<SacInfoNavbar />
5959
<div className={classes.hr}>
6060
<Typography variant='h2' className={classes.title}>
6161
Club Info

0 commit comments

Comments
 (0)